public class CopyModifyExpression extends Expression
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD| Constructor and Description |
|---|
CopyModifyExpression(Expression updateExp,
Expression returnExp,
int validationMode)
Create a copy-modify expression (also known as a transform expresion)
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkForUpdatingSubexpressions()
Check to ensure that this expression does not contain any inappropriate updating subexpressions.
|
int |
computeCardinality()
Determine the static cardinality of the expression.
|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
Item |
evaluateItem(XPathContext context)
Evaluate an expression as a single item.
|
void |
export(ExpressionPresenter out)
Diagnostic print of expression structure.
|
Expression |
getCopyBindings() |
java.lang.String |
getExpressionName()
Get a name identifying the kind of expression, in terms meaningful to a user.
|
int |
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
ItemType |
getItemType()
Determine the data type of the expression, if possible.
|
Expression |
getReturnExp() |
Expression |
getUpdateExp() |
boolean |
isUpdatingExpression()
Determine whether this is an updating expression as defined in the XQuery update specification
|
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence.
|
java.lang.Iterable<Operand> |
operands()
Get the immediate sub-expressions of this expression, with information about the relationship
of each expression to its parent expression.
|
void |
process(XPathContext context)
Process the instruction, without returning any tail calls
|
void |
setCopyBindings(Expression copyBindings)
Set the copy bindings.
|
void |
setReturnExp(Expression returnExp) |
void |
setUpdateExp(Expression updateExp) |
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkPermittedContents, computeDependencies, computeHashCode, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, getStreamerName, hasCompatibleStaticContext, hashCode, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isInstruction, isLiftable, isMultiThreaded, isSameExpression, isStaticPropertiesKnown, isSubtreeExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimize, optimizeChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheck, typeCheckChildren, typeError, unordered, verifyParentPointers, verifyParentPointerspublic CopyModifyExpression(Expression updateExp, Expression returnExp, int validationMode)
updateExp - the expression appearing in the modify clausereturnExp - the expression appearing in the return clausevalidationMode - the mode for validating the updated nodes (strict, lax, or skip)public java.lang.Iterable<Operand> operands()
ExpressionIf the expression is a Callable, then it is required that the order of the operands returned by this function is the same as the order of arguments supplied to the corresponding call() method.
operands in class Expressionpublic Expression getUpdateExp()
public void setUpdateExp(Expression updateExp)
public Expression getReturnExp()
public void setReturnExp(Expression returnExp)
public Expression getCopyBindings()
public void setCopyBindings(Expression copyBindings)
copyBindings - the set of Let expressions that bind variables that were copied during the copy
phase and that therefore may be updated during the modify phasepublic int computeCardinality()
computeCardinality in class Expressionpublic ItemType getItemType()
This method should always return a result, though it may be the best approximation that is available at the time.
getItemType in class Expressionpublic boolean isUpdatingExpression()
isUpdatingExpression in class Expressionpublic java.lang.String getExpressionName()
getExpressionName in class Expressionpublic void checkForUpdatingSubexpressions()
throws XPathException
checkForUpdatingSubexpressions in class ExpressionXPathException - if the expression has a non-permitted updating subexpressionpublic Expression copy(RebindingMap rebindings)
copy in class Expressionrebindings - public int getImplementationMethod()
getImplementationMethod in class ExpressionExpression.ITERATE_METHOD or Expression.EVALUATE_METHOD or
Expression.PROCESS_METHODpublic void export(ExpressionPresenter out) throws XPathException
export in interface ExportAgentexport in class Expressionout - the expression presenter used to display the structureXPathException - if the export fails, for example if an expression is found that won't work
in the target environment.public SequenceIterator iterate(XPathContext context) throws XPathException
iterate in class Expressioncontext - supplies the context for evaluationXPathException - if any dynamic error occurs evaluating the
expressionpublic Item evaluateItem(XPathContext context) throws XPathException
evaluateItem in class Expressioncontext - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionpublic void process(XPathContext context) throws XPathException
process in class Expressioncontext - The dynamic context, giving access to the current node,
the current variables, etc.XPathException - if a dynamic error occursCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.