ptolemy.moml.filter
Class AddEditorFactory

java.lang.Object
  extended by ptolemy.moml.filter.AddEditorFactory
All Implemented Interfaces:
MoMLFilter

public class AddEditorFactory
extends java.lang.Object
implements MoMLFilter

Add a VisibleParameterEditorFactory named _editorFactory to certain Parameters.

Since:
Ptolemy II 2.0
Version:
$Id: AddEditorFactory.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Christopher Hylands, Edward A. Lee
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

Field Summary
private  java.lang.String _currentActorFullName
           
private  boolean _currentAttributeHasLocation
           
private  boolean _currentlyProcessingActorThatMayNeedAnEditorFactory
           
private static java.lang.String _lastNameSeen
           
private static MoMLParser _parser
           
 
Constructor Summary
AddEditorFactory()
           
 
Method Summary
 java.lang.String filterAttributeValue(NamedObj container, java.lang.String element, java.lang.String attributeName, java.lang.String attributeValue, java.lang.String xmlFile)
          Identify Parameters that need a VisibleParameterEditorFactory named _editorFactory added.
 void filterEndElement(NamedObj container, java.lang.String elementName, java.lang.StringBuffer currentCharData, java.lang.String xmlFile)
          Make modifications to the specified container, which is defined in a MoML element with the specified name.
 java.lang.String toString()
          Return a string that describes what the filter does.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_currentActorFullName

private java.lang.String _currentActorFullName

_currentAttributeHasLocation

private boolean _currentAttributeHasLocation

_currentlyProcessingActorThatMayNeedAnEditorFactory

private boolean _currentlyProcessingActorThatMayNeedAnEditorFactory

_lastNameSeen

private static java.lang.String _lastNameSeen

_parser

private static MoMLParser _parser
Constructor Detail

AddEditorFactory

public AddEditorFactory()
Method Detail

filterAttributeValue

public java.lang.String filterAttributeValue(NamedObj container,
                                             java.lang.String element,
                                             java.lang.String attributeName,
                                             java.lang.String attributeValue,
                                             java.lang.String xmlFile)
Identify Parameters that need a VisibleParameterEditorFactory named _editorFactory added.

Specified by:
filterAttributeValue in interface MoMLFilter
Parameters:
container - The container for this attribute. in this method.
element - The XML element name.
attributeName - The name of the attribute.
attributeValue - The value of the attribute.
xmlFile - The file currently being parsed.
Returns:
the value of the attributeValue argument.

filterEndElement

public void filterEndElement(NamedObj container,
                             java.lang.String elementName,
                             java.lang.StringBuffer currentCharData,
                             java.lang.String xmlFile)
                      throws java.lang.Exception
Make modifications to the specified container, which is defined in a MoML element with the specified name.

Specified by:
filterEndElement in interface MoMLFilter
Parameters:
container - The object created by this element.
elementName - The element name.
currentCharData - The character data, which appears only in the doc and configure elements
xmlFile - The file currently being parsed.
Throws:
java.lang.Exception - if there is a problem substituting in the new value.

toString

public java.lang.String toString()
Return a string that describes what the filter does.

Specified by:
toString in interface MoMLFilter
Overrides:
toString in class java.lang.Object
Returns:
the description of the filter that ends with a newline.