ptolemy.actor.gt
Class GraphTransformer.CreateObjectChangeRequest

java.lang.Object
  extended by ptolemy.kernel.util.ChangeRequest
      extended by ptolemy.moml.MoMLChangeRequest
          extended by ptolemy.actor.gt.GraphTransformer.CreateObjectChangeRequest
Enclosing class:
GraphTransformer

private class GraphTransformer.CreateObjectChangeRequest
extends MoMLChangeRequest

The change request to create objects in the host model and record those objects in the tables.

Since:
Ptolemy II 7.1
Version:
$Id: GraphTransformer.java 59167 2010-09-21 17:08:02Z cxh $
Author:
Thomas Huining Feng
Accepted Rating:
Red (tfeng)
Proposed Rating:
Yellow (tfeng)

Field Summary
private  java.util.List<NamedObj> _createdObjects
          The list of created objects.
 
Constructor Summary
GraphTransformer.CreateObjectChangeRequest(NamedObj context, java.lang.String request)
          Construct a mutation request to be executed in the specified context.
 
Method Summary
protected  void _postParse(MoMLParser parser)
          React to end of this change request, and record the objects in the list of created objects.
protected  void _preParse(MoMLParser parser)
          React to start of this change request, and clear the list of created objects.
 java.util.List<NamedObj> getCreatedObjects()
          Get the list of objects that are created by this change request.
 
Methods inherited from class ptolemy.moml.MoMLChangeRequest
_execute, getContext, getDeferredToParent, setMergeWithPreviousUndo, setReportErrorsToHandler, setUndoable
 
Methods inherited from class ptolemy.kernel.util.ChangeRequest
addChangeListener, execute, getDescription, getLocality, getSource, isErrorReported, isPersistent, isStructuralChange, removeChangeListener, setDescription, setErrorReported, setListeners, setPersistent, waitForCompletion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_createdObjects

private java.util.List<NamedObj> _createdObjects
The list of created objects.

Constructor Detail

GraphTransformer.CreateObjectChangeRequest

public GraphTransformer.CreateObjectChangeRequest(NamedObj context,
                                                  java.lang.String request)
Construct a mutation request to be executed in the specified context. The context is typically a Ptolemy II container, such as an entity, within which the objects specified by the MoML code will be placed. This method resets and uses a parser that is a static member of this class. A listener to changes will probably want to check the originator so that when it is notified of errors or successful completion of changes, it can tell whether the change is one it requested. Alternatively, it can call waitForCompletion(). All external references are assumed to be absolute URLs. Whenever possible, use a different constructor that specifies the base.

Parameters:
context - The context in which to execute the MoML.
request - The mutation request in MoML.
Method Detail

getCreatedObjects

public java.util.List<NamedObj> getCreatedObjects()
Get the list of objects that are created by this change request.

Returns:
The list of created objects.

_postParse

protected void _postParse(MoMLParser parser)
React to end of this change request, and record the objects in the list of created objects.

Overrides:
_postParse in class MoMLChangeRequest
Parameters:
parser - The parser to execute this change request.

_preParse

protected void _preParse(MoMLParser parser)
React to start of this change request, and clear the list of created objects.

Overrides:
_preParse in class MoMLChangeRequest
Parameters:
parser - The parser to execute this change request.