public class AddMissingParameter extends MoMLFilterSimple
If a SDFDirector does not have an iterations parameter, then add one with the value "0", which is the default for Ptolemy II 8.0 and earlier.
FIXME: This class is similar to AddEditorFactory. The two classes should be merged by parameterizing.
Red (cxh) |
Red (cxh) |
Constructor and Description |
---|
AddMissingParameter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
filterAttributeValue(NamedObj container,
java.lang.String element,
java.lang.String attributeName,
java.lang.String attributeValue,
java.lang.String xmlFile)
Identify classes that need to have parameter added.
|
void |
filterEndElement(NamedObj container,
java.lang.String elementName,
java.lang.StringBuffer currentCharData,
java.lang.String xmlFile)
Deprecated.
Use
filterEndElement(NamedObj, String, StringBuffer, String, MoMLParser)
instead and pass a MoMLParser. |
void |
filterEndElement(NamedObj container,
java.lang.String elementName,
java.lang.StringBuffer currentCharData,
java.lang.String xmlFile,
MoMLParser parser)
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.
|
filterAttributeValue
public java.lang.String filterAttributeValue(NamedObj container, java.lang.String element, java.lang.String attributeName, java.lang.String attributeValue, java.lang.String xmlFile)
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.@Deprecated public void filterEndElement(NamedObj container, java.lang.String elementName, java.lang.StringBuffer currentCharData, java.lang.String xmlFile) throws java.lang.Exception
filterEndElement(NamedObj, String, StringBuffer, String, MoMLParser)
instead and pass a MoMLParser.container
- The object created by this element.elementName
- The element name.currentCharData
- The character data, which appears
only in the doc and configure elementsxmlFile
- The file currently being parsed.java.lang.Exception
- if there is a problem substituting
in the new value.public void filterEndElement(NamedObj container, java.lang.String elementName, java.lang.StringBuffer currentCharData, java.lang.String xmlFile, MoMLParser parser) throws java.lang.Exception
filterEndElement
in interface MoMLFilter
filterEndElement
in class MoMLFilterSimple
container
- The object created by this element.elementName
- The element name.currentCharData
- The character data, which appears
only in the doc and configure elementsxmlFile
- The file currently being parsed.parser
- The parser in which MoML is optionally evaluated.java.lang.Exception
- if there is a problem substituting
in the new value.public java.lang.String toString()
toString
in interface MoMLFilter
toString
in class java.lang.Object