Interface XMLComponent
-
- All Known Implementing Classes:
XIncludeHandler,XML11DocumentScannerImpl,XML11DTDProcessor,XML11DTDScannerImpl,XML11DTDValidator,XML11NamespaceBinder,XML11NSDocumentScannerImpl,XML11NSDTDValidator,XMLDocumentFragmentScannerImpl,XMLDocumentScannerImpl,XMLDTDLoader,XMLDTDProcessor,XMLDTDScannerImpl,XMLDTDValidator,XMLEntityManager,XMLErrorReporter,XMLNamespaceBinder,XMLNSDocumentScannerImpl,XMLNSDTDValidator,XMLScanner,XMLSchemaLoader,XMLSchemaValidator,XPointerHandler
public interface XMLComponentThe component interface defines methods that must be implemented by components in a parser configuration. The component methods allow the component manager to initialize the component state and notify the component when feature and property values change.- Version:
- $Id$
- Author:
- Andy Clark, IBM
- See Also:
XMLComponentManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BooleangetFeatureDefault(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.ObjectgetPropertyDefault(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[]getRecognizedFeatures()Returns a list of feature identifiers that are recognized by this component.String[]getRecognizedProperties()Returns a list of property identifiers that are recognized by this component.voidreset(XMLComponentManager componentManager)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 Detail
-
reset
void reset(XMLComponentManager componentManager) throws XMLConfigurationException
Resets the component. The component can query the component manager about any features and properties that affect the operation of the component.- Parameters:
componentManager- The component manager.- Throws:
XNIException- Thrown by component on initialization error.XMLConfigurationException
-
getRecognizedFeatures
String[] getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by this component. This method may return null if no features are recognized by this component.
-
setFeature
void setFeature(String featureId, boolean state) throws XMLConfigurationException
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 a list of property identifiers that are recognized by this component. This method may return null if no properties are recognized by this component.
-
setProperty
void setProperty(String propertyId, Object value) throws XMLConfigurationException
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
Boolean getFeatureDefault(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.- Parameters:
featureId- The feature identifier.- Since:
- Xerces 2.2.0
-
-