|
||||||||||
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. |
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 |
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. |
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 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 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 getNoteSet()
getNoteSet
in interface RichAnnotatable
Note
public void setNoteSet(Set 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 getComments()
getComments
in interface BioEntry
Comment
public Set getRankedDocRefs()
getRankedDocRefs
in interface BioEntry
RankedDocRef
public Set 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()
getName
in interface BioEntry
public Namespace getNamespace()
getNamespace
in interface BioEntry
public NCBITaxon getTaxon()
getTaxon
in interface BioEntry
public int getVersion()
getVersion
in interface BioEntry
public boolean equals(Object obj)
equals
in class Object
public int compareTo(Object o)
compareTo
in interface Comparable
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
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 rankedcrossrefs)
RankedCrossRefable
setRankedCrossRefs
in interface RankedCrossRefable
rankedcrossrefs
- a set of RankedCrossRef objects.public Integer getId()
public void setId(Integer id)
id
- the Hibernate ID, if using Hibernate.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |