com.ihr.xbrl.om.formula.functions

## Class XFFunction

- java.lang.Object
- - net.sf.saxon.expr.Expression
  - - net.sf.saxon.expr.FunctionCall
    - - com.ihr.xbrl.om.formula.functions.XFFunction

- All Implemented Interfaces:
    java.io.Serializable, javax.xml.transform.SourceLocator, net.sf.saxon.event.LocationProvider, net.sf.saxon.event.SaxonLocator, net.sf.saxon.trace.InstructionInfo, org.xml.sax.Locator
  Direct Known Subclasses:
    RS_IsFact, RS_NonXDTScenarioSegmentAspectTestHelper, RS_RelativeFilter, XFF_uncovered_aspect, XFFunctionMultiArguments, XFI_arcrole_definition, XFI_c_equal, XFI_c_equal_set, XFI_concept_balance, XFI_concept_custom_attribute, XFI_concept_data_type, XFI_concept_data_type_derived_from, XFI_concept_label, XFI_concept_period_type, XFI_concept_substitutions, XFI_context, XFI_context_function, XFI_cu_equal, XFI_decimals, XFI_duplicate_item, XFI_duplicate_tuple, XFI_end_equal, XFI_entity, XFI_entity_identifier, XFI_entity_segment, XFI_fact_dim_container_remainder, XFI_fact_footnotes, XFI_fact_identifier_scheme, XFI_fact_identifier_value, XFI_filter_member_network_selection, XFI_identical_node_set, XFI_identical_nodes, XFI_identifier, XFI_identifier_scheme, XFI_identifier_value, XFI_ImplicitFilterOptimizableImpl, XFI_is_fraction, XFI_is_non_numeric, XFI_is_numeric, XFI_is_period_function, XFI_items_in_instance, XFI_items_in_tuple, XFI_linkbase_link_roles, XFI_measure_name, XFI_nodes_correspond, XFI_p_equal, XFI_pc_equal, XFI_pcu_equal, XFI_period, XFI_precision, XFI_relationship_attribute, XFI_relationship_from_concept, XFI_relationship_link_attribute, XFI_relationship_link_name, XFI_relationship_name, XFI_relationship_to_concept, XFI_role_definition, XFI_s_equal, XFI_s_equal_set, XFI_scenario, XFI_segment, XFI_start_equal, XFI_tuples_in_instance, XFI_tuples_in_tuple, XFI_u_equal, XFI_u_equal_set, XFI_unit, XFI_unit_function, XFI_v_equal, XFI_v_equal_set, XFI_x_equal

      public abstract class XFFunction
      extends net.sf.saxon.expr.FunctionCall

  The Class XFFunction.
  Author:
    Ignacio
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.expr.Expression

      `EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, PUSH_SELECTION, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XFFunction()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `net.sf.saxon.expr.parser.PathMap.PathMapNodeSet` | `addDocToPathMap(net.sf.saxon.expr.parser.PathMap pathMap, net.sf.saxon.expr.parser.PathMap.PathMapNodeSet pathMapNodes)` Add a representation of a doc() call or similar function to a PathMap.
    `void` | `checkArguments(net.sf.saxon.expr.parser.ExpressionVisitor visitor)` Method called during static type checking.
    `int` | `computeCardinality()` Determine the cardinality of the function.
    `int` | `computeSpecialProperties()` Determine the special properties of this expression.
    `net.sf.saxon.expr.Expression` | `copy()` Copy an expression.
    `net.sf.saxon.functions.StandardFunction.Entry` | `getDetails()` Get the details of the function signature.
    `java.lang.String` | `getErrorCodeForTypeErrors()` Return the error code to be used for type errors.
    `XBRLFormulaProcessor` | `getFormulaProcessor()` Gets the formula processor.
    `net.sf.saxon.type.ItemType` | `getItemType(net.sf.saxon.type.TypeHierarchy th)` Determine the item type of the value returned by the function.
    `static net.sf.saxon.expr.FunctionCall` | `makeSystemFunction(java.lang.String name, net.sf.saxon.expr.Expression[] arguments, XBRLFormulaProcessor fp)` Make a xfi function call (one in the xfi namespace).
    `net.sf.saxon.expr.Expression` | `optimize(net.sf.saxon.expr.parser.ExpressionVisitor visitor, net.sf.saxon.expr.parser.ExpressionVisitor.ContextItemType contextItemType)` Perform optimisation of an expression and its subexpressions.
    `void` | `setDetails(net.sf.saxon.functions.StandardFunction.Entry entry)` Set the details of this type of function.
    `void` | `setFormulaProcessor(XBRLFormulaProcessor fp)` Sets the formula processor.

    - ### Methods inherited from class net.sf.saxon.expr.FunctionCall

      `addExternalFunctionCallToPathMap, equals, explain, getArguments, getDisplayName, getExpressionName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionName, simplify, toString, typeCheck`

    - ### Methods inherited from class net.sf.saxon.expr.Expression

      `addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExecutable, getHostLanguage, getImplementationMethod, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, iterateEvents, iterateSameFocusSubExpressions, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### XFFunction

          public XFFunction()

  - ### Method Detail

    - #### makeSystemFunction

          public static net.sf.saxon.expr.FunctionCall makeSystemFunction(java.lang.String name,
                                                          net.sf.saxon.expr.Expression[] arguments,
                                                          XBRLFormulaProcessor fp)

      Make a xfi function call (one in the xfi namespace).
      Parameters:
        `name` - The local name of the function.
        `arguments` - the arguments to the function call
        `fp` - the fp
      Returns:
        a FunctionCall that implements this function, if it exists, or null if the function is unknown.

    - #### setDetails

          public void setDetails(net.sf.saxon.functions.StandardFunction.Entry entry)

      Set the details of this type of function.
      Parameters:
        `entry` - information giving details of the function signature

    - #### setFormulaProcessor

          public void setFormulaProcessor(XBRLFormulaProcessor fp)

      Sets the formula processor.
      Parameters:
        `fp` - the new formula processor

    - #### getFormulaProcessor

          public XBRLFormulaProcessor getFormulaProcessor()

      Gets the formula processor.
      Returns:
        the formula processor

    - #### getDetails

          public net.sf.saxon.functions.StandardFunction.Entry getDetails()

      Get the details of the function signature.
      Returns:
        information about the function signature

    - #### checkArguments

          public void checkArguments(net.sf.saxon.expr.parser.ExpressionVisitor visitor)
                              throws net.sf.saxon.trans.XPathException

      Method called during static type checking.
      Specified by:
        `checkArguments` in class `net.sf.saxon.expr.FunctionCall`
      Parameters:
        `visitor` - the visitor
      Throws:
        `net.sf.saxon.trans.XPathException` - the x path exception

    - #### optimize

          public net.sf.saxon.expr.Expression optimize(net.sf.saxon.expr.parser.ExpressionVisitor visitor,
                                              net.sf.saxon.expr.parser.ExpressionVisitor.ContextItemType contextItemType)
                                                throws net.sf.saxon.trans.XPathException

      Perform optimisation of an expression and its subexpressions.

      This method is called after all references to functions and variables have been resolved to the declaration of the function or variable, and after all type checking has been done.

      Overrides:
        `optimize` in class `net.sf.saxon.expr.FunctionCall`
      Parameters:
        `visitor` - an expression visitor
        `contextItemType` - the static type of "." at the point where this expression is invoked. The parameter is set to null if it is known statically that the context item will be undefined. If the type of the context item is not known statically, the argument is set to `Type.ITEM_TYPE`
      Returns:
        the original expression, rewritten if appropriate to optimize execution
      Throws:
        `net.sf.saxon.trans.XPathException` - if an error is discovered during this phase (typically a type error)

    - #### copy

          public net.sf.saxon.expr.Expression copy()

      Copy an expression. This makes a deep copy.
      Specified by:
        `copy` in class `net.sf.saxon.expr.Expression`
      Returns:
        the copy of the original expression

    - #### getErrorCodeForTypeErrors

          public java.lang.String getErrorCodeForTypeErrors()

      Return the error code to be used for type errors. This is overridden for functions such as exactly-one(), one-or-more(), ...
      Returns:
        the error code to be used for type errors in the function call. Normally XPTY0004, but different codes are used for functions such as exactly-one()

    - #### getItemType

          public net.sf.saxon.type.ItemType getItemType(net.sf.saxon.type.TypeHierarchy th)

      Determine the item type of the value returned by the function.
      Specified by:
        `getItemType` in class `net.sf.saxon.expr.Expression`
      Parameters:
        `th` - the type hierarchy cache
      Returns:
        the item type

    - #### computeCardinality

          public int computeCardinality()

      Determine the cardinality of the function.
      Specified by:
        `computeCardinality` in class `net.sf.saxon.expr.Expression`
      Returns:
        the int

    - #### computeSpecialProperties

          public int computeSpecialProperties()

      Determine the special properties of this expression. The general rule is that a system function call is non-creative if its return type is atomic, or if all its arguments are non-creative. This is overridden for the generate-id() function, which is considered creative if its operand is creative (because the result depends on the identity of the operand)
      Overrides:
        `computeSpecialProperties` in class `net.sf.saxon.expr.Expression`
      Returns:
        the int

    - #### addDocToPathMap

          public net.sf.saxon.expr.parser.PathMap.PathMapNodeSet addDocToPathMap(net.sf.saxon.expr.parser.PathMap pathMap,
                                                                        net.sf.saxon.expr.parser.PathMap.PathMapNodeSet pathMapNodes)

      Add a representation of a doc() call or similar function to a PathMap. This is a convenience method called by the addToPathMap() methods for doc(), document(), collection() and similar functions. These all create a new root expression in the path map.
      Parameters:
        `pathMap` - the PathMap to which the expression should be added
        `pathMapNodes` - the node in the PathMap representing the focus at the point where this expression is called. Set to null if this expression appears at the top level.
      Returns:
        the pathMapNode representing the focus established by this expression, in the case where this expression is the first operand of a path expression or filter expression