org.griphyn.vdl.classes
Class Transformation

java.lang.Object
  extended by org.griphyn.vdl.Chimera
      extended by org.griphyn.vdl.classes.VDL
          extended by org.griphyn.vdl.classes.Definition
              extended by org.griphyn.vdl.classes.Transformation
All Implemented Interfaces:
Serializable, Comparable

public class Transformation
extends Definition
implements Serializable

Transformation is an implementation of an abstract VDL Definition. A transformation describes the immutable template of an input, processing, and output (IPO) application. The environment is part of the capture. The template can be parametrized using formal arguments, which are part of the transformation definition. Think of a transformation as something similar to a C function definition. Mutable parts are hidden in the arguments, and instantiated in Derivation.

FIXME: The mixing of compounds with simple transformations within the same class instead of hierarchy needs some serious redesigning. Unfortunately, this entails a redesign of just about everything...

Version:
$Revision: 50 $
Author:
Jens-S. V??ckler, Yong Zhao
See Also:
Definition, Definitions, Derivation, Serialized Form

Field Summary
private  ArrayList m_argumentList
          The argument list describes the command line arguments as sum of substrings.
private  String m_argumentSeparator
          All arguments are, for ease-of-use, separated by a single space.
private  ArrayList m_callList
          Each entry in the call list describes an invocation of another transformation, complete with actual arguments etc.
private  TreeMap m_declareMap
          Captures the argument name indexed map of formal arguments.
private  TreeMap m_localMap
          Each compound transformation may declare local variables.
private  ArrayList m_profileList
          The profile list encapsulates scheduler specific data in a generic structure.
 
Fields inherited from class org.griphyn.vdl.classes.Definition
DERIVATION, TRANSFORMATION
 
Constructor Summary
Transformation()
          Default ctor: This ctor will frequently be used by the SAX parser to create a hollow instance.
Transformation(String name)
          Minimum c'tor: Any transformation should be named.
Transformation(String namespace, String name, String version)
          Standard ctor: This will name a transformation with the complete tripel necessary to access it correctly (w/o guessing).
 
