|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.actor.gt.controller.TransformationAttribute
public class TransformationAttribute
An attribute encapsulating a model transformation with the Ptera controller.
The transformation can be applied to the container of this attribute either
manually by the model user, or automatically by invoking the executeTransformation() method.
| Red (tfeng) |
| Yellow (tfeng) |
| Nested Class Summary | |
|---|---|
private class |
TransformationAttribute.TransformationListener
An execution listener that sets the model parameter to contain the container of the transformation attribute at the beginning of the transformation. |
| Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
|---|
NamedObj.ContainedObjectsIterator |
| Field Summary | |
|---|---|
private Configurer |
_configurer
The configurer containing the model updater. |
private java.lang.String |
_configureSource
The configure source. |
private java.util.List<ExecutionListener> |
_executionListeners
The list of execution listeners. |
private PteraModalModel |
_modelUpdater
The model updater. |
Parameter |
condition
The condition under which this attribute is applicable. |
TransformationAttributeEditorFactory |
editorFactory
The editor factory for the contents in this attribute (the model updater). |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
|---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Constructor Summary | |
|---|---|
TransformationAttribute(NamedObj container,
java.lang.String name)
Construct an attribute with the given name contained by the specified entity. |
|
TransformationAttribute(Workspace workspace)
Construct an attribute in the specified workspace with an empty string as a name. |
|
| Method Summary | |
|---|---|
private static void |
_clearURI(NamedObj object)
Clear the URI attribute of the given object. |
protected void |
_exportMoMLContents(java.io.Writer output,
int depth)
Write a MoML description of the contents of this object, which in this base class is the attributes. |
private void |
_init()
Create the parameters and private fields of this attribute. |
void |
addExecutionListener(ExecutionListener listener)
Add an execution listener to the list of execution listeners, which are invoked at specific points when the transformation is executed. |
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace. |
void |
configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
Configure the object with data from the specified input source (a URL) and/or textual data. |
void |
executeTransformation()
Execute the transformation with the container of this attribute as the model to be transformed. |
void |
executeTransformation(CompositeEntity model)
Execute the transformation with the given model as the model to be transformed. |
java.lang.String |
getConfigureSource()
Return the input source that was specified the last time the configure method was called. |
java.lang.String |
getConfigureText()
Return the text string that represents the current configuration of this object. |
PteraModalModel |
getModelUpdater()
Get the model updater encapsulated in this attribute. |
void |
removeExecutionListener(ExecutionListener listener)
Remove an execution listener from the list of execution listeners, which\ are invoked at specific points when the transformation is executed. |
| Methods inherited from class ptolemy.kernel.util.Attribute |
|---|
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public Parameter condition
public TransformationAttributeEditorFactory editorFactory
private java.lang.String _configureSource
private Configurer _configurer
private java.util.List<ExecutionListener> _executionListeners
private PteraModalModel _modelUpdater
| Constructor Detail |
|---|
public TransformationAttribute(NamedObj container,
java.lang.String name)
throws NameDuplicationException,
IllegalActionException
container - The container.name - The name of this attribute.
IllegalActionException - If the attribute is not of an
acceptable class for the container, or if the name contains a period.
NameDuplicationException - If the name coincides with
an attribute already in the container.public TransformationAttribute(Workspace workspace)
workspace - The workspace that will list the attribute.| Method Detail |
|---|
public void addExecutionListener(ExecutionListener listener)
listener - The listener.removeExecutionListener(ExecutionListener)
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
clone in class Attributeworkspace - The workspace for the cloned object.
java.lang.CloneNotSupportedException - Not thrown in this base classNamedObj.exportMoML(Writer, int, String),
NamedObj.setDeferringChangeRequests(boolean)
public void configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
throws java.lang.Exception
This method is defined to throw a very general exception to allow classes that implement the interface to use whatever exceptions are appropriate.
configure in interface Configurablebase - The base relative to which references within the input
are found, or null if this is not known, or there is none.source - The input source, which specifies a URL, or null
if none.text - Configuration information given as text, or null if
none.
java.lang.Exception - If something goes wrong.
public void executeTransformation()
throws java.lang.Exception
java.lang.Exception - If error occurs in the transformation.executeTransformation(CompositeEntity)
public void executeTransformation(CompositeEntity model)
throws java.lang.Exception
model - The model to be transformed.
java.lang.Exception - If error occurs in the transformation.public java.lang.String getConfigureSource()
getConfigureSource in interface Configurablepublic java.lang.String getConfigureText()
getConfigureText in interface Configurablepublic PteraModalModel getModelUpdater()
public void removeExecutionListener(ExecutionListener listener)
listener - The listener to be removed.addExecutionListener(ExecutionListener)
protected void _exportMoMLContents(java.io.Writer output,
int depth)
throws java.io.IOException
_exportMoMLContents in class NamedObjoutput - The output stream to write to.depth - The depth in the hierarchy, to determine indenting.
java.io.IOException - If an I/O error occurs.NamedObj.exportMoML(Writer, int)
private static void _clearURI(NamedObj object)
throws IllegalActionException
object - The object.
IllegalActionException - If the URI attribute of the object
cannot be removed.
private void _init()
throws IllegalActionException,
NameDuplicationException
IllegalActionException - If thrown when creating the
parameters.
NameDuplicationException - If thrown when creating the
parameters.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||