Top Description Methods
com.sun.org.apache.xerces.internal.xni.parser

public Interface XMLComponent

Known Direct Implementers
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl, com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl, com.sun.org.apache.xerces.internal.impl.XMLEntityManager, com.sun.org.apache.xerces.internal.impl.XMLErrorReporter, com.sun.org.apache.xerces.internal.impl.XMLNamespaceBinder, com.sun.org.apache.xerces.internal.impl.XMLScanner, com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDProcessor, com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator, com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader, com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator, com.sun.org.apache.xerces.internal.jaxp.JAXPValidatorComponent, com.sun.org.apache.xerces.internal.xinclude.XIncludeHandler

The 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.
Author
Andy Clark, IBM
See Also
XMLComponentManager

Method Summary

Modifier and TypeMethod and Description
public Boolean
getFeatureDefault(String
The feature identifier.
featureId
)

Returns the default state for a feature, or null if this component does not want to report a default value for this feature.

public Object
getPropertyDefault(String
The property identifier.
propertyId
)

Returns the default state for a property, or null if this component does not want to report a default value for this property.

public String[]
getRecognizedFeatures()

Returns a list of feature identifiers that are recognized by this component.

public String[]
getRecognizedProperties()

Returns a list of property identifiers that are recognized by this component.

public void
reset(XMLComponentManager
The component manager.
componentManager
)

Resets the component.

public void
setFeature(String
The feature identifier.
featureId
,
boolean
The state of the feature.
state
)

Sets the state of a feature.

public void
setProperty(String
The property identifier.
propertyId
,
Object
The value of the property.
value
)

Sets the value of a property.

Method Detail

getFeatureDefaultback to summary
public 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:String

The feature identifier.

Since
Xerces 2.2.0
getPropertyDefaultback to summary
public Object 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.

Parameters
propertyId:String

The property identifier.

Since
Xerces 2.2.0
getRecognizedFeaturesback to summary
public 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.

getRecognizedPropertiesback to summary
public 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.

resetback to summary
public 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:XMLComponentManager

The component manager.

Exceptions
XNIException:
Thrown by component on initialization error.
setFeatureback to summary
public 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:String

The feature identifier.

state:boolean

The state of the feature.

Exceptions
XMLConfigurationException:
Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.
setPropertyback to summary
public 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:String

The property identifier.

value:Object

The value of the property.

Exceptions
XMLConfigurationException:
Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.