|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ashridgetech.jamda.transform.Transformation
Runs a transformation on an XMI UML file.
Field Summary | |
static java.lang.String |
CONFIG_COMMENT_MARKER
|
Constructor Summary | |
Transformation()
Construct a Transformation configured to do nothing. |
Method Summary | |
void |
addTransformer(ModelTransformer transformer)
Add a new ModelTransformer to the configuration. |
java.util.List |
getModelTransformers()
Get the ModelTransformer s in this Transformation . |
java.io.File |
getOutputFile()
Get the file to which a list of transformations applied is output |
java.io.File |
getStylesheetFile()
Get the XSLT file used to process the input file before it is loaded |
Model |
run(java.io.File xmiFile)
Run a transformation against a given XMI file. |
void |
run(Model inputModel)
Run a transformation against a given Model . |
Model |
run(java.lang.String xmiFileName)
Run a transformation against a given XMI file. |
void |
setOutputFile(java.io.File outputFile)
Set the file to which a list of transformations applied is output |
void |
setStylesheetFile(java.io.File stylesheetFile)
Set the XSLT file used to process the input file before it is loaded |
static void |
xsltTransform(java.io.File inputFile,
java.io.File outputFile,
java.io.File stylesheet)
Transform a given XML File to another using XSLT. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CONFIG_COMMENT_MARKER
Constructor Detail |
public Transformation()
Method Detail |
public java.io.File getOutputFile()
public void setOutputFile(java.io.File outputFile)
outputFile
- - the file, may be null if no output file requiredpublic java.io.File getStylesheetFile()
public void setStylesheetFile(java.io.File stylesheetFile)
stylesheetFile
- - the file, may be null if no stylesheet file requiredpublic void addTransformer(ModelTransformer transformer)
ModelTransformer
to the configuration.
transformer
- the ModelTransformer
to addpublic java.util.List getModelTransformers()
ModelTransformer
s in this Transformation
.
ModelTransformer
s.public Model run(java.lang.String xmiFileName) throws ModelTransformer.TransformException
setStylesheetFile(java.io.File)
, xmiFileName
will be transformed into a new file in the same directory with an added extension of .jamda
,
and this file will be used as the input file.
xmiFileName
- the name of the XMI file to transform
ModelTransformer.TransformException
public Model run(java.io.File xmiFile) throws ModelTransformer.TransformException
xmiFile
- the XMI file to transform
ModelTransformer.TransformException
public void run(Model inputModel) throws ModelTransformer.TransformException
Model
. Do not save the output.
This method assumes that the output is written elsewhere by the transformation.
inputModel
- the Model
to transform
ModelTransformer.TransformException
public static void xsltTransform(java.io.File inputFile, java.io.File outputFile, java.io.File stylesheet) throws java.io.IOException, javax.xml.transform.TransformerException
File
to another using XSLT.
inputFile
- the input XML fileoutputFile
- the output XML filestylesheet
- the stylesheet file to apply
java.io.IOException
javax.xml.transform.TransformerException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |