com.calitha.xml
Class PreParsedGrammarsConfiguration

java.lang.Object
  extended by com.calitha.xml.PreParsedGrammarsConfiguration
All Implemented Interfaces:
IParserConfiguration

public final class PreParsedGrammarsConfiguration
extends Object
implements IParserConfiguration

The PreParsedGrammarsConfiguration represents a configuration for SimpleDOMParser that uses pre-parsed grammars.

This configuration is used when you want a parser to validate the XML, using grammars that you have fed to a grammar pool, so that you can be sure the grammars are already available when parsing. The grammar pool is locked, so no additional grammars can be loaded.

The settings are:

Author:
Robert van Loenhout

Constructor Summary
PreParsedGrammarsConfiguration(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
           
 
Method Summary
 EntityResolver getEntityResolver()
          Gets the entity resolver.
 org.apache.xerces.xni.grammars.XMLGrammarPool getGrammarPool()
          Gets grammar pool property
 String getNoNamespaceSchemaLocation()
          Gets no-namespace schema location property.
 String getSchemaLocation()
          Gets schema location property.
 boolean isDynamicValidation()
          Gets dynamic validation feature.
 boolean isNamespaces()
          Gets namespace processing feature.
 boolean isSchemaValidation()
          Gets schema validation feature true - Turn on XML Schema validation false - Do not report validation errors against XML Schema default - false
 boolean isValidation()
          Gets validation feature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreParsedGrammarsConfiguration

public PreParsedGrammarsConfiguration(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Method Detail

isNamespaces

public boolean isNamespaces()
Description copied from interface: IParserConfiguration
Gets namespace processing feature.

Specified by:
isNamespaces in interface IParserConfiguration
Returns:
namespace processing setting
See Also:
http://xml.org/sax/features/namespaces

isValidation

public boolean isValidation()
Description copied from interface: IParserConfiguration
Gets validation feature.

Specified by:
isValidation in interface IParserConfiguration
Returns:
validation feature setting
See Also:
http://xml.org/sax/features/validation

isDynamicValidation

public boolean isDynamicValidation()
Description copied from interface: IParserConfiguration
Gets dynamic validation feature.

Specified by:
isDynamicValidation in interface IParserConfiguration
Returns:
dynamic validation feature setting
See Also:
http://apache.org/xml/features/validation/dynamic

isSchemaValidation

public boolean isSchemaValidation()
Description copied from interface: IParserConfiguration
Gets schema validation feature

Specified by:
isSchemaValidation in interface IParserConfiguration
Returns:
schema validation feature setting
See Also:
http://apache.org/xml/features/validation/schema

getGrammarPool

public org.apache.xerces.xni.grammars.XMLGrammarPool getGrammarPool()
Description copied from interface: IParserConfiguration
Gets grammar pool property

Null by default.

Specified by:
getGrammarPool in interface IParserConfiguration
Returns:
grammar pool property value
See Also:
Xerces - Caching & Preparsing Grammars

getSchemaLocation

public String getSchemaLocation()
Description copied from interface: IParserConfiguration
Gets schema location property.

The schema specified by the user using this property will be used if the targetNamespace matches.

Specified by:
getSchemaLocation in interface IParserConfiguration
Returns:
schema location property value
See Also:
http://apache.org/xml/properties/schema/external-schemaLocation

getNoNamespaceSchemaLocation

public String getNoNamespaceSchemaLocation()
Description copied from interface: IParserConfiguration
Gets no-namespace schema location property.

This property allows the user to specify an XML Schema with no namespace.

Null by default.

Specified by:
getNoNamespaceSchemaLocation in interface IParserConfiguration
Returns:
no-namespace schema location property settings
See Also:
http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation

getEntityResolver

public EntityResolver getEntityResolver()
Description copied from interface: IParserConfiguration
Gets the entity resolver.

Specified by:
getEntityResolver in interface IParserConfiguration
Returns:
entity resolver
See Also:
EntityResolver