xbrl.formula.Formula
¶
An xbrl.formula.Formula
class represents a <formula:formula> resource in the formula linkbase.
Base class: xbrl.formula.VariableSet
- class xbrl.formula.Formula¶
Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a
NotImplementedError
exception.
Attributes¶
- xbrl.formula.VariableSet.aspect_model
Returns the value of the ‘aspectModel’ attribute as an
xbrl.formula.AspectModel
enumeration.
- xbrl.formula.Formula.aspect_rules¶
Returns an iterator of
xbrl.formula.AspectRule
objects which represents the formula’s aspect rules.
- xbrl.formula.Formula.concept_rule¶
Returns an
xbrl.formula.ConceptRule
object which represents the formula’s concept rule, or None if the formula doesn’t contain a concept rule.
- xbrl.formula.Formula.decimals¶
Returns an xbrl.XPathExpression object representing the XPath expression in the ‘decimals’ attribute, or None if the ‘decimals’ attribute is absent.
- xbrl.formula.Formula.entity_identifier_rule¶
Returns an
xbrl.formula.EntityIdentifierRule
object which represents the formula’s entity identifier rule, or None if the formula doesn’t contain an entity identifier rule.
- xbrl.formula.VariableSet.filter_relationships
Returns an iterator of
xbrl.formula.VariableSetFilterRelationship
objects which represent the variable-set-filter relationships from this <variable:variableSet> resource.
- xbrl.formula.VariableSet.implicit_filtering
Returns the inferred value of the ‘implicitFiltering’ attribute as bool.
- xbrl.formula.Formula.period_rule¶
Returns an
xbrl.formula.PeriodRule
object which represents the formula’s period rule, or None if the formula doesn’t contain a period rule.
- xbrl.formula.Formula.precision¶
Returns an xbrl.XPathExpression object representing the XPath expression in the ‘precision’ attribute, or None if the ‘precision’ attribute is absent.
- xbrl.formula.VariableSet.precondition_relationships
Returns an iterator of
xbrl.formula.VariableSetPreconditionRelationship
objects which represent the variable-set-precondition relationships from this <variable:variableSet> resource.
- xbrl.formula.Formula.source¶
Returns the value of the ‘source’ attribute as xml.QName, or None if the ‘source’ attribute is absent.
- xbrl.formula.Formula.unit_rule¶
Returns an
xbrl.formula.UnitRule
object which represents the formula’s unit rule, or None if the formula doesn’t contain an unit rule.
- xbrl.formula.Formula.value¶
Returns an xbrl.XPathExpression object representing the XPath expression in the ‘value’ attribute.
- xbrl.formula.VariableSet.variable_set_relationships
Returns an iterator of
xbrl.formula.VariableSetRelationship
objects which represent the variable-set relationships from this <variable:variableSet> resource.
Methods¶
- xbrl.formula.Formula.dimension_rule(Dimension dimension)¶
Returns an
xbrl.formula.DimensionRule
object which represents the formula’s dimension rule for the given dimension aspect. Returns None if the formula doesn’t contain such a dimension rule.
- xbrl.formula.VariableSet.find_variable(qname)
[Deprecated: Use resolve_variable() instead!] Returns an
xbrl.formula.Parameter
orxbrl.formula.Variable
object which represents the formula paramter or variable with the given XML qualified name within the scope of this variable set, or None if no parameter or variable was found.
- xbrl.formula.Formula.occ_rules(occtype)¶
Returns an iterator of
xbrl.formula.OCCRule
objects which represents the formula’s OCC rules. Use occtype to retrieve either segment or scenario OCC rules.
- xbrl.formula.Formula.process_formulas(Instance instance, **kargs)¶
Processes this formula against the given XBRL instance and returns an xml.Instance, xml.ErrorLog tuple. The actual type of the returned instance can be an xbrl.Instance object if ‘validate_formula_output’ was set to True and the formula generated instance is XBRL 2.1 valid. Formula parameters can be set using the ‘formula_parameters’ argument by supplying a dict with the user-supplied parameter values. Use the same JSON format as accepted b the –formula-parameters CLI option. Other formula processing options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_xbrl_valxbrl.htm for a list of available options. Any errors and warnings reported during the formula processing can be accessed through the returned xml.ErrorLog object.
- xbrl.formula.VariableSet.referenced_parameters()
Returns an iterator of
xbrl.formula.Parameter
objects representing the referenced formula parameters by this <variable:variableSet> resource and any other associated resources.
- xbrl.formula.VariableSet.resolve_variable(qname)
Returns an
xbrl.formula.Parameter
orxbrl.formula.Variable
object which represents the formula paramter or variable with the given XML qualified name within the scope of this variable set, or None if no parameter or variable was found.
Special methods¶
__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__