public class DefaultFilter extends Object implements XMLDocumentFilter, HTMLComponent
| Modifier and Type | Field and Description |
|---|---|
protected XMLDocumentHandler |
fDocumentHandler
Document handler.
|
protected XMLDocumentSource |
fDocumentSource
Document source.
|
| Constructor and Description |
|---|
DefaultFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
characters(XMLString text,
Augmentations augs)
Characters.
|
void |
comment(XMLString text,
Augmentations augs)
Comment.
|
void |
doctypeDecl(String root,
String publicId,
String systemId,
Augmentations augs)
Doctype declaration.
|
void |
emptyElement(QName element,
XMLAttributes attributes,
Augmentations augs)
Empty element.
|
void |
endCDATA(Augmentations augs)
End CDATA section.
|
void |
endDocument(Augmentations augs)
End document.
|
void |
endElement(QName element,
Augmentations augs)
End element.
|
void |
endGeneralEntity(String name,
Augmentations augs)
End general entity.
|
void |
endPrefixMapping(String prefix,
Augmentations augs)
End prefix mapping.
|
XMLDocumentHandler |
getDocumentHandler()
Returns the document handler.
|
XMLDocumentSource |
getDocumentSource()
Returns the document source.
|
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.
|
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.
|
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.
|
void |
ignorableWhitespace(XMLString text,
Augmentations augs)
Ignorable whitespace.
|
protected static String[] |
merge(String[] array1,
String[] array2)
Utility method for merging string arrays for recognized features
and recognized properties.
|
void |
processingInstruction(String target,
XMLString data,
Augmentations augs)
Processing instruction.
|
void |
reset(XMLComponentManager componentManager)
Resets the component.
|
void |
setDocumentHandler(XMLDocumentHandler handler)
Sets the document handler.
|
void |
setDocumentSource(XMLDocumentSource source)
Sets the document source.
|
void |
setFeature(String featureId,
boolean state)
Sets the state of a feature.
|
void |
setProperty(String propertyId,
Object value)
Sets the value of a property.
|
void |
startCDATA(Augmentations augs)
Start CDATA section.
|
void |
startDocument(XMLLocator locator,
String encoding,
Augmentations augs)
Start document.
|
void |
startDocument(XMLLocator locator,
String encoding,
NamespaceContext nscontext,
Augmentations augs)
Start document.
|
void |
startElement(QName element,
XMLAttributes attributes,
Augmentations augs)
Start element.
|
void |
startGeneralEntity(String name,
XMLResourceIdentifier id,
String encoding,
Augmentations augs)
Start general entity.
|
void |
startPrefixMapping(String prefix,
String uri,
Augmentations augs)
Start prefix mapping.
|
void |
textDecl(String version,
String encoding,
Augmentations augs)
Text declaration.
|
void |
xmlDecl(String version,
String encoding,
String standalone,
Augmentations augs)
XML declaration.
|
protected XMLDocumentHandler fDocumentHandler
protected XMLDocumentSource fDocumentSource
public void setDocumentHandler(XMLDocumentHandler handler)
setDocumentHandler in interface XMLDocumentSourcepublic XMLDocumentHandler getDocumentHandler()
getDocumentHandler in interface XMLDocumentSourcepublic void setDocumentSource(XMLDocumentSource source)
setDocumentSource in interface XMLDocumentHandlerpublic XMLDocumentSource getDocumentSource()
getDocumentSource in interface XMLDocumentHandlerpublic void startDocument(XMLLocator locator, String encoding, NamespaceContext nscontext, Augmentations augs) throws XNIException
startDocument in interface XMLDocumentHandlerXNIExceptionpublic void xmlDecl(String version, String encoding, String standalone, Augmentations augs) throws XNIException
xmlDecl in interface XMLDocumentHandlerXNIExceptionpublic void doctypeDecl(String root, String publicId, String systemId, Augmentations augs) throws XNIException
doctypeDecl in interface XMLDocumentHandlerXNIExceptionpublic void comment(XMLString text, Augmentations augs) throws XNIException
comment in interface XMLDocumentHandlerXNIExceptionpublic void processingInstruction(String target, XMLString data, Augmentations augs) throws XNIException
processingInstruction in interface XMLDocumentHandlerXNIExceptionpublic void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException
startElement in interface XMLDocumentHandlerXNIExceptionpublic void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException
emptyElement in interface XMLDocumentHandlerXNIExceptionpublic void characters(XMLString text, Augmentations augs) throws XNIException
characters in interface XMLDocumentHandlerXNIExceptionpublic void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException
ignorableWhitespace in interface XMLDocumentHandlerXNIExceptionpublic void startGeneralEntity(String name, XMLResourceIdentifier id, String encoding, Augmentations augs) throws XNIException
startGeneralEntity in interface XMLDocumentHandlerXNIExceptionpublic void textDecl(String version, String encoding, Augmentations augs) throws XNIException
textDecl in interface XMLDocumentHandlerXNIExceptionpublic void endGeneralEntity(String name, Augmentations augs) throws XNIException
endGeneralEntity in interface XMLDocumentHandlerXNIExceptionpublic void startCDATA(Augmentations augs) throws XNIException
startCDATA in interface XMLDocumentHandlerXNIExceptionpublic void endCDATA(Augmentations augs) throws XNIException
endCDATA in interface XMLDocumentHandlerXNIExceptionpublic void endElement(QName element, Augmentations augs) throws XNIException
endElement in interface XMLDocumentHandlerXNIExceptionpublic void endDocument(Augmentations augs) throws XNIException
endDocument in interface XMLDocumentHandlerXNIExceptionpublic void startDocument(XMLLocator locator, String encoding, Augmentations augs) throws XNIException
XNIExceptionpublic void startPrefixMapping(String prefix, String uri, Augmentations augs) throws XNIException
XNIExceptionpublic void endPrefixMapping(String prefix, Augmentations augs) throws XNIException
XNIExceptionpublic String[] getRecognizedFeatures()
getRecognizedFeatures in interface XMLComponentpublic Boolean getFeatureDefault(String featureId)
getFeatureDefault in interface XMLComponentgetFeatureDefault in interface HTMLComponentpublic String[] getRecognizedProperties()
getRecognizedProperties in interface XMLComponentpublic Object getPropertyDefault(String propertyId)
getPropertyDefault in interface XMLComponentgetPropertyDefault in interface HTMLComponentpublic void reset(XMLComponentManager componentManager) throws XMLConfigurationException
reset in interface XMLComponentcomponentManager - The component manager.XNIException - Thrown by component on initialization error.XMLConfigurationExceptionpublic void setFeature(String featureId, boolean state) throws XMLConfigurationException
Note: Components should silently ignore features that do not affect the operation of the component.
setFeature in interface XMLComponentfeatureId - The feature identifier.state - The state of the feature.XMLConfigurationException - Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.public void setProperty(String propertyId, Object value) throws XMLConfigurationException
Note: Components should silently ignore properties that do not affect the operation of the component.
setProperty in interface XMLComponentpropertyId - The property identifier.value - The value of the property.XMLConfigurationException - Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.(C) Copyright 2002-2008, Andy Clark, Marc Guillemot. All rights reserved.