|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ebi.intenz.domain.history.HistoryGraph
public class HistoryGraph
The directed acyclic history graph stores all events related to an enzyme.
The list of all events may include all previous and following events, depending on the state of the regarded enzyme. This implementation provides standard graph methods such as removing and inserting nodes and events. Each application of these methods includes a check for cycles. SeeHistoryEvent
and HistoryNode
for more information about the elements
of the history graph.
Instances of this class are immutable.
Constructor Summary | |
---|---|
HistoryGraph(HistoryNode rootNode)
Returns a HistoryGraph instance. |
Method Summary | |
---|---|
SortedSet<HistoryEvent> |
getEdges()
|
HistoryEvent |
getLatestHistoryEventOfAll()
Returns the most recent event of the WHOLE graph. |
HistoryEvent |
getLatestHistoryEventOfRoot()
Returns the most recent event of the root node only. |
HistoryEvent |
getLatestRelevantHistoryEventOfRoot()
Returns the most recent event of the root node only. |
HistoryNode |
getRootNode()
|
boolean |
isDeletedRootNode()
Returns true if this node's event is a DELETION event. |
boolean |
isTransferredRootNode()
Returns true if this node's event is a TRANSFER event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HistoryGraph(HistoryNode rootNode)
HistoryGraph
instance.
rootNode
- The root node of the history graph.
NullPointerException
- if rootNode
is empty.Method Detail |
---|
public boolean isDeletedRootNode()
true
if this node's event is a DELETION
event.
This is only the case if the root node is the beforeNode
of the event. Otherwise the event is a
CREATION
event where the root node represents the afterNode
, that is the new entry
an enzyme has been deleted to.
true
if the root node's event is of type
uk.ac.ebi.intenz.domain.constants.EventConstant.DELETION
.public boolean isTransferredRootNode()
true
if this node's event is a TRANSFER
event.
This is only the case if the root node is the beforeNode
of the event. Otherwise the event is a
CREATION
event where the root node represents the afterNode
, that is the new entry
an enzyme has been transferred to.
true
if the root node's event is of type
uk.ac.ebi.intenz.domain.constants.EventConstant.TRANSFER
.public HistoryNode getRootNode()
public SortedSet<HistoryEvent> getEdges()
public HistoryEvent getLatestHistoryEventOfAll()
public HistoryEvent getLatestHistoryEventOfRoot()
public HistoryEvent getLatestRelevantHistoryEventOfRoot()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |