de.unihalle.informatik.Alida.operator
Class ALDOpNode

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDOpNode

public class ALDOpNode
extends java.lang.Object

Each instance of this class represents an operator invocation for the implicit processing graph. It holds input and output ports used to link the objects according to the data flow, as well as the parameter's values upon invocation in a parameter hash.


Field Summary
private static java.util.Vector<ALDOpNode> allInstances
           
private  java.util.Vector<ALDOpNode> children
          children of this opNode, will be set during back tracing
private static boolean collectInstances
          if true all instances of ALDOpNode will be collected in a static Vector.
(package private)  boolean completeDAG
          This opnode prefers a complete DAG to constructed for its invocation.
private  int depth
          depth in calling stack of Operators, set when back tracing
private  java.util.Vector<ALDOpNode> directlyRegisteredChildren
          children of this opNode, set when the operate() represented by this opNode calls nested operators.
(package private)  boolean hidden
          This opnode is hidden, i.e. not include, in the processing history.
private  java.util.Vector<ALDDataPort> includedData
          ALDDataPorts created within this opNode, set during back tracing
private  ALDInputPort[] inputPorts
          the input ports of this opNode.
private  java.lang.String name
          name of the operator for which an invocations is represented by this opNode
private  java.lang.Class operatorClass
          class of the operator for which an invocations is represented by this opNode
private  ALDOutputPort[] outputPorts
          the output ports of this opNode.
private  java.util.Hashtable<java.lang.String,java.lang.String> parameterHash
          This hash contains the values of all parameters as return by the toString() method of the parameters at the time of invocation of the operator using runOp().
private  org.apache.xmlbeans.XmlObject parameterHashAsXml
          parameteHash as an XmlObject
private  ALDOpNode parent
          parent of this opNode, will be set during back tracing
private  java.lang.String version
          version of the operator for which an invocations is represented by this opNode
 
Constructor Summary
ALDOpNode(ALDOperator op, boolean hidden)
          Construct an opnode for the operator op and hidden flag
 
Method Summary
(package private)  void addChild(ALDOpNode opNode)
          Add a child found during back tracing.
(package private)  void addData(ALDDataPort data)
          Add a data port found during back tracing.
(package private)  void addDirectChild(ALDOpNode opNode)
          Add a directly registered child during invocation.
(package private) static java.util.Vector<ALDOpNode> getAllInstances()
           
protected  java.util.Vector<ALDOpNode> getChildren()
          Get the all opNode children found during back tracing.
 int getDepth()
          Get depth.
protected  java.util.Vector<ALDOpNode> getDirectlyRegisteredChildern()
          Get the all opNode children directly registered during invocation.
 boolean getHidden()
          Get hidden flag of this opNode.
protected  java.util.Vector<ALDDataPort> getIncludedData()
          Get all included data ports found during back tracing.
 ALDPort getInputPort(int i)
          Get input port with index i of this opNode.
protected  ALDInputPort[] getInputPorts()
          Get all input ports of this opNode.
 java.lang.String getName()
          Get the name of the operator represented by this opNode.
 java.lang.Class getOperatorClass()
          Get the class object of the operator represented by this opNode.
 ALDOutputPort getOutputPort(int i)
          Get output port with index i of this opNode.
protected  ALDOutputPort[] getOutputPorts()
          Get all output ports of this opNode.
 java.lang.String getParameter(java.lang.String key)
          Get value of parameter for given key.
 org.apache.xmlbeans.XmlObject getParameterHashAsXml()
          Get the parameter hash where values of parameters.
 java.util.Enumeration<java.lang.String> getParameterKeys()
          Get all keys of the parameter hash.
 ALDOpNode getParent()
          Get the parent opNode.
 java.lang.String getVersion()
          Get the software version.
 void print()
          Print information if this opNode to standard output.
static void printInstanceStatistics()
           
static void printInstanceStatistics(java.io.PrintStream stream)
           
(package private)  void setDepth(int depth)
          Set depth.
 void setHidden(boolean hidden)
          Set hidden flag of this opNode.
(package private)  void setInOrigin(int i, java.lang.Object obj, java.lang.String explanation)
          Set the origin of the input port with index i.
(package private)  void setOutOrigin(int i, java.lang.Object obj, java.lang.String explanation)
          Set the origin of the output port with index i.
 void setParent(ALDOpNode parent)
          Set the parent opNode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allInstances

private static java.util.Vector<ALDOpNode> allInstances

children

private java.util.Vector<ALDOpNode> children
children of this opNode, will be set during back tracing


collectInstances

private static boolean collectInstances
if true all instances of ALDOpNode will be collected in a static Vector. WARNING: no instance of ALDOpNode will ever be freed currently in this case


completeDAG

final boolean completeDAG
This opnode prefers a complete DAG to constructed for its invocation.


depth

private int depth
depth in calling stack of Operators, set when back tracing


directlyRegisteredChildren

private java.util.Vector<ALDOpNode> directlyRegisteredChildren
children of this opNode, set when the operate() represented by this opNode calls nested operators.


hidden

boolean hidden
This opnode is hidden, i.e. not include, in the processing history.


includedData

private java.util.Vector<ALDDataPort> includedData
ALDDataPorts created within this opNode, set during back tracing


inputPorts

private ALDInputPort[] inputPorts
the input ports of this opNode.


name

private final java.lang.String name
name of the operator for which an invocations is represented by this opNode


operatorClass

private final java.lang.Class operatorClass
class of the operator for which an invocations is represented by this opNode


outputPorts

private ALDOutputPort[] outputPorts
the output ports of this opNode.


parameterHash

private java.util.Hashtable<java.lang.String,java.lang.String> parameterHash
This hash contains the values of all parameters as return by the toString() method of the parameters at the time of invocation of the operator using runOp().


parameterHashAsXml

private org.apache.xmlbeans.XmlObject parameterHashAsXml
parameteHash as an XmlObject


parent

private ALDOpNode parent
parent of this opNode, will be set during back tracing


version

private final java.lang.String version
version of the operator for which an invocations is represented by this opNode

Constructor Detail

ALDOpNode

public ALDOpNode(ALDOperator op,
                 boolean hidden)
Construct an opnode for the operator op and hidden flag

Method Detail

addChild

void addChild(ALDOpNode opNode)
Add a child found during back tracing.

Parameters:
opNode - child to add

addData

void addData(ALDDataPort data)
Add a data port found during back tracing.


addDirectChild

void addDirectChild(ALDOpNode opNode)
Add a directly registered child during invocation.

Parameters:
opNode - child to add

getAllInstances

static java.util.Vector<ALDOpNode> getAllInstances()

getChildren

protected java.util.Vector<ALDOpNode> getChildren()
Get the all opNode children found during back tracing.


getDepth

public int getDepth()
Get depth.


getDirectlyRegisteredChildern

protected java.util.Vector<ALDOpNode> getDirectlyRegisteredChildern()
Get the all opNode children directly registered during invocation.


getHidden

public boolean getHidden()
Get hidden flag of this opNode. If set this opNode is not included into a history as explicitly constructed.


getIncludedData

protected java.util.Vector<ALDDataPort> getIncludedData()
Get all included data ports found during back tracing.


getInputPort

public ALDPort getInputPort(int i)
Get input port with index i of this opNode.


getInputPorts

protected ALDInputPort[] getInputPorts()
Get all input ports of this opNode.


getName

public java.lang.String getName()
Get the name of the operator represented by this opNode.


getOperatorClass

public java.lang.Class getOperatorClass()
Get the class object of the operator represented by this opNode.


getOutputPort

public ALDOutputPort getOutputPort(int i)
Get output port with index i of this opNode.


getOutputPorts

protected ALDOutputPort[] getOutputPorts()
Get all output ports of this opNode.


getParameter

public java.lang.String getParameter(java.lang.String key)
Get value of parameter for given key.


getParameterHashAsXml

public org.apache.xmlbeans.XmlObject getParameterHashAsXml()
Get the parameter hash where values of parameters. are represented as xml objects.


getParameterKeys

public java.util.Enumeration<java.lang.String> getParameterKeys()
Get all keys of the parameter hash.


getParent

public ALDOpNode getParent()
Get the parent opNode.


getVersion

public java.lang.String getVersion()
Get the software version.


print

public void print()
Print information if this opNode to standard output.


printInstanceStatistics

public static void printInstanceStatistics()

printInstanceStatistics

public static void printInstanceStatistics(java.io.PrintStream stream)

setDepth

void setDepth(int depth)
Set depth.


setHidden

public void setHidden(boolean hidden)
Set hidden flag of this opNode. This prevents this opNode to be included into a processing history as explicitly constructed.


setInOrigin

void setInOrigin(int i,
                 java.lang.Object obj,
                 java.lang.String explanation)
Set the origin of the input port with index i. This sets the origin of the associated input port as well as its canoncial classname. The explanation is usually to be copied from the argument descriptor of this input port.

Parameters:
i - index of the input port
obj - object to assiciate with the port
explanation - explnatory string of port

setOutOrigin

void setOutOrigin(int i,
                  java.lang.Object obj,
                  java.lang.String explanation)
Set the origin of the output port with index i. This sets the origin of the accociated output port as well as its canoncial classname. The explanation is usually to be copied from the argument descriptor of this output port.

Parameters:
i - index of the input port
obj - object to assiciate with the port
explanation - explnatory string of port

setParent

public void setParent(ALDOpNode parent)
Set the parent opNode.