Package org.javarosa.xpath
Class XPathConditional
java.lang.Object
org.javarosa.xpath.XPathConditional
- All Implemented Interfaces:
IConditionExpr,Externalizable
public class XPathConditional extends Object implements IConditionExpr
-
Field Summary
-
Constructor Summary
Constructors Constructor Description XPathConditional()XPathConditional(String xpath)XPathConditional(XPathExpression expr) -
Method Summary
Modifier and Type Method Description booleanequals(Object o)booleaneval(DataInstance model, EvaluationContext evalContext)Evaluate this expression against the current models and context and provide a true or false value.List<TreeReference>evalNodeset(DataInstance model, EvaluationContext evalContext)Used for itemsets.ObjectevalRaw(DataInstance model, EvaluationContext evalContext)Evaluate this expression against the current models and context and provide the final value of the expression, without forcing a cast to a boolean value.StringevalReadable(DataInstance model, EvaluationContext evalContext)Used for itemsets.XPathExpressiongetExpr()Set<TreeReference>getTriggers(TreeReference contextRef)Provides a list of all of the references that this expression's value depends upon directly.List<Object>pivot(DataInstance model, EvaluationContext evalContext)Provide a list of Pivots around which this Condition Expression depends.voidreadExternal(DataInputStream in, PrototypeFactory pf)StringtoString()voidwriteExternal(DataOutputStream out)
-
Field Details
-
Constructor Details
-
XPathConditional
- Throws:
XPathSyntaxException
-
XPathConditional
-
XPathConditional
public XPathConditional()
-
-
Method Details
-
getExpr
-
evalRaw
Description copied from interface:IConditionExprEvaluate this expression against the current models and context and provide the final value of the expression, without forcing a cast to a boolean value.- Specified by:
evalRawin interfaceIConditionExpr- Returns:
-
eval
Description copied from interface:IConditionExprEvaluate this expression against the current models and context and provide a true or false value.- Specified by:
evalin interfaceIConditionExpr- Returns:
-
evalReadable
Description copied from interface:IConditionExprUsed for itemsets. Fill this documentation in.- Specified by:
evalReadablein interfaceIConditionExpr- Returns:
-
evalNodeset
Description copied from interface:IConditionExprUsed for itemsets. Fill this documentation in.- Specified by:
evalNodesetin interfaceIConditionExpr- Returns:
-
getTriggers
Description copied from interface:IConditionExprProvides a list of all of the references that this expression's value depends upon directly. These values can't be contextualized fully (since these triggers are necessary before runtime), but should only need to be contextualized to be a complete set.- Specified by:
getTriggersin interfaceIConditionExpr- Returns:
-
equals
-
readExternal
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionDeserializationException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
toString
-
pivot
public List<Object> pivot(DataInstance model, EvaluationContext evalContext) throws UnpivotableExpressionExceptionDescription copied from interface:IConditionExprProvide a list of Pivots around which this Condition Expression depends. Optional to implement. If not implemented, throw an Unpivotable Expression exception to signal that the expression cannot be statically evaluated.- Specified by:
pivotin interfaceIConditionExpr- Returns:
- Throws:
UnpivotableExpressionException
-