Package psidev.psi.mi.jami.bridges.ols
Class LazyCvTerm
- java.lang.Object
-
- psidev.psi.mi.jami.model.impl.DefaultCvTerm
-
- psidev.psi.mi.jami.bridges.ols.LazyCvTerm
-
- All Implemented Interfaces:
CvTerm
- Direct Known Subclasses:
LazyOntologyTerm,LazySource
public class LazyCvTerm extends DefaultCvTerm
A lazy cvTerm which will only fetch metadata when required.- Since:
- 14/08/13
- Author:
- Gabriel Aldam (galdam@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description LazyCvTerm(uk.ac.ebi.pride.utilities.ols.web.service.client.OLSClient olsClient, String fullName, Xref identityRef, String ontologyName)Constructor for LazyCvTerm.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Annotation>getAnnotations()getAnnotations.protected uk.ac.ebi.pride.utilities.ols.web.service.client.OLSClientgetOlsClient()Getter for the fieldolsClient.protected StringgetOntologyName()Getter for the fieldontologyName.protected XrefgetOriginalXref()Getter for the fieldoriginalXref.StringgetShortName()Getter for the fieldshortName.Collection<Alias>getSynonyms()getSynonyms.Collection<Xref>getXrefs()getXrefs.protected booleanhasLoadedMetadata()hasLoadedMetadata.protected booleanhasLoadedXrefs()hasLoadedXrefs.protected voidinitialiseDefinition(String description)initialiseDefinition.protected voidinitialiseMetaData(Xref xref)Retrieve the metadata for an entry.voidsetShortName(String name)Set the short nameStringtoString()-
Methods inherited from class psidev.psi.mi.jami.model.impl.DefaultCvTerm
clearPropertiesLinkedToIdentifiers, equals, getFullName, getIdentifiers, getMIIdentifier, getMODIdentifier, getPARIdentifier, hashCode, initialiseAnnotations, initialiseAnnotationsWith, initialiseIdentifiers, initialiseIdentifiersWith, initialiseSynonyms, initialiseSynonymsWith, initialiseXrefs, initialiseXrefsWith, processAddedIdentifierEvent, processRemovedIdentifierEvent, setFullName, setMIIdentifier, setMODIdentifier, setPARIdentifier
-
-
-
-
Field Detail
-
log
protected final Logger log
-
-
Method Detail
-
getShortName
public String getShortName()
Getter for the field
If the shortName is not yet known, a query will be made to OLS. If no shortName is found, the fullName is used instead.shortName.- Specified by:
getShortNamein interfaceCvTerm- Overrides:
getShortNamein classDefaultCvTerm- Returns:
- a
Stringobject.
-
setShortName
public void setShortName(String name)
Set the short name- Specified by:
setShortNamein interfaceCvTerm- Overrides:
setShortNamein classDefaultCvTerm- Parameters:
name- : short name
-
getXrefs
public Collection<Xref> getXrefs()
getXrefs.
- Specified by:
getXrefsin interfaceCvTerm- Overrides:
getXrefsin classDefaultCvTerm- Returns:
- a
Collectionobject.
-
getAnnotations
public Collection<Annotation> getAnnotations()
getAnnotations.
- Specified by:
getAnnotationsin interfaceCvTerm- Overrides:
getAnnotationsin classDefaultCvTerm- Returns:
- a
Collectionobject.
-
getSynonyms
public Collection<Alias> getSynonyms()
getSynonyms.
- Specified by:
getSynonymsin interfaceCvTerm- Overrides:
getSynonymsin classDefaultCvTerm- Returns:
- a
Collectionobject.
-
toString
public String toString()
- Overrides:
toStringin classDefaultCvTerm
-
getOriginalXref
protected Xref getOriginalXref()
Getter for the field
originalXref.- Returns:
- a
Xrefobject.
-
getOntologyName
protected String getOntologyName()
Getter for the field
ontologyName.- Returns:
- a
Stringobject.
-
getOlsClient
protected uk.ac.ebi.pride.utilities.ols.web.service.client.OLSClient getOlsClient()
Getter for the field
olsClient.- Returns:
- a
OLSClientobject.
-
initialiseMetaData
protected void initialiseMetaData(Xref xref)
Retrieve the metadata for an entry.The identifier is used to find the metadata which can be used to find the identifier phrases for short labels and synonyms.
- Parameters:
xref- The identifier that is being used.
-
initialiseDefinition
protected void initialiseDefinition(String description)
initialiseDefinition.
- Parameters:
description- aStringobject.
-
hasLoadedMetadata
protected boolean hasLoadedMetadata()
hasLoadedMetadata.
- Returns:
- a boolean.
-
hasLoadedXrefs
protected boolean hasLoadedXrefs()
hasLoadedXrefs.
- Returns:
- a boolean.
-
-