|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--uk.ac.ic.doc.automed.templates.wrapper.TemplateCompilerSimulator
|
+--uk.ac.ic.doc.automed.templates.wrapper.DefaultTemplate
The DefaultTemplate class enables the definition of template transformations at run-time.
An example of using the DefaultTemplate class follows:
DefaultTemplate template = new DefaultTemplate(model, name, description);
template.INPUTS();
//definition of template's inputs, e.g.
TemplateCompilerSimulator.OBJECT existingEntity = template.askForObject("Existing entity", entity);
template.START();
//template program definition, e.g.
existingEntity.DELETE(function);
template.END();
| Nested Class Summary |
| Field Summary |
| Fields inherited from class uk.ac.ic.doc.automed.templates.wrapper.TemplateCompilerSimulator |
aliases, awf, COLLECTING, CONSTRUCT, currentForeachVariables, currentKey, currentScopeStack, defaultModel, DEFINING_FOREACH_VARIABLES, DEFINING_IF_VALRIABLES, DEFINING_INPUT_VARIABLES, FINISHED, foreachStack, ifStack, initialSchemaKey, inputVariables, lastSchema, loopStatementsStack, mainTemplate, METHOD_PREFIX, outerMostVariables, STARTED, state, templateStatements, temporaryForeachOutputVariables, TypeConstraints, TypeConstraintsList, TypeFunction, TypeFunctionList, TypeItem, TypeList, TypeName, TypeNameList, TypeObject, TypeObjectList, TypeString, TypeStringList, VARIABLE_PREFIX, WRITTING_CODE |
| Constructor Summary | |
DefaultTemplate()
Instantiates a template transformation. |
|
DefaultTemplate(Model model,
java.lang.String name,
java.lang.String description)
Instantiates a template transformation. |
|
| Method Summary | |
java.lang.String |
defaultModel()
Return the AutoMed Model that the template transformation
will generate or delete SchemaObjects in |
protected void |
defineTemplate()
|
java.lang.String |
getDescription()
Returns the description of the template transformation |
Model |
getModel()
Returns the model of the template transformation |
java.lang.String |
getName()
Returns the name of the template transformation |
void |
INPUTS()
|
void |
setDescription(java.lang.String d)
Sets the description of the template transformation. |
void |
setModel(Model m)
Sets the model of the template transformation. |
void |
setName(java.lang.String name)
Sets the name of the template transformation. |
void |
START()
|
protected java.lang.String |
templateDescription()
|
java.lang.String |
templateName()
Return the name used to identify the template transformation that will be compiled by an implementation of this class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultTemplate(Model model,
java.lang.String name,
java.lang.String description)
throws java.lang.Exception
model - the model of the transformationname - the name of the transformationdescription - the description of the transformation
public DefaultTemplate()
throws java.lang.Exception
| Method Detail |
public java.lang.String templateName()
TemplateCompilerSimulator
templateName in class TemplateCompilerSimulatorprotected java.lang.String templateDescription()
templateDescription in class TemplateCompilerSimulatorpublic java.lang.String defaultModel()
TemplateCompilerSimulatorModel that the template transformation
will generate or delete SchemaObjects in
defaultModel in class TemplateCompilerSimulator
protected void defineTemplate()
throws java.lang.Exception
defineTemplate in class TemplateCompilerSimulatorjava.lang.Exceptionpublic void INPUTS()
INPUTS in class TemplateCompilerSimulatorpublic void START()
START in class TemplateCompilerSimulator
public void setName(java.lang.String name)
throws java.lang.Exception
name - the name of the transformation
java.lang.Exception - if the definition of this template has already started, i.e. the name of the
transformation cannot be set if the input (INPUT()) or the program (START()) definition
has startedpublic java.lang.String getName()
public void setModel(Model m)
throws java.lang.Exception
java.lang.Exception - if the definition of this template has already started, i.e. the model of the
transformation cannot be set if the input (INPUT()) or the program (START()) definition
has startedpublic Model getModel()
public void setDescription(java.lang.String d)
throws java.lang.Exception
java.lang.Exception - if the definition of this template has already started, i.e. the description of the
transformation cannot be set if the input (INPUT()) or the program (START()) definition
has startedpublic java.lang.String getDescription()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||