|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.backtrack.xmlparser.XmlHandler
ptolemy.backtrack.xmlparser.ConfigXmlHandler
public class ConfigXmlHandler
XML handler that generates the library description for backtracking actors.
Red (tfeng) |
Red (tfeng) |
Field Summary | |
---|---|
private java.util.Set<java.lang.String> |
_excludedFiles
The canonical paths of the XML documents that should be excluded from the parsing. |
private java.util.Set<java.lang.String> |
_includedClasses
The names of the classes that should be kept in the transformed XML document. |
private java.util.Set<java.lang.String> |
_parsedFiles
The canonical paths of the XML documents that have been parsed by this parser, or by the parsers that parse the ancestor nodes of the current tree. |
private static java.util.Set<java.lang.String> |
_REMOVED_CLASS_SET
The class in the original XML document that should be removed when it is transformed to the library description of backtracking actors. |
private static java.lang.String[] |
_REMOVED_CLASSES
The class in the original XML document that should be removed when it is transformed to the library description of backtracking actors. |
private static java.util.Set<java.lang.String> |
_REMOVED_ELEMENT_SET
The elements in the original XML document that should be removed when it is transformed to the library description of backtracking actors. |
private static java.lang.String[] |
_REMOVED_ELEMENTS
The elements in the original XML document that should be removed when it is transformed to the library description of backtracking actors. |
Fields inherited from class ptolemy.backtrack.xmlparser.XmlHandler |
---|
MoML_DTD_1, MoML_PUBLIC_ID_1 |
Constructor Summary | |
---|---|
ConfigXmlHandler(ConfigXmlTree tree,
java.lang.String systemId,
java.util.Set<java.lang.String> includedClasses)
Construct an XML handler. |
Method Summary | |
---|---|
void |
addExcludedFile(java.lang.String canonicalPath)
Exclude the specified XML document from the scan. |
void |
addExcludedFiles(java.util.Collection<java.lang.String> canonicalPaths)
Exclude the specified XML documents from the scan. |
void |
endElement(java.lang.String elementName)
Handle the end tag of an XML element. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Process the instruction given in the data. |
void |
startElement(java.lang.String elementName)
Handle the start tag of an XML element. |
Methods inherited from class ptolemy.backtrack.xmlparser.XmlHandler |
---|
attribute, charData, doctypeDecl, endDocument, endExternalEntity, error, getCurrentTree, getSystemId, ignorableWhitespace, resolveEntity, startDocument, startExternalEntity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String[] _REMOVED_CLASSES
private static java.util.Set<java.lang.String> _REMOVED_CLASS_SET
private static final java.lang.String[] _REMOVED_ELEMENTS
private static java.util.Set<java.lang.String> _REMOVED_ELEMENT_SET
private java.util.Set<java.lang.String> _excludedFiles
private java.util.Set<java.lang.String> _includedClasses
private java.util.Set<java.lang.String> _parsedFiles
Constructor Detail |
---|
ConfigXmlHandler(ConfigXmlTree tree, java.lang.String systemId, java.util.Set<java.lang.String> includedClasses)
tree
- The XML tree to be scanned.systemId
- The system ID representing the location of the original
XML document.includedClasses
- The classes in the original XML document that
should be transformed in the new XML document.Method Detail |
---|
public void addExcludedFile(java.lang.String canonicalPath)
canonicalPath
- The canonical path of the XML document to be
excluded.public void addExcludedFiles(java.util.Collection<java.lang.String> canonicalPaths)
canonicalPaths
- The canonical paths of the XML documents to be
excluded.public void endElement(java.lang.String elementName) throws java.lang.Exception
endElement
in interface XmlHandler
endElement
in class XmlHandler
elementName
- The name of the XML element.
java.lang.Exception
- If the overrided method in the superclass throws an
Exception.XmlHandler.startElement(java.lang.String)
,
XmlParser.declaredElements()
,
XmlParser.getElementContentType(java.lang.String)
public void processingInstruction(java.lang.String target, java.lang.String data) throws java.lang.Exception
processingInstruction
in interface XmlHandler
processingInstruction
in class XmlHandler
target
- The target (the name at the start of the processing
instruction).data
- The data, if any (the rest of the processing instruction).
java.lang.Exception
- If the MoML parser throws an exception.public void startElement(java.lang.String elementName) throws java.lang.Exception
startElement
in interface XmlHandler
startElement
in class XmlHandler
elementName
- The name of the XML element.
java.lang.Exception
- If the overridden method in the superclass throws
an Exception.XmlHandler.attribute(java.lang.String, java.lang.String, boolean)
,
XmlHandler.endElement(java.lang.String)
,
XmlParser.declaredElements()
,
XmlParser.getElementContentType(java.lang.String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |