de.unihalle.informatik.Alida.operator
Class ALDOpNodePort

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDPort
      extended by de.unihalle.informatik.Alida.operator.ALDOpNodePort
Direct Known Subclasses:
ALDInputPort, ALDOutputPort

public abstract class ALDOpNodePort
extends ALDPort

Abstract class for ports residing within opNodes. Derived sub classes are input and output ports. Each port knows the opNode it resides in and its index in the corresponding array of input or output ports in the opNode. The typeName is used only for printing purposes.

Furthermore a ALDOpNodePort may record properties of the ALDData as it is passed into or out of the operator. Specifically, the properties of the data are retrieved an recorded for input data just before the operate method is invoced, and for output data when the operate method returns. Also the explanation from the operator is copied as we may not keep a reference to it to allow garbage collection. Last the canaonical class name of the ALDData bound to the port is recorded, again for input data just before the operate method is invoced, and for output data when the operate method returns.


Field Summary
private  java.lang.String classname
          The canaonical class name of the ALDData bound to the port.
private  java.lang.String descriptorName
          The descriptor name of this port within opNode
private  java.lang.String explanation
          The explanation of this port.
(package private)  ALDOpNode opNode
          The opNode this port belongs to
private  int portIndex
          The index of this port within opNode
private  java.lang.Object properties
          The properties retrieved from the data as it passed the port into or out of the operator.
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDPort
typeName
 
Constructor Summary
ALDOpNodePort(java.lang.String typeName, ALDOpNode opNode, int idx, java.lang.String descriptorName)
          Create a port for an opNode with given index within this opNode and type.
 
Method Summary
 java.lang.String getClassname()
          Return the canonical classname of the ALDData associated with this port
 java.lang.String getDescriptorName()
          Return the descriptor name of the port within its opNode
 java.lang.String getExplanation()
          Return the explanation of the port copied from the argument descriptor
 ALDOpNode getOpNode()
          Return the opNode of this port
 int getPortIndex()
          Return the index of the port within its opNode
 java.lang.Object getProperties()
          Return the properties associated with this port which have been retrieved from the data as it passed the port.
 void print(java.lang.String indent)
          Print information of this port onto System.out
 void setClassname(java.lang.String cn)
          Set the canonical classname of the ALDData associated with this port
 void setExplanation(java.lang.String e)
          Set the explanation of the port copied from the argument descriptor
(package private)  java.lang.Object setProperties(java.lang.Object properties)
          Set the properties to be associated with this port.
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDPort
getOrigin, print, setOrigin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classname

private java.lang.String classname
The canaonical class name of the ALDData bound to the port. For input data just before the operate method is invoced, and for output data when the operate method returns.


descriptorName

private java.lang.String descriptorName
The descriptor name of this port within opNode


explanation

private java.lang.String explanation
The explanation of this port.


opNode

ALDOpNode opNode
The opNode this port belongs to


portIndex

private int portIndex
The index of this port within opNode


properties

private java.lang.Object properties
The properties retrieved from the data as it passed the port into or out of the operator.

Constructor Detail

ALDOpNodePort

public ALDOpNodePort(java.lang.String typeName,
                     ALDOpNode opNode,
                     int idx,
                     java.lang.String descriptorName)
Create a port for an opNode with given index within this opNode and type.

Parameters:
typeName - type of this port as a string, used only for printing
opNode - opNode this port resides in
idx - index of this port within the corresponding array of ports within opNode
Method Detail

getClassname

public java.lang.String getClassname()
Return the canonical classname of the ALDData associated with this port

Returns:
canonical classname of the ALDData associated with this port

getDescriptorName

public java.lang.String getDescriptorName()
Return the descriptor name of the port within its opNode

Returns:
descriptor name of the port within its opNode

getExplanation

public java.lang.String getExplanation()
Return the explanation of the port copied from the argument descriptor

Returns:
explantation of the port

getOpNode

public ALDOpNode getOpNode()
Return the opNode of this port

Returns:
opNode the port resides in

getPortIndex

public int getPortIndex()
Return the index of the port within its opNode

Returns:
index of the port within ints opNode

getProperties

public java.lang.Object getProperties()
Return the properties associated with this port which have been retrieved from the data as it passed the port.

Returns:
properties of the port

print

public void print(java.lang.String indent)
Print information of this port onto System.out

Overrides:
print in class ALDPort

setClassname

public void setClassname(java.lang.String cn)
Set the canonical classname of the ALDData associated with this port

Parameters:
cn - canonical classname of the ALDData associated with this port

setExplanation

public void setExplanation(java.lang.String e)
Set the explanation of the port copied from the argument descriptor

Parameters:
e - explanation of the port within ints opNode

setProperties

java.lang.Object setProperties(java.lang.Object properties)
Set the properties to be associated with this port.

Parameters:
properties - to set for the port