Method Summary
 void addArgument(Argument vArgument)
          Accessor: Adds an argument to the list of arguments
 void addArgument(int index, Argument vArgument)
          Accessor: Inserts an argument at an arbitrary place into the list.
 void addCall(Call vCall)
          Accessor: Adds an invocation to the list of calls.
 void addCall(int index, Call vCall)
          Accessor: Inserts an invocation at an arbitrary place into the list.
 void addDeclare(Declare vDeclare)
          Accessor: Adds a formal argument declaration to the map of declarations.
 void addLocal(Local vLocal)
          Accessor: Adds a temporary variable declaration to the map of local variables.
 void addProfile(int index, Profile vProfile)
          Accessor: Inserts a profile definition at an arbitrary position into the list of profiles.
 void addProfile(Profile vProfile)
          Accessor: Appends a profile definition to the list of profiles.
 Enumeration enumerateArgument()
          Deprecated. Use the new Collection based interfaces
 Enumeration enumerateCall()
          Deprecated. Use the new Collection based interfaces
 Enumeration enumerateDeclare()
          Deprecated. Use the new Collection based interfaces
 Enumeration enumerateLocal()
          Deprecated. Use the new Collection based interfaces
 Enumeration enumerateProfile()
          Deprecated. Use the new Collection based interfaces
 Argument[] getArgument()
          Deprecated. Use the new Collection based interfaces
 Argument getArgument(int index)
          Accessor: Obtains an Argument at an arbitrary position.
 int getArgumentCount()
          Accessor: Obtains the count of items in the argument list.
 List getArgumentList()
          Accessor: Obtains the complete commandline arguments.
 String getArgumentSeparator()
          Gets the separating string between multiple Argument elements.
 Call[] getCall()
          Deprecated. Use the new Collection based interfaces
 Call getCall(int index)
          Accessor: Obtains an Call at an arbitrary position.
 int getCallCount()
          Accessor: Obtains the count of items in the call list.
 List getCallList()
          Accessor: Obtains the invocation list.
 Declare[] getDeclare()
          Deprecated. Use the new Collection based interfaces
 Declare getDeclare(String name)
          Accessor: Obtains the declaration of a formal argument as referenced by its variable name.
 int getDeclareCount()
          Accessor: Counts the number of formal arguments known to this transformation.
 List getDeclareList()
          Accessor: Obtain all known formal arguments.
 Map getDeclareMap()
          Accessor: Obtains all known formal arguments.
 Local[] getLocal()
          Deprecated. Use the new Collection based interfaces
 Local getLocal(String name)
          Accessor: Obtains the declaration of a temporary variable as referenced by its name.
 int getLocalCount()
          Accessor: Counts the number of temporary variables known to this transformation.
 List getLocalList()
          Accessor: Obtains all known temporary variables.
 Map getLocalMap()
          Accessor: Obtains all known temporary variables.
 Profile[] getProfile()
          Deprecated. Use the new Collection based interfaces
 Profile getProfile(int index)
          Accessor: Obtains an Profile at an arbitrary position.
 int getProfileCount()
          Accessor: Counts the number of profile specifications known to this job.
 List getProfileList()
          Accessor: Obtain a read-only copy of the list of all Profile specifications.
 int getType()
          Type accessor for quick distinction between definitions.
 String identify()
          Constructs dynamically a short descriptive, hopefully unique identifier for this transformation.
 boolean isSimple()
          Predicate: Determines, if this is a simple TR (as opposed to compound).
 Iterator iterateArgument()
          Accessor: Provides an iterator for the Argument list.
 Iterator iterateCall()
          Accessor: Provides an iterator for the Call list.
 Iterator iterateDeclare()
          Accessor: Provides an iterator for the Declare map.
 Iterator iterateLocal()
          Accessor: Provides an iterator for local variables.
 Iterator iterateProfile()
          Accessor: Provides an iterator for the Profile list.
 ListIterator listIterateArgument()
          Accessor: Provides a list iterator for the Argument list.
 ListIterator listIterateArgument(int start)
          Accessor: Provides a list iterator for the Argument list.
 ListIterator listIterateCall()
          Accessor: Provides a list iterator for the Call list.
 ListIterator listIterateCall(int start)
          Accessor: Provides a list iterator for the Call list.
 ListIterator listIterateProfile()
          Accessor: Provides a list iterator for the Profile list.
 ListIterator listIterateProfile(int start)
          Accessor: Provides a list iterator for the Profile list.
 void removeAllArgument()
          Accessor: Removes all commandline arguments.
 void removeAllCall()
          Accessor: Removes all calls.
 void removeAllDeclare()
          Accessor: Removes all formal arguments.
 void removeAllLocal()
          Accessor: Removes all temporary variables.
 void removeAllProfile()
          Accessor: Removes all profile declarations.
 Argument removeArgument(int index)
          Accessor: Removes a commandline argument fragment from the commandline.
 Call removeCall(int index)
          Accessor: Removes a single call fragment from the list of calls.
 Declare removeDeclare(String name)
          Accessor: Removes a formal argument.
 Local removeLocal(String name)
          Accessor: Removes a temporary variable.
 Profile removeProfile(int index)
          Accessor: Removes a profile.
 void setArgument(Argument[] argumentArray)
          Deprecated. Use the new Collection based interfaces
 void setArgument(Collection arguments)
          Accessor: Replace the commandline arguments with a new commandline argument.
 void setArgument(int index, Argument vArgument)
          Accessor: Overwrites an commandline argument fragment with a new one.
 void setArgumentSeparator(String separator)
          Overwrites the internal separator string between neighbouring Argument elements with new content.
 void setCall(Call[] callArray)
          Deprecated. Use the new Collection based interfaces
 void setCall(Collection calls)
          Accessor: Replace the calls with a new call list.
 void setCall(int index, Call vCall)
          Accessor: Overwrites a call with a new one.
 void setDeclare(Collection declares)
          Accessor: Replace all declarations by a new set of declarations.
 void setDeclare(Declare vDeclare)
          Accessor: Insert or replace a declaration with a new version.
 void setDeclare(Declare[] declareArray)
          Deprecated. Use the new Collection based interfaces
 void setDeclare(Map declares)
          Accessor: Replace all declarations by a new set of declarations.
 void setLocal(Collection locals)
          Accessor: Replaces all declarations by a new set of declarations.
 void setLocal(Local vLocal)
          Accessor: Inserts or replaces a temporary variable with a new version.
 void setLocal(Local[] localArray)
          Deprecated. Use the new Collection based interfaces
 void setLocal(Map locals)
          Accessor: Replace all declarations by a new set of declarations.
 void setProfile(Collection profiles)
          Accessor: Replace the internal profiles with a new list.
 void setProfile(int index, Profile vProfile)
          Accessor: Overwrites a profile with a new profile
 void setProfile(Profile[] profileArray)
          Deprecated. Use the new Collection based interfaces
 void toString(Writer stream)
          Dumps the content of the given element into a string.
 void toXML(Writer stream, String indent, String namespace)
          Dump the state of the current element as XML output.
 
Methods inherited from class org.griphyn.vdl.classes.Definition
compareTo, equals, getDescription, getKeyword, getName, getNamespace, getTitle, getUrl, getVersion, hashCode, match, setDescription, setKeyword, setName, setNamespace, setTitle, setUrl, setVersion, shortID, shortID, toXML, toXML
 
Methods inherited from class org.griphyn.vdl.Chimera
escape, quote, toString, toXML, toXML, writeAttribute
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_declareMap

private TreeMap m_declareMap
Captures the argument name indexed map of formal arguments. Each element is of type Declare with an optional default value of type Value.

See Also:
Declare

m_profileList

private ArrayList m_profileList
The profile list encapsulates scheduler specific data in a generic structure.

See Also:
Profile

m_argumentList

private ArrayList m_argumentList
The argument list describes the command line arguments as sum of substrings. Each element is an Argument, and can be optionally addressed by a name.

See Also:
Argument

m_argumentSeparator

private String m_argumentSeparator
All arguments are, for ease-of-use, separated by a single space. If this is not wanted, the user can overwrite the separator, including setting it to the empty string and null.


m_localMap

private TreeMap m_localMap
Each compound transformation may declare local variables.


m_callList

private ArrayList m_callList
Each entry in the call list describes an invocation of another transformation, complete with actual arguments etc.

See Also:
Call
Constructor Detail

Transformation

public Transformation()
Default ctor: This ctor will frequently be used by the SAX parser to create a hollow instance. Note that a transformation can be named.


Transformation

public Transformation(String name)
Minimum c'tor: Any transformation should be named.

Parameters:
name - is the name of the transformation in the current namespace and version context.
See Also:
Definition

Transformation

public Transformation(String namespace,
                      String name,
                      String version)
Standard ctor: This will name a transformation with the complete tripel necessary to access it correctly (w/o guessing).

Parameters:
name - is the name of the transformation in the current namespace and version context.
namespace - is the namespace that the transformation resides in.
version - is a version number.
See Also:
Definition
Method Detail

getType

public int getType()
Type accessor for quick distinction between definitions.

Specified by:
getType in class Definition
Returns:
the value of Definition.TRANSFORMATION

addArgument

public void addArgument(Argument vArgument)
                 throws IndexOutOfBoundsException
Accessor: Adds an argument to the list of arguments

Parameters:
vArgument - is the argument to append to the command line arguments.
Throws:
IndexOutOfBounds - if the argument does not fit into the list.
IndexOutOfBoundsException
See Also:
Argument

addArgument

public void addArgument(int index,
                        Argument vArgument)
                 throws IndexOutOfBoundsException
