Package psidev.psi.mi.jami.bridges.ols
Class CachedOlsFetcher<T extends CvTerm>
- java.lang.Object
-
- psidev.psi.mi.jami.bridges.fetcher.AbstractCachedFetcher
-
- psidev.psi.mi.jami.bridges.ols.CachedOlsFetcher<T>
-
- All Implemented Interfaces:
CachedFetcher,CvTermFetcher<T>
- Direct Known Subclasses:
CachedOlsCvTermFetcher,CachedOlsOntologyTermFetcher,CachedOlsSourceFetcher
public class CachedOlsFetcher<T extends CvTerm> extends AbstractCachedFetcher implements CvTermFetcher<T>, CachedFetcher
Generic implementation for CachedOlsService- Since:
05/09/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Field Summary
-
Fields inherited from class psidev.psi.mi.jami.bridges.fetcher.AbstractCachedFetcher
EHCACHE_CONFIG_FILE
-
-
Constructor Summary
Constructors Constructor Description CachedOlsFetcher(String cacheName, CvTermFetcher<T> delegateFetcher)Constructor for CachedOlsFetcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TfetchByIdentifier(String termIdentifier, String miOntologyName)Uses the identifier and the name of the database to search for a complete form of the cvTerm.TfetchByIdentifier(String termIdentifier, CvTerm ontologyDatabase)Uses the identifier and a cvTerm denoting the database to search to fetch a complete from of the term.Collection<T>fetchByIdentifiers(Collection<String> termIdentifiers, String miOntologyName)fetchByIdentifiers.Collection<T>fetchByIdentifiers(Collection<String> termIdentifiers, CvTerm ontologyDatabase)Uses the identifier and a cvTerm denoting the database to search to fetch a complete from of the term.Collection<T>fetchByName(String searchName)Uses the name of the term and the name of the database to search for a complete form of the term.TfetchByName(String searchName, String miOntologyName)Uses the name of the term and the name of the database to search for a complete form of the term.Collection<T>fetchByNames(Collection<String> searchNames)Finds the CvTerms which match the exact names provided.Collection<T>fetchByNames(Collection<String> searchNames, String miOntologyName)Uses the name of the term and the name of the database to search for a complete form of the term.protected CvTermFetcher<T>getDelegateFetcher()Getter for the fielddelegateFetcher.-
Methods inherited from class psidev.psi.mi.jami.bridges.fetcher.AbstractCachedFetcher
clearCache, getFromCache, initialiseCache, initialiseCache, shutDownCache, storeInCache
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface psidev.psi.mi.jami.bridges.fetcher.CachedFetcher
clearCache, getFromCache, initialiseCache, initialiseCache, shutDownCache, storeInCache
-
-
-
-
Constructor Detail
-
CachedOlsFetcher
public CachedOlsFetcher(String cacheName, CvTermFetcher<T> delegateFetcher) throws BridgeFailedException
Constructor for CachedOlsFetcher.
- Parameters:
cacheName- aStringobject.delegateFetcher- aCvTermFetcherobject.- Throws:
BridgeFailedException- if any.
-
-
Method Detail
-
fetchByIdentifier
public T fetchByIdentifier(String termIdentifier, String miOntologyName) throws BridgeFailedException
Uses the identifier and the name of the database to search for a complete form of the cvTerm. Uses the identifier and the name of the database to search for a complete form of the cvTerm.- Specified by:
fetchByIdentifierin interfaceCvTermFetcher<T extends CvTerm>- Parameters:
termIdentifier- The identifier for the CvTerm to fetch.miOntologyName- The name of the ontology to search for. Eg, psi-mi, psi-mod, go. Must not be Null.- Returns:
- A full cvTerm which matches the search term or null if one cannot be found.
- Throws:
BridgeFailedException- if any.
-
fetchByIdentifier
public T fetchByIdentifier(String termIdentifier, CvTerm ontologyDatabase) throws BridgeFailedException
Uses the identifier and a cvTerm denoting the database to search to fetch a complete from of the term.- Specified by:
fetchByIdentifierin interfaceCvTermFetcher<T extends CvTerm>- Parameters:
termIdentifier- The identifier for the CvTerm to fetchontologyDatabase- The cvTerm of the ontology to search for.- Returns:
- A fully enriched cvTerm which matches the search term or null if one cannot be found.
- Throws:
BridgeFailedException- if any.
-
fetchByName
public T fetchByName(String searchName, String miOntologyName) throws BridgeFailedException
Uses the name of the term and the name of the database to search for a complete form of the term. Uses the name of the term and the name of the database to search for a complete form of the term.- Specified by:
fetchByNamein interfaceCvTermFetcher<T extends CvTerm>- Parameters:
searchName- A full or short name for the term to be searched for.miOntologyName- The ontology to search for the term in.- Returns:
- A fully enriched cvTerm which matches the search term or null if one cannot be found.
- Throws:
BridgeFailedException- if any.
-
fetchByName
public Collection<T> fetchByName(String searchName) throws BridgeFailedException
Uses the name of the term and the name of the database to search for a complete form of the term.If the term can not be resolved to a database, then this method may return null. Uses the name of the term and the name of the database to search for a complete form of the term.
If the term can not be resolved to a database, then this method may return null.
- Specified by:
fetchByNamein interfaceCvTermFetcher<T extends CvTerm>- Parameters:
searchName- A full or short name for the term to be searched for.- Returns:
- A fully enriched cvTerm which matches the search term or null if one cannot be found.
- Throws:
BridgeFailedException- if any.
-
fetchByIdentifiers
public Collection<T> fetchByIdentifiers(Collection<String> termIdentifiers, String miOntologyName) throws BridgeFailedException
fetchByIdentifiers.
- Specified by:
fetchByIdentifiersin interfaceCvTermFetcher<T extends CvTerm>- Parameters:
termIdentifiers- aCollectionobject.miOntologyName- aStringobject.- Returns:
- a
Collectionobject. - Throws:
BridgeFailedException- if any.
-
fetchByIdentifiers
public Collection<T> fetchByIdentifiers(Collection<String> termIdentifiers, CvTerm ontologyDatabase) throws BridgeFailedException
Uses the identifier and a cvTerm denoting the database to search to fetch a complete from of the term.- Specified by:
fetchByIdentifiersin interfaceCvTermFetcher<T extends CvTerm>- Parameters:
termIdentifiers- The identifier for the CvTerms to fetch.ontologyDatabase- The name of the ontology to search for the terms in.- Returns:
- A fully enriched cvTerm which matches the search term or null if one cannot be found.
- Throws:
BridgeFailedException- if any.
-
fetchByNames
public Collection<T> fetchByNames(Collection<String> searchNames, String miOntologyName) throws BridgeFailedException
Uses the name of the term and the name of the database to search for a complete form of the term.- Specified by:
fetchByNamesin interfaceCvTermFetcher<T extends CvTerm>- Parameters:
searchNames- A full or short name for the term to be searched for.miOntologyName- The name of the database to search for the names in.- Returns:
- A fully enriched cvTerm which matches the search term or null if one cannot be found.
- Throws:
BridgeFailedException- if any.
-
fetchByNames
public Collection<T> fetchByNames(Collection<String> searchNames) throws BridgeFailedException
Finds the CvTerms which match the exact names provided.If the a term found by the search can not be resolved to a database, this method may return null.
- Specified by:
fetchByNamesin interfaceCvTermFetcher<T extends CvTerm>- Parameters:
searchNames- A collection full or short names for the term to be searched for.- Returns:
- A collection of cvTerms which matched a search term.
- Throws:
BridgeFailedException- if any.
-
getDelegateFetcher
protected CvTermFetcher<T> getDelegateFetcher()
Getter for the field
delegateFetcher.- Returns:
- a
CvTermFetcherobject.
-
-