INRIA & FluxMedia

fr.fluxmedia.transmorpher.graph
Class CallImpl

java.lang.Object
  |
  +--java.util.Observable
        |
        +--fr.fluxmedia.transmorpher.graph.CallImpl
All Implemented Interfaces:
Call, java.io.Serializable
Direct Known Subclasses:
ApplyImpl, Dispatch, Generate, Merge, Repeat, Serialize

public abstract class CallImpl
extends java.util.Observable
implements Call

This class is an helper class which implements most of methods specified in the Call interface.

Since:
jdk 1.3 / SAX 2.0
Author:
Jerome.Euzenat@inrialpes.fr
See Also:
Serialized Form

Field Summary
protected  StringParameters attributes
          The storage object for the attributes of this call.
protected  java.lang.String id
          The id of the call
protected  PortList inPorts
          The storage structure for the in ports of this call
protected  boolean nullified
          Description of the Field
protected  PortList outPorts
          The storage structure for the out ports of this call
protected  Parameters parameters
          The storage object for the parameters of this call.
protected  Process process
          The process owner of this call
protected  boolean visited
          Description of the Field
 
Fields inherited from class java.util.Observable
changed, obs
 
Constructor Summary
CallImpl()
           
CallImpl(java.lang.String id, java.lang.String type, Process process, int numberOfIn, int numberOfOut)
          Constructor for the CallImpl object
 
Method Summary
 void addIn(int index, Port port)
          Adds a feature to the In attribute of the CallImpl object
 void addIn(Port port)
          Adds a feature to the In attribute of the CallImpl object
 void addOut(int index, Port port)
          Adds a feature to the Out attribute of the CallImpl object
 void addOut(Port port)
          Adds a feature to the Out attribute of the CallImpl object
 void clearNull()
          clear the "null" mark
 void clearVisited()
          clear the "visited" mark
 void createProcess(TProcessComposite composite)
          Creates the execution object ( from engine package ) corresponding to this call
abstract  void generateJavaCode(Writer file)
          Prints the Java code for the execution of the call
 void generateParameters(Writer file)
          This method is used for printing a java description of this Call parameters and attributes
 void generatePorts(Writer file)
          This method is used for printing a java description of this Call ports
abstract  void generateXML()
          Prints the XML expression of the call
 StringParameters getAttributes()
          Gets the process attribute of the CallImpl object
 java.lang.String getId()
          Gets the id attribute of the CallImpl object
 Parameters getParameters()
          Gets the parameters attribute of the CallImpl object
 Process getProcess()
          Gets the process attribute of the CallImpl object
 java.lang.String getType()
          Gets the type attribute of the CallImpl object
 PortList inPorts()
          Returns the storage object of the in ports
static TProcess newProcess(java.lang.String type, java.lang.Object[] params)
          This method is used for creating the execution object corresponding to this call.
 PortList outPorts()
          Returns the storage object of the out ports
 void retroNull()
          propagate the null values of the input to the output. by default, mark the channel as visited
 void setId(java.lang.String id)
          A modification of the id involved a modification in the process Struct Storage.
 void setParameters(Parameters param)
          Sets the parameters attribute of the CallImpl object
 void setType(java.lang.String t)
          Sets the type attribute of the CallImpl object
 void setUp()
          Description of the Method
 java.lang.String toString()
          Prints a description of this object in a string form
 void update(java.lang.Object object)
          A specific method for flowcomposer
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

id

protected java.lang.String id
The id of the call

parameters

protected Parameters parameters
The storage object for the parameters of this call. Parameters are parameterizable.

attributes

protected StringParameters attributes
The storage object for the attributes of this call. Attributes are not parameterizable.

inPorts

protected PortList inPorts
The storage structure for the in ports of this call

outPorts

protected PortList outPorts
The storage structure for the out ports of this call

visited

protected boolean visited
Description of the Field

nullified

protected boolean nullified
Description of the Field

process

protected Process process
The process owner of this call
Constructor Detail

CallImpl

public CallImpl()

CallImpl

public CallImpl(java.lang.String id,
                java.lang.String type,
                Process process,
                int numberOfIn,
                int numberOfOut)
Constructor for the CallImpl object
Parameters:
id - The name of this call
type - The type of this call
process - The process owner of this call
numberOfIn - The number of in ports
numberOfOut - The number of out port
Method Detail

