public class TransformationProgram extends Object
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 and Description |
|---|
TransformationProgram() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public String getId()
public void setId(String id)
id - the id of the transformation program.public String getName()
public void setName(String name)
name - the name of the transformation program.public String getDescription()
public void setDescription(String description)
description - the description of the transformation program.public ArrayList<TransformationUnit> getTransformationUnits()
public void setTransformationUnits(ArrayList<TransformationUnit> transformationUnits)
transformationUnits - the TUs that this transformation program contains.public Transformer getTransformer()
public void setTransformer(Transformer transformer)
transformer - the transformer that this transformation program references.public static void main(String[] args) throws Exception
args - The arguments of the main method.Exception - If an error occurred in the test.public void fromDOM(Element tpresource) throws Exception
tpresource - The xml representation.Exception - If the transformation program could not be parsed.Copyright © 2014. All Rights Reserved.