This class implements the basic operations for managing parser
configuration features and properties. This utility class can
be used as a base class for parser configurations or separately
to encapsulate a number of parser settings as a component
manager.
This class can be constructed with a "parent" settings object
(in the form of an XMLComponentManager) that allows
parser configuration settings to be "chained" together.
author: Andy Clark, IBM version: $Id: ParserConfigurationSettings.java,v 1.2 2006/04/01 06:01:40 jeffsuttor Exp $
Field Summary
static int
counter Set the state of a feature.
Set the state of any feature in a SAX2 parser.
addRecognizedFeatures(String[] featureIds) Allows a parser to add parser specific features to be recognized
and managed by the parser configuration.
public void
addRecognizedProperties(String[] propertyIds) Allows a parser to add parser specific properties to be recognized
and managed by the parser configuration.
Set the state of a feature.
Set the state of any feature in a SAX2 parser. The parser
might not recognize the feature, and if it does recognize
it, it might not be able to fulfill the request.
Parameters: featureId - The unique identifier (URI) of the feature. Parameters: state - The requested state of the feature (true or false). exception: com.sun.xml.stream.xerces.xni.parser.XMLConfigurationException - If therequested feature is not known.
Constructs a parser configuration settings object with a
parent settings object.
Method Detail
addRecognizedFeatures
public void addRecognizedFeatures(String[] featureIds)(Code)
Allows a parser to add parser specific features to be recognized
and managed by the parser configuration.
Parameters: featureIds - An array of the additional feature identifiersto be recognized.
addRecognizedProperties
public void addRecognizedProperties(String[] propertyIds)(Code)
Allows a parser to add parser specific properties to be recognized
and managed by the parser configuration.
Parameters: propertyIds - An array of the additional property identifiersto be recognized.
Check a feature. If feature is known and supported, this method simply
returns. Otherwise, the appropriate exception is thrown.
Parameters: featureId - The unique identifier (URI) of the feature. exception: com.sun.xml.stream.xerces.xni.parser.XMLConfigurationException - If therequested feature is not known.
Check a property. If the property is known and supported, this method
simply returns. Otherwise, the appropriate exception is thrown.
Parameters: propertyId - The unique identifier (URI) of the propertybeing set. exception: com.sun.xml.stream.xerces.xni.parser.XMLConfigurationException - If therequested feature is not known.
Returns the state of a feature.
Parameters: featureId - The feature identifier. true if the feature is supported throws: XMLConfigurationException - Thrown for configuration error.In general, components shouldonly throw this exception ifit is reallya critical error.
Returns the value of a property.
Parameters: propertyId - The property identifier. the value of the property throws: XMLConfigurationException - Thrown for configuration error.In general, components shouldonly throw this exception ifit is reallya critical error.