Class 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)
    • Field Detail

      • log

        protected final Logger log
    • Constructor Detail

      • LazyCvTerm

        public LazyCvTerm​(uk.ac.ebi.pride.utilities.ols.web.service.client.OLSClient olsClient,
                          String fullName,
                          Xref identityRef,
                          String ontologyName)

        Constructor for LazyCvTerm.

        Parameters:
        olsClient - a OLSClient object.
        fullName - a String object.
        identityRef - a Xref object.
        ontologyName - a String object.
    • Method Detail

      • getShortName

        public String getShortName()

        Getter for the field shortName.

        If the shortName is not yet known, a query will be made to OLS. If no shortName is found, the fullName is used instead.
        Specified by:
        getShortName in interface CvTerm
        Overrides:
        getShortName in class DefaultCvTerm
        Returns:
        a String object.
      • 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 - a String object.
      • hasLoadedMetadata

        protected boolean hasLoadedMetadata()

        hasLoadedMetadata.

        Returns:
        a boolean.
      • hasLoadedXrefs

        protected boolean hasLoadedXrefs()

        hasLoadedXrefs.

        Returns:
        a boolean.