Accessor: Inserts an argument at an arbitrary place into the list. Each component in this vector with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously.

Parameters:
index - is the position to insert an argument
vArgument - is the argument to append to the command line arguments.
Throws:
IndexOutOfBounds - if the argument does not fit into the list.
IndexOutOfBoundsException
See Also:
getArgument( int ), setArgument( int, Argument ), Argument

addCall

public void addCall(Call vCall)
             throws IndexOutOfBoundsException
Accessor: Adds an invocation to the list of calls.

Parameters:
vCall - is the invocation to append to the list of calls.
Throws:
IndexOutOfBounds - if the argument does not fit into the list.
IndexOutOfBoundsException
See Also:
Call

addCall

public void addCall(int index,
                    Call vCall)
             throws IndexOutOfBoundsException
Accessor: Inserts an invocation at an arbitrary place into the list. Each component in this vector with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously.

Parameters:
index - is the position to insert an invocation
vCall - is the invocation to append to the list of calls.
Throws:
IndexOutOfBounds - if the argument does not fit into the list.
IndexOutOfBoundsException
See Also:
setCall( int, Call ), getCall( int ), Call

addDeclare

public void addDeclare(Declare vDeclare)
Accessor: Adds a formal argument declaration to the map of declarations.

Parameters:
vDeclare - is the formal argument to add to the declarations.
See Also:
getDeclare( String ), setDeclare( Declare ), Declare

addLocal

public void addLocal(Local vLocal)
Accessor: Adds a temporary variable declaration to the map of local variables.

Parameters:
vLocal - is the local variable declaration with value.
See Also:
getLocal( String ), setLocal( Local ), Local

addProfile

public void addProfile(Profile vProfile)
                throws IndexOutOfBoundsException
Accessor: Appends a profile definition to the list of profiles.

Parameters:
vProfile - is the profile to append to remembered profiles.
Throws:
IndexOutOfBounds - if the argument does not fit into the list.
IndexOutOfBoundsException
See Also:
Profile

addProfile

public void addProfile(int index,
                       Profile vProfile)
                throws IndexOutOfBoundsException
Accessor: Inserts a profile definition at an arbitrary position into the list of profiles. Each component in this vector with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously.

Parameters:
index - is the position to insert the definitions into.
vProfile - is the profile to append to remembered profiles.
Throws:
IndexOutOfBounds - if the argument does not fit into the list.
IndexOutOfBoundsException
See Also:
getProfile( int ), setProfile( int, Profile ), Profile

enumerateArgument

public Enumeration enumerateArgument()
Deprecated. Use the new Collection based interfaces

Accessor: Provides an iterator for the Argument list.

Returns:
the iterator for the Argument list.
See Also:
Argument, Enumeration

enumerateCall

public Enumeration enumerateCall()
Deprecated. Use the new Collection based interfaces

Accessor: Provides an iterator for the Call list.

Returns:
the iterator for the Call list.
See Also:
Call, Enumeration

enumerateDeclare

public Enumeration enumerateDeclare()
Deprecated. Use the new Collection based interfaces

Accessor: Provides an iterator for the Declare map.

Returns:
the iterator for the Declare list.
See Also:
Declare, Enumeration

enumerateLocal

public Enumeration enumerateLocal()
Deprecated. Use the new Collection based interfaces

Accessor: Provides an iterator for the local variables.

Returns:
the iterator over all locally declared variables.
See Also:
Local, Enumeration

enumerateProfile

public Enumeration enumerateProfile()
Deprecated. Use the new Collection based interfaces

Accessor: Provides an iterator for the Profile list.

Returns:
the iterator for the Profile list.
See Also:
Profile, Enumeration

isSimple

public boolean isSimple()
Predicate: Determines, if this is a simple TR (as opposed to compound).

Returns:
true, if this a simple transformation.

getArgument

public Argument getArgument(int index)
                     throws IndexOutOfBoundsException
