INRIA & FluxMedia

fr.fluxmedia.transmorpher.graph
Class Iterator

java.lang.Object
  |
  +--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
(package private)  java.lang.String name
          Iterator name.
(package private)  Parameters parameters
          The iterator parameters.
(package private)  Repeat repeat
          The owner .
(package private)  java.lang.String type
          Iterator type
 
Constructor Summary
Iterator(java.lang.String n, java.lang.String t, Repeat r)
          Creates an instance of iterator.
 
Method Summary
 void createIterator(TProcessComposite process, TProcessFactory factory)
          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.
 void setParameters(Parameters param)
          Sets parameters.
 void setType(java.lang.String t)
          Sets the type of iterator.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

name

java.lang.String name
Iterator name.

parameters

Parameters parameters
The iterator parameters.

type

java.lang.String type
Iterator type

repeat

Repeat repeat
The owner . It must be a Repeat
Constructor Detail

Iterator

public Iterator(java.lang.String n,
                java.lang.String t,
                Repeat r)
Creates an instance of iterator.
Parameters:
n - the name of the iterator.
t - the type of the iterator.
r - 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 t)
Sets the type of iterator.
Parameters:
t - the type.

getType

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

setParameters

public void setParameters(Parameters param)
Sets parameters.
Parameters:
param - The new parameters value

getParameters

public Parameters getParameters()
Returns parameters.
Returns:
parameters.

createIterator

public void createIterator(TProcessComposite process,
                           TProcessFactory factory)
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.
factory - used for creating the TIterator.

generateJavaCode

public void generateJavaCode(Writer file)
                      throws java.io.IOException
Generates java code for this component.
Parameters:
file - The file to write the code in

generateParameters

public void generateParameters(Writer file)
                        throws java.io.IOException
Generates java code for the parameters of this iterator.
Parameters:
file - The file to write the code in.

INRIA & FluxMedia

..no bottom yet...