public class XPathQueryBuilder extends Object implements XPathVisitor, XPathTreeConstants
JJTADDITIVEEXPR, JJTANDEXPR, JJTANYKINDTEST, JJTANYNAME, JJTAPOSATTRCONTENTCHAR, JJTAPOSATTRVALUECONTENT, JJTAS, JJTASCENDING, JJTASSIGNEQUALS, JJTAT, JJTATOMICTYPE, JJTATSTRINGLITERAL, JJTATTRIBNAMEORWILDCARD, JJTATTRIBUTEDECLARATION, JJTATTRIBUTELBRACE, JJTATTRIBUTENAME, JJTATTRIBUTEQNAMELBRACE, JJTATTRIBUTETEST, JJTATTRIBUTETYPE, JJTATTRIBUTETYPEFORKINDTEST, JJTATWORD, JJTAXISANCESTOR, JJTAXISANCESTORORSELF, JJTAXISATTRIBUTE, JJTAXISCHILD, JJTAXISDESCENDANT, JJTAXISDESCENDANTORSELF, JJTAXISFOLLOWING, JJTAXISFOLLOWINGSIBLING, JJTAXISPARENT, JJTAXISPRECEDING, JJTAXISPRECEDINGSIBLING, JJTAXISSELF, JJTBASEURIDECL, JJTCASE, JJTCASECLAUSE, JJTCASTABLEEXPR, JJTCASTAS, JJTCASTEXPR, JJTCDATASECTION, JJTCDATASECTIONCHAR, JJTCDATASECTIONCONTENTS, JJTCDATASECTIONEND, JJTCDATASECTIONSTART, JJTCDATASECTIONSTARTFORELEMENTCONTENT, JJTCHARREF, JJTCLOSEAPOS, JJTCLOSEQUOT, JJTCOLLATION, JJTCOLONEQUALS, JJTCOMMAFORKINDTEST, JJTCOMMENTCONTENTCHAR, JJTCOMMENTCONTENTCHARDASH, JJTCOMMENTLBRACE, JJTCOMMENTLPARFORKINDTEST, JJTCOMMENTTEST, JJTCOMMONCONTENT, JJTCOMPARISONEXPR, JJTCOMPATTRCONSTRUCTOR, JJTCOMPCOMMENTCONSTRUCTOR, JJTCOMPDOCCONSTRUCTOR, JJTCOMPELEMCONSTRUCTOR, JJTCOMPPICONSTRUCTOR, JJTCOMPTEXTCONSTRUCTOR, JJTCOMPUTEDCONSTRUCTOR, JJTCONSTRUCTIONDECL, JJTCONSTRUCTOR, JJTCONTENTEXPR, JJTDECIMALLITERAL, JJTDECLAREBASEURI, JJTDECLARECOLLATION, JJTDECLARECONSTRUCTION, JJTDECLAREDEFAULTELEMENT, JJTDECLAREDEFAULTFUNCTION, JJTDECLAREDEFAULTORDERINGEMPTY, JJTDECLAREINHERITNAMESPACES, JJTDECLARENAMESPACE, JJTDECLAREORDERING, JJTDECLAREXMLSPACE, JJTDEFAULT, JJTDEFAULTCOLLATIONDECL, JJTDEFAULTELEMENT, JJTDEFAULTNAMESPACEDECL, JJTDEFINEFUNCTION, JJTDEFINEVARIABLE, JJTDESCENDING, JJTDIRATTRIBUTELIST, JJTDIRATTRIBUTEVALUE, JJTDIRCOMMENTCONSTRUCTOR, JJTDIRCOMMENTCONTENTS, JJTDIRECTCONSTRUCTOR, JJTDIRELEMCONSTRUCTOR, JJTDIRELEMCONTENT, JJTDIRPICONSTRUCTOR, JJTDIRPICONTENTS, JJTDOCUMENTLBRACE, JJTDOCUMENTLPAR, JJTDOCUMENTLPARFORKINDTEST, JJTDOCUMENTTEST, JJTDOT, JJTDOTDOT, JJTDOUBLELITERAL, JJTELEMENTCONTENTCHAR, JJTELEMENTDECLARATION, JJTELEMENTLBRACE, JJTELEMENTNAME, JJTELEMENTNAMEORWILDCARD, JJTELEMENTQNAMELBRACE, JJTELEMENTTEST, JJTELEMENTTYPE, JJTELEMENTTYPEFORDOCUMENTTEST, JJTELEMENTTYPEFORKINDTEST, JJTEMPTYGREATEST, JJTEMPTYLEAST, JJTEMPTYORDERINGDECL, JJTEMPTYTAGCLOSE, JJTEMPTYTOK, JJTENCLOSEDEXPR, JJTENDTAGCLOSE, JJTENDTAGOPEN, JJTESCAPEAPOS, JJTESCAPEQUOT, JJTEVERY, JJTEXPR, JJTEXTERNAL, JJTFLWOREXPR, JJTFUNCTIONCALL, JJTFUNCTIONDECL, JJTIFEXPR, JJTIMPORT, JJTIMPORTMODULETOKEN, JJTIMPORTSCHEMATOKEN, JJTIN, JJTINHERITNAMESPACESDECL, JJTINSTANCEOFEXPR, JJTINTEGERLITERAL, JJTINTERSECTEXCEPTEXPR, JJTITEM, JJTLBRACE, JJTLBRACEEXPRENCLOSURE, JJTLCURLYBRACEESCAPE, JJTLETCLAUSE, JJTLETVARIABLE, JJTLIBRARYMODULE, JJTMAINMODULE, JJTMODULE, JJTMODULEDECL, JJTMODULEIMPORT, JJTMODULENAMESPACE, JJTMULTIPLICATIVEEXPR, JJTNAMESPACE, JJTNAMESPACEDECL, JJTNAMETEST, JJTNCNAMECOLONSTAR, JJTNCNAMEFORPI, JJTNCNAMEFORPREFIX, JJTNILLABLE, JJTNO, JJTNODELPARFORKINDTEST, jjtNodeName, JJTNODETEST, JJTOCCURRENCEONEORMORE, JJTOCCURRENCEZEROORMORE, JJTOCCURRENCEZEROORONE, JJTOPENAPOS, JJTOPENQUOT, JJTORDERBY, JJTORDERBYCLAUSE, JJTORDERBYSTABLE, JJTORDERED, JJTORDEREDOPEN, JJTORDERINGMODEDECL, JJTORDERMODIFIER, JJTORDERSPEC, JJTORDERSPECLIST, JJTOREXPR, JJTPARAM, JJTPARAMLIST, JJTPATHEXPR, JJTPICONTENTCHAR, JJTPILBRACE, JJTPINCNAMELBRACE, JJTPITARGET, JJTPITEST, JJTPOSITIONALVAR, JJTPREDEFINEDENTITYREF, JJTPREDICATE, JJTPREDICATELIST, JJTPROCESSINGINSTRUCTIONEND, JJTPROCESSINGINSTRUCTIONLPARFORKINDTEST, JJTPROCESSINGINSTRUCTIONSTART, JJTPROCESSINGINSTRUCTIONSTARTFORELEMENTCONTENT, JJTPROLOG, JJTQNAME, JJTQNAMEFORATOMICTYPE, JJTQNAMEFORITEMTYPE, JJTQNAMEFORSEQUENCETYPE, JJTQNAMELPAR, JJTQUANTIFIEDEXPR, JJTQUERYBODY, JJTQUERYLIST, JJTQUOTATTRCONTENTCHAR, JJTQUOTATTRVALUECONTENT, JJTRANGEEXPR, JJTRBRACE, JJTRCURLYBRACEESCAPE, JJTROOT, JJTROOTDESCENDANTS, JJTS, JJTSATISFIES, JJTSCHEMAATTRIBUTETEST, JJTSCHEMAATTRIBUTETYPE, JJTSCHEMAATTRIBUTETYPEFORKINDTEST, JJTSCHEMAELEMENTTEST, JJTSCHEMAELEMENTTYPE, JJTSCHEMAELEMENTTYPEFORDOCUMENTTEST, JJTSCHEMAELEMENTTYPEFORKINDTEST, JJTSCHEMAIMPORT, JJTSCHEMAMODEFORDECLARECONSTRUCTION, JJTSCHEMAPREFIX, JJTSEPARATOR, JJTSEQUENCETYPE, JJTSETTER, JJTSFORPI, JJTSINGLETYPE, JJTSLASHSLASH, JJTSOME, JJTSTAR, JJTSTARCOLONNCNAME, JJTSTARTTAGCLOSE, JJTSTARTTAGOPEN, JJTSTARTTAGOPENROOT, JJTSTEPEXPR, JJTSTRINGLITERAL, JJTSTRINGLITERALFORKINDTEST, JJTSTRINGLITERALFORVERSION, JJTTAGQNAME, JJTTEXTLBRACE, JJTTEXTLPARFORKINDTEST, JJTTEXTTEST, JJTTREATEXPR, JJTTYPEDECLARATION, JJTTYPENAME, JJTTYPESWITCHEXPR, JJTUNARYEXPR, JJTUNARYMINUS, JJTUNARYPLUS, JJTUNIONEXPR, JJTUNORDERED, JJTUNORDEREDOPEN, JJTURLLITERAL, JJTVALIDATEEXPR, JJTVALIDATELBRACE, JJTVALIDATESCHEMAMODE, JJTVALUEINDICATOR, JJTVARDECL, JJTVARNAME, JJTVERSIONDECL, JJTVOID, JJTWHERE, JJTWHERECLAUSE, JJTXMLCOMMENTEND, JJTXMLCOMMENTSTART, JJTXMLCOMMENTSTARTFORELEMENTCONTENT, JJTXMLSPACEDECL, JJTXMLSPACEPRESERVE, JJTXMLSPACESTRIP, JJTXPATH2, JJTXQUERYENCODING, JJTXQUERYVERSION, JJTYES
Modifier and Type | Method and Description |
---|---|
static QueryRootNode |
createQuery(String statement,
NameResolver resolver,
QueryNodeFactory factory)
Creates a
QueryNode tree from a XPath statement using the
passed query node factory . |
static String |
toString(QueryRootNode root,
NameResolver resolver)
Creates a String representation of the query node tree in XPath syntax.
|
Object |
visit(SimpleNode node,
Object data)
Implements the generic visit method for this
XPathVisitor . |
public static QueryRootNode createQuery(String statement, NameResolver resolver, QueryNodeFactory factory) throws javax.jcr.query.InvalidQueryException
QueryNode
tree from a XPath statement using the
passed query node factory
.statement
- the XPath statement.resolver
- the name resolver to use.factory
- the query node factory.QueryNode
tree for the XPath statement.javax.jcr.query.InvalidQueryException
- if the XPath statement is malformed.public static String toString(QueryRootNode root, NameResolver resolver) throws javax.jcr.query.InvalidQueryException
root
- the root of the query node tree.resolver
- to resolve Name
s.javax.jcr.query.InvalidQueryException
- if the query node tree cannot be converted
into a String representation due to restrictions in XPath.public Object visit(SimpleNode node, Object data)
XPathVisitor
.visit
in interface XPathVisitor
node
- the current node as created by the XPath parser.data
- the current QueryNode
created by this
XPathVisitor
.QueryNode
. Can be different from
data
.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.