public class SimpleBioEntry extends AbstractChangeable implements BioEntry
Annotatable.AnnotationForwarder
COMMENT, DESCRIPTION, DIVISION, IDENTIFIER, RANKEDCROSSREF, RANKEDDOCREF, RELATIONS, SEQVERSION, TAXON
ANNOTATION
Modifier | Constructor and Description |
---|---|
protected |
SimpleBioEntry() |
|
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.
|
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(Object o)
Bioentries are ordered first by namespace, then name, accession, and
finally version.
|
boolean |
equals(Object obj)
Two bioentries are equal if they share the same namespace, name,
accession and version.
|
String |
getAccession()
Returns the accession of this bioentry.
|
Annotation |
getAnnotation()
Should return the associated annotation object.
|
Set<Comment> |
getComments()
Returns a set of all comments associated with this bioentry.
|
String |
getDescription()
Returns a description of this sequence.
|
String |
getDivision()
Returns the division of this bioentry.
|
Integer |
getId()
Gets the Hibernate ID.
|
String |
getIdentifier()
Returns the identifier of this bioentry.
|
String |
getName()
Returns the name of this bioentry.
|
Namespace |
getNamespace()
Returns the namespace of this bioentry.
|
Set<Note> |
getNoteSet()
Returns the set of notes associated with this object.
|
Set<RankedCrossRef> |
getRankedCrossRefs()
Returns the set of all ranked cross references associated with an object.
|
Set<RankedDocRef> |
getRankedDocRefs()
Returns a set of all bioentrydocrefs associated with this bioentry.
|
Set<BioEntryRelationship> |
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(String description)
Sets the description for this bioentry.
|
void |
setDivision(String division)
Sets the division of this bioentry.
|
void |
setId(Integer id)
Sets the Hibernate ID.
|
void |
setIdentifier(String identifier)
Sets the identifier of this bioentry.
|
void |
setNoteSet(Set<Note> notes)
Clears the notes associated with this object and replaces them with
the contents of this set.
|
void |
setRankedCrossRefs(Set<RankedCrossRef> rankedcrossrefs)
Sets the ranked cross references associated with an object.
|
void |
setTaxon(NCBITaxon taxon)
Sets the taxon for this bioentry.
|
String |
toString()
Form: namespace:name/accession.version
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public SimpleBioEntry(Namespace ns, String name, 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 Set<RankedCrossRef> getRankedCrossRefs()
getRankedCrossRefs
in interface RankedCrossRefable
public void setTaxon(NCBITaxon taxon) throws ChangeVetoException
setTaxon
in interface BioEntry
taxon
- New value of property taxon.ChangeVetoException
- in case of objections.public Annotation getAnnotation()
getAnnotation
in interface Annotatable
public RichAnnotation getRichAnnotation()
getRichAnnotation
in interface RichAnnotatable
public Set<Note> getNoteSet()
getNoteSet
in interface RichAnnotatable
Note
public void setNoteSet(Set<Note> notes) throws ChangeVetoException
setNoteSet
in interface RichAnnotatable
notes
- 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.Note
public Set<Comment> getComments()
getComments
in interface BioEntry
Comment
public Set<RankedDocRef> getRankedDocRefs()
getRankedDocRefs
in interface BioEntry
RankedDocRef
public Set<BioEntryRelationship> getRelationships()
getRelationships
in interface BioEntry
BioEntryRelationship
public void setIdentifier(String identifier) throws ChangeVetoException
setIdentifier
in interface BioEntry
identifier
- New value of property identifier.ChangeVetoException
- in case of objections.public void setDivision(String division) throws ChangeVetoException
setDivision
in interface BioEntry
division
- New value of property division.ChangeVetoException
- in case of objections.public void setDescription(String description) throws ChangeVetoException
setDescription
in interface BioEntry
description
- New value of property description.ChangeVetoException
- in case of objections.public String getAccession()
getAccession
in interface BioEntry
public String getDescription()
getDescription
in interface BioEntry
public String getDivision()
getDivision
in interface BioEntry
public String getIdentifier()
getIdentifier
in interface BioEntry
public String getName()
public Namespace getNamespace()
getNamespace
in interface BioEntry
public int getVersion()
getVersion
in interface BioEntry
public boolean equals(Object obj)
public int compareTo(Object o)
compareTo
in interface Comparable
public void addRankedCrossRef(RankedCrossRef crossref) throws ChangeVetoException
addRankedCrossRef
in interface RankedCrossRefable
crossref
- the ranked cross reference to add.ChangeVetoException
- if the parameter is null.public void removeRankedCrossRef(RankedCrossRef crossref) throws ChangeVetoException
removeRankedCrossRef
in interface RankedCrossRefable
crossref
- the ranked cross reference to remove.ChangeVetoException
- if the parameter is null.public void addRankedDocRef(RankedDocRef docref) throws ChangeVetoException
addRankedDocRef
in interface BioEntry
docref
- the item to add.ChangeVetoException
- if it doesn't want to add it.public void removeRankedDocRef(RankedDocRef docref) throws ChangeVetoException
removeRankedDocRef
in interface BioEntry
docref
- the item to remove.ChangeVetoException
- if it doesn't want to remove it.public void addComment(Comment comment) throws ChangeVetoException
addComment
in interface BioEntry
comment
- the item to add.ChangeVetoException
- if it doesn't want to add it.public void removeComment(Comment comment) throws ChangeVetoException
removeComment
in interface BioEntry
comment
- the item to remove.ChangeVetoException
- if it doesn't want to remove it.public void addRelationship(BioEntryRelationship relation) throws ChangeVetoException
addRelationship
in interface BioEntry
relation
- the item to add.ChangeVetoException
- if it doesn't want to add it.public void removeRelationship(BioEntryRelationship relation) throws ChangeVetoException
removeRelationship
in interface BioEntry
relation
- the item to remove.ChangeVetoException
- if it doesn't want to remove it.public void setRankedCrossRefs(Set<RankedCrossRef> rankedcrossrefs)
RankedCrossRefable
setRankedCrossRefs
in interface RankedCrossRefable
rankedcrossrefs
- a set of RankedCrossRef objects.public Integer getId()
Copyright © 2014 BioJava. All rights reserved.