Class ParserConfigurationSettings
java.lang.Object
org.htmlunit.cyberneko.xerces.util.ParserConfigurationSettings
- All Implemented Interfaces:
XMLComponentManager
- Direct Known Subclasses:
HTMLConfiguration
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionFeatures.Properties.Recognized features.Recognized properties. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRecognizedFeatures(String[] featureIds) Allows a parser to add parser specific features to be recognized and managed by the parser configuration.voidaddRecognizedProperties(String[] propertyIds) Allows a parser to add parser specific properties to be recognized and managed by the parser configuration.protected voidcheckFeature(String featureId) Check a feature.protected voidcheckProperty(String propertyId) Check a property.booleangetFeature(String featureId) getProperty(String propertyId) voidsetFeature(String featureId, boolean state) Set the state of a feature.voidsetProperty(String propertyId, Object value) setProperty
-
Field Details
-
fRecognizedProperties_
-
fProperties_
-
fRecognizedFeatures_
-
fFeatures_
-
-
Constructor Details
-
ParserConfigurationSettings
public ParserConfigurationSettings()
-
-
Method Details
-
addRecognizedFeatures
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 identifiers to be recognized.
-
setFeature
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.state- The requested state of the feature (true or false).- Throws:
XMLConfigurationException- If the requested feature is not known.
-
addRecognizedProperties
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 identifiers to be recognized.
-
setProperty
setProperty- Parameters:
propertyId- the property idvalue- the value- Throws:
XMLConfigurationException- If the requested feature is not known.
-
getFeature
- Specified by:
getFeaturein interfaceXMLComponentManager- Parameters:
featureId- The feature identifier.- Returns:
- the state of a feature.
- Throws:
XMLConfigurationException- Thrown on configuration error.
-
getProperty
- Specified by:
getPropertyin interfaceXMLComponentManager- Parameters:
propertyId- The property identifier.- Returns:
- the value of a property.
- Throws:
XMLConfigurationException- Thrown on configuration error.
-
checkFeature
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.- Throws:
XMLConfigurationException- If the requested feature is not known.
-
checkProperty
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 property being set.- Throws:
XMLConfigurationException- If the requested feature is not known.
-