Accessor: Obtains an Argument at an arbitrary position.

Parameters:
index - is the place to look up the element at.
Returns:
the argument at the specified place.
Throws:
IndexOutOfBoundsException - if the referenced position does not exist.
See Also:
Argument

getArgument

public Argument[] getArgument()
Deprecated. Use the new Collection based interfaces

Accessor: Obtains the complete commandline arguments. This array is a copy to avoid write-through modifications.

Returns:
an array with all commandline arguments inside.
See Also:
setArgument( Argument[] ), Argument

getArgumentCount

public int getArgumentCount()
Accessor: Obtains the count of items in the argument list.

Returns:
the number of arguments in the commandline argument list.
See Also:
Argument

getArgumentList

public List getArgumentList()
Accessor: Obtains the complete commandline arguments. The resulting list is read-only.

Returns:
an array with all commandline arguments inside.
See Also:
setArgument( Collection ), Argument

getArgumentSeparator

public String getArgumentSeparator()
Gets the separating string between multiple Argument elements.

Returns:
The current state of the separator. The text may be null.
See Also:
setArgumentSeparator(String)

getCall

public Call getCall(int index)
             throws IndexOutOfBoundsException
Accessor: Obtains an Call at an arbitrary position.

Parameters:
index - is the place to look up the element at.
Returns:
the call at the specified place.
Throws:
IndexOutOfBoundsException - if the referenced position does not exist.
See Also:
addCall( int, Call ), setCall( int, Call ), Call

getCall

public Call[] getCall()
Deprecated. Use the new Collection based interfaces

Accessor: Obtains the invocation list. This array is a copy of the original to avoid write-through modifications.

Returns:
an array with all calls inside.
See Also:
Call

getCallCount

public int getCallCount()
Accessor: Obtains the count of items in the call list.

Returns:
the number of calls in the call list.
See Also:
Call

getCallList

public List getCallList()
Accessor: Obtains the invocation list.

Returns:
a read-only list with all calls inside.
See Also:
setCall( Collection ), Call

getDeclare

public Declare getDeclare(String name)
Accessor: Obtains the declaration of a formal argument as referenced by its variable name.

Parameters:
name - is the symbolic index and variable name to obtain the declaration for.
Returns:
the Declare object referenced by the name. May return null, if there is no such object.
See Also:
addDeclare( Declare ), setDeclare( Declare ), Declare

getDeclare

public Declare[] getDeclare()
Deprecated. Use the new Collection based interfaces

Accessor: Obtain all known formal arguments. Note that the array will be arbitrarily sorted, depending on Java's hash function.

Returns:
a list of all formal arguments.
See Also:
Declare, setDeclare( Declare[] )

getDeclareCount

public int getDeclareCount()
Accessor: Counts the number of formal arguments known to this transformation.

Returns:
the formal argument count

getDeclareList

public List getDeclareList()
Accessor: Obtain all known formal arguments. Note that the list will be arbitrarily sorted, depending on Java's hash function. It is also a read-only list to avoid modifications outside the API.

Returns:
a list of all formal arguments.
See Also:
setDeclare( Collection ), Declare

getDeclareMap

public Map getDeclareMap()
Accessor: Obtains all known formal arguments. The map is a read-only map to avoid modifications outside the API.

Returns:
a map with all formal arguments.
See Also:
setDeclare( Map ), Declare

getLocal

public Local getLocal(String name)
Accessor: Obtains the declaration of a temporary variable as referenced by its name.

Parameters:
name - is the variable name to obtain the declaration for.
Returns:
the Local object referenced by the name. May return null, if there is no such object.
See Also:
addLocal( Local ), setLocal( Local ), Local

getLocal

public Local[] getLocal()
Deprecated. Use the new Collection based interfaces

Accessor: Obtain all known temporary variables. Note that the array will be arbitrarily sorted, depending on Java's hash function.

Returns:
a list of all temporary variables.
See Also:
setLocal( Local[] ), Local

