Package net.bioclipse.managers
Class BridgedbManager
java.lang.Object
net.bioclipse.managers.BridgedbManager
- All Implemented Interfaces:
IBactingManager,net.bioclipse.managers.business.IBioclipseManager
Bioclipse manager that provides identifier mapping functionality
using the BridgeDb framework.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bridgedb.XrefCreates aXrefobject for the given Bioregistry.io compact identifier.doi()Lists the DOIs of the articles associated to this manager.org.bridgedb.IDMappergetIDMapper(String provider) Returns theIDMapperfor the given provider.org.bridgedb.DataSourceLooks up theDataSourcefor the given system code.org.bridgedb.DataSourcegetSourceByPrefix(String source) Looks up theDataSourcefor the given Bioregistry.io prefix.org.bridgedb.DataSourcegetSourceFromName(String name) Looks up theDataSourcefor the given full name.List<org.bridgedb.DataSource>guessIdentifierType(String identifier) Based on the given identifier, tries to guess what database that identifier comes from.List<org.bridgedb.bio.Organism>Returns all known organisms as a JavaList.Returns all known sources as a JavaList.Returns IDMappers supported by Bacting.org.bridgedb.IDMapperloadRelationalDatabase(String location) Creates a BridgeDbIDMapperfor the given Derby database location.Using the given connection string, it returns mappings for the given identifier.Using the given connection string, it returns mappings for the given identifier, but only for the given target data source.Set<org.bridgedb.Xref>Using the given connection string, it returns mappings for the given identifier.Set<org.bridgedb.Xref>Using the given connection string, it returns mappings for the given identifier, but only for the given target data source.Using the givenIDMapperstring, it returns mappings for the given identifier.Using the givenIDMapperstring, it returns mappings for the given identifier, but only for the given target data source.Set<org.bridgedb.Xref>map(org.bridgedb.IDMapper database, org.bridgedb.Xref source) Using the givenIDMapperstring, it returns mappings for the given identifier.Set<org.bridgedb.Xref>Using the givenIDMapperstring, it returns mappings for the given identifier, but only for the given target data source.org.bridgedb.DataSourceregisterDataSource(String code, String name) Creates a newDataSourcebased on the system code and full name.Using the given connection string, it returns mappings for the given identifier, but only for the given target data source.Searches in the given database for hits, with a given maximum.org.bridgedb.XrefCreates aXrefobject for the given identifier.org.bridgedb.XrefCreates aXrefobject for the given identifier.
-
Constructor Details
-
BridgedbManager
Creates a newBridgedbManager.- Parameters:
workspaceRoot- location of the workspace, e.g. "."
-
-
Method Details
-
getSourceByPrefix
public org.bridgedb.DataSource getSourceByPrefix(String source) throws net.bioclipse.core.business.BioclipseException Looks up theDataSourcefor the given Bioregistry.io prefix.- Parameters:
source- the system code- Returns:
- the matching
DataSource - Throws:
net.bioclipse.core.business.BioclipseException
-
getSource
public org.bridgedb.DataSource getSource(String source) throws net.bioclipse.core.business.BioclipseException Looks up theDataSourcefor the given system code.- Parameters:
source- the system code- Returns:
- the matching
DataSource - Throws:
net.bioclipse.core.business.BioclipseException
-
getSourceFromName
public org.bridgedb.DataSource getSourceFromName(String name) throws net.bioclipse.core.business.BioclipseException Looks up theDataSourcefor the given full name.- Parameters:
name- the full name- Returns:
- the matching
DataSource - Throws:
net.bioclipse.core.business.BioclipseException
-
listAllSources
Returns all known sources as a JavaList.- Returns:
- a Java
List
-
listAllOrganisms
Returns all known organisms as a JavaList.- Returns:
- a Java
List
-
search
public List<String> search(org.bridgedb.IDMapper database, String query, int limit) throws net.bioclipse.core.business.BioclipseException Searches in the given database for hits, with a given maximum.- Parameters:
database- the BridgeDbIDMapperto search inquery- the content to search forlimit- the maximum number of hits- Returns:
- the search results as a Java
List - Throws:
net.bioclipse.core.business.BioclipseException
-
guessIdentifierType
public List<org.bridgedb.DataSource> guessIdentifierType(String identifier) throws net.bioclipse.core.business.BioclipseException Based on the given identifier, tries to guess what database that identifier comes from.- Parameters:
identifier- the identifier to guess- Returns:
- a Java
Listis possible data sources - Throws:
net.bioclipse.core.business.BioclipseException
-
map
public List<String> map(String restService, String identifier, String source) throws net.bioclipse.core.business.BioclipseException Using the given connection string, it returns mappings for the given identifier.- Parameters:
restService- the connection stringidentifier- the identifier to return mappings forsource- the data source of the identifier to return mappings for- Returns:
- a Java
Listof mapped identifiers - Throws:
net.bioclipse.core.business.BioclipseException
-
map
public Set<org.bridgedb.Xref> map(String restService, org.bridgedb.Xref identifier) throws net.bioclipse.core.business.BioclipseException Using the given connection string, it returns mappings for the given identifier.- Parameters:
restService- the connection stringidentifier- the identifier to return mappings for- Returns:
- a Java
Listof mapped identifiers - Throws:
net.bioclipse.core.business.BioclipseException
-
map
public List<String> map(org.bridgedb.IDMapper database, String identifier, String source) throws net.bioclipse.core.business.BioclipseException Using the givenIDMapperstring, it returns mappings for the given identifier.- Parameters:
database- theIDMapperto get the mappings fromidentifier- the identifier to return mappings forsource- the data source of the identifier to return mappings for- Returns:
- a Java
Listof mapped identifiers - Throws:
net.bioclipse.core.business.BioclipseException
-
map
public List<String> map(String restService, String identifier, String source, String target) throws net.bioclipse.core.business.BioclipseException Using the given connection string, it returns mappings for the given identifier, but only for the given target data source.- Parameters:
restService- the connection stringidentifier- the identifier to return mappings forsource- the data source of the identifier to return mappings fortarget- the data source for which to return mappings- Returns:
- a Java
Listof mapped identifiers - Throws:
net.bioclipse.core.business.BioclipseException
-
map
public Set<org.bridgedb.Xref> map(String restService, org.bridgedb.Xref identifier, String target) throws net.bioclipse.core.business.BioclipseException Using the given connection string, it returns mappings for the given identifier, but only for the given target data source.- Parameters:
restService- the connection stringidentifier- theXrefidentifier to return mappings fortarget- the data source for which to return mappings- Returns:
- a Java
Listof mapped identifiers - Throws:
net.bioclipse.core.business.BioclipseException- when the connection to the REST service failed
-
search
public List<String> search(String restService, String query, int limit) throws net.bioclipse.core.business.BioclipseException Using the given connection string, it returns mappings for the given identifier, but only for the given target data source.- Parameters:
restService- the REST server, or the full connection stringquery- what to search forlimit- maximal number of identifiers to be found- Returns:
- a Java
Listof found identifiers - Throws:
net.bioclipse.core.business.BioclipseException
-
map
public List<String> map(org.bridgedb.IDMapper database, String identifier, String source, String target) throws net.bioclipse.core.business.BioclipseException Using the givenIDMapperstring, it returns mappings for the given identifier, but only for the given target data source.- Parameters:
database- theIDMapperto get the mappings fromidentifier- the identifier to return mappings forsource- the data source of the identifier to return mappings fortarget- the data source for which to return mappings- Returns:
- a Java
Listof mapped identifiers - Throws:
net.bioclipse.core.business.BioclipseException
-
map
public Set<org.bridgedb.Xref> map(org.bridgedb.IDMapper database, org.bridgedb.Xref source) throws net.bioclipse.core.business.BioclipseException Using the givenIDMapperstring, it returns mappings for the given identifier.- Parameters:
database- theIDMapperto get the mappings fromsource- the identifier to return mappings for- Returns:
- a Java
Listof mapped identifiers - Throws:
net.bioclipse.core.business.BioclipseException
-
map
public Set<org.bridgedb.Xref> map(org.bridgedb.IDMapper database, org.bridgedb.Xref source, String target) throws net.bioclipse.core.business.BioclipseException Using the givenIDMapperstring, it returns mappings for the given identifier, but only for the given target data source.- Parameters:
database- theIDMapperto get the mappings fromsource- the identifier to return mappings fortarget- the data source for which to return mappings- Returns:
- a Java
Listof mapped identifiers - Throws:
net.bioclipse.core.business.BioclipseException
-
curie
Creates aXrefobject for the given Bioregistry.io compact identifier.- Parameters:
curie- the identifier- Returns:
- an
Xrefobject - Throws:
net.bioclipse.core.business.BioclipseException- when the compact identifier format is not recognized
-
xref
public org.bridgedb.Xref xref(String sourcedIdentifier) throws net.bioclipse.core.business.BioclipseException Creates aXrefobject for the given identifier.- Parameters:
sourcedIdentifier- the identifier- Returns:
- an
Xrefobject - Throws:
net.bioclipse.core.business.BioclipseException
-
xref
public org.bridgedb.Xref xref(String identifier, String source) throws net.bioclipse.core.business.BioclipseException Creates aXrefobject for the given identifier.- Parameters:
identifier- the identifier to return mappings forsource- the data source of the identifier to return mappings for- Returns:
- an
Xrefobject - Throws:
net.bioclipse.core.business.BioclipseException
-
loadRelationalDatabase
public org.bridgedb.IDMapper loadRelationalDatabase(String location) throws net.bioclipse.core.business.BioclipseException Creates a BridgeDbIDMapperfor the given Derby database location.- Parameters:
location- the location of the Derby file- Returns:
- the
IDMapperobject - Throws:
net.bioclipse.core.business.BioclipseException
-
registerDataSource
Creates a newDataSourcebased on the system code and full name.- Parameters:
code- the system code for the new data sourcename- the full name for the new data source- Returns:
- the new
DataSourceobject
-
listIDMapperProviders
Returns IDMappers supported by Bacting.- Returns:
- a
ListwithIDMappers
-
getIDMapper
public org.bridgedb.IDMapper getIDMapper(String provider) throws net.bioclipse.core.business.BioclipseException Returns theIDMapperfor the given provider.- Parameters:
provider- name of the provider, for example "Gene ID Mapping Database (Homo sapiens)"- Returns:
- the IDMapper for the given provider
- Throws:
net.bioclipse.core.business.BioclipseException- when the mapping database could not be properly loaded
-
getManagerName
- Specified by:
getManagerNamein interfacenet.bioclipse.managers.business.IBioclipseManager
-
doi
Description copied from interface:IBactingManagerLists the DOIs of the articles associated to this manager.- Specified by:
doiin interfaceIBactingManager- Returns:
- a
Listof String with DOIs
-