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 Details

    • getDataSources

      Collection<DataSource> getDataSources(DataCategory category)
      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

      Collection<DataSource> getDataSources(String providerName)
      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

      boolean deleteDataSource(DataSource pDataSource)
      Remove a DataSource from the DataSourceManager
      Returns:
      true if the dataSource is removed successfully
    • saveDataSource

      void saveDataSource(DataSource pDataSource)
      Save a DataSource to the DataSourceManager
    • containsDataSource

      boolean containsDataSource(DataSource pDataSource)
      Check if a DataSource already existed in the DataSourceManager
      Returns:
      true if the dataSource is in the DataSourceManager