|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XBRLFormulaFilter
This interface defines the minimum requirements for an XBRL Formula Filter
A filter can be compared against other filters in order to decide about the order the filter expressions are evaluated. This order is not defined in the XBRL Formula Specification (a mistake made by the authors of the Specification) but filter order is relevant during the formula evaluation. Example
Expression A obtains facts in the instance
Expression B returns the unit of a monetary fact variable.
Expression B would return an error condition if the fact is not numeric.
Expression C filters only numeric values from the instance.
Expression C should be evaluated BEFORE expression B in order to avoid unexpected errors to be raised during the evaluation of expression B.
The Formula Specification 1.0 does not allows users to define any order in which the filters should be evaluated. So different implementations would raise different results.
In the opinion of RS, the XBRL Formula specification should allow just one filter (the general filter) and avoid any other filter to exist. Software products in the market would facilitate users to write the long XPath expressions, the specification is NOT the place to put all this stuff.
| Method Summary | |
|---|---|
void |
collectVariables(java.util.Collection<javax.xml.namespace.QName> col,
java.util.Collection<net.sf.saxon.s9api.QName> resolved)
This method is called after the filter has been compiled. |
int |
getCorevedAspect()
Returns a constant value indicating the aspect covered by this filter Constants are defined in the CommonAspectRule class |
int |
getFilterWeight()
Returns a number assigned statically to every filter type in order to facilitate evaluate the right order in which filters should be concatenated in an XPath expression or Boolean Filter. |
java.lang.String |
getLabel()
Implemented in the XBRLResource. |
java.lang.String |
getXPathTerm(java.util.Collection<net.sf.saxon.s9api.QName> preDefinedVariables)
Access to the XPath expression for this filter according to the formula specification |
| Method Detail |
|---|
java.lang.String getXPathTerm(java.util.Collection<net.sf.saxon.s9api.QName> preDefinedVariables)
throws XFValidationException
preDefinedVariables - set of pre defined variables in the variable set
XFValidationException - if the variable filter XPath expression cannot be compiled for any reasonint getCorevedAspect()
void collectVariables(java.util.Collection<javax.xml.namespace.QName> col,
java.util.Collection<net.sf.saxon.s9api.QName> resolved)
col - the collection where variables will be appendedresolved - declaredVars - int getFilterWeight()
A typical implementation should just do:
XBRLFilterOrderTool.getFilterWeight(getClass());and make sure the class is defined in the XBRLFilterOrderTool
java.lang.String getLabel()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||