|
||||||||||
| 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.ElementListSelector
Subclass of ElementSelector that selects elements using a list of child ElementSelector.
Can select if Any (OR) or All of its child selectors can select depending on its boolean setting. Used with the
SAXDeleteFilter.
| Nested Class Summary |
| Nested classes inherited from class com.raritantechnologies.xml.sax.filter.ElementSelector |
ElementSelector.ElementData |
| Constructor Summary | |
ElementListSelector()
|
|
ElementListSelector(boolean andLogic)
|
|
ElementListSelector(ElementSelector[] selectors,
boolean andLogic)
This contructor a set of ElementSelectors and a boolean for AND/OR |
|
| Method Summary | |
void |
addSelector(ElementSelector selector)
|
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)
Give all child selectors a chance to look at it. |
void |
processCharacters(java.lang.String path,
char[] ch,
int start,
int length)
subclasses can override this to select based on contents of cData. |
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)
subclasses can override this to select parent tag based on contents of child tags. |
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. |
boolean |
shouldSelectElement(int startIndex)
This method is called by SAXDeleteFilter to determine if this ElementSelector
has any Elements that start at the given index and that should be selected. |
| Methods inherited from class com.raritantechnologies.xml.sax.filter.ElementSelector |
getEndMark, initialize, reset, selectElement, setEndMark, setSelecting |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ElementListSelector()
public ElementListSelector(boolean andLogic)
public ElementListSelector(ElementSelector[] selectors,
boolean andLogic)
| Method Detail |
public void addSelector(ElementSelector selector)
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)
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)
ElementSelector
processChildElement in class ElementSelector
public void processCharacters(java.lang.String path,
char[] ch,
int start,
int length)
ElementSelector
processCharacters in class ElementSelectorpublic boolean shouldSelectElement(int startIndex)
SAXDeleteFilter to determine if this ElementSelector
has any Elements that start at the given index and that should be selected.
Either: we have an element at this index that shouldn't be selected, should be selected
or we don't have an element at this index.
shouldSelectElement in class ElementSelector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||