Package org.biopax.paxtools.query.model
Class AbstractNode
java.lang.Object
org.biopax.paxtools.query.model.AbstractNode
- All Implemented Interfaces:
GraphObject,Node
- Direct Known Subclasses:
ControlWrapper,ControlWrapper,EventWrapper,EventWrapper,PhysicalEntityWrapper,PhysicalEntityWrapper
- Author:
- Ozgun Babur
-
Field Summary
FieldsModifier and TypeFieldDescriptionFor saying: "If the algorithm traverses this node, it cannot traverse those others".Set of downstream edges.protected booleanFlag to remember if downstream links were created.protected GraphOwner graph.If there are equivalent nodes in the graph, and they have a hierarchy, like an homology node and members, then this set is for the child equivalents of this node.protected intThis variable can be used by algorithms that need to label nodes with a path sign (typically the current path).If there are equivalent nodes in the graph, and they have a hierarchy, like an homology node and members, then this set is for the parent equivalents of this node.Set of upstream edges.protected booleanFlag to remember if upstream links were created. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractNode(Graph graph) Constructor with the owner graph. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Resets the path sign.Gets the downstream edges.This class gets the downstream links but does not initialize.getGraph()Every graph object should have an owner graph.intGets the upstream edges.This class gets the upstream links but does not initialize.voidinit()Does nothing yet.voidInitializes the set of banned nodes.voidInitializes the downstream connections.voidInitializes the upstream connections.booleanNodes are not transcription by default.voidvoidsetPathSign(int pathSign) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biopax.paxtools.query.model.GraphObject
getKeyMethods inherited from interface org.biopax.paxtools.query.model.Node
getSign, isBreadthNode, isUbique
-
Field Details
-
graph
Owner graph. -
upstreamInited
protected boolean upstreamInitedFlag to remember if upstream links were created. -
downstreamInited
protected boolean downstreamInitedFlag to remember if downstream links were created. -
upperEquivalent
If there are equivalent nodes in the graph, and they have a hierarchy, like an homology node and members, then this set is for the parent equivalents of this node. -
lowerEquivalent
If there are equivalent nodes in the graph, and they have a hierarchy, like an homology node and members, then this set is for the child equivalents of this node. -
upstream
Set of upstream edges. -
downstream
Set of downstream edges. -
pathSign
protected int pathSignThis variable can be used by algorithms that need to label nodes with a path sign (typically the current path). -
banned
For saying: "If the algorithm traverses this node, it cannot traverse those others". If this set will be used, then initBanned() should be called. Otherwise getBanned() will return an immutable empty set.
-
-
Constructor Details
-
AbstractNode
Constructor with the owner graph.- Parameters:
graph- Owner graph
-
-
Method Details
-
getGraph
Description copied from interface:GraphObjectEvery graph object should have an owner graph.- Specified by:
getGraphin interfaceGraphObject- Returns:
- The owner graph
-
getBanned
- Returns:
- Set of banned-to-traverse nodes if this node is traversed.
-
initBanned
public void initBanned()Initializes the set of banned nodes. If the algorithm will use this set, then this method or setBanned method should be called. -
setBanned
- Parameters:
banned- Set of banned nodes
-
getUpstream
Gets the upstream edges. Initializes if necessary.- Specified by:
getUpstreamin interfaceNode- Returns:
- upstream edges
-
getDownstream
Gets the downstream edges. Initializes if necessary.- Specified by:
getDownstreamin interfaceNode- Returns:
- downstream edges
-
initUpstream
public void initUpstream()Initializes the upstream connections. -
initDownstream
public void initDownstream()Initializes the downstream connections. -
getUpstreamNoInit
This class gets the upstream links but does not initialize.- Returns:
- Upstream links
-
getDownstreamNoInit
This class gets the downstream links but does not initialize.- Returns:
- Downstream links
-
getUpperEquivalent
- Specified by:
getUpperEquivalentin interfaceNode- Returns:
- Parent equivalent nodes.
-
getLowerEquivalent
- Specified by:
getLowerEquivalentin interfaceNode- Returns:
- Child equivalent nodes
-
init
public void init()Does nothing yet. -
getPathSign
public int getPathSign()- Returns:
- path sign
-
setPathSign
public void setPathSign(int pathSign) - Parameters:
pathSign- The path sign
-
clear
public void clear()Resets the path sign.- Specified by:
clearin interfaceGraphObject
-
isTranscription
public boolean isTranscription()Nodes are not transcription by default.- Specified by:
isTranscriptionin interfaceNode- Returns:
- False
-