|
||||||||||
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.SimpleBioEntryRelationship
public class SimpleBioEntryRelationship
Represents a relationship between two bioentries that is described by a term and given a rank.
Field Summary |
---|
Fields inherited from interface org.biojavax.bio.BioEntryRelationship |
---|
RANK |
Constructor Summary | |
---|---|
protected |
SimpleBioEntryRelationship()
|
|
SimpleBioEntryRelationship(BioEntry object,
BioEntry subject,
ComparableTerm term,
Integer rank)
Creates a new instance of SimpleBioEntryRelationship. |
Method Summary | |
---|---|
int |
compareTo(Object o)
A relationship is compared first by rank, then object, subject, and term. |
boolean |
equals(Object obj)
Relationships are equal if they share the same rank, object, subject and term. |
Integer |
getId()
Gets the Hibernate ID. |
BioEntry |
getObject()
Returns the object of this relationship (ie. |
Integer |
getRank()
Returns the rank of this relationship. |
BioEntry |
getSubject()
Returns the subject of this relationship (ie. |
ComparableTerm |
getTerm()
Returns the term describing the relationship. |
int |
hashCode()
|
void |
setId(Integer id)
Sets the Hibernate ID. |
void |
setRank(Integer rank)
Sets the rank of this relationship. |
String |
toString()
Form is "(#rank) term(object,subject)" |
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 SimpleBioEntryRelationship(BioEntry object, BioEntry subject, ComparableTerm term, Integer rank)
rank
- The rank of the relationship.subject
- The subject bioentry.term
- The relationship term.protected SimpleBioEntryRelationship()
Method Detail |
---|
public void setRank(Integer rank) throws ChangeVetoException
setRank
in interface BioEntryRelationship
rank
- Value of property rank.
ChangeVetoException
- if the rank rankles.public Integer getRank()
getRank
in interface BioEntryRelationship
public BioEntry getObject()
getObject
in interface BioEntryRelationship
public BioEntry getSubject()
getSubject
in interface BioEntryRelationship
public ComparableTerm getTerm()
getTerm
in interface BioEntryRelationship
public int compareTo(Object o)
compareTo
in interface Comparable
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
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 |