public class ParserConfigurationSettings extends Object implements XMLComponentManager
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.
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Boolean> |
fFeatures
Features.
|
protected XMLComponentManager |
fParentSettings
Parent parser configuration settings.
|
protected Map<String,Object> |
fProperties
Properties.
|
protected Set<String> |
fRecognizedFeatures
Recognized features.
|
protected Set<String> |
fRecognizedProperties
Recognized properties.
|
protected static String |
PARSER_SETTINGS |
| Constructor and Description |
|---|
ParserConfigurationSettings()
Default Constructor.
|
ParserConfigurationSettings(XMLComponentManager parent)
Constructs a parser configuration settings object with a
parent settings object.
|
| Modifier and Type | Method and Description |
|---|---|
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 FeatureState |
checkFeature(String featureId)
Check a feature.
|
protected PropertyState |
checkProperty(String propertyId)
Check a property.
|
boolean |
getFeature(String featureId)
Returns the state of a feature.
|
boolean |
getFeature(String featureId,
boolean defaultValue)
Returns the state of a feature.
|
FeatureState |
getFeatureState(String featureId) |
Object |
getProperty(String propertyId)
Returns the value of a property.
|
Object |
getProperty(String propertyId,
Object defaultValue)
Returns the value of a property.
|
PropertyState |
getPropertyState(String propertyId) |
void |
setFeature(String featureId,
boolean state)
Set the state of a feature.
|
void |
setProperty(String propertyId,
Object value)
setProperty
|
protected static final String PARSER_SETTINGS
protected XMLComponentManager fParentSettings
public ParserConfigurationSettings()
public ParserConfigurationSettings(XMLComponentManager parent)
public void addRecognizedFeatures(String[] featureIds)
featureIds - An array of the additional feature identifiers
to be recognized.public void setFeature(String featureId, boolean state) throws XMLConfigurationException
featureId - The unique identifier (URI) of the feature.state - The requested state of the feature (true or false).XMLConfigurationException - If the
requested feature is not known.public void addRecognizedProperties(String[] propertyIds)
propertyIds - An array of the additional property identifiers
to be recognized.public void setProperty(String propertyId, Object value) throws XMLConfigurationException
propertyId - value - XMLConfigurationException - If the
requested feature is not known.public final boolean getFeature(String featureId) throws XMLConfigurationException
getFeature in interface XMLComponentManagerfeatureId - The feature identifier.XMLConfigurationException - Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.public final boolean getFeature(String featureId, boolean defaultValue)
XMLComponentManagergetFeature in interface XMLComponentManagerfeatureId - The feature identifier.defaultValue - Default value if future is not available.public FeatureState getFeatureState(String featureId)
getFeatureState in interface XMLComponentManagerpublic final Object getProperty(String propertyId) throws XMLConfigurationException
getProperty in interface XMLComponentManagerpropertyId - The property identifier.XMLConfigurationException - Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.public final Object getProperty(String propertyId, Object defaultValue)
XMLComponentManagergetProperty in interface XMLComponentManagerpropertyId - The property identifier.defaultValue - Return value if property is not available.public PropertyState getPropertyState(String propertyId)
getPropertyState in interface XMLComponentManagerprotected FeatureState checkFeature(String featureId) throws XMLConfigurationException
featureId - The unique identifier (URI) of the feature.XMLConfigurationException - If the
requested feature is not known.protected PropertyState checkProperty(String propertyId) throws XMLConfigurationException
propertyId - The unique identifier (URI) of the property
being set.XMLConfigurationException - If the
requested feature is not known.Copyright © 2018–2021 mhoffrogge. All rights reserved.