Class SimpleBioEntry

    • Constructor Detail

      • SimpleBioEntry

        public SimpleBioEntry​(Namespace ns,
                              String name,
                              String accession,
                              int version)
        Creates a new bioentry representing the sequence in the given namespace with the given name, accession and version. These properties are all immutable and non-nullable.
        Parameters:
        ns - The namespace for this new bioentry (not null).
        name - The name for this new bioentry (not null).
        accession - The accession for this new bioentry (not null).
        version - The version for this new bioentry.
    • Method Detail

      • getRankedCrossRefs

        public Set<RankedCrossRefgetRankedCrossRefs()
        Returns the set of all ranked cross references associated with an object. Warning this method gives access to the original Collection not a copy. This is required by Hibernate. If you modify the object directly the behaviour may be unpredictable.
        Specified by:
        getRankedCrossRefs in interface RankedCrossRefable
        Returns:
        a set of RankedCrossRef objects.
      • getNoteSet

        public Set<NotegetNoteSet()
        Returns the set of notes associated with this object. Would normally delegate call to internal RichAnnotation instance. Warning this method gives access to the original Collection not a copy. This is required by Hibernate. If you modify the object directly the behaviour may be unpredictable.
        Specified by:
        getNoteSet in interface RichAnnotatable
        Returns:
        set a set of Note objects.
        See Also:
        Note
      • setNoteSet

        public void setNoteSet​(Set<Note> notes)
                        throws ChangeVetoException
        Clears the notes associated with this object and replaces them with the contents of this set. Would normally delegate call to internal RichAnnotation instance. Warning this method gives access to the original Collection not a copy. This is required by Hibernate. If you modify the object directly the behaviour may be unpredictable.
        Specified by:
        setNoteSet in interface RichAnnotatable
        Parameters:
        notes - the set of Note objects to replace the existing ones with.
        Throws:
        ChangeVetoException - if the set is null or contains any objects that are not Note objects.
        See Also:
        Note
      • getComments

        public Set<CommentgetComments()
        Returns a set of all comments associated with this bioentry. This set is not mutable. If no comments are associated, you will get back an empty set. Warning this method gives access to the original Collection not a copy. This is required by Hibernate. If you modify the object directly the behaviour may be unpredictable.
        Specified by:
        getComments in interface BioEntry
        Returns:
        a set of Comment objects.
        See Also:
        Comment
      • getRankedDocRefs

        public Set<RankedDocRefgetRankedDocRefs()
        Returns a set of all bioentrydocrefs associated with this bioentry. This set is not mutable. If no docrefs are associated, you will get back an empty set. Warning this method gives access to the original Collection not a copy. This is required by Hibernate. If you modify the object directly the behaviour may be unpredictable.
        Specified by:
        getRankedDocRefs in interface BioEntry
        Returns:
        a set of RankedDocRef objects.
        See Also:
        RankedDocRef
      • getRelationships

        public Set<BioEntryRelationshipgetRelationships()
        Returns a set of all relationships associated with this bioentry. This set is not mutable. If no relationships are associated, you will get back an empty set. Warning this method gives access to the original Collection not a copy. This is required by Hibernate. If you modify the object directly the behaviour may be unpredictable.
        Specified by:
        getRelationships in interface BioEntry
        Returns:
        a set of BioEntryRelationship objects.
        See Also:
        BioEntryRelationship
      • getAccession

        public String getAccession()
        Returns the accession of this bioentry. The accession is supposed to be an immutable property set by the constructor.
        Specified by:
        getAccession in interface BioEntry
        Returns:
        Value of property accession.
      • getDivision

        public String getDivision()
        Returns the division of this bioentry. Division relates to a division of the parent namespace.
        Specified by:
        getDivision in interface BioEntry
        Returns:
        Value of property division.
      • getName

        public String getName()
        Returns the name of this bioentry. The name is supposed to be an immutable property set by the constructor.
        Specified by:
        getName in interface BioEntry
        Returns:
        Value of property name.
      • getNamespace

        public Namespace getNamespace()
        Returns the namespace of this bioentry. The namespace is supposed to be an immutable property set by the constructor.
        Specified by:
        getNamespace in interface BioEntry
        Returns:
        the namespace of this bioentry.
      • getTaxon

        public NCBITaxon getTaxon()
        Gets the taxon associated with this bioentry. It may be null.
        Specified by:
        getTaxon in interface BioEntry
        Returns:
        Value of property taxon.
      • getVersion

        public int getVersion()
        Gets the version of this bioentry. Bioentries with no versions return 0. The version is supposed to be immutable and set only by the constructor.
        Specified by:
        getVersion in interface BioEntry
        Returns:
        Value of property version.
      • equals

        public boolean equals​(Object obj)
        Two bioentries are equal if they share the same namespace, name, accession and version.
        Overrides:
        equals in class Object
      • compareTo

        public int compareTo​(Object o)
        Bioentries are ordered first by namespace, then name, accession, and finally version.
        Specified by:
        compareTo in interface Comparable
      • getId

        public Integer getId()
        Gets the Hibernate ID. Should be used with caution.
        Returns:
        the Hibernate ID, if using Hibernate.
      • setId

        public void setId​(Integer id)
        Sets the Hibernate ID. Should be used with caution.
        Parameters:
        id - the Hibernate ID, if using Hibernate.