public class XBRLVariableResourceUse
extends java.lang.Object
A variable use can be shared between multiple variable sets. But it MUST not be shared between different threads evaluating the same variable name. Each thread must have its own local copy of the evaluation values.
| Constructor and Description |
|---|
XBRLVariableResourceUse(javax.xml.namespace.QName name,
XBRLVariableFormulaEvaluable res,
XBRLVariablesHolder set)
Instantiates a new XBRL variable resource use.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkOptimizer()
creates an optimizer of the XPath expressions and the implicit filters for all variables in the set.
|
boolean |
checkVariable(java.util.Collection<net.sf.saxon.s9api.QName> resolved)
Execute validations as defined in the Formula specification.
|
int |
evaluatedValueSize()
Access to the number of elements in the evaluation sequence.
|
net.sf.saxon.s9api.XdmValue |
evaluateValue(XMLFragment evaluationContext,
java.util.Collection<XBRLVariableResourceUse> evaluatedVars,
boolean bResetAtEnd)
Evaluates this variable value.
|
XFValidationException |
getEvaluationError()
Gets the evaluation error.
|
EvaluationType |
getEvaluationType()
Computes the evaluation type for the value that
|
net.sf.saxon.s9api.XdmValue |
getLastEvaluatedValue(XMLFragment evaluationContext,
java.util.Collection<XBRLVariableResourceUse> availableVars)
Returns the last evaluated value for this variable from the cached value.
|
javax.xml.namespace.QName |
getVariableName()
Access to the variable name (a QName).
|
XBRLVariableFormulaEvaluable |
getVariableResource()
This is the XBRLVariableResource this variable use is assigned to.
|
net.sf.saxon.s9api.QName |
getVariableS9APIQName()
Helper method to obtain the variable name using a saxon s9api QName
rather than a java.xml.namespace.QName
|
java.util.Collection<javax.xml.namespace.QName> |
getVariablesRequired()
Access to a collection of variable names required to evaluate this variable.
|
boolean |
hasNext()
Returns true if this variable has been evaluated and there are more values not already obtained
using calls to evaluateValue.
|
boolean |
isEvaluated()
Returns true if this variable has been successfully evaluated the last time it was evaluated.
|
boolean |
isFallbackDefined()
If the variable has a fall back value defined this method will return true. regardless the last evaluation
is the fall back value or not.
|
boolean |
isFallBackEvaluation()
Returns true if the last evaluated value is the fallback value.
|
boolean |
isRecyclable()
Checks if is recyclable.
|
java.util.Vector<java.util.ArrayList<net.sf.saxon.s9api.XdmItem>> |
preparePartitions(java.util.Vector<java.util.ArrayList<net.sf.saxon.s9api.XdmItem>> hsOutSeq,
int uncoveredAspects)
For API use only.
|
void |
recycle()
This method sets the internal iterator to the first element and avoids
evaluating the XPath expression again.
|
void |
replaceLastEvaluatedValue(net.sf.saxon.s9api.XdmValue newValue)
Sets the cache of the evaluated value to a specific value.
|
void |
reset()
Sets this variable use to the status of not evaluated.
|
void |
setIsEvaluated(boolean value)
Sets the cache of the evaluated flag value to a specific value.
|
void |
setLastEvaluatedLen(int i)
Sets the cache of the evaluated sequence length to a specific value.
|
void |
setVariableName(javax.xml.namespace.QName name)
Sets a specific variable name if needed.
|
long |
size()
Size.
|
public XBRLVariableResourceUse(javax.xml.namespace.QName name,
XBRLVariableFormulaEvaluable res,
XBRLVariablesHolder set)
name - the nameres - the resset - the setpublic javax.xml.namespace.QName getVariableName()
public void setVariableName(javax.xml.namespace.QName name)
name - QNamepublic XBRLVariableFormulaEvaluable getVariableResource()
public net.sf.saxon.s9api.QName getVariableS9APIQName()
public net.sf.saxon.s9api.XdmValue evaluateValue(XMLFragment evaluationContext, java.util.Collection<XBRLVariableResourceUse> evaluatedVars, boolean bResetAtEnd) throws XFValidationException
If the variable does not binds as sequence but the variable evaluation returns a sequence this method returns the first (or next) element in the sequence
evaluationContext - the evaluation contextevaluatedVars - the evaluated varsbResetAtEnd - the b reset at endXFValidationException - the XF validation exceptionpublic java.util.Vector<java.util.ArrayList<net.sf.saxon.s9api.XdmItem>> preparePartitions(java.util.Vector<java.util.ArrayList<net.sf.saxon.s9api.XdmItem>> hsOutSeq,
int uncoveredAspects)
throws XFValidationException
hsOutSeq - the hs out sequncoveredAspects - the uncovered aspectsXFValidationException - the XF validation exceptionpublic net.sf.saxon.s9api.XdmValue getLastEvaluatedValue(XMLFragment evaluationContext, java.util.Collection<XBRLVariableResourceUse> availableVars)
getEvaluationError() to obtain the surrounding XFValidationExceptionevaluationContext - the evaluation contextavailableVars - the available varspublic XFValidationException getEvaluationError()
public int evaluatedValueSize()
public java.util.Collection<javax.xml.namespace.QName> getVariablesRequired()
This is static information once the variable and all its filters are compiled.
public boolean checkVariable(java.util.Collection<net.sf.saxon.s9api.QName> resolved)
throws XFValidationException
resolved - the resolvedXFValidationException - the XF validation exceptionpublic void checkOptimizer()
public void replaceLastEvaluatedValue(net.sf.saxon.s9api.XdmValue newValue)
newValue - the new valuepublic boolean isEvaluated()
public EvaluationType getEvaluationType()
public void setLastEvaluatedLen(int i)
i - the new last evaluated lenpublic void setIsEvaluated(boolean value)
value - the new checks if is evaluatedpublic void reset()
public boolean hasNext()
public boolean isFallbackDefined()
public boolean isFallBackEvaluation()
public long size()
public void recycle()
public boolean isRecyclable()