generateXML

public abstract void generateXML()
Prints the XML expression of the call
Specified by:
generateXML in interface Call

generateJavaCode

public abstract void generateJavaCode(Writer file)
                               throws java.io.IOException
Prints the Java code for the execution of the call
Specified by:
generateJavaCode in interface Call
Parameters:
file - The writer used for printing the java code
Throws:
java.io.IOException - If an I/O error occurs

toString

public java.lang.String toString()
Prints a description of this object in a string form
Overrides:
toString in class java.lang.Object
Returns:
The string which contains the description

getId

public java.lang.String getId()
Gets the id attribute of the CallImpl object
Specified by:
getId in interface Call
Returns:
The id value

setId

public void setId(java.lang.String id)
A modification of the id involved a modification in the process Struct Storage.
Specified by:
setId in interface Call
Parameters:
id - The new id value

getType

public java.lang.String getType()
Gets the type attribute of the CallImpl object
Specified by:
getType in interface Call
Returns:
The type value

setType

public void setType(java.lang.String t)
Sets the type attribute of the CallImpl object
Specified by:
setType in interface Call
Parameters:
t - The new type value

setParameters

public void setParameters(Parameters param)
Sets the parameters attribute of the CallImpl object
Specified by:
setParameters in interface Call
Parameters:
param - The new parameters value

getParameters

public Parameters getParameters()
Gets the parameters attribute of the CallImpl object
Specified by:
getParameters in interface Call
Returns:
The parameters value

getAttributes

public StringParameters getAttributes()
Gets the process attribute of the CallImpl object
Specified by:
getAttributes in interface Call
Returns:
The process value

getProcess

public Process getProcess()
Gets the process attribute of the CallImpl object
Specified by:
getProcess in interface Call
Returns:
The process value

addOut

public void addOut(Port port)
Adds a feature to the Out attribute of the CallImpl object
Parameters:
port - The feature to be added to the Out attribute

addIn

public void addIn(Port port)
Adds a feature to the In attribute of the CallImpl object
Parameters:
port - The feature to be added to the In attribute

addIn

public void addIn(int index,
                  Port port)
Adds a feature to the In attribute of the CallImpl object
Parameters:
index - The index in the storage object at which port has to be added
port - The feature to be added to the In attribute

addOut

public void addOut(int index,
                   Port port)
Adds a feature to the Out attribute of the CallImpl object
Parameters:
index - The index in the storage object at which port has to be added
port - The feature to be added to the Out attribute

inPorts

public PortList inPorts()
Returns the storage object of the in ports
Specified by:
inPorts in interface Call
Returns:
the PortList object

outPorts

public PortList outPorts()
Returns the storage object of the out ports
Specified by:
outPorts in interface Call
Returns:
the PortList object

clearVisited

public void clearVisited()
clear the "visited" mark
Specified by:
clearVisited in interface Call

clearNull

public void clearNull()
clear the "null" mark
Specified by:
clearNull in interface Call

retroNull

public void retroNull()
propagate the null values of the input to the output. by default, mark the channel as visited

setUp

public void setUp()
Description copied from interface: Call
Description of the Method
Specified by:
setUp in interface Call

generatePorts

public void generatePorts(Writer file)
                   throws java.io.IOException
This method is used for printing a java description of this Call ports
Parameters:
file - The writer used for printing in a file
Throws:
java.io.IOException - If an I/O error occurs

generateParameters

public void generateParameters(Writer file)
                        throws java.io.IOException
This method is used for printing a java description of this Call parameters and attributes
Parameters:
file - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

createProcess

public void createProcess(TProcessComposite composite)
Creates the execution object ( from engine package ) corresponding to this call
Specified by:
createProcess in interface Call
Parameters:
composite - the container for the execution object

update

public void update(java.lang.Object object)
A specific method for flowcomposer
Parameters:
object - Description of the Parameter

newProcess

public static final TProcess newProcess(java.lang.String type,
                                        java.lang.Object[] params)
This method is used for creating the execution object corresponding to this call.
Parameters:
type - The type of the execution object to create
params - the parameters to pass to the selected constructor
Returns:
a Tprocess

INRIA & FluxMedia

..no bottom yet...