|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.XMLFilterImpl | +--dke.smwp.serialize.IncrementalModificationFilter
class deriving an XML filter.
This class is designed to sit between an XMLReader and the client application's event handlers. By default, it does nothing but pass requests up to the reader and events on to the handlers unmodified, but subclasses can override specific methods to modify the event stream or the configuration requests as they pass through.
Field Summary | |
private int |
curDepth
|
private static boolean |
DEBUG
|
private java.lang.String |
idAttLocalName
private cache of id attribute |
private java.lang.String |
idAttNamespaceURI
private cache of id attribute |
private java.lang.String |
idAttValue
private cache of id attribute |
private boolean |
inScopeOfModification
|
private TupleModificationDescr |
modifyDescr
type of modificaton on tuple |
private QName |
parentElt
private cache of parent element |
private QName |
tupleElt
private cache of tuple element |
private int |
tupleEltInDepth
|
private java.util.Hashtable |
xmlTuple
private cache of tuple in pseudo XML representation |
private QName[] |
xmlTupleElts
private cache of tuple in pseudo XML representation |
Fields inherited from class org.xml.sax.helpers.XMLFilterImpl |
contentHandler, dtdHandler, entityResolver, errorHandler, locator, parent |
Constructor Summary | |
IncrementalModificationFilter(TupleModificationDescr modifyDescr)
Construct an empty XML filter, with no parent using TupleModificationDescr. |
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Filter a character data event if character is in scope of modification. |
void |
endElement(java.lang.String uri,
java.lang.String locName,
java.lang.String qualName)
Filters an end document event limitation: not possible to use multiple child-elements which are using the same element-name |
void |
setTupleElementInDepth(int d)
sets element depth in which elements are to be processed |
void |
startElement(java.lang.String uri,
java.lang.String locName,
java.lang.String qualName,
org.xml.sax.Attributes atts)
Filters a start element event. |
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, setupParse, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final boolean DEBUG
private TupleModificationDescr modifyDescr
private QName tupleElt
private QName parentElt
private java.lang.String idAttNamespaceURI
private java.lang.String idAttLocalName
private java.lang.String idAttValue
private java.util.Hashtable xmlTuple
private QName[] xmlTupleElts
private boolean inScopeOfModification
private int tupleEltInDepth
private int curDepth
Constructor Detail |
public IncrementalModificationFilter(TupleModificationDescr modifyDescr)
This filter will have no parent: you must assign a parent before you start a parse or do any configuration with setFeature or setProperty.
modifyDescr
- Method Detail |
public void setTupleElementInDepth(int d)
d
- element depthpublic void startElement(java.lang.String uri, java.lang.String locName, java.lang.String qualName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in class org.xml.sax.helpers.XMLFilterImpl
uri
- The element's Namespace URI, or the empty string.locName
- The element's local name, or the empty string.qualName
- 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 locName, java.lang.String qualName) throws org.xml.sax.SAXException
limitation: not possible to use multiple child-elements which are using the same element-name
endElement
in class org.xml.sax.helpers.XMLFilterImpl
uri
- The element's Namespace URI, or the empty string.locName
- The element's local name, or the empty string.qualName
- The element's qualified (prefixed) name,
or the empty string.org.xml.sax.SAXException
- The client may throw an exception during processingpublic void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in class org.xml.sax.helpers.XMLFilterImpl
ch
- An array of charactersstart
- The starting position in the array.length
- The number of characters to use from the arrayorg.xml.sax.SAXException
- The client may throw an exception during processing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |