com.calitha.xml
Class SimpleParserConfiguration

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

public class SimpleParserConfiguration
extends Object
implements IParserConfiguration

This basic implementation of the parser configuration provides direct access to all the different configuration properties.

The default settings are:

Author:
Robert van Loenhout

Constructor Summary
SimpleParserConfiguration()
           
 
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.
 void setDynamicValidation(boolean dynamicValidation)
          Sets dynamic validation feature.
 void setEntityResolver(EntityResolver entityResolver)
          Sets the entity resolver
 void setGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
          Sets grammar pool property.
 void setNamespaces(boolean namespaces)
          Sets namespace processing feature.
 void setNoNamespaceSchemaLocation(String noNamespaceSchemaLocation)
          Sets no-namespace schema location property
 void setSchemaLocation(String schemaLocation)
          Sets schema location property.
 void setSchemaValidation(boolean schemaValidation)
          Sets schema validation feature.
 void setValidation(boolean validation)
          Sets validation feature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleParserConfiguration

public SimpleParserConfiguration()
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

setNamespaces

public void setNamespaces(boolean namespaces)
Sets namespace processing feature.

Parameters:
namespaces - namespace processing setting
See Also:
IParserConfiguration.isNamespaces()

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

setValidation

public void setValidation(boolean validation)
Sets validation feature.

Parameters:
validation - validation feature setting
See Also:
IParserConfiguration.isValidation()

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

setDynamicValidation

public void setDynamicValidation(boolean dynamicValidation)
Sets dynamic validation feature.

Parameters:
dynamicValidation - dynamic validation feature setting
See Also:
IParserConfiguration.isDynamicValidation()

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

setSchemaValidation

public void setSchemaValidation(boolean schemaValidation)
Sets schema validation feature.

Parameters:
schemaValidation - schema validation feature
See Also:
IParserConfiguration.isSchemaValidation()

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

setGrammarPool

public void setGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Sets grammar pool property.

Parameters:
grammarPool - grammar pool property value
See Also:
IParserConfiguration.getGrammarPool()

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

setSchemaLocation

public void setSchemaLocation(String schemaLocation)
Sets schema location property.

Parameters:
schemaLocation - schema location property value
See Also:
IParserConfiguration.getSchemaLocation()

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

setNoNamespaceSchemaLocation

public void setNoNamespaceSchemaLocation(String noNamespaceSchemaLocation)
Sets no-namespace schema location property

Parameters:
noNamespaceSchemaLocation - no-namespace schema location property value
See Also:
IParserConfiguration.getNoNamespaceSchemaLocation()

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

setEntityResolver

public void setEntityResolver(EntityResolver entityResolver)
Sets the entity resolver

Parameters:
entityResolver - entity resolver
See Also:
EntityResolver