public LoadNetworkURLTaskFactoryImpl( CyNetworkReaderManager mgr, CyNetworkManager netmgr, final CyNetworkViewManager networkViewManager, CyProperty<Properties> cyProps, CyNetworkNaming cyNetworkNaming, StreamUtil streamUtil, final SynchronousTaskManager<?> syncTaskManager, TunableSetter tunableSetter, final VisualMappingManager vmm) { this.mgr = mgr; this.netmgr = netmgr; this.networkViewManager = networkViewManager; this.props = cyProps.getProperties(); this.cyNetworkNaming = cyNetworkNaming; this.streamUtil = streamUtil; this.tunableSetter = tunableSetter; this.syncTaskManager = syncTaskManager; this.vmm = vmm; }
public BiogridDataLoader( final CyProperty<?> props, final URL dataSource, final File settingFileLocation) { // First priority: optional URL props. final Properties propObject = (Properties) props.getProperties(); final String locationString = propObject.getProperty(FILE_LOCATION); if (locationString != null && dataSource == null) { try { source = new URL(locationString); } catch (MalformedURLException e) { source = null; } } else if (dataSource == null) { source = this.getClass().getClassLoader().getResource(DEF_RESOURCE); } else { this.source = dataSource; } this.sources = new HashSet<DataSource>(); localFile = new File(settingFileLocation, LOCAL); if (localFile.exists() == false) localFile.mkdir(); }