Package ptolemy.moml.filter
Class MoMLFilterSimple
- java.lang.Object
-
- ptolemy.moml.filter.MoMLFilterSimple
-
- All Implemented Interfaces:
MoMLFilter
- Direct Known Subclasses:
AddEditorFactory
,AddIcon
,AddMissingParameter
,ChangeFixedWidth1ToAuto
,ClassChanges
,DocAttributeChanges
,GRColorChanges
,HideAnnotationNames
,JavaScriptThisUpdate
,LazyTypedCompositeActorChanges
,MultiportToSinglePort
,NamedObjClassesSeen
,ParameterNameChanges
,PortClassChanges
,PortNameChanges
,PropertyClassChanges
,RelationWidthChanges
,RemoveClasses
,RemoveGraphicalClasses
,RemoveNonPtinyClasses
,RemoveProperties
,UpdateAnnotations
public abstract class MoMLFilterSimple extends java.lang.Object implements MoMLFilter
Filter MoML without using a MoMLParser to parse xml generated by the filter.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Christopher Brooks
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Constructor Summary
Constructors Constructor Description MoMLFilterSimple()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
filterAttributeValue(NamedObj container, java.lang.String element, java.lang.String attributeName, java.lang.String attributeValue, java.lang.String xmlFile, MoMLParser parser)
Return the old attribute value for properties that are not registered to be removed.void
filterEndElement(NamedObj container, java.lang.String elementName, java.lang.StringBuffer currentCharData, java.lang.String xmlFile, MoMLParser parser)
Reset private variables.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ptolemy.moml.MoMLFilter
filterAttributeValue, filterEndElement, toString
-
-
-
-
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, MoMLParser parser)
Return the old attribute value for properties that are not registered to be removed. Otherwise, return null to remove the property.- Specified by:
filterAttributeValue
in interfaceMoMLFilter
- Parameters:
container
- The container for this attribute.element
- The XML element name.attributeName
- The name of the attribute.attributeValue
- The value of the attribute.xmlFile
- The file currently being parsed.parser
- The parser in which MoML is optionally evaluated. Ignored in this method.- 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, MoMLParser parser) throws java.lang.Exception
Reset private variables.- Specified by:
filterEndElement
in interfaceMoMLFilter
- Parameters:
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.- Throws:
java.lang.Exception
- if there is a problem substituting in the new value.
-
-