Search in sources :

Example 1 with BookmarkDataSourceBuilder

use of org.cytoscape.io.datasource.internal.bookmarks.BookmarkDataSourceBuilder in project cytoscape-impl by cytoscape.

the class CyActivator method start.

@Override
public void start(BundleContext bc) {
    final CyServiceRegistrar serviceRegistrar = getService(bc, CyServiceRegistrar.class);
    DataSourceManagerImpl dataSourceManager = new DataSourceManagerImpl();
    registerService(bc, dataSourceManager, DataSourceManager.class, new Properties());
    registerServiceListener(bc, dataSourceManager::addDataSource, dataSourceManager::removeDataSource, DataSource.class);
    BookmarkDataSourceBuilder bkBuilder = new BookmarkDataSourceBuilder(serviceRegistrar);
    final Set<DataSource> bkDataSources = bkBuilder.getDataSources();
    for (final DataSource ds : bkDataSources) registerService(bc, ds, DataSource.class, new Properties());
}
Also used : BookmarkDataSourceBuilder(org.cytoscape.io.datasource.internal.bookmarks.BookmarkDataSourceBuilder) Properties(java.util.Properties) CyServiceRegistrar(org.cytoscape.service.util.CyServiceRegistrar) DataSource(org.cytoscape.io.datasource.DataSource)

Aggregations

Properties (java.util.Properties)1 DataSource (org.cytoscape.io.datasource.DataSource)1 BookmarkDataSourceBuilder (org.cytoscape.io.datasource.internal.bookmarks.BookmarkDataSourceBuilder)1 CyServiceRegistrar (org.cytoscape.service.util.CyServiceRegistrar)1