public abstract class Clause
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Clause.ClauseName |
Constructor and Description |
---|
Clause() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addToPathMap(PathMap pathMap,
PathMap.PathMapNodeSet pathMapNodeSet)
Collect information about the navigation paths followed by this clause, for document projection purposes
|
boolean |
containsNonInlineableVariableReference(Binding binding)
Determine whether the clause contains a reference to a local variable binding that cannot be inlined
|
abstract Clause |
copy(FLWORExpression flwor,
RebindingMap rebindings)
Create a copy of this clause
|
abstract void |
explain(ExpressionPresenter out)
Diagnostic print of expression structure.
|
void |
gatherVariableReferences(ExpressionVisitor visitor,
Binding binding,
java.util.List<VariableReference> refs)
Build a list of all references to a variables declared in this clause
|
abstract Clause.ClauseName |
getClauseKey()
Get a keyword identifying what kind of clause this is
|
Configuration |
getConfiguration() |
Location |
getLocation()
Get the location, which can be used to determine
the system ID and line number of the clause
|
PackageData |
getPackageData() |
abstract TuplePull |
getPullStream(TuplePull base,
XPathContext context)
Get a pull-mode tuple stream that implements the functionality of this clause, taking its
input from another tuple stream which this clause modifies
|
abstract TuplePush |
getPushStream(TuplePush destination,
Outputter output,
XPathContext context)
Get a push-mode tuple stream that implements the functionality of this clause, supplying its
output to another tuple stream
|
LocalVariableBinding[] |
getRangeVariables()
Get the variables bound by this clause
|
java.util.Map<java.lang.String,java.lang.Object> |
getTraceInfo()
Get information for inclusion in trace output
|
boolean |
isRepeated() |
void |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Optimize any expressions contained within this clause
|
abstract void |
processOperands(OperandProcessor processor)
Process the subexpressions of this clause
|
void |
refineVariableType(ExpressionVisitor visitor,
java.util.List<VariableReference> references,
Expression returnExpr)
Supply improved type information to the expressions that contain references to the variables declared in this clause
|
void |
setLocation(Location locationId)
Set the location, which can be used to determine
the system ID and line number of the clause
|
void |
setPackageData(PackageData pd) |
void |
setRepeated(boolean repeated) |
java.lang.String |
toShortString()
Get a short string representation of the clause
|
void |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Type-check any expression contained within this clause
|
public Location getLocation()
public void setLocation(Location locationId)
locationId
- the locationpublic void setPackageData(PackageData pd)
public PackageData getPackageData()
public Configuration getConfiguration()
public void setRepeated(boolean repeated)
public boolean isRepeated()
public abstract Clause copy(FLWORExpression flwor, RebindingMap rebindings)
flwor
- the new FLWORExpression to contain the copied clauserebindings
- the rebinding mappublic void optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
visitor
- the ExpressionVisitor, providing access to static context informationcontextItemType
- the type of the context itemXPathException
- if any error is detectedpublic void typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
visitor
- the ExpressionVisitor, providing access to static context informationcontextInfo
- static information about the dynamic contextXPathException
- if any error is detectedpublic abstract TuplePull getPullStream(TuplePull base, XPathContext context)
base
- the input tuple streamcontext
- the dynamic evaluation contextpublic abstract TuplePush getPushStream(TuplePush destination, Outputter output, XPathContext context)
destination
- the output tuple streamoutput
- the destination for the resultcontext
- the dynamic evaluation contextpublic abstract void processOperands(OperandProcessor processor) throws XPathException
processor
- the expression processor used to process the subexpressionsXPathException
- if any error is detectedpublic abstract void explain(ExpressionPresenter out) throws XPathException
out
- the expression presenter used to display the structureXPathException
- if any error occurspublic LocalVariableBinding[] getRangeVariables()
public void gatherVariableReferences(ExpressionVisitor visitor, Binding binding, java.util.List<VariableReference> refs)
visitor
- the expression visitorbinding
- a variable declared in this clauserefs
- the list of variable references, initially empty, to which the method will appendpublic boolean containsNonInlineableVariableReference(Binding binding)
binding
- the binding for the local variable in questionpublic void refineVariableType(ExpressionVisitor visitor, java.util.List<VariableReference> references, Expression returnExpr)
visitor
- the expression visitorreferences
- the list of variable referencesreturnExpr
- the expression in the return clausepublic abstract void addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
pathMap
- the path map in which the data is to be collectedpathMapNodeSet
- the path map node set representing the paths to the context itempublic abstract Clause.ClauseName getClauseKey()
public java.lang.String toShortString()
public java.util.Map<java.lang.String,java.lang.Object> getTraceInfo()
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.