public class SimpleBioEntry extends AbstractChangeable implements BioEntry
Annotatable.AnnotationForwarderCOMMENT, DESCRIPTION, DIVISION, IDENTIFIER, RANKEDCROSSREF, RANKEDDOCREF, RELATIONS, SEQVERSION, TAXONANNOTATION| Modifier | Constructor and Description |
|---|---|
protected |
SimpleBioEntry() |
|
SimpleBioEntry(Namespace ns,
java.lang.String name,
java.lang.String accession,
int version)
Creates a new bioentry representing the sequence in the given namespace
with the given name, accession and version.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addComment(Comment comment)
Adds a comment instance to this bioentry.
|
void |
addRankedCrossRef(RankedCrossRef crossref)
Adds a ranked cross reference to the existing set.
|
void |
addRankedDocRef(RankedDocRef docref)
Adds a ranked docref instance to this bioentry.
|
void |
addRelationship(BioEntryRelationship relation)
Adds a relation instance to this bioentry.
|
int |
compareTo(java.lang.Object o)
Bioentries are ordered first by namespace, then name, accession, and
finally version.
|
boolean |
equals(java.lang.Object obj)
Two bioentries are equal if they share the same namespace, name,
accession and version.
|
java.lang.String |
getAccession()
Returns the accession of this bioentry.
|
Annotation |
getAnnotation()
Should return the associated annotation object.
|
java.util.Set |
getComments()
Returns a set of all comments associated with this bioentry.
|
java.lang.String |
getDescription()
Returns a description of this sequence.
|
java.lang.String |
getDivision()
Returns the division of this bioentry.
|
java.lang.Integer |
getId()
Gets the Hibernate ID.
|
java.lang.String |
getIdentifier()
Returns the identifier of this bioentry.
|
java.lang.String |
getName()
Returns the name of this bioentry.
|
Namespace |
getNamespace()
Returns the namespace of this bioentry.
|
java.util.Set |
getNoteSet()
Returns the set of notes associated with this object.
|
java.util.Set |
getRankedCrossRefs()
Returns the set of all ranked cross references associated with an object.
|
java.util.Set |
getRankedDocRefs()
Returns a set of all bioentrydocrefs associated with this bioentry.
|
java.util.Set |
getRelationships()
Returns a set of all relationships associated with this bioentry.
|
RichAnnotation |
getRichAnnotation()
Return the associated annotation object.
|
NCBITaxon |
getTaxon()
Gets the taxon associated with this bioentry.
|
int |
getVersion()
Gets the version of this bioentry.
|
int |
hashCode() |
void |
removeComment(Comment comment)
Removes a comment instance from this bioentry.
|
void |
removeRankedCrossRef(RankedCrossRef crossref)
Removes a ranked cross reference from the existing set.
|
void |
removeRankedDocRef(RankedDocRef docref)
Removes a ranked docref instance from this bioentry.
|
void |
removeRelationship(BioEntryRelationship relation)
Removes a relation instance from this bioentry.
|
void |
setDescription(java.lang.String description)
Sets the description for this bioentry.
|
void |
setDivision(java.lang.String division)
Sets the division of this bioentry.
|
void |
setId(java.lang.Integer id)
Sets the Hibernate ID.
|
void |
setIdentifier(java.lang.String identifier)
Sets the identifier of this bioentry.
|
void |
setNoteSet(java.util.Set notes)
Clears the notes associated with this object and replaces them with
the contents of this set.
|
void |
setRankedCrossRefs(java.util.Set rankedcrossrefs)
Sets the ranked cross references associated with an object.
|
void |
setTaxon(NCBITaxon taxon)
Sets the taxon for this bioentry.
|
java.lang.String |
toString()
Form: namespace:name/accession.version
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic SimpleBioEntry(Namespace ns, java.lang.String name, java.lang.String accession, int version)
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.protected SimpleBioEntry()
public java.util.Set getRankedCrossRefs()
getRankedCrossRefs in interface RankedCrossRefablepublic void setTaxon(NCBITaxon taxon) throws ChangeVetoException
setTaxon in interface BioEntrytaxon - New value of property taxon.ChangeVetoException - in case of objections.public Annotation getAnnotation()
getAnnotation in interface Annotatablepublic RichAnnotation getRichAnnotation()
getRichAnnotation in interface RichAnnotatablepublic java.util.Set getNoteSet()
getNoteSet in interface RichAnnotatableNotepublic void setNoteSet(java.util.Set notes)
throws ChangeVetoException
setNoteSet in interface RichAnnotatablenotes - the set of Note objects to replace the existing ones with.ChangeVetoException - if the set is null or contains any objects
that are not Note objects.Notepublic java.util.Set getComments()
getComments in interface BioEntryCommentpublic java.util.Set getRankedDocRefs()
getRankedDocRefs in interface BioEntryRankedDocRefpublic java.util.Set getRelationships()
getRelationships in interface BioEntryBioEntryRelationshippublic void setIdentifier(java.lang.String identifier)
throws ChangeVetoException
setIdentifier in interface BioEntryidentifier - New value of property identifier.ChangeVetoException - in case of objections.public void setDivision(java.lang.String division)
throws ChangeVetoException
setDivision in interface BioEntrydivision - New value of property division.ChangeVetoException - in case of objections.public void setDescription(java.lang.String description)
throws ChangeVetoException
setDescription in interface BioEntrydescription - New value of property description.ChangeVetoException - in case of objections.public java.lang.String getAccession()
getAccession in interface BioEntrypublic java.lang.String getDescription()
getDescription in interface BioEntrypublic java.lang.String getDivision()
getDivision in interface BioEntrypublic java.lang.String getIdentifier()
getIdentifier in interface BioEntrypublic java.lang.String getName()
public Namespace getNamespace()
getNamespace in interface BioEntrypublic NCBITaxon getTaxon()
public int getVersion()
getVersion in interface BioEntrypublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void addRankedCrossRef(RankedCrossRef crossref) throws ChangeVetoException
addRankedCrossRef in interface RankedCrossRefablecrossref - the ranked cross reference to add.ChangeVetoException - if the parameter is null.public void removeRankedCrossRef(RankedCrossRef crossref) throws ChangeVetoException
removeRankedCrossRef in interface RankedCrossRefablecrossref - the ranked cross reference to remove.ChangeVetoException - if the parameter is null.public void addRankedDocRef(RankedDocRef docref) throws ChangeVetoException
addRankedDocRef in interface BioEntrydocref - the item to add.ChangeVetoException - if it doesn't want to add it.public void removeRankedDocRef(RankedDocRef docref) throws ChangeVetoException
removeRankedDocRef in interface BioEntrydocref - the item to remove.ChangeVetoException - if it doesn't want to remove it.public void addComment(Comment comment) throws ChangeVetoException
addComment in interface BioEntrycomment - the item to add.ChangeVetoException - if it doesn't want to add it.public void removeComment(Comment comment) throws ChangeVetoException
removeComment in interface BioEntrycomment - the item to remove.ChangeVetoException - if it doesn't want to remove it.public void addRelationship(BioEntryRelationship relation) throws ChangeVetoException
addRelationship in interface BioEntryrelation - the item to add.ChangeVetoException - if it doesn't want to add it.public void removeRelationship(BioEntryRelationship relation) throws ChangeVetoException
removeRelationship in interface BioEntryrelation - the item to remove.ChangeVetoException - if it doesn't want to remove it.public void setRankedCrossRefs(java.util.Set rankedcrossrefs)
RankedCrossRefablesetRankedCrossRefs in interface RankedCrossRefablerankedcrossrefs - a set of RankedCrossRef objects.public java.lang.Integer getId()
public void setId(java.lang.Integer id)
id - the Hibernate ID, if using Hibernate.