org.gcube.datatransformation.datatransformationlibrary.model
Class TransformationProgram

java.lang.Object
  extended by org.gcube.datatransformation.datatransformationlibrary.model.TransformationProgram

public class TransformationProgram
extends Object

Author:
Dimitris Katris, NKUA

A transformation program is an XML document describing one or more possible transformations from a source content type to a target content type. Each transformation program references to at most one Program and it contains one or more TransformationUnits for each possible transformation.


Constructor Summary
TransformationProgram()
           
 
Method Summary
 void fromDOM(Element tpresource)
          Creates a transformation program instance from its xml representation.
 String getDescription()
          Returns the description of the transformation program.
 String getId()
          Returns the id of the transformation program.
 String getName()
          Returns the name of the transformation program.
 ArrayList<TransformationUnit> getTransformationUnits()
          Returns the TUs that this transformation program contains.
 Transformer getTransformer()
          Returns the transformer that this transformation program references.
static void main(String[] args)
          A simple test for parsing and serializing transformation programs.
 void setDescription(String description)
          Sets the description of the transformation program.
 void setId(String id)
          Sets the id of the transformation program.
 void setName(String name)
          Sets the name of the transformation program.
 void setTransformationUnits(ArrayList<TransformationUnit> transformationUnits)
          Sets the TUs that this transformation program contains.
 void setTransformer(Transformer transformer)
          Sets the transformer that this transformation program references.
 void toDom(Element tpresource)
           
 String toXML()
          Returns the xml representation of the transformation program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformationProgram

public TransformationProgram()
Method Detail

getId

public String getId()
Returns the id of the transformation program.

Returns:
the id of the transformation program.

setId

public void setId(String id)
Sets the id of the transformation program.

Parameters:
id - the id of the transformation program.

getName

public String getName()
Returns the name of the transformation program.

Returns:
the name of the transformation program.

setName

public void setName(String name)
Sets the name of the transformation program.

Parameters:
name - the name of the transformation program.

getDescription

public String getDescription()
Returns the description of the transformation program.

Returns:
the description of the transformation program.

setDescription

public void setDescription(String description)
Sets the description of the transformation program.

Parameters:
description - the description of the transformation program.

getTransformationUnits

public ArrayList<TransformationUnit> getTransformationUnits()
Returns the TUs that this transformation program contains.

Returns:
the TUs that this transformation program contains.

setTransformationUnits

public void setTransformationUnits(ArrayList<TransformationUnit> transformationUnits)
Sets the TUs that this transformation program contains.

Parameters:
transformationUnits - the TUs that this transformation program contains.

getTransformer

public Transformer getTransformer()
Returns the transformer that this transformation program references.

Returns:
the transformer that this transformation program references.

setTransformer

public void setTransformer(Transformer transformer)
Sets the transformer that this transformation program references.

Parameters:
transformer - the transformer that this transformation program references.

main

public static void main(String[] args)
                 throws Exception
A simple test for parsing and serializing transformation programs.

Parameters:
args - The arguments of the main method.
Throws:
Exception - If an error occurred in the test.

fromDOM

public void fromDOM(Element tpresource)
             throws Exception
Creates a transformation program instance from its xml representation.

Parameters:
tpresource - The xml representation.
Throws:
Exception - If the transformation program could not be parsed.

toDom

public void toDom(Element tpresource)
           throws Exception
Throws:
Exception

toXML

public String toXML()
             throws Exception
Returns the xml representation of the transformation program.

Returns:
the xml representation of the transformation program.
Throws:
Exception - If the transformation program could not be serialized.


Copyright © 2013. All Rights Reserved.