public class XBRLVariableInternal extends java.lang.Object implements XBRLVariableFormulaEvaluable
This class implements the XBRLVariableFormulaEvaluable interface
| Constructor and Description |
|---|
XBRLVariableInternal(XBRLFormulaProcessor proc,
net.sf.saxon.s9api.XdmValue value)
Instantiates a new XBRL variable internal.
|
XBRLVariableInternal(XBRLFormulaProcessor proc,
net.sf.saxon.s9api.XdmValue value,
boolean bindAsSequence)
Instantiates a new XBRL variable internal.
|
| Modifier and Type | Method and Description |
|---|---|
net.sf.saxon.s9api.XdmValue |
adjustValueAccordingToType(net.sf.saxon.s9api.XdmValue val,
net.sf.saxon.s9api.XdmItem item)
Checks if the variable has a "as" attribute and:
* if it exist; the value in the item parameter is converted to the type indicated
* if it does not exist; the value of the val parameter is returned.
|
boolean |
bindAsSequence()
In the case of resource based variables this reads the surrounding syntax and returns the value
of the bindAsSequence.
|
boolean |
checkVariable(XBRLVariablesHolder set,
javax.xml.namespace.QName name,
java.util.Collection<net.sf.saxon.s9api.QName> resolved)
Called for variables that are also resources during the static compilation phase of the formula preparation.
|
void |
clear()
Used to clean up evaluation caches.
|
Evaluation |
evaluateValue(XMLFragment evaluationContext,
java.util.Collection<XBRLVariableResourceUse> availableVars,
XBRLVariableSetResource set)
Evaluates the resource internal XPath expression and returns either the returned value from the XPath expression
or the fall back value in the case of variables that may have a fall back value and the rawEvaluation of the
XPath expression results in the empty sequence.
|
java.util.List<XBRLFilterUse> |
getFilters(int aspect)
Gets the filters.
|
XBRLFormulaProcessor |
getProcessor()
Returns an instance of the XBRLFormulaProcessor this variable has been created under
|
java.util.Collection<javax.xml.namespace.QName> |
getVariablesRequired(XBRLVariablesHolder set)
Returns a collection of variables required for the evaluation of this variable.
|
XBRLVariableType |
getVariableType()
Gets the variable type.
|
XMLFragment |
getXMLFragment()
Returns the surrounding XML Fragment this resource comes from.
|
boolean |
hasFilterAspect(int aspect,
javax.xml.namespace.QName dimName)
Checks for filter aspect.
|
Evaluation |
rawEvaluateValue(XMLFragment evaluationContext,
java.util.Collection<XBRLVariableResourceUse> availableVars)
Evaluates the resource internal XPath expression and returns the sequence.
|
public XBRLVariableInternal(XBRLFormulaProcessor proc, net.sf.saxon.s9api.XdmValue value)
proc - the procvalue - the valuepublic XBRLVariableInternal(XBRLFormulaProcessor proc, net.sf.saxon.s9api.XdmValue value, boolean bindAsSequence)
proc - the procvalue - the valuebindAsSequence - the bind as sequencepublic Evaluation evaluateValue(XMLFragment evaluationContext, java.util.Collection<XBRLVariableResourceUse> availableVars, XBRLVariableSetResource set) throws XFValidationException
XBRLVariableFormulaEvaluableevaluateValue in interface XBRLVariableFormulaEvaluableevaluationContext - the evaluation contextavailableVars - the available varsset - the setXFValidationException - the XF validation exceptionXBRLVariableFormulaEvaluable.rawEvaluateValue(XMLFragment, Collection)public Evaluation rawEvaluateValue(XMLFragment evaluationContext, java.util.Collection<XBRLVariableResourceUse> availableVars) throws XFValidationException
XBRLVariableFormulaEvaluableXBRLVariableFormulaEvaluable.evaluateValue(XMLFragment, Collection, XBRLVariableSetResource) method.rawEvaluateValue in interface XBRLVariableFormulaEvaluableevaluationContext - the evaluation contextavailableVars - the available varsXFValidationException - the XF validation exceptionpublic void clear()
XBRLVariableFormulaEvaluableclear in interface XBRLVariableFormulaEvaluablepublic boolean bindAsSequence()
XBRLVariableFormulaEvaluableIn other cases relays on the implementation
bindAsSequence in interface XBRLVariableFormulaEvaluablepublic boolean checkVariable(XBRLVariablesHolder set, javax.xml.namespace.QName name, java.util.Collection<net.sf.saxon.s9api.QName> resolved) throws XFValidationException
XBRLVariableFormulaEvaluablethrows exceptions according to the validation rules.
shall return true on success
checkVariable in interface XBRLVariableFormulaEvaluableset - the setname - the nameresolved - the resolvedXFValidationException - the XF validation exceptionpublic java.util.Collection<javax.xml.namespace.QName> getVariablesRequired(XBRLVariablesHolder set)
XBRLVariableFormulaEvaluablegetVariablesRequired in interface XBRLVariableFormulaEvaluableset - the setpublic XBRLFormulaProcessor getProcessor()
XBRLVariableFormulaEvaluablegetProcessor in interface XBRLVariableFormulaEvaluablepublic java.util.List<XBRLFilterUse> getFilters(int aspect)
XBRLVariableFormulaEvaluablegetFilters in interface XBRLVariableFormulaEvaluableaspect - the aspectpublic boolean hasFilterAspect(int aspect,
javax.xml.namespace.QName dimName)
XBRLVariableFormulaEvaluablehasFilterAspect in interface XBRLVariableFormulaEvaluableaspect - the aspectdimName - if aspect is DIMENSION then dimName is the dimension namepublic XBRLVariableType getVariableType()
XBRLVariableFormulaEvaluablegetVariableType in interface XBRLVariableFormulaEvaluablepublic net.sf.saxon.s9api.XdmValue adjustValueAccordingToType(net.sf.saxon.s9api.XdmValue val,
net.sf.saxon.s9api.XdmItem item)
throws XFValidationException
XBRLVariableFormulaEvaluableadjustValueAccordingToType in interface XBRLVariableFormulaEvaluableval - value to be returned when no "as" attribute exist on variableitem - the value that must be converted to the type indicated in the as attributeXFValidationException - the XF validation exceptionpublic XMLFragment getXMLFragment()
XBRLVariableFormulaEvaluablegetXMLFragment in interface XBRLVariableFormulaEvaluable