org.apache.xerces.util
Class ParserConfigurationSettings
java.lang.Object
org.apache.xerces.util.ParserConfigurationSettings
- org.apache.xerces.xni.parser.XMLComponentManager
public class ParserConfigurationSettings
extends java.lang.Object
implements org.apache.xerces.xni.parser.XMLComponentManager
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.
$Id: ParserConfigurationSettings.java 319903 2004-04-25 05:05:50Z mrglavas $
void | addRecognizedFeatures(String[] featureIds) - Allows a parser to add parser specific features to be recognized
and managed by the parser configuration.
|
void | addRecognizedProperties(String[] propertyIds) - Allows a parser to add parser specific properties to be recognized
and managed by the parser configuration.
|
protected void | checkFeature(String featureId) - Check a feature.
|
protected void | checkProperty(String propertyId) - Check a property.
|
boolean | getFeature(String featureId) - Returns the state of a feature.
|
Object | getProperty(String propertyId) - Returns the value of a property.
|
void | setFeature(String featureId, boolean state) - Set the state of a feature.
|
void | setProperty(String propertyId, Object value) - setProperty
|
PARSER_SETTINGS
protected static final String PARSER_SETTINGS
fFeatures
protected HashMap fFeatures
Features.
fParentSettings
protected org.apache.xerces.xni.parser.XMLComponentManager fParentSettings
Parent parser configuration settings.
fProperties
protected HashMap fProperties
Properties.
fRecognizedFeatures
protected ArrayList fRecognizedFeatures
Recognized features.
fRecognizedProperties
protected ArrayList fRecognizedProperties
Recognized properties.
ParserConfigurationSettings
public ParserConfigurationSettings()
Default Constructor.
ParserConfigurationSettings
public ParserConfigurationSettings(org.apache.xerces.xni.parser.XMLComponentManager parent)
Constructs a parser configuration settings object with a
parent settings object.
addRecognizedFeatures
public void addRecognizedFeatures(String[] featureIds)
Allows a parser to add parser specific features to be recognized
and managed by the parser configuration.
featureIds
- An array of the additional feature identifiers
to be recognized.
addRecognizedProperties
public void addRecognizedProperties(String[] propertyIds)
Allows a parser to add parser specific properties to be recognized
and managed by the parser configuration.
propertyIds
- An array of the additional property identifiers
to be recognized.
checkFeature
protected void checkFeature(String featureId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
Check a feature. If feature is known and supported, this method simply
returns. Otherwise, the appropriate exception is thrown.
featureId
- The unique identifier (URI) of the feature.
org.apache.xerces.xni.parser.XMLConfigurationException
- If the
requested feature is not known.
checkProperty
protected void checkProperty(String propertyId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
Check a property. If the property is known and supported, this method
simply returns. Otherwise, the appropriate exception is thrown.
propertyId
- The unique identifier (URI) of the property
being set.
org.apache.xerces.xni.parser.XMLConfigurationException
- If the
requested feature is not known.
getFeature
public boolean getFeature(String featureId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
Returns the state of a feature.
- getFeature in interface org.apache.xerces.xni.parser.XMLComponentManager
featureId
- The feature identifier.
- true if the feature is supported
org.apache.xerces.xni.parser.XMLConfigurationException
- Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.
getProperty
public Object getProperty(String propertyId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
Returns the value of a property.
- getProperty in interface org.apache.xerces.xni.parser.XMLComponentManager
propertyId
- The property identifier.
- the value of the property
org.apache.xerces.xni.parser.XMLConfigurationException
- Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.
setFeature
public void setFeature(String featureId,
boolean state)
throws org.apache.xerces.xni.parser.XMLConfigurationException
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.
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).
org.apache.xerces.xni.parser.XMLConfigurationException
- If the
requested feature is not known.
setProperty
public void setProperty(String propertyId,
Object value)
throws org.apache.xerces.xni.parser.XMLConfigurationException
setProperty
org.apache.xerces.xni.parser.XMLConfigurationException
- If the
requested feature is not known.
Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.