|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.tomp.xtcl.filter.XTFilterImpl
net.sf.tomp.xtcl.filter.DynamicFilterImpl
public class DynamicFilterImpl
DOCUMENT ME!
Field Summary | |
---|---|
protected org.xml.sax.XMLFilter |
filter
DOCUMENT ME! |
protected boolean |
isContentHandler
DOCUMENT ME! |
protected boolean |
isDTDHandler
DOCUMENT ME! |
protected boolean |
isEntityResolver
DOCUMENT ME! |
protected boolean |
isErrorHandler
DOCUMENT ME! |
protected boolean |
isLexicalHandler
DOCUMENT ME! |
protected HasOutputProperties |
outputPropertiesListener
DOCUMENT ME! |
Fields inherited from class net.sf.tomp.xtcl.filter.XTFilterImpl |
---|
contentHandler, dtdHandler, entityResolver, errorHandler, lexicalHandler, locator, parent |
Constructor Summary | |
---|---|
DynamicFilterImpl()
Construct an empty XML filter, with no parent. |
|
DynamicFilterImpl(org.xml.sax.XMLReader parent)
Construct an XML filter with the specified parent. |
Method Summary | |
---|---|
void |
comment(char[] ch,
int start,
int length)
Callback interface for SAX (part of LexicalHandler interface): not for application use |
void |
endCDATA()
DOCUMENT ME! |
void |
endDocument()
Filter an end document event. |
void |
endDTD()
Register the end of the DTD. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Filter an end element event. |
void |
endEntity(java.lang.String name)
DOCUMENT ME! |
void |
endPrefixMapping(java.lang.String prefix)
Filter an end Namespace prefix mapping event. |
void |
error(org.xml.sax.SAXParseException e)
Filter an error event. |
void |
fatalError(org.xml.sax.SAXParseException e)
Filter a fatal error event. |
org.xml.sax.ContentHandler |
getContentHandler()
Get the content event handler. |
org.xml.sax.DTDHandler |
getDTDHandler()
Get the current DTD event handler. |
org.xml.sax.EntityResolver |
getEntityResolver()
Get the current entity resolver. |
org.xml.sax.ErrorHandler |
getErrorHandler()
Get the current error event handler. |
boolean |
getFeature(java.lang.String name)
Look up the value of a feature. |
org.xml.sax.XMLFilter |
getFilter()
DOCUMENT ME! |
org.xml.sax.ext.LexicalHandler |
getLexicalHandler()
Get the lexical event handler. |
java.util.Properties |
getOutputProperties()
DOCUMENT ME! |
java.lang.Object |
getProperty(java.lang.String name)
Look up the value of a property. |
void |
characters(char[] ch,
int start,
int length)
Filter a character data event. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Filter an ignorable whitespace event. |
void |
notationDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Filter a notation declaration event. |
void |
parse(org.xml.sax.InputSource input)
Parse a document. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Filter a processing instruction event. |
protected void |
propagateParamsToFilter(org.xml.sax.XMLFilter filter)
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Filter an external entity resolution. |
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Set the content event handler. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Filter a new document locator event. |
void |
setDTDHandler(org.xml.sax.DTDHandler handler)
Set the DTD event handler. |
void |
setErrorHandler(org.xml.sax.ErrorHandler handler)
Set the error event handler. |
void |
setFeature(java.lang.String name,
boolean value)
Set the value of a feature. |
void |
setFilter(org.xml.sax.XMLFilter f)
DOCUMENT ME! |
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Set the lexical event handler. |
void |
setOutputProperties(java.util.Properties p)
DOCUMENT ME! |
void |
setOutputPropertiesListener(HasOutputProperties l)
DOCUMENT ME! |
void |
setParameter(java.lang.String k,
java.lang.Object v)
sets the parameter |
void |
setParent(org.xml.sax.XMLReader parent)
Set the parent reader. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set the value of a property. |
void |
skippedEntity(java.lang.String name)
Filter a skipped entity event. |
void |
startCDATA()
DOCUMENT ME! |
void |
startDocument()
Filter a start document event. |
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Register the start of the DTD. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Filter a start element event. |
void |
startEntity(java.lang.String name)
DOCUMENT ME! |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Filter a start Namespace prefix mapping event. |
void |
unparsedEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId,
java.lang.String notationName)
Filter an unparsed entity declaration event. |
void |
warning(org.xml.sax.SAXParseException e)
Filter a warning event. |
Methods inherited from class net.sf.tomp.xtcl.filter.XTFilterImpl |
---|
getContext, getDocumentLocator, getId, getParent, parse, setContext, setEntityResolver, setId, setupParse |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.tomp.xtcl.filter.XTFilter |
---|
getContext, setContext |
Methods inherited from interface org.xml.sax.XMLFilter |
---|
getParent |
Methods inherited from interface org.xml.sax.XMLReader |
---|
parse, setEntityResolver |
Methods inherited from interface net.sf.tomp.general.Identifiable |
---|
getId |
Field Detail |
---|
protected org.xml.sax.XMLFilter filter
protected boolean isContentHandler
protected boolean isDTDHandler
protected boolean isErrorHandler
protected boolean isLexicalHandler
protected boolean isEntityResolver
protected HasOutputProperties outputPropertiesListener
Constructor Detail |
---|
public DynamicFilterImpl()
This filter will have no parent: you must assign a parent before you
start a parse or do any configuration with setFeature or setProperty,
unless you use this as a pure event consumer rather than as an XMLReader
.
XMLReader.setFeature(java.lang.String, boolean)
,
XMLReader.setProperty(java.lang.String, java.lang.Object)
,
setParent(org.xml.sax.XMLReader)
public DynamicFilterImpl(org.xml.sax.XMLReader parent)
parent
- DOCUMENT ME!setParent(org.xml.sax.XMLReader)
,
XTFilterImpl.getParent()
Method Detail |
---|
public void setParent(org.xml.sax.XMLReader parent)
This is the XMLReader
from which this
filter will obtain its events and to which it will pass its configuration
requests. The parent may itself be another filter.
If there is no parent reader set, any attempt to parse or to set or get a feature or property will fail.
setParent
in interface org.xml.sax.XMLFilter
setParent
in class XTFilterImpl
parent
- The parent XML reader.XTFilterImpl.getParent()
public void setFeature(java.lang.String name, boolean value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
This will always fail if the parent is null.
setFeature
in interface org.xml.sax.XMLReader
setFeature
in class XTFilterImpl
name
- The feature name.value
- The requested feature value.
org.xml.sax.SAXNotRecognizedException
- If the feature value can't be
assigned or retrieved from the parent.
org.xml.sax.SAXNotSupportedException
- When the parent recognizes the
feature name but cannot set the requested value.public boolean getFeature(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
This will always fail if the parent is null.
getFeature
in interface org.xml.sax.XMLReader
getFeature
in class XTFilterImpl
name
- The feature name.
org.xml.sax.SAXNotRecognizedException
- If the feature value can't be
assigned or retrieved from the parent.
org.xml.sax.SAXNotSupportedException
- When the parent recognizes the
feature name but cannot determine its value at this time.public void setProperty(java.lang.String name, java.lang.Object value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
This will always fail if the parent is null.
setProperty
in interface org.xml.sax.XMLReader
setProperty
in class XTFilterImpl
name
- The property name.value
- The requested property value.
org.xml.sax.SAXNotRecognizedException
- If the property value can't be
assigned or retrieved from the parent.
org.xml.sax.SAXNotSupportedException
- When the parent recognizes the
property name but cannot set the requested value.public java.lang.Object getProperty(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
getProperty
in interface org.xml.sax.XMLReader
getProperty
in class XTFilterImpl
name
- The property name.
org.xml.sax.SAXNotRecognizedException
- If the property value can't be
assigned or retrieved from the parent.
org.xml.sax.SAXNotSupportedException
- When the parent recognizes the
property name but cannot determine its value at this time.public org.xml.sax.EntityResolver getEntityResolver()
getEntityResolver
in interface org.xml.sax.XMLReader
getEntityResolver
in class XTFilterImpl
public void setDTDHandler(org.xml.sax.DTDHandler handler)
setDTDHandler
in interface org.xml.sax.XMLReader
setDTDHandler
in class XTFilterImpl
handler
- The new DTD handler.public org.xml.sax.DTDHandler getDTDHandler()
getDTDHandler
in interface org.xml.sax.XMLReader
getDTDHandler
in class XTFilterImpl
public void setContentHandler(org.xml.sax.ContentHandler handler)
setContentHandler
in interface org.xml.sax.XMLReader
setContentHandler
in class XTFilterImpl
handler
- The new content handler.public org.xml.sax.ContentHandler getContentHandler()
getContentHandler
in interface org.xml.sax.XMLReader
getContentHandler
in class XTFilterImpl
public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
setLexicalHandler
in class XTFilterImpl
handler
- The new lexical handler.public org.xml.sax.ext.LexicalHandler getLexicalHandler()
getLexicalHandler
in class XTFilterImpl
public void setErrorHandler(org.xml.sax.ErrorHandler handler)
setErrorHandler
in interface org.xml.sax.XMLReader
setErrorHandler
in class XTFilterImpl
handler
- The new error handler.public org.xml.sax.ErrorHandler getErrorHandler()
getErrorHandler
in interface org.xml.sax.XMLReader
getErrorHandler
in class XTFilterImpl
public void parse(org.xml.sax.InputSource input) throws org.xml.sax.SAXException, java.io.IOException
parse
in interface org.xml.sax.XMLReader
parse
in class XTFilterImpl
input
- The input source for the document entity.
org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another
exception.
java.io.IOException
- An IO exception from the parser, possibly from a
byte stream or character stream supplied by the
application.public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
resolveEntity
in interface org.xml.sax.EntityResolver
resolveEntity
in class XTFilterImpl
publicId
- The entity's public identifier, or null.systemId
- The entity's system identifier.
org.xml.sax.SAXException
- The client may throw an exception during
processing.
java.io.IOException
- The client may throw an I/O-related exception
while obtaining the new InputSource.public void notationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
notationDecl
in interface org.xml.sax.DTDHandler
notationDecl
in class XTFilterImpl
name
- The notation name.publicId
- The notation's public identifier, or null.systemId
- The notation's system identifier, or null.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName) throws org.xml.sax.SAXException
unparsedEntityDecl
in interface org.xml.sax.DTDHandler
unparsedEntityDecl
in class XTFilterImpl
name
- The entity name.publicId
- The entity's public identifier, or null.systemId
- The entity's system identifier, or null.notationName
- The name of the associated notation.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
setDocumentLocator
in class XTFilterImpl
locator
- The document locator.public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class XTFilterImpl
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class XTFilterImpl
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
startPrefixMapping
in class XTFilterImpl
prefix
- The Namespace prefix.uri
- The Namespace URI.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
endPrefixMapping
in interface org.xml.sax.ContentHandler
endPrefixMapping
in class XTFilterImpl
prefix
- The Namespace prefix.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class XTFilterImpl
uri
- The element's Namespace URI, or the empty string.localName
- The element's local name, or the empty string.qName
- The element's qualified (prefixed) name, or the empty
string.atts
- The element's attributes.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class XTFilterImpl
uri
- The element's Namespace URI, or the empty string.localName
- The element's local name, or the empty string.qName
- The element's qualified (prefixed) name, or the empty
string.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class XTFilterImpl
ch
- An array of characters.start
- The starting position in the array.length
- The number of characters to use from the array.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
ignorableWhitespace
in class XTFilterImpl
ch
- An array of characters.start
- The starting position in the array.length
- The number of characters to use from the array.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
processingInstruction
in class XTFilterImpl
target
- The processing instruction target.data
- The text following the target.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
skippedEntity
in interface org.xml.sax.ContentHandler
skippedEntity
in class XTFilterImpl
name
- The name of the skipped entity.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
warning
in class XTFilterImpl
e
- The warning as an exception.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
error
in class XTFilterImpl
e
- The error as an exception.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
fatalError
in class XTFilterImpl
e
- The error as an exception.
org.xml.sax.SAXException
- The client may throw an exception during
processing.public void comment(char[] ch, int start, int length) throws org.xml.sax.SAXException
comment
in interface org.xml.sax.ext.LexicalHandler
comment
in class XTFilterImpl
ch
- DOCUMENT ME!start
- DOCUMENT ME!length
- DOCUMENT ME!
org.xml.sax.SAXException
- DOCUMENT ME!public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
startDTD
in interface org.xml.sax.ext.LexicalHandler
startDTD
in class XTFilterImpl
name
- DOCUMENT ME!publicId
- DOCUMENT ME!systemId
- DOCUMENT ME!
org.xml.sax.SAXException
- DOCUMENT ME!public void endDTD() throws org.xml.sax.SAXException
endDTD
in interface org.xml.sax.ext.LexicalHandler
endDTD
in class XTFilterImpl
org.xml.sax.SAXException
- DOCUMENT ME!public void startEntity(java.lang.String name) throws org.xml.sax.SAXException
startEntity
in interface org.xml.sax.ext.LexicalHandler
startEntity
in class XTFilterImpl
name
- DOCUMENT ME!
org.xml.sax.SAXException
- DOCUMENT ME!public void endEntity(java.lang.String name) throws org.xml.sax.SAXException
endEntity
in interface org.xml.sax.ext.LexicalHandler
endEntity
in class XTFilterImpl
name
- DOCUMENT ME!
org.xml.sax.SAXException
- DOCUMENT ME!public void startCDATA() throws org.xml.sax.SAXException
startCDATA
in interface org.xml.sax.ext.LexicalHandler
startCDATA
in class XTFilterImpl
org.xml.sax.SAXException
- DOCUMENT ME!public void endCDATA() throws org.xml.sax.SAXException
endCDATA
in interface org.xml.sax.ext.LexicalHandler
endCDATA
in class XTFilterImpl
org.xml.sax.SAXException
- DOCUMENT ME!public void setFilter(org.xml.sax.XMLFilter f) throws org.xml.sax.SAXException
DynamicFilter
setFilter
in interface DynamicFilter
f
- DOCUMENT ME!
org.xml.sax.SAXException
- DOCUMENT ME!public org.xml.sax.XMLFilter getFilter()
getFilter
in interface DynamicFilter
public void setParameter(java.lang.String k, java.lang.Object v)
Parametrized
setParameter
in interface Parametrized
setParameter
in class XTFilterImpl
k
- parameter namev
- parameter valueprotected void propagateParamsToFilter(org.xml.sax.XMLFilter filter)
public java.util.Properties getOutputProperties()
getOutputProperties
in interface HasOutputProperties
public void setOutputProperties(java.util.Properties p)
setOutputProperties
in interface HasOutputProperties
p
- DOCUMENT ME!
java.lang.UnsupportedOperationException
- DOCUMENT ME!public void setOutputPropertiesListener(HasOutputProperties l)
setOutputPropertiesListener
in interface HasOutputProperties
l
- DOCUMENT ME!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |