public class SimpleCrossRef extends Unchangeable implements CrossRef
Annotatable.AnnotationForwarderANNOTATION| Modifier | Constructor and Description |
|---|---|
protected |
SimpleCrossRef() |
|
SimpleCrossRef(String dbname,
String accession,
int version)
Creates a new instance of SimpleCrossRef with the values to use for
the immutable database name, accession and version.
|
|
SimpleCrossRef(String dbname,
String accession,
Integer version)
Creates a new instance of SimpleCrossRef with the values to use for
the immutable database name, accession and version.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o)
Compares cross references first by database name, then by accession,
then by version.
|
boolean |
equals(Object obj)
Equality is defined as having the same database name, accession and
version.
|
String |
getAccession()
Returns the accession of the object that the crossref refers to.
|
Annotation |
getAnnotation()
Should return the associated annotation object.
|
String |
getDbname()
Returns the name of the database the cross reference refers to.
|
Integer |
getId()
Gets the Hibernate ID.
|
Set |
getNoteSet()
Returns the set of notes associated with this object.
|
RichAnnotation |
getRichAnnotation()
Return the associated annotation object.
|
int |
getVersion()
Returns the version of the object that the crossref refers to.
|
int |
hashCode() |
void |
setId(Integer id)
Sets the Hibernate ID.
|
void |
setNoteSet(Set notes)
Clears the notes associated with this object and replaces them with
the contents of this set.
|
String |
toString()
Form: "dbname:accession.version"
|
addChangeListener, addChangeListener, addForwarder, getForwarders, getListeners, isUnchanging, removeChangeListener, removeChangeListener, removeForwarderclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic SimpleCrossRef(String dbname, String accession, int version)
dbname - the dbname for this crossref.accession - the accession for this crossref.version - the version for this crossref.public SimpleCrossRef(String dbname, String accession, Integer version)
dbname - the dbname for this crossref.accession - the accession for this crossref.version - the version for this crossref.protected SimpleCrossRef()
public Annotation getAnnotation()
getAnnotation in interface Annotatablepublic RichAnnotation getRichAnnotation()
getRichAnnotation in interface RichAnnotatablepublic Set getNoteSet()
getNoteSet in interface RichAnnotatableNotepublic void setNoteSet(Set notes)
setNoteSet in interface RichAnnotatablenotes - the set of Note objects to replace the existing ones with.Notepublic String getAccession()
getAccession in interface CrossRefpublic String getDbname()
public int getVersion()
getVersion in interface CrossRefpublic int compareTo(Object o)
compareTo in interface Comparablepublic boolean equals(Object obj)
public Integer getId()
Copyright © 2014 BioJava. All rights reserved.