Class DefaultBioactiveEntity

  • All Implemented Interfaces:
    BioactiveEntity, Interactor, Molecule
    Direct Known Subclasses:
    MitabBioactiveEntity, XmlBioactiveEntity, XmlBioactiveEntity, XmlBioactiveEntity

    public class DefaultBioactiveEntity
    extends DefaultMolecule
    implements BioactiveEntity
    Default implementation for bioactive entity Notes: The equals and hashcode methods have NOT been overridden because the BioactiveEntity object is a complex object. To compare BioactiveEntity objects, you can use some comparators provided by default: - DefaultBioactiveEntityComparator - UnambiguousBioactiveEntityComparator - DefaultExactBioactiveEntityComparator - UnambiguousExactBioactiveEntityComparator - BioactiveEntityComparator
    Since:
    24/01/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      CvTerm type)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        type - a CvTerm object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName,
                                      CvTerm type)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
        type - a CvTerm object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      CvTerm type,
                                      Organism organism)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        type - a CvTerm object.
        organism - a Organism object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName,
                                      CvTerm type,
                                      Organism organism)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
        type - a CvTerm object.
        organism - a Organism object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      CvTerm type,
                                      Xref uniqueId)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        type - a CvTerm object.
        uniqueId - a Xref object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName,
                                      CvTerm type,
                                      Xref uniqueId)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
        type - a CvTerm object.
        uniqueId - a Xref object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      CvTerm type,
                                      Organism organism,
                                      Xref uniqueId)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        type - a CvTerm object.
        organism - a Organism object.
        uniqueId - a Xref object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName,
                                      CvTerm type,
                                      Organism organism,
                                      Xref uniqueId)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
        type - a CvTerm object.
        organism - a Organism object.
        uniqueId - a Xref object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName,
                                      CvTerm type,
                                      String uniqueChebi)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
        type - a CvTerm object.
        uniqueChebi - a String object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      CvTerm type,
                                      Organism organism,
                                      String uniqueChebi)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        type - a CvTerm object.
        organism - a Organism object.
        uniqueChebi - a String object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName,
                                      CvTerm type,
                                      Organism organism,
                                      String uniqueChebi)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
        type - a CvTerm object.
        organism - a Organism object.
        uniqueChebi - a String object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      Organism organism)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        organism - a Organism object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName,
                                      Organism organism)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
        organism - a Organism object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      Xref uniqueId)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        uniqueId - a Xref object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName,
                                      Xref uniqueId)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
        uniqueId - a Xref object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      Organism organism,
                                      Xref uniqueId)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        organism - a Organism object.
        uniqueId - a Xref object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName,
                                      Organism organism,
                                      Xref uniqueId)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
        organism - a Organism object.
        uniqueId - a Xref object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName,
                                      String uniqueChebi)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
        uniqueChebi - a String object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      Organism organism,
                                      String uniqueChebi)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        organism - a Organism object.
        uniqueChebi - a String object.
      • DefaultBioactiveEntity

        public DefaultBioactiveEntity​(String name,
                                      String fullName,
                                      Organism organism,
                                      String uniqueChebi)

        Constructor for DefaultBioactiveEntity.

        Parameters:
        name - a String object.
        fullName - a String object.
        organism - a Organism object.
        uniqueChebi - a String object.
    • Method Detail

      • getPreferredIdentifier

        public Xref getPreferredIdentifier()

        getPreferredIdentifier

        Return the first chebi identifier if provided, otherwise the first identifier in the list of identifiers
        Specified by:
        getPreferredIdentifier in interface Interactor
        Overrides:
        getPreferredIdentifier in class DefaultInteractor
        Returns:
        the first identifier in the list of identifiers or null if the list is empty
      • setChebi

        public void setChebi​(String id)
        Sets the CHEBI identifier. It will remove the old chebi identifier from the collection of identifiers and replace it with the new chebi identifier. If the new chebi identifier is null, all the existing chebi identifiers will be removed from the collection of identifiers
        Specified by:
        setChebi in interface BioactiveEntity
        Parameters:
        id - : CHEBI identifier
      • setSmile

        public void setSmile​(String smile)
        Sets the smile of this small molecule. It will remove the old smile from the collection of checksums and replace it with the new smile. If the new smile is null, all the existing smiles will be removed from the collection of checksums
        Specified by:
        setSmile in interface BioactiveEntity
        Parameters:
        smile - : the smile
      • setStandardInchiKey

        public void setStandardInchiKey​(String key)
        Sets the standard InChI key . It will remove the old standard inchi key from the collection of checksums and replace it with the new standard inchi key. If the new standard inchi key is null, all the existing standard inchi keys will be removed from the collection of checksums
        Specified by:
        setStandardInchiKey in interface BioactiveEntity
        Parameters:
        key - : the standard inchi key
      • setStandardInchi

        public void setStandardInchi​(String inchi)
        Sets the standard InChI. It will remove the old standard inchi from the collection of checksums and replace it with the new standard inchi. If the new standard is null, all the existing standard inchi will be removed from the collection of checksums
        Specified by:
        setStandardInchi in interface BioactiveEntity
        Parameters:
        inchi - : the standard InChI
      • processAddedChecksumEvent

        protected void processAddedChecksumEvent​(Checksum added)

        processAddedChecksumEvent

        Parameters:
        added - a Checksum object.
      • processRemovedChecksumEvent

        protected void processRemovedChecksumEvent​(Checksum removed)

        processRemovedChecksumEvent

        Parameters:
        removed - a Checksum object.
      • clearPropertiesLinkedToChecksums

        protected void clearPropertiesLinkedToChecksums()

        clearPropertiesLinkedToChecksums

      • 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()
      • setInteractorType

        public void setInteractorType​(CvTerm interactorType)
        Sets the interactor type of this bioactive entity. If the given interactorType is null, it sets the interactorType to 'bioactive entity'(MI:1100)
        Specified by:
        setInteractorType in interface Interactor
        Overrides:
        setInteractorType in class DefaultInteractor
        Parameters:
        interactorType - : molecule type