|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.utils.Unchangeable
org.biojavax.SimpleCrossRef
public class SimpleCrossRef
A basic CrossRef implementation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable |
---|
Annotatable.AnnotationForwarder |
Field Summary |
---|
Fields inherited from interface org.biojava.bio.Annotatable |
---|
ANNOTATION |
Constructor Summary | |
---|---|
protected |
SimpleCrossRef()
|
|
SimpleCrossRef(java.lang.String dbname,
java.lang.String accession,
int version)
Creates a new instance of SimpleCrossRef with the values to use for the immutable database name, accession and version. |
|
SimpleCrossRef(java.lang.String dbname,
java.lang.String accession,
java.lang.Integer version)
Creates a new instance of SimpleCrossRef with the values to use for the immutable database name, accession and version. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares cross references first by database name, then by accession, then by version. |
boolean |
equals(java.lang.Object obj)
Equality is defined as having the same database name, accession and version. |
java.lang.String |
getAccession()
Returns the accession of the object that the crossref refers to. |
Annotation |
getAnnotation()
Should return the associated annotation object. |
java.lang.String |
getDbname()
Returns the name of the database the cross reference refers to. |
java.util.Set |
getNoteSet()
Returns the set of notes associated with this object. |
int |
getVersion()
Returns the version of the object that the crossref refers to. |
int |
hashCode()
|
void |
setNoteSet(java.util.Set notes)
Clears the notes associated with this object and replaces them with the contents of this set. |
java.lang.String |
toString()
Form: "dbname:accession.version" |
Methods inherited from class org.biojava.utils.Unchangeable |
---|
addChangeListener, addChangeListener, addForwarder, getForwarders, getListeners, isUnchanging, removeChangeListener, removeChangeListener, removeForwarder |
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 SimpleCrossRef(java.lang.String dbname, java.lang.String accession, int version)
dbname
- the dbname for this crossref.accession
- the accession for this crossref.version
- the version for this crossref.public SimpleCrossRef(java.lang.String dbname, java.lang.String accession, java.lang.Integer version)
dbname
- the dbname for this crossref.accession
- the accession for this crossref.version
- the version for this crossref.protected SimpleCrossRef()
Method Detail |
---|
public Annotation getAnnotation()
getAnnotation
in interface Annotatable
public java.util.Set getNoteSet()
getNoteSet
in interface RichAnnotatable
Note
public void setNoteSet(java.util.Set notes)
setNoteSet
in interface RichAnnotatable
notes
- the set of Note objects to replace the existing ones with.Note
public java.lang.String getAccession()
getAccession
in interface CrossRef
public java.lang.String getDbname()
getDbname
in interface CrossRef
public int getVersion()
getVersion
in interface CrossRef
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |