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.OLSClient
getOlsClient()
Getter for the fieldolsClient
.protected String
getOntologyName()
Getter for the fieldontologyName
.protected Xref
getOriginalXref()
Getter for the fieldoriginalXref
.String
getShortName()
Getter for the fieldshortName
.Collection<Alias>
getSynonyms()
getSynonyms.Collection<Xref>
getXrefs()
getXrefs.protected boolean
hasLoadedMetadata()
hasLoadedMetadata.protected boolean
hasLoadedXrefs()
hasLoadedXrefs.protected void
initialiseDefinition(String description)
initialiseDefinition.protected void
initialiseMetaData(Xref xref)
Retrieve the metadata for an entry.void
setShortName(String name)
Set the short nameString
toString()
-
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:
getShortName
in interfaceCvTerm
- Overrides:
getShortName
in classDefaultCvTerm
- Returns:
- a
String
object.
-
setShortName
public void setShortName(String name)
Set the short name- Specified by:
setShortName
in interfaceCvTerm
- Overrides:
setShortName
in classDefaultCvTerm
- Parameters:
name
- : short name
-
getXrefs
public Collection<Xref> getXrefs()
getXrefs.
- Specified by:
getXrefs
in interfaceCvTerm
- Overrides:
getXrefs
in classDefaultCvTerm
- Returns:
- a
Collection
object.
-
getAnnotations
public Collection<Annotation> getAnnotations()
getAnnotations.
- Specified by:
getAnnotations
in interfaceCvTerm
- Overrides:
getAnnotations
in classDefaultCvTerm
- Returns:
- a
Collection
object.
-
getSynonyms
public Collection<Alias> getSynonyms()
getSynonyms.
- Specified by:
getSynonyms
in interfaceCvTerm
- Overrides:
getSynonyms
in classDefaultCvTerm
- Returns:
- a
Collection
object.
-
toString
public String toString()
- Overrides:
toString
in classDefaultCvTerm
-
getOriginalXref
protected Xref getOriginalXref()
Getter for the field
originalXref
.- Returns:
- a
Xref
object.
-
getOntologyName
protected String getOntologyName()
Getter for the field
ontologyName
.- Returns:
- a
String
object.
-
getOlsClient
protected uk.ac.ebi.pride.utilities.ols.web.service.client.OLSClient getOlsClient()
Getter for the field
olsClient
.- Returns:
- a
OLSClient
object.
-
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
- aString
object.
-
hasLoadedMetadata
protected boolean hasLoadedMetadata()
hasLoadedMetadata.
- Returns:
- a boolean.
-
hasLoadedXrefs
protected boolean hasLoadedXrefs()
hasLoadedXrefs.
- Returns:
- a boolean.
-
-