com.sun.enterprise.deployment.node
Class SaxParserHandlerBundled

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by com.sun.enterprise.deployment.node.SaxParserHandler
          extended by com.sun.enterprise.deployment.node.SaxParserHandlerBundled
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

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
SaxParserHandlerBundled()
          Creates a new instance of SaxParserHandlerBundled
 
Method Summary
 org.xml.sax.InputSource resolveEntity(java.lang.String publicID, java.lang.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, getMapping, getSchemaFileFor, getSchemaURLFor, getTopNode, main, notationDecl, registerMapping, setErrorReportingString, setStopOnError, setTopNode, startElement, startPrefixMapping, warning
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaxParserHandlerBundled

public SaxParserHandlerBundled()
Creates a new instance of SaxParserHandlerBundled

Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicID,
                                             java.lang.String systemID)
                                      throws org.xml.sax.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 interface org.xml.sax.EntityResolver
Overrides:
resolveEntity in class SaxParserHandler
Parameters:
publicID - public ID of the requested entity
systemID - system ID of the requested entity
Returns:
InputSource for the requested entity; null if not available
Throws:
org.xml.sax.SAXException - in case of errors resolving the entity


Copyright © 2012 GlassFish Community. All Rights Reserved.