|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.xml.parsers.DocumentBuilder
com.verisign.epp.util.EPPSchemaCachingParser
public class EPPSchemaCachingParser
XML Parser that pre-caches the XML schemas from the XML schemas registered in
the EPPFactory for improved XML parsing performance.
| Field Summary | |
|---|---|
static int |
BIG_PRIME
A default prime number to use for the SymbolTable size. |
static java.lang.String |
CREATE_ENTITY_REF_NODES
True: Create EntityReference nodes in the DOM tree. |
static java.lang.String |
DEFER_NODE_EXPANSION
Constant for setting the defer node expansion parser feature. |
static java.lang.String |
EXTERNAL_GENERAL_ENTITIES
True: Include external general entities. |
static java.lang.String |
EXTERNAL_PARAMETER_ENTITIES
True: Include external parameter entities and the external DTD subset. |
static java.lang.String |
INCLUDE_IGNORABLE_WHITE_SPACE
True: Include text nodes that can be considered "ignorable whitespace" in the DOM tree. |
static java.lang.String |
LOAD_DTD_GRAMMAR
True: Load the DTD and use it to add default attributes and set attribute types when parsing. |
static java.lang.String |
LOAD_EXTERNAL_DTD
Apache constant for loading external DTD's when they are seen in the instance document |
static java.lang.String |
NAMESPACES_FEATURE_ID
Namespaces feature id (http://xml.org/sax/features/namespaces) |
static java.lang.String |
NORMALIZE_DATA
attempt to normalize data in an entity reference or CDATA section. |
static java.lang.String |
POOL
Name of the EPP XML Parser Pool managed by GenericPoolManager
. |
static java.lang.String |
SCHEMA_FULL_CHECKING_FEATURE_ID
Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). |
static java.lang.String |
SCHEMA_VALIDATION_FEATURE_ID
Schema validation feature id (http://apache.org/xml/features/validation/schema). |
protected static java.lang.String |
SYMBOL_TABLE
Property identifier: The symbol table feature |
static java.lang.String |
VALIDATION_FEATURE_ID
Validation feature id (http://xml.org/sax/features/validation). |
static java.lang.String |
XMLGRAMMAR_POOL
Property identifier: The XML Grammar pool feature |
| Constructor Summary | |
|---|---|
EPPSchemaCachingParser()
Create a new instance of EPPSchemaCachingParser. |
|
EPPSchemaCachingParser(int aSymbolTableSize)
Creates an EPPSchemaCachingParser instance with the specified symboltable size |
|
| Method Summary | |
|---|---|
void |
addSchemaToCache(org.apache.xerces.xni.parser.XMLInputSource aSchema)
Addes the XMLInputSource instance to the current cache of schemas. |
org.w3c.dom.DOMImplementation |
getDOMImplementation()
Returns the DOM implementation |
boolean |
getFeature(java.lang.String aFeatureId)
Query the state of a feature. |
java.lang.Object |
getProperty(java.lang.String aPropertyId)
Query the value of a property. |
int |
getSymbolTableSize()
Gets the symbol table size |
protected void |
init()
Helper method to initialize this instance of EPPSchemaCachingParser. |
boolean |
isNamespaceAware()
Returns true if the parser is setup to be Namespace aware, false otherwise. |
boolean |
isValidating()
Returns true if this parser is setup to validate XML instances, false otherwise |
org.w3c.dom.Document |
newDocument()
Non-preferred: use the getDOMImplementation() method instead of this one to get a DOM Level 2 DOMImplementation object and then use DOM Level 2 methods to create a DOM Document object. |
org.w3c.dom.Document |
parse(java.io.File aFile)
Parse a file to a DOM Document. |
org.w3c.dom.Document |
parse(org.xml.sax.InputSource aXmlInstance)
Parses the InputSource passed in which should be an XML instance. |
org.w3c.dom.Document |
parse(java.io.InputStream aInputStream)
Implemented as part of standard Document Builder API. |
org.w3c.dom.Document |
parse(java.io.InputStream aInputStream,
java.lang.String aSystemId)
Implemented as part of standard Document Builder API. |
org.w3c.dom.Document |
parse(java.lang.String aUri)
Implemented as part of standard Document Builder API. |
void |
setEntityResolver(org.xml.sax.EntityResolver aEntityResolver)
Sets the EntityResolver of this DocumentBuilder |
void |
setErrorHandler(org.xml.sax.ErrorHandler aErrorHandler)
Sets the ErrorHandler this DocumentBuilder instance. |
void |
setFeature(java.lang.String aFeatureId,
boolean aBoolean)
Set the state of any feature in a SAX2 parser. |
void |
setLockSchemaCache(boolean aBoolean)
Lock the schema cache. |
void |
setProperty(java.lang.String aProperty,
java.lang.Object aObject)
Set the state of any property in a SAX2 parser. |
void |
setSymbolTableSize(int aSymbolTableSize)
Sets the symbol table size. |
| Methods inherited from class javax.xml.parsers.DocumentBuilder |
|---|
getSchema, isXIncludeAware, reset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String POOL
GenericPoolManager
.
public static final int BIG_PRIME
public static final java.lang.String NAMESPACES_FEATURE_ID
public static final java.lang.String VALIDATION_FEATURE_ID
public static final java.lang.String SCHEMA_VALIDATION_FEATURE_ID
public static final java.lang.String SCHEMA_FULL_CHECKING_FEATURE_ID
public static final java.lang.String XMLGRAMMAR_POOL
protected static final java.lang.String SYMBOL_TABLE
public static final java.lang.String DEFER_NODE_EXPANSION
public static final java.lang.String LOAD_EXTERNAL_DTD
public static final java.lang.String LOAD_DTD_GRAMMAR
public static final java.lang.String CREATE_ENTITY_REF_NODES
public static final java.lang.String INCLUDE_IGNORABLE_WHITE_SPACE
public static final java.lang.String EXTERNAL_GENERAL_ENTITIES
public static final java.lang.String EXTERNAL_PARAMETER_ENTITIES
public static final java.lang.String NORMALIZE_DATA
| Constructor Detail |
|---|
public EPPSchemaCachingParser()
public EPPSchemaCachingParser(int aSymbolTableSize)
aSymbolTableSize - | Method Detail |
|---|
protected void init()
throws EPPParserException
EPPSchemaCachingParser.
EPPParserException - Error initializing EPPSchemaCachingParserpublic void setLockSchemaCache(boolean aBoolean)
setLockSchemaCache in interface EPPSchemaCacheraBoolean - True param locks it, false unlocks it
public void addSchemaToCache(org.apache.xerces.xni.parser.XMLInputSource aSchema)
throws EPPParserException
addSchemaToCache in interface EPPSchemaCacheraSchema - The schema instance to be cached
EPPParserException - Error adding schema to the cachepublic boolean isNamespaceAware()
isNamespaceAware in class javax.xml.parsers.DocumentBuilderjava.lang.IllegalStateException - Parser is not in a state to query it's propertiespublic void setEntityResolver(org.xml.sax.EntityResolver aEntityResolver)
setEntityResolver in class javax.xml.parsers.DocumentBuilderaEntityResolver - The EntityResolver instance that this DocumentBuilder will use
when parsing.public org.w3c.dom.DOMImplementation getDOMImplementation()
getDOMImplementation in class javax.xml.parsers.DocumentBuilderpublic org.w3c.dom.Document newDocument()
newDocument in class javax.xml.parsers.DocumentBuilder
public org.w3c.dom.Document parse(org.xml.sax.InputSource aXmlInstance)
throws org.xml.sax.SAXException,
java.io.IOException
parse in class javax.xml.parsers.DocumentBuilderaXmlInstance - The XML instance to parse
org.xml.sax.SAXException - Thrown if any errors occur
java.io.IOException - Thrown if any errors occur
java.lang.IllegalArgumentException - DOCUMENT ME!
public org.w3c.dom.Document parse(java.io.InputStream aInputStream,
java.lang.String aSystemId)
throws org.xml.sax.SAXException,
java.io.IOException
parse in class javax.xml.parsers.DocumentBuilderaInputStream - The InputStream instance to parseaSystemId -
org.xml.sax.SAXException
java.io.IOException
public org.w3c.dom.Document parse(java.lang.String aUri)
throws org.xml.sax.SAXException,
java.io.IOException
parse in class javax.xml.parsers.DocumentBuilderaUri - The URI to parse
org.xml.sax.SAXException
java.io.IOException
public org.w3c.dom.Document parse(java.io.InputStream aInputStream)
throws org.xml.sax.SAXException,
java.io.IOException
parse in class javax.xml.parsers.DocumentBuilderaInputStream - The InputStream to parse
org.xml.sax.SAXException
java.io.IOException
public org.w3c.dom.Document parse(java.io.File aFile)
throws org.xml.sax.SAXException,
java.io.IOException
parse in class javax.xml.parsers.DocumentBuilderaFile - XML file to parse to a DOM Document
java.io.IOException - Error opening XML file
org.xml.sax.SAXException - Error parsing XML filepublic void setErrorHandler(org.xml.sax.ErrorHandler aErrorHandler)
setErrorHandler in class javax.xml.parsers.DocumentBuilderaErrorHandler - The ErrorHandler instance to usepublic boolean isValidating()
isValidating in class javax.xml.parsers.DocumentBuilderjava.lang.IllegalStateException - Error setting the validation featurepublic int getSymbolTableSize()
public void setSymbolTableSize(int aSymbolTableSize)
throws EPPParserException
aSymbolTableSize - The new value of the symbol table size
EPPParserException - Error setting the symbol table size
public void setFeature(java.lang.String aFeatureId,
boolean aBoolean)
throws org.xml.sax.SAXNotSupportedException,
org.xml.sax.SAXNotRecognizedException
aFeatureId - The unique identifier (URI) of the feature.aBoolean - The requested state of the feature (true or false).
org.xml.sax.SAXNotSupportedException - If the requested feature is known, but the requested state
is not supported.
org.xml.sax.SAXNotRecognizedException - If the requested feature is not known.
public void setProperty(java.lang.String aProperty,
java.lang.Object aObject)
throws org.xml.sax.SAXNotSupportedException,
org.xml.sax.SAXNotRecognizedException
aProperty - The unique identifier (URI) of the feature.aObject - The requested state of the feature (true or false).
org.xml.sax.SAXNotSupportedException - If the requested feature is known, but the requested state
is not supported.
org.xml.sax.SAXNotRecognizedException - If the requested feature is not known.
public boolean getFeature(java.lang.String aFeatureId)
throws org.xml.sax.SAXNotSupportedException,
org.xml.sax.SAXNotRecognizedException
aFeatureId - The unique identifier (URI) of the feature being set.
org.xml.sax.SAXNotSupportedException - If the requested feature is known but not supported.
org.xml.sax.SAXNotRecognizedException - If the requested feature is not known.
public java.lang.Object getProperty(java.lang.String aPropertyId)
throws org.xml.sax.SAXNotSupportedException,
org.xml.sax.SAXNotRecognizedException
aPropertyId - The unique identifier (URI) of the property being set.
org.xml.sax.SAXNotSupportedException - If the requested property is known but not supported.
org.xml.sax.SAXNotRecognizedException - If the requested property is not known.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||