Package org.cytoscape.io.datasource
Interface DataSourceManager
public interface DataSourceManager
Entry point to access all data sources implemented as OSGi services.
Once someone export
DataSource
as an OSGi service, this object
automatically add the source and it is accessible by users.Module: datasource-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>datasource-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsDataSource(DataSource pDataSource)
Check if a DataSource already existed in the DataSourceManagerboolean
deleteDataSource(DataSource pDataSource)
Remove a DataSource from the DataSourceManagerReturns all data categoriesReturns all data sources registered as OSGi servicesgetDataSources(String providerName)
Returns all data sources from a data providergetDataSources(DataCategory category)
Returns all data sources under the given category.void
saveDataSource(DataSource pDataSource)
Save a DataSource to the DataSourceManager
-
Method Details
-
getDataSources
Returns all data sources under the given category.- Parameters:
category
- Category of the data source. Network, Table, etc.- Returns:
- all data sources under the category.
-
getDataSources
Returns all data sources from a data provider- Parameters:
providerName
- name of the data provider- Returns:
- all data source from the given data provider
-
getAllDataSources
Collection<DataSource> getAllDataSources()Returns all data sources registered as OSGi services- Returns:
- all data sources
-
getAllCategories
Collection<DataCategory> getAllCategories()Returns all data categories- Returns:
- all Data Categories
-
deleteDataSource
Remove a DataSource from the DataSourceManager- Returns:
- true if the dataSource is removed successfully
-
saveDataSource
Save a DataSource to the DataSourceManager -
containsDataSource
Check if a DataSource already existed in the DataSourceManager- Returns:
- true if the dataSource is in the DataSourceManager
-