Package ptolemy.configs.test
Class ValidatingXMLParser.MoMLEntityResolver
- java.lang.Object
-
- ptolemy.configs.test.ValidatingXMLParser.MoMLEntityResolver
-
- All Implemented Interfaces:
org.xml.sax.EntityResolver
- Enclosing class:
- ValidatingXMLParser
public static class ValidatingXMLParser.MoMLEntityResolver extends java.lang.Object implements org.xml.sax.EntityResolver
Resolve an entity by checking for http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd and, if found, return the value of MoMLParser.MoML_1.dtd.
-
-
Constructor Summary
Constructors Constructor Description MoMLEntityResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xml.sax.InputSource
resolveEntity(java.lang.String publicID, java.lang.String systemID)
Resolve the entity.
-
-
-
Method Detail
-
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicID, java.lang.String systemID) throws org.xml.sax.SAXException
Resolve the entity.- Specified by:
resolveEntity
in interfaceorg.xml.sax.EntityResolver
- Parameters:
publicID
- Ignored.systemID
- The systemID.- Returns:
- If systemID equals http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd then return an InputSource based on the value of MoMLParser.MoML_DTD_1, If the systemID equals https://accessors.org/Accessor_1.dtd, then return the contents of $CLASSPATH/org/terraswarm/accessor/accessors/web/Accessor_1.dtd otherwise return null.
- Throws:
org.xml.sax.SAXException
- If the MoML DTD cannot be created.
-
-