|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojavax.bio.SimpleBioEntry
public class SimpleBioEntry
Reference implementation of a BioEntry object which has no features or sequence. Equality is the combination of namespace, name, accession and version.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable |
|---|
Annotatable.AnnotationForwarder |
| Field Summary |
|---|
| Fields inherited from interface org.biojavax.bio.BioEntry |
|---|
COMMENT, DESCRIPTION, DIVISION, IDENTIFIER, RANKEDCROSSREF, RANKEDDOCREF, RELATIONS, SEQVERSION, TAXON |
| Fields inherited from interface org.biojava.bio.Annotatable |
|---|
ANNOTATION |
| Constructor Summary | |
|---|---|
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. |
| Method Summary | |
|---|---|
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 |
getComments()
Returns a set of all comments associated with this bioentry. Warning this method gives access to the original Collection not a copy. |
String |
getDescription()
Returns a description of this sequence. |
String |
getDivision()
Returns the division of this bioentry. |
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 |
getNoteSet()
Returns the set of notes associated with this object. Warning this method gives access to the original Collection not a copy. |
Set |
getRankedCrossRefs()
Returns the set of all ranked cross references associated with an object. Warning this method gives access to the original Collection not a copy. |
Set |
getRankedDocRefs()
Returns a set of all bioentrydocrefs associated with this bioentry. Warning this method gives access to the original Collection not a copy. |
Set |
getRelationships()
Returns a set of all relationships associated with this bioentry. Warning this method gives access to the original Collection not a copy. |
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 |
setIdentifier(String identifier)
Sets the identifier of this bioentry. |
void |
setNoteSet(Set notes)
Clears the notes associated with this object and replaces them with the contents of this set. Warning this method gives access to the original Collection not a copy. |
void |
setRankedCrossRefs(Set 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 |
| Methods inherited from class org.biojava.utils.AbstractChangeable |
|---|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.biojava.utils.Changeable |
|---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
| Constructor Detail |
|---|
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()
| Method Detail |
|---|
public Set getRankedCrossRefs()
getRankedCrossRefs in interface RankedCrossRefable
public 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 Set getNoteSet()
getNoteSet in interface RichAnnotatableNote
public void setNoteSet(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 Set getComments()
getComments in interface BioEntryCommentpublic Set getRankedDocRefs()
getRankedDocRefs in interface BioEntryRankedDocRefpublic Set getRelationships()
getRelationships in interface BioEntryBioEntryRelationship
public void setIdentifier(String identifier)
throws ChangeVetoException
setIdentifier in interface BioEntryidentifier - New value of property identifier.
ChangeVetoException - in case of objections.
public void setDivision(String division)
throws ChangeVetoException
setDivision in interface BioEntrydivision - New value of property division.
ChangeVetoException - in case of objections.
public void setDescription(String description)
throws ChangeVetoException
setDescription in interface BioEntrydescription - New value of property description.
ChangeVetoException - in case of objections.public String getAccession()
getAccession in interface BioEntrypublic String getDescription()
getDescription in interface BioEntrypublic String getDivision()
getDivision in interface BioEntrypublic String getIdentifier()
getIdentifier in interface BioEntrypublic String getName()
getName in interface BioEntrypublic Namespace getNamespace()
getNamespace in interface BioEntrypublic NCBITaxon getTaxon()
getTaxon in interface BioEntrypublic int getVersion()
getVersion in interface BioEntrypublic boolean equals(Object obj)
equals in class Objectpublic int compareTo(Object o)
compareTo in interface Comparablepublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
public 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(Set rankedcrossrefs)
RankedCrossRefable
setRankedCrossRefs in interface RankedCrossRefablerankedcrossrefs - a set of RankedCrossRef objects.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||