Package org.alfresco.repo.search
Class DocumentNavigator
java.lang.Object
org.jaxen.DefaultNavigator
org.alfresco.repo.search.DocumentNavigator
- All Implemented Interfaces:
Serializable,org.jaxen.NamedAccessNavigator,org.jaxen.Navigator
public class DocumentNavigator
extends org.jaxen.DefaultNavigator
implements org.jaxen.NamedAccessNavigator
An implementation of the Jaxen xpath against the node service API
This means any node service can do xpath style navigation. Given any context node we can navigate between nodes using xpath.
This allows simple path navigation and much more.
- Author:
- Andy Hind
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclass -
Constructor Summary
ConstructorsConstructorDescriptionDocumentNavigator(DictionaryService dictionaryService, NodeService nodeService, SearchService searchService, NamespacePrefixResolver nspr, boolean followAllParentLinks) DocumentNavigator(DictionaryService dictionaryService, NodeService nodeService, SearchService searchService, NamespacePrefixResolver nspr, boolean followAllParentLinks, boolean useJCRRootNode) Deprecated.useJCRRootNode parameter is now obsolete. -
Method Summary
Modifier and TypeMethodDescriptioncontains(NodeRef childRef, QName qname, String sqlLikePattern, SearchParameters.Operator defaultOperator) getAttributeAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI) getChildAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI) getNode(NodeRef nodeRef, QNamePattern qNamePattern) booleanbooleanbooleanisDocument(Object o) booleanbooleanbooleanisSubtypeOf(NodeRef nodeRef, QName typeQName) booleanorg.jaxen.XPathparseXPath(String o) voidsetFollowAllParentLinks(boolean followAllParentLinks) Allow this to be set as it commonly changes from one search to the nextMethods inherited from class org.jaxen.DefaultNavigator
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getDocument, getElementById, getNodeType, getParentNode, getProcessingInstructionData, getProcessingInstructionTarget, getSelfAxisIterator, translateNamespacePrefixToUriMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jaxen.Navigator
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getDocument, getElementById, getNodeType, getParentNode, getProcessingInstructionData, getProcessingInstructionTarget, getSelfAxisIterator, translateNamespacePrefixToUri
-
Constructor Details
-
DocumentNavigator
public DocumentNavigator(DictionaryService dictionaryService, NodeService nodeService, SearchService searchService, NamespacePrefixResolver nspr, boolean followAllParentLinks, boolean useJCRRootNode) Deprecated.useJCRRootNode parameter is now obsolete. -
DocumentNavigator
public DocumentNavigator(DictionaryService dictionaryService, NodeService nodeService, SearchService searchService, NamespacePrefixResolver nspr, boolean followAllParentLinks) - Parameters:
dictionaryService- used to resolve the subtypeOf function and other type-related functionsnodeService- the NodeService against which to executesearchService- the service that helps resolve functions such as like and containsnspr- resolves namespaces in the xpathfollowAllParentLinks- true if the XPath should traverse all parent associations when going up the hierarchy; false if the only the primary parent-child association should be traversed
-
-
Method Details
-
getNamespacePrefixResolver
-
setFollowAllParentLinks
public void setFollowAllParentLinks(boolean followAllParentLinks) Allow this to be set as it commonly changes from one search to the next- Parameters:
followAllParentLinks- true
-
getAttributeName
- Specified by:
getAttributeNamein interfaceorg.jaxen.Navigator
-
getAttributeNamespaceUri
- Specified by:
getAttributeNamespaceUriin interfaceorg.jaxen.Navigator
-
getAttributeQName
- Specified by:
getAttributeQNamein interfaceorg.jaxen.Navigator
-
getAttributeStringValue
- Specified by:
getAttributeStringValuein interfaceorg.jaxen.Navigator
-
getCommentStringValue
- Specified by:
getCommentStringValuein interfaceorg.jaxen.Navigator
-
getElementName
- Specified by:
getElementNamein interfaceorg.jaxen.Navigator
-
getElementNamespaceUri
- Specified by:
getElementNamespaceUriin interfaceorg.jaxen.Navigator
-
getElementQName
- Specified by:
getElementQNamein interfaceorg.jaxen.Navigator
-
getElementStringValue
- Specified by:
getElementStringValuein interfaceorg.jaxen.Navigator
-
getNamespacePrefix
- Specified by:
getNamespacePrefixin interfaceorg.jaxen.Navigator
-
getNamespaceStringValue
- Specified by:
getNamespaceStringValuein interfaceorg.jaxen.Navigator
-
getTextStringValue
- Specified by:
getTextStringValuein interfaceorg.jaxen.Navigator
-
isAttribute
- Specified by:
isAttributein interfaceorg.jaxen.Navigator
-
isComment
- Specified by:
isCommentin interfaceorg.jaxen.Navigator
-
isDocument
- Specified by:
isDocumentin interfaceorg.jaxen.Navigator
-
isElement
- Specified by:
isElementin interfaceorg.jaxen.Navigator
-
isNamespace
- Specified by:
isNamespacein interfaceorg.jaxen.Navigator
-
isProcessingInstruction
- Specified by:
isProcessingInstructionin interfaceorg.jaxen.Navigator
-
isText
- Specified by:
isTextin interfaceorg.jaxen.Navigator
-
parseXPath
- Specified by:
parseXPathin interfaceorg.jaxen.Navigator- Throws:
org.jaxen.JaxenException
-
getAttributeAxisIterator
public Iterator getAttributeAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI) throws org.jaxen.UnsupportedAxisException - Specified by:
getAttributeAxisIteratorin interfaceorg.jaxen.NamedAccessNavigator- Throws:
org.jaxen.UnsupportedAxisException
-
getAttributeAxisIterator
- Specified by:
getAttributeAxisIteratorin interfaceorg.jaxen.Navigator- Overrides:
getAttributeAxisIteratorin classorg.jaxen.DefaultNavigator- Throws:
org.jaxen.UnsupportedAxisException
-
getChildAxisIterator
public Iterator getChildAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI) throws org.jaxen.UnsupportedAxisException - Specified by:
getChildAxisIteratorin interfaceorg.jaxen.NamedAccessNavigator- Throws:
org.jaxen.UnsupportedAxisException
-
getChildAxisIterator
- Specified by:
getChildAxisIteratorin interfaceorg.jaxen.Navigator- Overrides:
getChildAxisIteratorin classorg.jaxen.DefaultNavigator- Throws:
org.jaxen.UnsupportedAxisException
-
getFollowingSiblingAxisIterator
public Iterator getFollowingSiblingAxisIterator(Object arg0) throws org.jaxen.UnsupportedAxisException - Specified by:
getFollowingSiblingAxisIteratorin interfaceorg.jaxen.Navigator- Overrides:
getFollowingSiblingAxisIteratorin classorg.jaxen.DefaultNavigator- Throws:
org.jaxen.UnsupportedAxisException- See Also:
-
always thrown
-
getFollowingAxisIterator
- Specified by:
getFollowingAxisIteratorin interfaceorg.jaxen.Navigator- Overrides:
getFollowingAxisIteratorin classorg.jaxen.DefaultNavigator- Throws:
org.jaxen.UnsupportedAxisException- See Also:
-
always thrown
-
getPrecedingAxisIterator
- Specified by:
getPrecedingAxisIteratorin interfaceorg.jaxen.Navigator- Overrides:
getPrecedingAxisIteratorin classorg.jaxen.DefaultNavigator- Throws:
org.jaxen.UnsupportedAxisException- See Also:
-
always thrown
-
getPrecedingSiblingAxisIterator
public Iterator getPrecedingSiblingAxisIterator(Object arg0) throws org.jaxen.UnsupportedAxisException - Specified by:
getPrecedingSiblingAxisIteratorin interfaceorg.jaxen.Navigator- Overrides:
getPrecedingSiblingAxisIteratorin classorg.jaxen.DefaultNavigator- Throws:
org.jaxen.UnsupportedAxisException- See Also:
-
always thrown
-
getNamespaceAxisIterator
- Specified by:
getNamespaceAxisIteratorin interfaceorg.jaxen.Navigator- Overrides:
getNamespaceAxisIteratorin classorg.jaxen.DefaultNavigator- Throws:
org.jaxen.UnsupportedAxisException
-
getParentAxisIterator
- Specified by:
getParentAxisIteratorin interfaceorg.jaxen.Navigator- Overrides:
getParentAxisIteratorin classorg.jaxen.DefaultNavigator- Throws:
org.jaxen.UnsupportedAxisException
-
getDocumentNode
- Specified by:
getDocumentNodein interfaceorg.jaxen.Navigator- Overrides:
getDocumentNodein classorg.jaxen.DefaultNavigator
-
getNode
-
getNode
-
like
-
contains
public Boolean contains(NodeRef childRef, QName qname, String sqlLikePattern, SearchParameters.Operator defaultOperator) -
isSubtypeOf
-
hasAspect
-