public class RecursiveElementVisitor extends Object implements ElementVisitor
Visitor pattern helper that walks the entire tree calling operations are various points in the walking process. It is a depth first traversal.
Every visit operation is bracketted by a start/end pair makeing the calling points:
The calls before and after subElements pass in the containing Element. These calls are in addition to the start/end call on elements as part of the recursive walk.
Usage: inherit from this class and implement startElement/endElement as needed. The ElementWalker is like implementing endElement.
Constructor and Description |
---|
RecursiveElementVisitor(ElementVisitor visitor) |
public RecursiveElementVisitor(ElementVisitor visitor)
public void startElement(ElementTriplesBlock el)
public void endElement(ElementTriplesBlock el)
public void startElement(ElementDataset el)
public void endElement(ElementDataset el)
public void startElement(ElementFilter el)
public void endElement(ElementFilter el)
public void startElement(ElementAssign el)
public void endElement(ElementAssign el)
public void startElement(ElementBind el)
public void endElement(ElementBind el)
public void startElement(ElementData el)
public void endElement(ElementData el)
public void startElement(ElementUnion el)
public void endElement(ElementUnion el)
public void startSubElement(ElementUnion el, Element subElt)
public void endSubElement(ElementUnion el, Element subElt)
public void startElement(ElementGroup el)
public void endElement(ElementGroup el)
public void startSubElement(ElementGroup el, Element subElt)
public void endSubElement(ElementGroup el, Element subElt)
public void startElement(ElementOptional el)
public void endElement(ElementOptional el)
public void startElement(ElementNamedGraph el)
public void endElement(ElementNamedGraph el)
public void startElement(ElementService el)
public void endElement(ElementService el)
public void startElement(ElementExists el)
public void endElement(ElementExists el)
public void startElement(ElementNotExists el)
public void endElement(ElementNotExists el)
public void startElement(ElementMinus el)
public void endElement(ElementMinus el)
public void endElement(ElementSubQuery el)
public void startElement(ElementSubQuery el)
public void endElement(ElementPathBlock el)
public void startElement(ElementPathBlock el)
public final void visit(ElementTriplesBlock el)
visit
in interface ElementVisitor
public final void visit(ElementDataset el)
visit
in interface ElementVisitor
public final void visit(ElementFilter el)
visit
in interface ElementVisitor
public void visit(ElementAssign el)
visit
in interface ElementVisitor
public void visit(ElementBind el)
visit
in interface ElementVisitor
public void visit(ElementData el)
visit
in interface ElementVisitor
public final void visit(ElementUnion el)
visit
in interface ElementVisitor
public final void visit(ElementGroup el)
visit
in interface ElementVisitor
public final void visit(ElementOptional el)
visit
in interface ElementVisitor
public final void visit(ElementNamedGraph el)
visit
in interface ElementVisitor
public final void visit(ElementService el)
visit
in interface ElementVisitor
public final void visit(ElementExists el)
visit
in interface ElementVisitor
public final void visit(ElementNotExists el)
visit
in interface ElementVisitor
public final void visit(ElementMinus el)
visit
in interface ElementVisitor
public void visit(ElementSubQuery el)
visit
in interface ElementVisitor
public void visit(ElementPathBlock el)
visit
in interface ElementVisitor
Licenced under the Apache License, Version 2.0