getLocalCount

public int getLocalCount()
Accessor: Counts the number of temporary variables known to this transformation.

Returns:
the temporary variable count

getLocalList

public List getLocalList()
Accessor: Obtains all known temporary variables. Note that the list will be arbitrarily sorted, depending on Java's hash function. It is also a read-only list to avoid modifications outside the API.

Returns:
a list of all formal arguments.
See Also:
setLocal( Collection ), Local

getLocalMap

public Map getLocalMap()
Accessor: Obtains all known temporary variables. The map is a read-only map to avoid modifications outside the API.

Returns:
a map with all formal arguments.
See Also:
setLocal( Map ), Local

getProfile

public Profile getProfile(int index)
                   throws IndexOutOfBoundsException
Accessor: Obtains an Profile at an arbitrary position.

Parameters:
index - is the place to look up the element at.
Throws:
IndexOutOfBoundsException - if the referenced position does not exist.
See Also:
addProfile( int, Profile ), setProfile( int, Profile ), Profile

getProfile

public Profile[] getProfile()
Deprecated. Use the new Collection based interfaces

Accessor: Obtain a copy of the list of all Profile specifications.

Returns:
a collection containing the scheduler specific environment options for the job.
See Also:
setProfile( Profile[] ), Profile

getProfileCount

public int getProfileCount()
Accessor: Counts the number of profile specifications known to this job.

Returns:
the number of profiles
See Also:
Profile

getProfileList

public List getProfileList()
Accessor: Obtain a read-only copy of the list of all Profile specifications.

Returns:
a collection containing the scheduler specific environment options for the job.
See Also:
setProfile( Collection ), Profile

iterateArgument

public Iterator iterateArgument()
Accessor: Provides an iterator for the Argument list.

Returns:
the iterator for the Argument list.
See Also:
Argument

iterateCall

public Iterator iterateCall()
Accessor: Provides an iterator for the Call list.

Returns:
the iterator for the Call list.
See Also:
Call

iterateDeclare

public Iterator iterateDeclare()
Accessor: Provides an iterator for the Declare map.

Returns:
the iterator for the Declare list.
See Also:
Declare

iterateLocal

public Iterator iterateLocal()
Accessor: Provides an iterator for local variables.

Returns:
the iterator over all local variables.
See Also:
Declare

iterateProfile

public Iterator iterateProfile()
Accessor: Provides an iterator for the Profile list.

Returns:
the iterator for the Profile list.
See Also:
Profile

listIterateArgument

public ListIterator listIterateArgument()
Accessor: Provides a list iterator for the Argument list.

Returns:
the iterator for the Argument list.
See Also:
Argument

listIterateCall

public ListIterator listIterateCall()
Accessor: Provides a list iterator for the Call list.

Returns:
the iterator for the Call list.
See Also:
Call

listIterateProfile

public ListIterator listIterateProfile()
Accessor: Provides a list iterator for the Profile list.

Returns:
the iterator for the Profile list.
See Also:
Profile

listIterateArgument

public ListIterator listIterateArgument(int start)
Accessor: Provides a list iterator for the Argument list.

Parameters:
start - is the start index
Returns:
the iterator for the Argument list.
See Also:
Argument

listIterateCall

public ListIterator listIterateCall(int start)
Accessor: Provides a list iterator for the Call list.

Parameters:
start - is the start index
Returns:
the iterator for the Call list.
See Also:
Call

listIterateProfile

public ListIterator listIterateProfile(int start)
Accessor: Provides a list iterator for the Profile list.

Parameters:
start - is the start index
Returns:
the iterator for the Profile list.
See Also:
Profile

removeAllArgument

public void removeAllArgument()
Accessor: Removes all commandline arguments.

See Also:
Argument

removeAllCall

public void removeAllCall()
Accessor: Removes all calls.

See Also:
Call

removeAllDeclare

public void removeAllDeclare()
Accessor: Removes all formal arguments.

