INRIA & FluxMedia

fr.fluxmedia.transmorpher.graph
Class Iterator

java.lang.Object
  extended by fr.fluxmedia.transmorpher.graph.Iterator

public class Iterator
extends java.lang.Object

Transmorpher graph iterator implementation The iterator class introduces the use of a variable which will be iterated over a particular structure. It must contain a name, a type and a number of other parameters that will specify its behavior.

Since:
jdk 1.3 / SAX 2.0
Author:
Jerome.Euzenat@inrialpes.fr

Field Summary
protected  java.lang.String name
          Iterator name.
protected  Parameters parameters
          The iterator parameters.
protected  Repeat repeat
          The owner .
protected  java.lang.String type
          Iterator type
 
Constructor Summary
Iterator()
          Creates a simple instance of iterator.
Iterator(java.lang.String name, java.lang.String type, Repeat repeat)
          Creates an instance of iterator.
 
Method Summary
 void createIterator(TProcessComposite process)
          Creates a new TIterator corresponding to the iterator and adds it to the current composite process (this must be a TLoop because iterators cannot be used inside others components)
 void generateJavaCode(Writer file)
          Generates java code for this component.
 void generateParameters(Writer file)
          Generates java code for the parameters of this iterator.
 void generateXML()
          Prints the XML expression of the call.
 java.lang.String getName()
          Returns the name.
 Parameters getParameters()
          Returns parameters.
 Repeat getRepeat()
          Returns the owner (repeat) of the iterator.
 java.lang.String getType()
          Returns iterator type.
private  TIterator newIterator(java.lang.String type, java.lang.Object[] params)
          Description of the Method
 void setParameters(Parameters parameters)
          Sets parameters.
 void setType(java.lang.String type)
          Sets the type of iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Iterator name.


parameters

protected Parameters parameters
The iterator parameters.


type

protected java.lang.String type
Iterator type


repeat

protected Repeat repeat
The owner . It must be a Repeat

Constructor Detail

Iterator

public Iterator()
Creates a simple instance of iterator.


Iterator

public Iterator(java.lang.String name,
                java.lang.String type,
                Repeat repeat)
Creates an instance of iterator.

Parameters:
name - the name of the iterator.
type - the type of the iterator.
repeat - the owner of the iterator.
Method Detail

generateXML

public void generateXML()
Prints the XML expression of the call. This is a default printer that can be overloaded


getName

public java.lang.String getName()
Returns the name.

Returns:
the name of the iterator.

getRepeat

public Repeat getRepeat()
Returns the owner (repeat) of the iterator.

Returns:
the owner.

setType

public void setType(java.lang.String type)
Sets the type of iterator.

Parameters:
type - the type.

getType

public java.lang.String getType()
Returns iterator type.

Returns:
the type.

setParameters

public void setParameters(Parameters parameters)
Sets parameters.

Parameters:
parameters - The new parameters value

getParameters

public Parameters getParameters()
Returns parameters.

Returns:
parameters.

newIterator

private TIterator newIterator(java.lang.String type,
                              java.lang.Object[] params)
Description of the Method

Parameters:
type - Description of the Parameter
params - Description of the Parameter
Returns:
Description of the Return Value

createIterator

public void createIterator(TProcessComposite process)
Creates a new TIterator corresponding to the iterator and adds it to the current composite process (this must be a TLoop because iterators cannot be used inside others components)

Parameters:
process - the current TLoop.

generateJavaCode

public void generateJavaCode(Writer file)
                      throws java.io.IOException
Generates java code for this component.

Parameters:
file - a writer for printing in a file
Throws:
java.io.IOException - when an IO errors occur

generateParameters

public void generateParameters(Writer file)
                        throws java.io.IOException
Generates java code for the parameters of this iterator.

Parameters:
file - a writer for printing in a file
Throws:
java.io.IOException - when an IO errors occur

INRIA & FluxMedia

..no bottom yet...