org.xml.sax
Interface Configurable

All Known Implementing Classes:
ConfigurableParserAdapter

public interface Configurable

Interface for a configurable SAX2 parser. This interface allows the application to set or query features and property values from a SAX2 parser. It provides a standard interface feature negotiation and for extensibility. Features and properties have unique identifiers, which must be fully-qualified URIs.

See Also:
Parser, ConfigurableParserAdapter

Method Summary
 boolean getFeature(java.lang.String featureId)
          Query the state of a feature.
 java.lang.Object getProperty(java.lang.String propertyId)
          Query the value of a property.
 void setFeature(java.lang.String featureId, boolean state)
          Set the state of a feature.
 void setProperty(java.lang.String propertyId, java.lang.Object value)
          Set the value of a property.
 

Method Detail

setFeature

public void setFeature(java.lang.String featureId,
                       boolean state)
                throws SAXException
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:
SAXNotRecognizedException - If the requested feature is not known.
SAXNotSupportedException - If the requested feature is known, but the requested state is not supported.
SAXException - If there is any other problem fulfilling the request.

getFeature

public boolean getFeature(java.lang.String featureId)
                   throws SAXException
Query the state of a feature. Query the current state of any feature in a SAX2 parser. The parser might not recognize the feature.

Parameters:
featureId - The unique identifier (URI) of the feature being set.
Returns:
The current state of the feature.
Throws:
SAXNotRecognizedException - If the requested feature is not known.
SAXException - If there is any other problem fulfilling the request.

setProperty

public void setProperty(java.lang.String propertyId,
                        java.lang.Object value)
                 throws SAXException
Set the value of a property. Set the value of any property in a SAX2 parser. The parser might not recognize the property, and if it does recognize it, it might not support the requested value.

Parameters:
propertyId - The unique identifier (URI) of the property being set.
Throws:
SAXNotRecognizedException - If the requested property is not known.
SAXNotSupportedException - If the requested property is known, but the requested value is not supported.
SAXException - If there is any other problem fulfilling the request.

getProperty

public java.lang.Object getProperty(java.lang.String propertyId)
                             throws SAXException
Query the value of a property. Return the current value of a property in a SAX2 parser. The parser might not recognize the property.

Parameters:
propertyId - The unique identifier (URI) of the property being set.
Returns:
The current value of the property.
Throws:
SAXNotRecognizedException - If the requested property is not known.
SAXException - If there is any other problem fulfilling the request.
See Also:
getProperty(java.lang.String)