Class DefaultCvTerm

  • All Implemented Interfaces:
    CvTerm
    Direct Known Subclasses:
    DefaultOntologyTerm, DefaultSource, LazyCvTerm, MitabCvTerm

    public class DefaultCvTerm
    extends Object
    implements CvTerm
    Default implementation for CvTerm Notes: The equals and hashcode methods have been overridden to be consistent with UnambiguousCvTermComparator
    Since:
    21/01/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • DefaultCvTerm

        public DefaultCvTerm​(String shortName)

        Constructor for DefaultCvTerm.

        Parameters:
        shortName - a String object.
      • DefaultCvTerm

        public DefaultCvTerm​(String shortName,
                             String miIdentifier)

        Constructor for DefaultCvTerm.

        Parameters:
        shortName - a String object.
        miIdentifier - a String object.
      • DefaultCvTerm

        public DefaultCvTerm​(String shortName,
                             String fullName,
                             String miIdentifier)

        Constructor for DefaultCvTerm.

        Parameters:
        shortName - a String object.
        fullName - a String object.
        miIdentifier - a String object.
      • DefaultCvTerm

        public DefaultCvTerm​(String shortName,
                             Xref ontologyId)

        Constructor for DefaultCvTerm.

        Parameters:
        shortName - a String object.
        ontologyId - a Xref object.
      • DefaultCvTerm

        public DefaultCvTerm​(String shortName,
                             String fullName,
                             Xref ontologyId)

        Constructor for DefaultCvTerm.

        Parameters:
        shortName - a String object.
        fullName - a String object.
        ontologyId - a Xref object.
    • Method Detail

      • getShortName

        public String getShortName()

        Getter for the field shortName.

        Specified by:
        getShortName in interface CvTerm
        Returns:
        a String object.
      • setShortName

        public void setShortName​(String name)
        Set the short name
        Specified by:
        setShortName in interface CvTerm
        Parameters:
        name - : short name
      • getFullName

        public String getFullName()

        Getter for the field fullName.

        Specified by:
        getFullName in interface CvTerm
        Returns:
        a String object.
      • setFullName

        public void setFullName​(String name)
        Set the full name
        Specified by:
        setFullName in interface CvTerm
        Parameters:
        name - : full name
      • initialiseXrefs

        protected void initialiseXrefs()

        initialiseXrefs

      • initialiseAnnotations

        protected void initialiseAnnotations()

        initialiseAnnotations

      • initialiseSynonyms

        protected void initialiseSynonyms()

        initialiseSynonyms

      • initialiseIdentifiers

        protected void initialiseIdentifiers()

        initialiseIdentifiers

      • initialiseXrefsWith

        protected void initialiseXrefsWith​(Collection<Xref> xrefs)

        initialiseXrefsWith

        Parameters:
        xrefs - a Collection object.
      • initialiseAnnotationsWith

        protected void initialiseAnnotationsWith​(Collection<Annotation> annotations)

        initialiseAnnotationsWith

        Parameters:
        annotations - a Collection object.
      • initialiseSynonymsWith

        protected void initialiseSynonymsWith​(Collection<Alias> aliases)

        initialiseSynonymsWith

        Parameters:
        aliases - a Collection object.
      • initialiseIdentifiersWith

        protected void initialiseIdentifiersWith​(Collection<Xref> identifiers)

        initialiseIdentifiersWith

        Parameters:
        identifiers - a Collection object.
      • setMIIdentifier

        public void setMIIdentifier​(String mi)
        Sets the PSI-MI identifier. It will remove the previous PSI-MI identifier from the collection of identifiers, and add the new one in the collection of identifiers with qualifier identity. If mi is null, it will remove all the psi-mi identifiers from the collection of identifiers.
        Specified by:
        setMIIdentifier in interface CvTerm
        Parameters:
        mi - : mi identifier
      • setMODIdentifier

        public void setMODIdentifier​(String mod)
        Sets the PSI-MOD identifier. It will remove the previous PSI-MOD identifier from the collection of xrefs, and add the new one in the collection of identifiers with qualifier identity. If mod is null, it will remove all the psi-mod identifiers from the collection of identifiers.
        Specified by:
        setMODIdentifier in interface CvTerm
        Parameters:
        mod - : mod identifier
      • setPARIdentifier

        public void setPARIdentifier​(String par)
        Sets the PSI-PAR identifier. It will remove the previous PSI-PAR identifier from the collection of xrefs, and add the new one in the collection of identifiers with qualifier identity. If par is null, it will remove all the psi-par identifiers from the collection of identifiers.
        Specified by:
        setPARIdentifier in interface CvTerm
        Parameters:
        par - : par identifier
      • processAddedIdentifierEvent

        protected void processAddedIdentifierEvent​(Xref added)

        processAddedIdentifierEvent

        Parameters:
        added - a Xref object.
      • processRemovedIdentifierEvent

        protected void processRemovedIdentifierEvent​(Xref removed)

        processRemovedIdentifierEvent

        Parameters:
        removed - a Xref object.
      • clearPropertiesLinkedToIdentifiers

        protected void clearPropertiesLinkedToIdentifiers()

        clearPropertiesLinkedToIdentifiers

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object