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, removeChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic 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 BioEntryRelationshiprank - Value of property rank.ChangeVetoException - if the rank rankles.public Integer getRank()
getRank in interface BioEntryRelationshippublic BioEntry getObject()
getObject in interface BioEntryRelationshippublic BioEntry getSubject()
getSubject in interface BioEntryRelationshippublic ComparableTerm getTerm()
getTerm in interface BioEntryRelationshippublic int compareTo(Object o)
compareTo in interface Comparablepublic boolean equals(Object obj)
public Integer getId()
Copyright © 2020 BioJava. All rights reserved.