public class ProcessTreeImpl extends ProcessTreeElementImpl implements ProcessTree
ProcessTree.Type
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<Edge> |
edges |
protected java.util.Set<Expression> |
expressions |
protected gnu.trove.map.TObjectIntMap<Node> |
nodes |
protected java.util.List<Originator> |
originators |
protected Node |
root |
protected java.util.Set<Variable> |
variables |
id, name, propertyDependent, propertyIndependent
Constructor and Description |
---|
ProcessTreeImpl() |
ProcessTreeImpl(ProcessTree tree) |
ProcessTreeImpl(java.lang.String name) |
ProcessTreeImpl(java.util.UUID id) |
ProcessTreeImpl(java.util.UUID id,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
addEdge(Edge edge)
adds an edge to the tree.
|
boolean |
addExpression(Expression expression)
adds an expression to the tree.
|
boolean |
addNode(Node node)
adds a node to the tree.
|
boolean |
addOriginator(Originator originator)
adds an originator to the tree.
|
boolean |
addVariable(Variable variable)
adds a variable to the tree.
|
Edge |
getEdge(java.util.UUID id)
Return the edge with the given ID
|
java.util.Collection<Edge> |
getEdges()
Returns an immutable collection of edges in this tree.
|
ProcessTreeElement |
getElement(java.util.UUID id)
Return the process tree element with the given ID
|
java.util.Collection<ProcessTreeElement> |
getElements()
Return all the process tree elements
|
Expression |
getExpression(java.util.UUID id)
Return the expression with the given ID
|
java.util.Collection<Expression> |
getExpressions()
Returns an immutable collection of expressions used in this tree.
|
Node |
getNode(java.util.UUID id)
Return the node with the given ID
|
java.util.Collection<Node> |
getNodes()
Returns an immutable collection of nodes in this tree.
|
Originator |
getOriginator(java.util.UUID id)
Return the originator with the given ID
|
java.util.Collection<Originator> |
getOriginators()
Returns an immutable collection of originators used in this tree.
|
Node |
getRoot()
Returns the root of the process tree
|
ProcessTree.Type |
getType(Node node)
Returns the type of a node expressed in the Type enumeration
|
Variable |
getVariable(java.util.UUID id)
Return the variable with the given ID
|
java.util.Collection<Variable> |
getVariables()
Returns an immutable collection of variables used in this tree.
|
boolean |
isConfigurable()
Returns true if and only if this processtree has configuration options
|
boolean |
isDag()
Returns true if and only if this processtree is a directed acyclic graph.
|
boolean |
isTree()
Returns true if and only if this processtree is a proper tree, i.e.
|
<N extends Node> |
iterator(ProcessTree.Type type)
returns an iterator over the nodes implementing the given type.
|
boolean |
removeEdge(Edge edge)
removes an edge from the tree.
|
boolean |
removeExpression(Expression expression)
removes an expression from the tree.
|
boolean |
removeNode(Node node)
removes a node from the tree.
|
boolean |
removeOriginator(Originator originator)
removes an originator from the tree.
|
boolean |
removeVariable(Variable variable)
removes a variable from the tree.
|
void |
setRoot(Node root)
Sets the root of this process tree.
|
int |
size()
Returns the number of nodes in the tree
|
java.lang.String |
toString() |
java.lang.String |
toString(Node node)
Return a string representing a node
|
ProcessTree |
toTree()
Return a tree representation of this processtree (i.e., the DAG is unfolded)
|
equals, getDependentProperties, getDependentProperty, getDependentProperty, getID, getIndependentProperties, getIndependentProperty, getIndependentProperty, getName, hashCode, removeDependentProperty, removeDependentProperty, removeIndependentProperty, removeIndependentProperty, setDependentProperty, setDependentProperty, setIndependentProperty, setIndependentProperty, setName
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDependentProperties, getDependentProperty, getDependentProperty, getID, getIndependentProperties, getIndependentProperty, getIndependentProperty, getName, removeDependentProperty, removeDependentProperty, removeIndependentProperty, removeIndependentProperty, setDependentProperty, setDependentProperty, setIndependentProperty, setIndependentProperty, setName
protected final gnu.trove.map.TObjectIntMap<Node> nodes
protected final java.util.Set<Edge> edges
protected final java.util.Set<Variable> variables
protected final java.util.List<Originator> originators
protected final java.util.Set<Expression> expressions
protected Node root
public ProcessTreeImpl(java.lang.String name)
public ProcessTreeImpl()
public ProcessTreeImpl(java.util.UUID id)
public ProcessTreeImpl(java.util.UUID id, java.lang.String name)
public ProcessTreeImpl(ProcessTree tree)
public void setRoot(Node root)
ProcessTree
setRoot
in interface ProcessTree
public boolean isTree()
ProcessTree
isTree
in interface ProcessTree
public boolean isDag()
ProcessTree
isDag
in interface ProcessTree
public ProcessTree toTree()
ProcessTree
toTree
in interface ProcessTree
public boolean isConfigurable()
ProcessTree
isConfigurable
in interface ProcessTree
public Node getRoot()
ProcessTree
getRoot
in interface ProcessTree
public java.util.Collection<Node> getNodes()
ProcessTree
getNodes
in interface ProcessTree
public java.util.Collection<Edge> getEdges()
ProcessTree
getEdges
in interface ProcessTree
public java.util.Collection<Variable> getVariables()
ProcessTree
getVariables
in interface ProcessTree
public java.util.Collection<Expression> getExpressions()
ProcessTree
getExpressions
in interface ProcessTree
public boolean addNode(Node node)
ProcessTree
addNode
in interface ProcessTree
public boolean removeNode(Node node)
ProcessTree
removeNode
in interface ProcessTree
public boolean addVariable(Variable variable)
ProcessTree
addVariable
in interface ProcessTree
public boolean removeVariable(Variable variable)
ProcessTree
removeVariable
in interface ProcessTree
public boolean addEdge(Edge edge)
ProcessTree
addEdge
in interface ProcessTree
public boolean removeEdge(Edge edge)
ProcessTree
removeEdge
in interface ProcessTree
public boolean addExpression(Expression expression)
ProcessTree
addExpression
in interface ProcessTree
public boolean removeExpression(Expression expression)
ProcessTree
removeExpression
in interface ProcessTree
public <N extends Node> java.util.Iterator<N> iterator(ProcessTree.Type type)
ProcessTree
iterator
in interface ProcessTree
N
- the type returned by type.getType()public java.lang.String toString()
toString
in class ProcessTreeElementImpl
public java.lang.String toString(Node node)
ProcessTree
toString
in interface ProcessTree
public ProcessTree.Type getType(Node node)
ProcessTree
getType
in interface ProcessTree
public int size()
ProcessTree
size
in interface ProcessTree
public java.util.Collection<Originator> getOriginators()
ProcessTree
getOriginators
in interface ProcessTree
public boolean addOriginator(Originator originator)
ProcessTree
addOriginator
in interface ProcessTree
public boolean removeOriginator(Originator originator)
ProcessTree
removeOriginator
in interface ProcessTree
public Node getNode(java.util.UUID id)
ProcessTree
getNode
in interface ProcessTree
public Originator getOriginator(java.util.UUID id)
ProcessTree
getOriginator
in interface ProcessTree
public Edge getEdge(java.util.UUID id)
ProcessTree
getEdge
in interface ProcessTree
public Variable getVariable(java.util.UUID id)
ProcessTree
getVariable
in interface ProcessTree
public Expression getExpression(java.util.UUID id)
ProcessTree
getExpression
in interface ProcessTree
public java.util.Collection<ProcessTreeElement> getElements()
ProcessTree
getElements
in interface ProcessTree
public ProcessTreeElement getElement(java.util.UUID id)
ProcessTree
getElement
in interface ProcessTree