See Also:
Declare

removeAllLocal

public void removeAllLocal()
Accessor: Removes all temporary variables.

See Also:
Local

removeAllProfile

public void removeAllProfile()
Accessor: Removes all profile declarations.

See Also:
Profile

removeArgument

public Argument removeArgument(int index)
Accessor: Removes a commandline argument fragment from the commandline. Each component in this vector with an index greater or equal to the specified index is shifted downward to have an index one smaller than the value it had previously. The size of this vector is decreased by 1.

Parameters:
index - is the position to remove the argument fragment from.
Returns:
the removed Argument.
Throws:
ArrayIndexOutOfBoundsException - if the index was invalid.
See Also:
Argument

removeCall

public Call removeCall(int index)
Accessor: Removes a single call fragment from the list of calls. Each component in this vector with an index greater or equal to the specified index is shifted downward to have an index one smaller than the value it had previously. The size of this vector is decreased by 1.

Parameters:
index - is the position to remove the call fragment from.
Returns:
the removed Call.
Throws:
ArrayIndexOutOfBoundsException - if the index was invalid.
See Also:
Call

removeDeclare

public Declare removeDeclare(String name)
Accessor: Removes a formal argument.

Parameters:
name - is the name of the argument to remove
Returns:
the removed formal argument.
See Also:
Declare

removeLocal

public Local removeLocal(String name)
Accessor: Removes a temporary variable.

Parameters:
name - is the name of the temporary variable to remove
Returns:
the removed variable.
See Also:
Local

removeProfile

public Profile removeProfile(int index)
Accessor: Removes a profile. Each component in this vector with an index greater or equal to the specified index is shifted downward to have an index one smaller than the value it had previously. The size of this vector is decreased by 1.

Parameters:
index - is the position to remove the profile from.
Returns:
the removed Profile.
Throws:
ArrayIndexOutOfBoundsException - if the index was invalid.
See Also:
Profile

setArgument

public void setArgument(int index,
                        Argument vArgument)
                 throws IndexOutOfBoundsException
Accessor: Overwrites an commandline argument fragment with a new one.

Parameters:
index - is the position to overwrite the element at
vArgument - is the new commandline argument.
Throws:
IndexOutOfBoundsException - if the position does not exist.
See Also:
Argument

setArgument

public void setArgument(Argument[] argumentArray)
Deprecated. Use the new Collection based interfaces

Accessor: Replace the commandline arguments with a new commandline argument.

Parameters:
argumentArray - is the new commandline argument array.
See Also:
Argument

setArgument

public void setArgument(Collection arguments)
Accessor: Replace the commandline arguments with a new commandline argument.

Parameters:
arguments - is the new commandline argument array.
See Also:
Argument

setArgumentSeparator

public void setArgumentSeparator(String separator)
Overwrites the internal separator string between neighbouring Argument elements with new content.

Parameters:
separator - is the new string separating neighbouring arguments.
See Also:
getArgumentSeparator()

setCall

public void setCall(int index,
                    Call vCall)
             throws IndexOutOfBoundsException
Accessor: Overwrites a call with a new one.

Parameters:
index - is the position to overwrite the element at
vCall - is the new call.
Throws:
IndexOutOfBoundsException - if the position does not exist.
See Also:
addCall( int, Call ), getCall( int ), Call

setCall

public void setCall(Call[] callArray)
Deprecated. Use the new Collection based interfaces

Accessor: Replace the calls with a new call list.

Parameters:
callArray - is the new call array.
See Also:
Call

setCall

public void setCall(Collection calls)
Accessor: Replace the calls with a new call list.

Parameters:
calls - is the new call array.
See Also:
Call

setDeclare

public void setDeclare(Declare vDeclare)
Accessor: Insert or replace a declaration with a new version.

Parameters:
vDeclare - is the declaration to insert or replace.
See Also:
Declare, Hashtable.put( Object, Object )

setDeclare

