org.apache.chemistry.opencmis.jcr.query
Interface XPathBuilder


public interface XPathBuilder

This result type of EvaluatorXPath provides means for partially evaluating the underlying query's condition. This allows to determine whether there is a semantically equivalent translation from the CMIS query's where clause to an XPath condition.
Specifically EvaluatorXPath only supports a single folder predicate. That is the original CMIS query must not contain more than one IN_TREE or IN_FOLDER predicate respectively. Furthermore that single folder predicate must be affirmative. A literal p in a boolean expression X is affirmative if there exists a boolean expression Y such that p ∧ Y = X. Note: a single folder predicate is affirmative if any only if eval(false) return false.
Only if both conditions hold will the XPath translation provided the xPath() method be valid.


Method Summary
 java.lang.Boolean eval(java.lang.Boolean folderPredicateValuation)
          Evaluate the query condition for a given valuation of the folder predicate terms.
 java.lang.Iterable<XPathBuilder> folderPredicates()
          The folder predicates contained in this query's condition.
 java.lang.String xPath()
          Translation of the underlying CMIS query's where clause to a XPath condition.
 

Method Detail

xPath

java.lang.String xPath()
Translation of the underlying CMIS query's where clause to a XPath condition. The string is only valid if there is no more than one folder predicate and the folder predicate is in affirmative position.


eval

java.lang.Boolean eval(java.lang.Boolean folderPredicateValuation)
Evaluate the query condition for a given valuation of the folder predicate terms.

Parameters:
folderPredicateValuation - valuation for the folder predicate terms. Use null for none.
Returns:
result of the partial evaluation. null means that the value of the query condition is not determined the value passed for folderPredicateValuation.

folderPredicates

java.lang.Iterable<XPathBuilder> folderPredicates()
The folder predicates contained in this query's condition.



Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.