- All Known Implementing Classes:
DefaultFilter,HTMLScanner,HTMLTagBalancer,HTMLWriterFilter,NamespaceBinder
public interface HTMLComponent
This interface extends the XNI
XMLComponent interface
to add methods that allow the preferred default values for features
and properties to be queried.- Author:
- Andy Clark
-
Method Summary
Modifier and TypeMethodDescriptiongetFeatureDefault(String featureId) Returns the default state for a feature, or null if this component does not want to report a default value for this feature.getPropertyDefault(String propertyId) Returns the default state for a property, or null if this component does not want to report a default value for this property.String[]String[]voidreset(XMLParserConfiguration xmlParserConfiguration) Resets the component.voidsetFeature(String featureId, boolean state) Sets the state of a feature.voidsetProperty(String propertyId, Object value) Sets the value of a property.
-
Method Details
-
reset
Resets the component. The component can query the component manager about any features and properties that affect the operation of the component.- Parameters:
xmlParserConfiguration- TheXMLParserConfiguration.- Throws:
XNIException- Thrown by component on initialization error.XMLConfigurationException
-
getRecognizedFeatures
String[] getRecognizedFeatures()- Returns:
- an array of feature identifiers that are recognized by this component. This method may return null if no features are recognized by this component.
-
setFeature
Sets the state of a feature. This method is called by the component manager any time after reset when a feature changes state.Note: Components should silently ignore features that do not affect the operation of the component.
- Parameters:
featureId- The feature identifier.state- The state of the feature.- Throws:
XMLConfigurationException- Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.
-
getRecognizedProperties
String[] getRecognizedProperties()- Returns:
- an array of property identifiers that are recognized by this component. This method may return null if no properties are recognized by this component.
-
setProperty
Sets the value of a property. This method is called by the component manager any time after reset when a property changes value.Note: Components should silently ignore properties that do not affect the operation of the component.
- Parameters:
propertyId- The property identifier.value- The value of the property.- Throws:
XMLConfigurationException- Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.
-
getFeatureDefault
Returns the default state for a feature, or null if this component does not want to report a default value for this feature.- Parameters:
featureId- The feature identifier.- Returns:
- the default state for a feature, or null if this component does not want to report a default value for this feature.
-
getPropertyDefault
Returns the default state for a property, or null if this component does not want to report a default value for this property.- Parameters:
propertyId- The property identifier.- Returns:
- the default state for a property, or null if this component does not want to report a default value for this property
-