Class LuceneXPathHandler
java.lang.Object
org.alfresco.repo.search.impl.elasticsearch.query.language.lucene.LuceneXPathHandler
- All Implemented Interfaces:
org.jaxen.saxpath.XPathHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intElasticsearch does not support span near queries with unlimited slop. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAny time an absolute XPath ends, we close a near span e.g.voidendAdditiveExpr(int op) voidvoidendAndExpr(boolean create) voidvoidendEqualityExpr(int op) voidvoidvoidendMultiplicativeExpr(int op) voidvoidendOrExpr(boolean create) voidvoidvoidvoidendRelationalExpr(int op) voidAny time a relative XPath ends, we close a near span e.g.voidvoidendUnaryExpr(int op) voidendUnionExpr(boolean create) voidendXPath()org.apache.lucene.queries.spans.SpanQuerygetQuery()Get the resulting queryvoidvoidnumber(double arg0) voidnumber(int arg0) voidAn absolute location xPath starts with /voidvoidstartAllNodeStep(int axis) Any time we meet a //, we close a near span e.g.voidvoidstartCommentNodeStep(int arg0) voidvoidvoidstartFunction(String arg0, String arg1) voidvoidstartNameStep(int axis, String nameSpace, String localName) Any time we meet a namespace:localName in the path we reach this point: e.g.voidvoidvoidvoidstartProcessingInstructionNodeStep(int arg0, String arg1) voidvoidA relative location xPath starts with //voidstartTextNodeStep(int arg0) voidvoidvoidvoidvariableReference(String uri, String localName)
-
Field Details
-
MAX_PATH_LENGTH
public static final int MAX_PATH_LENGTHElasticsearch does not support span near queries with unlimited slop. Instead we support wildcard xpaths by using a hard coded maximum that is larger than we expect any path query to use.- See Also:
-
-
Constructor Details
-
LuceneXPathHandler
-
-
Method Details
-
startXPath
public void startXPath()- Specified by:
startXPathin interfaceorg.jaxen.saxpath.XPathHandler
-
endXPath
public void endXPath()- Specified by:
endXPathin interfaceorg.jaxen.saxpath.XPathHandler
-
getQuery
public org.apache.lucene.queries.spans.SpanQuery getQuery()Get the resulting query- Returns:
- - the query
-
startAbsoluteLocationPath
public void startAbsoluteLocationPath()An absolute location xPath starts with /- Specified by:
startAbsoluteLocationPathin interfaceorg.jaxen.saxpath.XPathHandler
-
startRelativeLocationPath
public void startRelativeLocationPath()A relative location xPath starts with //- Specified by:
startRelativeLocationPathin interfaceorg.jaxen.saxpath.XPathHandler
-
startAllNodeStep
public void startAllNodeStep(int axis) Any time we meet a //, we close a near span e.g. /a/b//c Once we meet // we close the /a/b span- Specified by:
startAllNodeStepin interfaceorg.jaxen.saxpath.XPathHandler- Parameters:
axis-
-
endAbsoluteLocationPath
public void endAbsoluteLocationPath()Any time an absolute XPath ends, we close a near span e.g. /a/b//c Once we meet the end we close the c span- Specified by:
endAbsoluteLocationPathin interfaceorg.jaxen.saxpath.XPathHandler
-
endRelativeLocationPath
public void endRelativeLocationPath()Any time a relative XPath ends, we close a near span e.g. /a/b//* Once we meet the end we close the * span adding a wildcard span term- Specified by:
endRelativeLocationPathin interfaceorg.jaxen.saxpath.XPathHandler
-
startNameStep
Any time we meet a namespace:localName in the path we reach this point: e.g. /namespace:a//namespace:b namespace:a calls this method descending a child axis namespace:b calls this method descending a child axis- Specified by:
startNameStepin interfaceorg.jaxen.saxpath.XPathHandler- Parameters:
axis- - the XPath axis we are descending intonameSpace- - the nameSpace of the current elementlocalName- - the local name of the current element
-
endNameStep
public void endNameStep()- Specified by:
endNameStepin interfaceorg.jaxen.saxpath.XPathHandler
-
endAllNodeStep
public void endAllNodeStep()- Specified by:
endAllNodeStepin interfaceorg.jaxen.saxpath.XPathHandler
-
endAdditiveExpr
public void endAdditiveExpr(int op) - Specified by:
endAdditiveExprin interfaceorg.jaxen.saxpath.XPathHandler
-
endAndExpr
public void endAndExpr(boolean create) - Specified by:
endAndExprin interfaceorg.jaxen.saxpath.XPathHandler
-
endCommentNodeStep
public void endCommentNodeStep()- Specified by:
endCommentNodeStepin interfaceorg.jaxen.saxpath.XPathHandler
-
endEqualityExpr
public void endEqualityExpr(int op) - Specified by:
endEqualityExprin interfaceorg.jaxen.saxpath.XPathHandler
-
endFilterExpr
public void endFilterExpr()- Specified by:
endFilterExprin interfaceorg.jaxen.saxpath.XPathHandler
-
endFunction
public void endFunction()- Specified by:
endFunctionin interfaceorg.jaxen.saxpath.XPathHandler
-
endMultiplicativeExpr
public void endMultiplicativeExpr(int op) - Specified by:
endMultiplicativeExprin interfaceorg.jaxen.saxpath.XPathHandler
-
endOrExpr
public void endOrExpr(boolean create) - Specified by:
endOrExprin interfaceorg.jaxen.saxpath.XPathHandler
-
endPathExpr
public void endPathExpr()- Specified by:
endPathExprin interfaceorg.jaxen.saxpath.XPathHandler
-
endPredicate
public void endPredicate()- Specified by:
endPredicatein interfaceorg.jaxen.saxpath.XPathHandler
-
endProcessingInstructionNodeStep
public void endProcessingInstructionNodeStep()- Specified by:
endProcessingInstructionNodeStepin interfaceorg.jaxen.saxpath.XPathHandler
-
endRelationalExpr
public void endRelationalExpr(int op) - Specified by:
endRelationalExprin interfaceorg.jaxen.saxpath.XPathHandler
-
endTextNodeStep
public void endTextNodeStep()- Specified by:
endTextNodeStepin interfaceorg.jaxen.saxpath.XPathHandler
-
endUnaryExpr
public void endUnaryExpr(int op) - Specified by:
endUnaryExprin interfaceorg.jaxen.saxpath.XPathHandler
-
endUnionExpr
public void endUnionExpr(boolean create) - Specified by:
endUnionExprin interfaceorg.jaxen.saxpath.XPathHandler
-
literal
- Specified by:
literalin interfaceorg.jaxen.saxpath.XPathHandler- Throws:
org.jaxen.saxpath.SAXPathException
-
number
public void number(double arg0) throws org.jaxen.saxpath.SAXPathException - Specified by:
numberin interfaceorg.jaxen.saxpath.XPathHandler- Throws:
org.jaxen.saxpath.SAXPathException
-
number
public void number(int arg0) throws org.jaxen.saxpath.SAXPathException - Specified by:
numberin interfaceorg.jaxen.saxpath.XPathHandler- Throws:
org.jaxen.saxpath.SAXPathException
-
startAdditiveExpr
public void startAdditiveExpr()- Specified by:
startAdditiveExprin interfaceorg.jaxen.saxpath.XPathHandler
-
startAndExpr
public void startAndExpr()- Specified by:
startAndExprin interfaceorg.jaxen.saxpath.XPathHandler
-
startCommentNodeStep
public void startCommentNodeStep(int arg0) - Specified by:
startCommentNodeStepin interfaceorg.jaxen.saxpath.XPathHandler
-
startEqualityExpr
public void startEqualityExpr()- Specified by:
startEqualityExprin interfaceorg.jaxen.saxpath.XPathHandler
-
startFilterExpr
public void startFilterExpr()- Specified by:
startFilterExprin interfaceorg.jaxen.saxpath.XPathHandler
-
startFunction
- Specified by:
startFunctionin interfaceorg.jaxen.saxpath.XPathHandler
-
startMultiplicativeExpr
public void startMultiplicativeExpr()- Specified by:
startMultiplicativeExprin interfaceorg.jaxen.saxpath.XPathHandler
-
startOrExpr
public void startOrExpr()- Specified by:
startOrExprin interfaceorg.jaxen.saxpath.XPathHandler
-
startPathExpr
public void startPathExpr()- Specified by:
startPathExprin interfaceorg.jaxen.saxpath.XPathHandler
-
startPredicate
public void startPredicate()- Specified by:
startPredicatein interfaceorg.jaxen.saxpath.XPathHandler
-
startProcessingInstructionNodeStep
- Specified by:
startProcessingInstructionNodeStepin interfaceorg.jaxen.saxpath.XPathHandler
-
startRelationalExpr
public void startRelationalExpr()- Specified by:
startRelationalExprin interfaceorg.jaxen.saxpath.XPathHandler
-
startTextNodeStep
public void startTextNodeStep(int arg0) - Specified by:
startTextNodeStepin interfaceorg.jaxen.saxpath.XPathHandler
-
startUnaryExpr
public void startUnaryExpr()- Specified by:
startUnaryExprin interfaceorg.jaxen.saxpath.XPathHandler
-
startUnionExpr
public void startUnionExpr()- Specified by:
startUnionExprin interfaceorg.jaxen.saxpath.XPathHandler
-
variableReference
- Specified by:
variableReferencein interfaceorg.jaxen.saxpath.XPathHandler
-