|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ptolemy.moml.filter.NamedObjClassesSeen
public class NamedObjClassesSeen
Create a Set of classes that extend NamedObj that are in the MoML parsed thus far. This filter does not modify the model.
Red (cxh) |
Red (cxh) |
Field Summary | |
---|---|
private java.util.Set |
_classesSeen
Set of classes seen the far. |
private java.util.HashMap |
_classesToBeIndexed
A HashMap, where the key is a fully qualified dot separated String naming the class; and the key is a Set where each element is a String that is a relative path that refres to the model. |
(package private) java.lang.String |
_modelPath
The relative path to the model we are parsing. |
private static java.lang.Class |
_namedObjClass
|
Constructor Summary | |
---|---|
NamedObjClassesSeen(java.util.HashMap classesToBeIndexed)
Create a filter that looks for classes that extend NamedObj. |
Method Summary | |
---|---|
java.lang.String |
filterAttributeValue(NamedObj container,
java.lang.String element,
java.lang.String attributeName,
java.lang.String attributeValue,
java.lang.String xmlFile)
If the attributeName is "class" and the attributeValue extends NamedObj, then add the attributeValue to the set of classes we are interested in. |
void |
filterEndElement(NamedObj container,
java.lang.String elementName,
java.lang.StringBuffer currentCharData,
java.lang.String xmlFile)
In this class, do nothing. |
void |
reset(java.lang.String modelPath)
Reset the filter. |
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 |
---|
private java.util.Set _classesSeen
private java.util.HashMap _classesToBeIndexed
java.lang.String _modelPath
private static java.lang.Class _namedObjClass
Constructor Detail |
---|
public NamedObjClassesSeen(java.util.HashMap classesToBeIndexed)
classesToBeIndexed
- A HashMap, where the key is a fully
qualified dot separated String naming the class; and the key
is a Set where each element is a String that is a relative
path that refres to the model.Method Detail |
---|
public java.lang.String filterAttributeValue(NamedObj container, java.lang.String element, java.lang.String attributeName, java.lang.String attributeValue, java.lang.String xmlFile)
filterAttributeValue
in interface MoMLFilter
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.
public void filterEndElement(NamedObj container, java.lang.String elementName, java.lang.StringBuffer currentCharData, java.lang.String xmlFile) throws java.lang.Exception
filterEndElement
in interface MoMLFilter
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
- Not thrown in this base class.public void reset(java.lang.String modelPath)
modelPath
- The new model path.public java.lang.String toString()
toString
in interface MoMLFilter
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |