|
INRIA & FluxMedia | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
fr.fluxmedia.transmorpher.graph.Transmorpher
public class Transmorpher
This class provides methods to create a graph structure corresponding to a transformation process defined in an XML file or with Flowcomposer ( a GUI tool for Transmorpher) . There is many ways to use this structure :
Field Summary | |
---|---|
protected int |
debug
value of the debug mode |
protected LinearIndexedStruct |
defexterns
the list of declared names of components |
protected java.io.File |
href
The filename of the Transmorpher sheet |
protected TProcessComposite |
iExecutionStructure
the execution structure |
protected java.util.LinkedList |
imports
the list of imports must be a list of Transmorphers once the imports have been parsed. |
protected java.util.LinkedList |
includes
the list of includes |
protected LinearIndexedStruct |
listOfType
store the types of the (built-in) components and their corresponding classes to use for creating them |
protected MainProcess |
main
The main process of the Transmorpher sheet |
protected java.lang.String |
name
The name of the Transmorpher sheet |
protected boolean |
opt
if true the production of XML description of this instance is required |
protected java.lang.String |
reloc
a path for the output of transmorpher (java or xslt) |
protected LinearIndexedStruct |
transformations
the list of Processes |
protected boolean |
useThread
a flag to show if thread are used or not |
protected java.lang.String |
version
the version to be used |
Constructor Summary | |
---|---|
Transmorpher(int debug)
Constructor for the Transmorpher object |
|
Transmorpher(java.lang.String name,
java.lang.String version,
int debug,
boolean optimize)
Constructor for the Transmorpher object |
|
Transmorpher(java.lang.String name,
java.lang.String version,
int debug,
java.lang.String reloc,
boolean optimize)
Constructor for the Transmorpher object |
|
Transmorpher(java.lang.String name,
java.lang.String version,
int debug,
java.lang.String reloc,
boolean optimize,
Transmorpher transmorpher)
Constructor for the Transmorpher object |
Method Summary | |
---|---|
void |
addExtern(java.lang.String name,
java.lang.String className,
java.lang.String impl,
boolean def)
Adds an externs definition to the defextern list |
void |
addImport(java.lang.String i)
This is an internal method for dynamically adding imports * |
void |
addInclude(java.lang.String i)
Adds a feature to the Include attribute of the Transmorpher object |
void |
addTransformation(java.lang.String name,
Transformation t)
Adds a feature to the Transformation attribute of the Transmorpher object |
void |
exec(Parameters p)
Starts the execution of the process described by this Transmorpher instance |
Transformation |
findTransformation(java.lang.String name)
Returns a transformtion corresponding to the name. |
void |
generateExec(java.lang.String reloc)
Generates the execution structure corresponding to this Transmorpher instance |
void |
generateJavaCode(java.lang.String reloc)
Generates a java code description for this Transmorpher instance |
void |
generateStylesheet()
Launches the conversion of Ruleset and Query to XSLT files |
void |
generateXML()
Prints an XML description of this Transmorpher instance |
java.lang.String |
getClassForType(java.lang.String name)
Looks for a name in the list of type and in the defextern list. |
int |
getDebug()
Get the value of debug. |
LinearIndexedStruct |
getDefexterns()
Gets the defexterns attribute of the Transmorpher object |
java.lang.String |
getExtern(java.lang.String name)
Looks for a name in the defextern list. |
java.io.File |
getFile()
Gets the file attribute of the Transmorpher object |
java.util.LinkedList |
getImports()
Gets the imports attribute of the Transmorpher object |
java.util.LinkedList |
getIncludes()
Gets the includes attribute of the Transmorpher object |
MainProcess |
getMain()
Gets the main attribute of the Transmorpher object |
java.lang.String |
getName()
Gets the name attribute of the Transmorpher object |
Transformation |
getTransformation(java.lang.String name)
Gets the transformation attribute of the Transmorpher object |
LinearIndexedStruct |
getTransformations()
Gets the transformations attribute of the Transmorpher object |
java.lang.String |
getVersion()
Gets the version attribute of the Transmorpher object |
void |
initListOfType()
Initializes the list of type supported by Transmorpher. |
boolean |
isThread()
Tests if this Transmorpher instance uses thread |
boolean |
optimizedP()
Gets the value of the optimized flag |
void |
recordImport(java.lang.String i,
Transmorpher t)
replace the import URI by the actual import * |
void |
removeExtern(java.lang.String name)
Removes the value corresponding to the name from the extern list |
void |
removeTransformation(Transformation trans)
Removes a transformtion from this Transmorpher instance |
void |
reserveImport(java.lang.String i)
just put the import URI in the linked list * |
void |
retroNull()
Description of the Method |
void |
save()
Description of the Method |
void |
saveAll()
Description of the Method |
void |
setDebug(int debug)
Set the value of debug. |
void |
setFile(java.io.File uri)
Sets the file attribute of the Transmorpher object |
void |
setMain(MainProcess p)
Sets the main attribute of the Transmorpher object |
void |
setName(java.lang.String name)
Sets the name attribute of the Transmorpher object |
void |
setOptimized(boolean optimize)
Sets the optimized attribute of the Transmorpher object |
void |
setVersion(java.lang.String version)
Sets the version attribute of the Transmorpher object |
void |
useThread(boolean thread)
Initializes this Transmorpher instance for the use of thread or not |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected java.io.File href
protected MainProcess main
protected LinearIndexedStruct transformations
protected java.lang.String version
protected TProcessComposite iExecutionStructure
protected java.util.LinkedList imports
protected java.util.LinkedList includes
protected LinearIndexedStruct defexterns
protected LinearIndexedStruct listOfType
protected int debug
protected java.lang.String reloc
protected boolean opt
protected boolean useThread
Constructor Detail |
---|
public Transmorpher(int debug)
debug
- the debug mode valuepublic Transmorpher(java.lang.String name, java.lang.String version, int debug, boolean optimize)
name
- The name of this Transmorpher instanceversion
- The version of this Transmorpher instancedebug
- The debug mode valueoptimize
- The optimize flag (if true , this instance will produce an XML description of itself)public Transmorpher(java.lang.String name, java.lang.String version, int debug, java.lang.String reloc, boolean optimize)
name
- The name of this Transmorpher instanceversion
- The version of this Transmorpher instancedebug
- The debug mode valuereloc
- a path for outputsoptimize
- The optimize flag (if true , this instance will produce an XML description of itself)public Transmorpher(java.lang.String name, java.lang.String version, int debug, java.lang.String reloc, boolean optimize, Transmorpher transmorpher)
name
- The name of this Transmorpher instanceversion
- The version of this Transmorpher instancedebug
- The debug mode valuereloc
- a path for outputsoptimize
- The optimize flag (if true , this instance will produce an XML description of itself)transmorpher
- Description of the ParameterMethod Detail |
---|
public void initListOfType()
public final java.lang.String getName()
public final void setName(java.lang.String name)
name
- The new name valuepublic int getDebug()
public void setDebug(int debug)
debug
- Value to assign to debug.public boolean isThread()
public void useThread(boolean thread)
thread
- if true, thread are used.public final java.io.File getFile()
public final void setFile(java.io.File uri)
uri
- The new file valuepublic final java.lang.String getVersion()
public final void setVersion(java.lang.String version)
version
- The new version valuepublic final boolean optimizedP()
public final void setOptimized(boolean optimize)
b
- The new optimized valuepublic final MainProcess getMain()
public LinearIndexedStruct getTransformations()
public final Transformation findTransformation(java.lang.String name)
name
- The name of the transformation to find
public final Transformation getTransformation(java.lang.String name)
name
- Description of the Parameter
public final void addTransformation(java.lang.String name, Transformation t)
name
- The feature to be added to the Transformation attributet
- The feature to be added to the Transformation attributepublic final void removeTransformation(Transformation trans)
trans
- The transformation to removepublic final java.lang.String getClassForType(java.lang.String name)
name
- The name
public final java.lang.String getExtern(java.lang.String name)
name
- Description of the Parameter
public final void addExtern(java.lang.String name, java.lang.String className, java.lang.String impl, boolean def)
name
- The type of the component to addclassName
- The class of the component to addimpl
- The feature to be added to the Extern attributedef
- The feature to be added to the Extern attributepublic final void removeExtern(java.lang.String name)
name
- the name of the extern defniition to removepublic final LinearIndexedStruct getDefexterns()
public final void reserveImport(java.lang.String i)
i
- Description of the Parameterpublic final void recordImport(java.lang.String i, Transmorpher t)
i
- Description of the Parametert
- Description of the Parameterpublic final void addImport(java.lang.String i) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
i
- The feature to be added to the Import attribute
javax.xml.parsers.ParserConfigurationException
- Description of the Exception
org.xml.sax.SAXException
- Description of the Exception
java.io.IOException
- Description of the Exceptionpublic final java.util.LinkedList getImports()
public final void addInclude(java.lang.String i)
i
- The feature to be added to the Include attributepublic final java.util.LinkedList getIncludes()
public final void setMain(MainProcess p)
p
- The new main valuepublic final void retroNull()
public final void save() throws TMException
TMException
- Description of the Exceptionpublic final void saveAll() throws TMException
TMException
- Description of the Exceptionpublic final void generateXML()
public void generateStylesheet() throws TMException, java.io.IOException
TMException
- Description of the Exception
java.io.IOException
- Description of the Exceptionpublic final void generateExec(java.lang.String reloc) throws javax.xml.transform.TransformerException, javax.xml.transform.TransformerConfigurationException, TMException, org.xml.sax.SAXException, java.io.IOException
reloc
- Description of the Parameter
javax.xml.transform.TransformerException
- Description of the Exception
javax.xml.transform.TransformerConfigurationException
- Description of the Exception
TMException
- Description of the Exception
org.xml.sax.SAXException
- Description of the Exception
java.io.IOException
- Description of the Exceptionpublic final void generateJavaCode(java.lang.String reloc) throws java.io.IOException, TMException
reloc
- The path for the outputs
java.io.IOException
- Description of the Exception
TMException
- Description of the Exceptionpublic final void exec(Parameters p) throws java.lang.Exception
p
- Description of the Parameter
java.lang.Exception
- Description of the Exception
|
INRIA & FluxMedia | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |