|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.xml.sax.filter.ElementSelector
com.raritantechnologies.xml.sax.filter.selectors.DecendantElementSelector
This class can be used to cause the selection of an decendant tag, based on its properties AND the
properties of an ancestor.
Used in conjunction with the SAXDeleteFilter. It overrides the protected processChildElement( )
method to achieve its functionality. This method allows a parent element to be marked for
selection by the SAXDeleteFilter. The selector can work either on the decendant tag or on its
character data.
Developed by
Raritan Technologies Inc..
| Nested Class Summary |
| Nested classes inherited from class com.raritantechnologies.xml.sax.filter.ElementSelector |
ElementSelector.ElementData |
| Constructor Summary | |
DecendantElementSelector(ElementComparator ancestorComp,
ElementComparator decendantComp)
Constructor: takes a childComp that is used to match decendent Tags that should cause the selection of the decendant. |
|
DecendantElementSelector(ElementComparator ancestorComp,
ElementComparator decendantComp,
CDataComparator ancestorDataComp,
CDataComparator decendantDataComp)
Overloaded version of the constructor that allows a tag to be selected if a decendant tag's character data matches the criteria specified in the CDataComparator. |
|
| Method Summary | |
boolean |
couldSelectElement(java.lang.String path,
int startIndex,
java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
Signals that the element could be selected. |
void |
processCharacters(java.lang.String path,
char[] ch,
int start,
int length)
processes character data if decendant data comparator is set. |
void |
processChildElement(java.lang.String childPath,
ElementSelector.ElementData parentElement,
java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
sets the Element at path to be selected if the element comparator matches input. |
void |
processChildElement(java.lang.String childPath,
int startedAt,
java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
This method is used to determine if the presence of a certain child tag should cause the parent (or ancestor tag) to be selected too. |
| Methods inherited from class com.raritantechnologies.xml.sax.filter.ElementSelector |
getEndMark, initialize, reset, selectElement, setEndMark, setSelecting, shouldSelectElement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DecendantElementSelector(ElementComparator ancestorComp,
ElementComparator decendantComp)
ancestorComp - element comparator used to identify the tag that signals if a decendant
tag can be selected.decendantComp - element comparator used to identity decendant tag that can be
selected. Selection will occur if a decendant
tag matches the criteria of this element comparator.
public DecendantElementSelector(ElementComparator ancestorComp,
ElementComparator decendantComp,
CDataComparator ancestorDataComp,
CDataComparator decendantDataComp)
ancestorComp - element comparator used to identify the tag that signals if a decendant
tag can be selected.decendantComp - element comparator used to identity decendant tag that can be selected. In
this case, the selection is deferred
to analysis of the character data section of the tag.| Method Detail |
public boolean couldSelectElement(java.lang.String path,
int startIndex,
java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
ElementComparator
to check if the element is selectable by this ElementSelector.
couldSelectElement in class ElementSelector
public void processChildElement(java.lang.String childPath,
int startedAt,
java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
ElementSelector
processChildElement in class ElementSelector
public void processChildElement(java.lang.String childPath,
ElementSelector.ElementData parentElement,
java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
processChildElement in class ElementSelector
public void processCharacters(java.lang.String path,
char[] ch,
int start,
int length)
processCharacters in class ElementSelector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||