Class SaxParserHandlerBundled
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- com.sun.enterprise.deployment.node.SaxParserHandler
-
- com.sun.enterprise.deployment.node.SaxParserHandlerBundled
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
@Service public class SaxParserHandlerBundled extends SaxParserHandler
Provides access to schemas and DTDs to Java Web Start-launched app clients that do not have an app server product installation at hand. The DTDs and schemas are assumed to be in the classpath so that schemas are at /schemas/and DTDs at /dtds/ This ParserHandler is used by Embedded GlassFish as well. - Author:
- tjquinn
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.deployment.node.SaxParserHandler
JAXP_SCHEMA_LANGUAGE, JAXP_SCHEMA_SOURCE, publicID, topNode, W3C_XML_SCHEMA
-
-
Constructor Summary
Constructors Constructor Description SaxParserHandlerBundled()
Creates a new instance of SaxParserHandlerBundled
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputSource
resolveEntity(String publicID, String systemID)
Returns an InputSource for the requested DTD or schema.-
Methods inherited from class com.sun.enterprise.deployment.node.SaxParserHandler
characters, endElement, error, fatalError, getDTDUrlFor, getElementsAllowingEmptyValues, getElementsPreservingWhiteSpace, getMapping, getSchemaFileFor, getSchemaURLFor, getTopNode, getVersionUpgrades, notationDecl, registerBundleNode, resolvePublicID, resolveSchemaNamespace, setErrorReportingString, setStopOnError, setTopNode, startElement, startPrefixMapping
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, unparsedEntityDecl, warning
-
-
-
-
Method Detail
-
resolveEntity
public InputSource resolveEntity(String publicID, String systemID) throws SAXException
Returns an InputSource for the requested DTD or schema. This implementation returns an InputSource that wraps the result of getResourceAsStream, having located the requested schema in the classpath.- Specified by:
resolveEntity
in interfaceEntityResolver
- Overrides:
resolveEntity
in classSaxParserHandler
- Parameters:
publicID
- public ID of the requested entitysystemID
- system ID of the requested entity- Returns:
- InputSource for the requested entity; null if not available
- Throws:
SAXException
- in case of errors resolving the entity
-
-