Package org.cytoscape.io.datasource
Class DefaultDataSource
- java.lang.Object
-
- org.cytoscape.io.datasource.DefaultDataSource
-
- All Implemented Interfaces:
DataSource
public final class DefaultDataSource extends Object implements DataSource
Basic implementation ofDataSource. In general, most of the data sources can be encoded with this default implementation.Module:
datasource-apiTo 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 (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
-
-
Constructor Summary
Constructors Constructor Description DefaultDataSource(String name, String provider, String description, DataCategory category, URL url)Constructor for the default data source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataCategorygetDataCategory()DataCategoryof this data.StringgetDescription()Description for this data.URLgetLocation()Location of this data file.StringgetName()Name of this data sourceStringgetProvider()Name of this data provider for this source.
-
-
-
Constructor Detail
-
DefaultDataSource
public DefaultDataSource(String name, String provider, String description, DataCategory category, URL url)
Constructor for the default data source. All of the parameters should be provided as a non-null value.- Parameters:
name- name of sourceprovider- provider name of data sourcedescription- description for this sourcecategory- category of dataurl- location of data file as URL
-
-
Method Detail
-
getProvider
public String getProvider()
Description copied from interface:DataSourceName of this data provider for this source. Usually, this is an database name or organization name providing set of data.- Specified by:
getProviderin interfaceDataSource- Returns:
- Name of data provider
-
getName
public String getName()
Description copied from interface:DataSourceName of this data source- Specified by:
getNamein interfaceDataSource- Returns:
- Name of this data source
-
getDescription
public String getDescription()
Description copied from interface:DataSourceDescription for this data.- Specified by:
getDescriptionin interfaceDataSource- Returns:
- description
-
getDataCategory
public DataCategory getDataCategory()
Description copied from interface:DataSourceDataCategoryof this data.- Specified by:
getDataCategoryin interfaceDataSource- Returns:
- category of this data file.
-
getLocation
public URL getLocation()
Description copied from interface:DataSourceLocation of this data file.- Specified by:
getLocationin interfaceDataSource- Returns:
- URL of this data file
-
-