use of org.cytoscape.io.internal.read.xgmml.SessionXGMMLFileFilter in project cytoscape-impl by cytoscape.
the class CyActivator method start.
@Override
public void start(BundleContext bc) {
final CyServiceRegistrar serviceRegistrar = getService(bc, CyServiceRegistrar.class);
StreamUtilImpl streamUtil = new StreamUtilImpl(serviceRegistrar);
BasicCyFileFilter expressionFilter = new BasicCyFileFilter(new String[] { "pvals" }, new String[] { "text/plain" }, "Cytoscape Expression Matrix", DataCategory.TABLE, streamUtil);
// Always register CYS filters from higher to lower version!
BasicCyFileFilter cys3Filter = new SessionFileFilter(new String[] { "cys" }, new String[] { "application/zip" }, "Cytoscape 3 Session", DataCategory.SESSION, "3.0.0", streamUtil);
BasicCyFileFilter cys2Filter = new SessionFileFilter(new String[] { "cys" }, new String[] { "application/zip" }, "Cytoscape 2 Session", DataCategory.SESSION, "2.0.0", streamUtil);
BasicCyFileFilter pngFilter = new BasicCyFileFilter(new String[] { "png" }, new String[] { "image/png" }, "PNG", DataCategory.IMAGE, streamUtil);
BasicCyFileFilter jpegFilter = new BasicCyFileFilter(new String[] { "jpg", "jpeg" }, new String[] { "image/jpeg" }, "JPEG", DataCategory.IMAGE, streamUtil);
BasicCyFileFilter pdfFilter = new BasicCyFileFilter(new String[] { "pdf" }, new String[] { "image/pdf" }, "PDF", DataCategory.IMAGE, streamUtil);
BasicCyFileFilter psFilter = new BasicCyFileFilter(new String[] { "ps" }, new String[] { "image/ps" }, "PostScript", DataCategory.IMAGE, streamUtil);
BasicCyFileFilter svgFilter = new BasicCyFileFilter(new String[] { "svg" }, new String[] { "image/svg" }, "SVG", DataCategory.IMAGE, streamUtil);
BasicCyFileFilter attrsFilter = new BasicCyFileFilter(new String[] { "attrs" }, new String[] { "text/plain" }, "Text", DataCategory.TABLE, streamUtil);
BasicCyFileFilter sifFilter = new BasicCyFileFilter(new String[] { "sif" }, new String[] { "text/sif" }, "SIF", DataCategory.NETWORK, streamUtil);
BasicCyFileFilter nnfFilter = new BasicCyFileFilter(new String[] { "nnf" }, new String[] { "text/nnf" }, "NNF", DataCategory.NETWORK, streamUtil);
BasicCyFileFilter csvFilter = new BasicCyFileFilter(new String[] { "csv" }, new String[] { "text/plain" }, "CSV", DataCategory.TABLE, streamUtil);
BasicCyFileFilter sessionTableFilter = new BasicCyFileFilter(new String[] { "cytable" }, new String[] { "text/plain" }, "Session Table", DataCategory.TABLE, streamUtil);
GenericXGMMLFileFilter xgmmlFilter = new GenericXGMMLFileFilter(new String[] { "xgmml", "xml" }, new String[] { "text/xgmml", "text/xgmml+xml" }, "XGMML", DataCategory.NETWORK, streamUtil);
SessionXGMMLFileFilter sessXgmmlFileFilter = new SessionXGMMLFileFilter(new String[] { "xgmml" }, new String[] { "text/xgmml", "text/xgmml+xml" }, "Cy3 Session XGMML", DataCategory.NETWORK, streamUtil);
SessionXGMMLNetworkFileFilter sessXgmmlNetFileFilter = new SessionXGMMLNetworkFileFilter(new String[] { "xgmml" }, new String[] { "text/xgmml", "text/xgmml+xml" }, "CYS Network XGMML", DataCategory.NETWORK, streamUtil);
SessionXGMMLNetworkViewFileFilter sessXgmmlViewFileFilter = new SessionXGMMLNetworkViewFileFilter(new String[] { "xgmml" }, new String[] { "text/xgmml", "text/xgmml+xml" }, "CYS View XGMML", DataCategory.NETWORK, streamUtil);
GMLFileFilter gmlFilter = new GMLFileFilter(new String[] { "gml" }, new String[] { "text/gml" }, "GML", DataCategory.NETWORK, streamUtil);
CysessionFileFilter cysessionFilter = new CysessionFileFilter(new String[] { "xml" }, new String[] {}, "Cysession XML", DataCategory.PROPERTIES, streamUtil);
BookmarkFileFilter bookmarksFilter = new BookmarkFileFilter(new String[] { "xml" }, new String[] {}, "Bookmark XML", DataCategory.PROPERTIES, streamUtil);
PropertiesFileFilter propertiesFilter = new PropertiesFileFilter(new String[] { "props", "properties" }, new String[] {}, "Java Properties", DataCategory.PROPERTIES, streamUtil);
VizmapXMLFileFilter vizmapXMLFilter = new VizmapXMLFileFilter(new String[] { "xml" }, new String[] {}, "Style XML", DataCategory.VIZMAP, streamUtil);
VizmapPropertiesFileFilter vizmapPropertiesFilter = new VizmapPropertiesFileFilter(new String[] { "props", "properties" }, new String[] {}, "Vizmap Java Properties", DataCategory.VIZMAP, streamUtil);
CyNetworkReaderManagerImpl networkReaderManager = new CyNetworkReaderManagerImpl(streamUtil);
CyTableReaderManagerImpl tableReaderManager = new CyTableReaderManagerImpl(streamUtil);
CySessionReaderManagerImpl sessionReaderManager = new CySessionReaderManagerImpl(streamUtil);
VizmapReaderManagerImpl vizmapReaderManager = new VizmapReaderManagerImpl(streamUtil);
CyPropertyReaderManagerImpl propertyReaderManager = new CyPropertyReaderManagerImpl(streamUtil);
PresentationWriterManagerImpl viewWriterManager = new PresentationWriterManagerImpl();
CyNetworkViewWriterManagerImpl networkViewWriterManager = new CyNetworkViewWriterManagerImpl();
SessionWriterManagerImpl sessionWriterManager = new SessionWriterManagerImpl();
PropertyWriterManagerImpl propertyWriterManager = new PropertyWriterManagerImpl();
CyTableWriterManagerImpl tableWriterManager = new CyTableWriterManagerImpl();
VizmapWriterManagerImpl vizmapWriterManager = new VizmapWriterManagerImpl();
CalculatorConverterFactory calculatorConverterFactory = new CalculatorConverterFactory();
ExpressionReaderFactory expressionReaderFactory = new ExpressionReaderFactory(expressionFilter, serviceRegistrar);
CyAttributesReaderFactory attrsDataReaderFactory = new CyAttributesReaderFactory(attrsFilter, serviceRegistrar);
SIFNetworkReaderFactory sifNetworkViewReaderFactory = new SIFNetworkReaderFactory(sifFilter, serviceRegistrar);
NNFNetworkReaderFactory nnfNetworkViewReaderFactory = new NNFNetworkReaderFactory(nnfFilter, serviceRegistrar);
UnrecognizedVisualPropertyManager unrecognizedVisualPropertyManager = new UnrecognizedVisualPropertyManager(serviceRegistrar);
GMLNetworkReaderFactory gmlNetworkViewReaderFactory = new GMLNetworkReaderFactory(gmlFilter, unrecognizedVisualPropertyManager, serviceRegistrar);
ReadCache readCache = new ReadCache(serviceRegistrar);
GroupUtil groupUtil = new GroupUtil(serviceRegistrar);
SUIDUpdater suidUpdater = new SUIDUpdater();
ReadDataManager readDataManager = new ReadDataManager(readCache, suidUpdater, groupUtil, serviceRegistrar);
HandlerFactory handlerFactory = new HandlerFactory(readDataManager);
XGMMLParser xgmmlParser = new XGMMLParser(handlerFactory, readDataManager);
GenericXGMMLReaderFactory xgmmlReaderFactory = new GenericXGMMLReaderFactory(xgmmlFilter, readDataManager, xgmmlParser, unrecognizedVisualPropertyManager, serviceRegistrar);
SessionXGMMLNetworkReaderFactory sessXgmmlNetReaderFactory = new SessionXGMMLNetworkReaderFactory(sessXgmmlNetFileFilter, readDataManager, xgmmlParser, unrecognizedVisualPropertyManager, serviceRegistrar);
SessionXGMMLNetworkViewReaderFactory sessXgmmlViewReaderFactory = new SessionXGMMLNetworkViewReaderFactory(sessXgmmlViewFileFilter, readDataManager, xgmmlParser, unrecognizedVisualPropertyManager, serviceRegistrar);
CSVCyReaderFactory sessionTableReaderFactory = new CSVCyReaderFactory(sessionTableFilter, true, true, serviceRegistrar);
Cy3SessionReaderFactoryImpl cy3SessionReaderFactory = new Cy3SessionReaderFactoryImpl(cys3Filter, readCache, groupUtil, suidUpdater, networkReaderManager, propertyReaderManager, vizmapReaderManager, sessionTableReaderFactory, serviceRegistrar);
Cy2SessionReaderFactoryImpl cy2SessionReaderFactory = new Cy2SessionReaderFactoryImpl(cys2Filter, readCache, groupUtil, networkReaderManager, propertyReaderManager, vizmapReaderManager, serviceRegistrar);
CysessionReaderFactory cysessionReaderFactory = new CysessionReaderFactory(cysessionFilter);
BookmarkReaderFactory bookmarkReaderFactory = new BookmarkReaderFactory(bookmarksFilter);
PropertiesReaderFactory propertiesReaderFactory = new PropertiesReaderFactory(propertiesFilter);
VisualStyleSerializer visualStyleSerializer = new VisualStyleSerializer(calculatorConverterFactory, serviceRegistrar);
VizmapXMLReaderFactory vizmapXMLReaderFactory = new VizmapXMLReaderFactory(vizmapXMLFilter, visualStyleSerializer);
VizmapPropertiesReaderFactory vizmapPropertiesReaderFactory = new VizmapPropertiesReaderFactory(vizmapPropertiesFilter, visualStyleSerializer);
BitmapWriterFactory pngWriterFactory = new BitmapWriterFactory(pngFilter);
BitmapWriterFactory jpegWriterFactory = new BitmapWriterFactory(jpegFilter);
PDFWriterFactory pdfWriterFactory = new PDFWriterFactory(pdfFilter);
PSWriterFactory psWriterFactory = new PSWriterFactory(psFilter);
SVGWriterFactory svgWriterFactory = new SVGWriterFactory(svgFilter);
SifNetworkWriterFactory sifNetworkViewWriterFactory = new SifNetworkWriterFactory(sifFilter);
NnfNetworkWriterFactory nnfNetworkViewWriterFactory = new NnfNetworkWriterFactory(nnfFilter, serviceRegistrar);
GenericXGMMLWriterFactory xgmmlWriterFactory = new GenericXGMMLWriterFactory(xgmmlFilter, unrecognizedVisualPropertyManager, groupUtil, serviceRegistrar);
SessionXGMMLWriterFactory sessionXgmmlWriterFactory = new SessionXGMMLWriterFactory(sessXgmmlFileFilter, unrecognizedVisualPropertyManager, serviceRegistrar);
CysessionWriterFactoryImpl cysessionWriterFactory = new CysessionWriterFactoryImpl(cysessionFilter);
BookmarksWriterFactoryImpl bookmarksWriterFactory = new BookmarksWriterFactoryImpl(bookmarksFilter);
PropertiesWriterFactoryImpl propertiesWriterFactory = new PropertiesWriterFactoryImpl(propertiesFilter);
CSVTableWriterFactory csvTableWriterFactory = new CSVTableWriterFactory(csvFilter, false, false, true);
CSVTableWriterFactory sessionTableWriterFactory = new CSVTableWriterFactory(sessionTableFilter, true, true, false);
VizmapWriterFactoryImpl vizmapWriterFactory = new VizmapWriterFactoryImpl(vizmapXMLFilter, visualStyleSerializer);
SessionWriterFactoryImpl sessionWriterFactory = new SessionWriterFactoryImpl(cys3Filter, bookmarksFilter, propertiesFilter, sessionTableFilter, vizmapXMLFilter, sessionXgmmlWriterFactory, propertyWriterManager, tableWriterManager, vizmapWriterManager, groupUtil, serviceRegistrar);
RecentlyOpenedTrackerImpl recentlyOpenedTracker = new RecentlyOpenedTrackerImpl(serviceRegistrar);
CyTransformerReaderImpl transformerReader = new CyTransformerReaderImpl();
CyTransformerWriterImpl transformerWriter = new CyTransformerWriterImpl();
registerService(bc, transformerReader, CyTransformerReader.class);
registerService(bc, transformerWriter, CyTransformerWriter.class);
registerServiceListener(bc, transformerReader::registerTransformerManager, transformerReader::unregisterTransformerManager, TransformerManager.class);
registerService(bc, networkReaderManager, CyNetworkReaderManager.class);
registerService(bc, tableReaderManager, CyTableReaderManager.class);
registerService(bc, vizmapReaderManager, VizmapReaderManager.class);
registerService(bc, viewWriterManager, PresentationWriterManager.class);
registerService(bc, sessionReaderManager, CySessionReaderManager.class);
registerService(bc, propertyReaderManager, CyPropertyReaderManager.class);
registerService(bc, networkViewWriterManager, CyNetworkViewWriterManager.class);
registerService(bc, sessionWriterManager, CySessionWriterManager.class);
registerService(bc, propertyWriterManager, CyPropertyWriterManager.class);
registerService(bc, tableWriterManager, CyTableWriterManager.class);
registerService(bc, vizmapWriterManager, VizmapWriterManager.class);
registerService(bc, sifNetworkViewReaderFactory, InputStreamTaskFactory.class);
registerService(bc, nnfNetworkViewReaderFactory, InputStreamTaskFactory.class);
registerService(bc, xgmmlReaderFactory, InputStreamTaskFactory.class);
registerService(bc, sessXgmmlNetReaderFactory, InputStreamTaskFactory.class);
registerService(bc, sessXgmmlViewReaderFactory, InputStreamTaskFactory.class);
registerService(bc, attrsDataReaderFactory, InputStreamTaskFactory.class);
registerService(bc, gmlNetworkViewReaderFactory, InputStreamTaskFactory.class);
registerService(bc, cy3SessionReaderFactory, InputStreamTaskFactory.class);
registerService(bc, cy2SessionReaderFactory, InputStreamTaskFactory.class);
registerService(bc, cysessionReaderFactory, InputStreamTaskFactory.class);
registerService(bc, bookmarkReaderFactory, InputStreamTaskFactory.class);
registerService(bc, propertiesReaderFactory, InputStreamTaskFactory.class);
registerService(bc, vizmapPropertiesReaderFactory, InputStreamTaskFactory.class);
registerService(bc, vizmapXMLReaderFactory, InputStreamTaskFactory.class);
registerService(bc, sessionTableReaderFactory, InputStreamTaskFactory.class);
registerService(bc, expressionReaderFactory, InputStreamTaskFactory.class);
registerService(bc, streamUtil, StreamUtil.class);
registerService(bc, unrecognizedVisualPropertyManager, NetworkViewAboutToBeDestroyedListener.class);
registerService(bc, recentlyOpenedTracker, RecentlyOpenedTracker.class);
registerServiceListener(bc, networkReaderManager::addInputStreamTaskFactory, networkReaderManager::removeInputStreamTaskFactory, InputStreamTaskFactory.class);
registerServiceListener(bc, tableReaderManager::addInputStreamTaskFactory, tableReaderManager::removeInputStreamTaskFactory, InputStreamTaskFactory.class);
registerServiceListener(bc, sessionReaderManager::addInputStreamTaskFactory, sessionReaderManager::removeInputStreamTaskFactory, InputStreamTaskFactory.class);
registerServiceListener(bc, propertyReaderManager::addInputStreamTaskFactory, propertyReaderManager::removeInputStreamTaskFactory, InputStreamTaskFactory.class);
registerServiceListener(bc, vizmapReaderManager::addInputStreamTaskFactory, vizmapReaderManager::removeInputStreamTaskFactory, InputStreamTaskFactory.class);
registerServiceListener(bc, viewWriterManager::addCyWriterFactory, viewWriterManager::removeCyWriterFactory, PresentationWriterFactory.class);
registerServiceListener(bc, networkViewWriterManager::addCyWriterFactory, networkViewWriterManager::removeCyWriterFactory, CyNetworkViewWriterFactory.class);
registerServiceListener(bc, sessionWriterManager::addCyWriterFactory, sessionWriterManager::removeCyWriterFactory, CySessionWriterFactory.class);
registerServiceListener(bc, propertyWriterManager::addCyWriterFactory, propertyWriterManager::removeCyWriterFactory, CyPropertyWriterFactory.class);
registerServiceListener(bc, tableWriterManager::addCyWriterFactory, tableWriterManager::removeCyWriterFactory, CyTableWriterFactory.class);
registerServiceListener(bc, vizmapWriterManager::addCyWriterFactory, vizmapWriterManager::removeCyWriterFactory, VizmapWriterFactory.class);
registerAllServices(bc, pngWriterFactory);
registerAllServices(bc, jpegWriterFactory);
registerAllServices(bc, pdfWriterFactory);
registerAllServices(bc, psWriterFactory);
registerAllServices(bc, svgWriterFactory);
registerAllServices(bc, sifNetworkViewWriterFactory);
registerAllServices(bc, nnfNetworkViewWriterFactory);
registerAllServices(bc, xgmmlWriterFactory);
registerAllServices(bc, cysessionWriterFactory);
registerAllServices(bc, bookmarksWriterFactory);
registerAllServices(bc, propertiesWriterFactory);
registerAllServices(bc, csvTableWriterFactory);
registerAllServices(bc, sessionTableWriterFactory);
registerAllServices(bc, vizmapWriterFactory);
registerAllServices(bc, sessionWriterFactory);
}
Aggregations