public void setDeclare(Declare[] declareArray)
Deprecated. Use the new Collection based interfaces

Accessor: Replace all declarations by a new set of declarations. This method effectively exchanges all formal arguments of a job.

Parameters:
declareArray - is the new set of declarations.
See Also:
Declare

setDeclare

public void setDeclare(Collection declares)
Accessor: Replace all declarations by a new set of declarations. This method effectively exchanges all formal arguments of a job.

Parameters:
declares - is the new set of declarations.
See Also:
Declare

setDeclare

public void setDeclare(Map declares)
Accessor: Replace all declarations by a new set of declarations. This method effectively exchanges all formal arguments of a job.

Parameters:
declares - is the new set of declarations.
See Also:
Declare

setLocal

public void setLocal(Local vLocal)
Accessor: Inserts or replaces a temporary variable with a new version.

Parameters:
vLocal - is the temporary variable to insert or replace.
See Also:
Local, Hashtable.put( Object, Object )

setLocal

public void setLocal(Local[] localArray)
Deprecated. Use the new Collection based interfaces

Accessor: Replaces all declarations by a new set of declarations. This method effectively exchanges all temporary variables.

Parameters:
localArray - is the new set of local variable declarations.
See Also:
Local

setLocal

public void setLocal(Collection locals)
Accessor: Replaces all declarations by a new set of declarations. This method effectively exchanges all temporary variables.

Parameters:
locals - is the new set of temporary variable declarations.
See Also:
Local

setLocal

public void setLocal(Map locals)
Accessor: Replace all declarations by a new set of declarations. This method effectively exchanges all temporary variables.

Parameters:
locals - is the new set of declarations.
See Also:
Local

setProfile

public void setProfile(int index,
                       Profile vProfile)
                throws IndexOutOfBoundsException
Accessor: Overwrites a profile with a new profile

Parameters:
index - is the position to overwrite the profile at.
vProfile - is the new profile to use in overwriting.
Throws:
IndexOutOfBoundsException - if the position does not exist.
See Also:
Profile

setProfile

public void setProfile(Profile[] profileArray)
Deprecated. Use the new Collection based interfaces

Accessor: Replace the internal profiles with a new list.

Parameters:
profileArray - is the new list of profiles to use for the job.
See Also:
Profile

setProfile

public void setProfile(Collection profiles)
Accessor: Replace the internal profiles with a new list.

Parameters:
profiles - is the new list of profiles to use for the job.
See Also:
Profile

identify

public String identify()
Constructs dynamically a short descriptive, hopefully unique identifier for this transformation.

Specified by:
identify in class Definition
Returns:
a string describing the transformation
See Also:
Object.hashCode()

toString

public void toString(Writer stream)
              throws IOException
Dumps the content of the given element into a string. This function traverses all sibling classes as necessary and converts the data into textual output.

Specified by:
toString in class Chimera
Parameters:
stream - is a stream opened and ready for writing. This can also be a string stream for efficient output. The stream interface should be able to handle large elements efficiently.
Throws:
IOException - if something fishy happens to the stream.

toXML

public void toXML(Writer stream,
                  String indent,
                  String namespace)
           throws IOException
Dump the state of the current element as XML output. This function traverses all sibling classes as necessary, and converts the data into pretty-printed XML output. The stream interface should be able to handle large output efficiently, if you use a buffered writer.

Specified by:
toXML in class Chimera
Parameters:
stream - is a stream opened and ready for writing. This can also be a string stream for efficient output.
indent - is a String of spaces used for pretty printing. The initial amount of spaces should be an empty string. The parameter is used internally for the recursive traversal. If a null value is specified, no indentation nor linefeeds will be generated.
namespace - is the XML schema namespace prefix. If neither empty nor null, each element will be prefixed with this prefix, and the root element will map the XML namespace.
Throws:
IOException - if something fishy happens to the stream.
See Also:
BufferedWriter


Copyright © 2007 The University of Southern California. All Rights Reserved.