public class SimpleBioEntryRelationship extends AbstractChangeable implements BioEntryRelationship
RANK
Modifier | Constructor and Description |
---|---|
protected |
SimpleBioEntryRelationship() |
|
SimpleBioEntryRelationship(BioEntry object,
BioEntry subject,
ComparableTerm term,
Integer rank)
Creates a new instance of SimpleBioEntryRelationship.
|
Modifier and Type | Method and Description |
---|---|
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. the BioEntry which
this relationship starts from).
|
Integer |
getRank()
Returns the rank of this relationship.
|
BioEntry |
getSubject()
Returns the subject of this relationship (ie. the BioEntry which
this relationship targets).
|
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)"
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
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()
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)
public Integer getId()
Copyright © 2014 BioJava. All rights reserved.