com.ihr.xbrl.om.formula.aspects

## Class DefaultAspectRule

- java.lang.Object
- - com.ihr.xbrl.om.formula.aspects.CommonAspectRule
  - - com.ihr.xbrl.om.formula.aspects.DefaultAspectRule

- All Implemented Interfaces:
    ConceptAspectInterface, ContextComponentRuleInterface, DimensionAspectInterface, EntityIdentifierAspectInterface, LocationAspectInterface, PeriodAspectInterface, UnitAspectInterface

      public class DefaultAspectRule
      extends CommonAspectRule
      implements ConceptAspectInterface, EntityIdentifierAspectInterface, PeriodAspectInterface, UnitAspectInterface, ContextComponentRuleInterface, DimensionAspectInterface, LocationAspectInterface

  The Class DefaultAspectRule.
  Author:
    Ignacio

- - ### Field Summary

    - ### Fields inherited from class com.ihr.xbrl.om.formula.aspects.CommonAspectRule

      `ALLDIMENSIONALASPECTS, ALLNONDIMENSIONALASPECTS, ANY, COMPLETESCENARIO, COMPLETESEGMENT, CONCEPT, DIMENSION, ENTITYIDENTIFIER, LOCATION, NONE, NONXDTSCENARIO, NONXDTSEGMENT, PERIOD, UNIT, VALUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultAspectRule(int aspect, XBRLFormula formula, net.sf.saxon.s9api.XdmNode aspectNode, int type)` Instantiates a new default aspect rule.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `XMLElementDefinition` | `getConcept(XPathHelper xph)` Returns the calculated concept for this aspect.
    `javax.xml.namespace.QName` | `getDimension()` Gets the dimension.
    `XBRLEntity` | `getEntity(XPathHelper xph)` Gets the entity.
    `XBRLContext` | `getLastEvaluatedContext()` Gets the last evaluated context.
    `XBRLFactsList` | `getLocation(XBRLInstance instance, XPathHelper xph)` Returns the location for a new item or tuple .
    `XBRLPeriod` | `getPeriod(XPathHelper xph)` Gets the period.
    `XBRLItem.PeriodType` | `getPeriodType(XBRLItem item)` Returns a constant identifying either XBRLItem.DURATION or XBRLItem.INSTANT
    `javax.xml.namespace.QName` | `getSource()` Access to the source from other classes.
    `XBRLUnit` | `getUnit(XPathHelper xph)` Gets the unit.
    `boolean` | `isStaticConcept()` Returns true if the evaluation of the concept does not requires access to dynamic content.
    `void` | `resolve(XMLElementDefinition el, FContext fc, XPathHelper xph, javax.xml.namespace.QName dimName)` Resolve one dimension in the appropriate dimension container.
    `void` | `updateDimensionsContainer(FContext fctx, XPathHelper xph, boolean bIsOcc)` Update dimensions container.

    - ### Methods inherited from class com.ihr.xbrl.om.formula.aspects.CommonAspectRule

      `getAspectsText`

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultAspectRule

          public DefaultAspectRule(int aspect,
                           XBRLFormula formula,
                           net.sf.saxon.s9api.XdmNode aspectNode,
                           int type)
                            throws XFValidationException

      Instantiates a new default aspect rule.
      Parameters:
        `aspect` - the aspect
        `formula` - the formula
        `aspectNode` - the aspect node
        `type` - this is either TYPED or EXPLICIT but only when DIMENSION is the aspect
      Throws:
        `XFValidationException` - the XF validation exception

  - ### Method Detail

    - #### getConcept

          public XMLElementDefinition getConcept(XPathHelper xph)
                                          throws XFValidationException

      Description copied from interface: `ConceptAspectInterface`
      Returns the calculated concept for this aspect.
      Specified by:
        `getConcept` in interface `ConceptAspectInterface`
      Parameters:
        `xph` - the hpx
      Returns:
        a QName
      Throws:
        `XFValidationException` - the XF validation exception

    - #### isStaticConcept

          public boolean isStaticConcept()

      Description copied from interface: `ConceptAspectInterface`
      Returns true if the evaluation of the concept does not requires access to dynamic content.
      Specified by:
        `isStaticConcept` in interface `ConceptAspectInterface`
      Returns:
        boolean

    - #### getPeriodType

          public XBRLItem.PeriodType getPeriodType(XBRLItem item)

      Description copied from interface: `PeriodAspectInterface`
      Returns a constant identifying either XBRLItem.DURATION or XBRLItem.INSTANT
      Specified by:
        `getPeriodType` in interface `PeriodAspectInterface`
      Parameters:
        `item` - the item
      Returns:
        the period type

    - #### getEntity

          public XBRLEntity getEntity(XPathHelper xph)
                               throws XFValidationException

      Description copied from interface: `EntityIdentifierAspectInterface`
      Gets the entity.
      Specified by:
        `getEntity` in interface `EntityIdentifierAspectInterface`
      Parameters:
        `xph` - the xph
      Returns:
        the entity
      Throws:
        `XFValidationException` - the XF validation exception

    - #### getPeriod

          public XBRLPeriod getPeriod(XPathHelper xph)
                               throws XFValidationException

      Description copied from interface: `PeriodAspectInterface`
      Gets the period.
      Specified by:
        `getPeriod` in interface `PeriodAspectInterface`
      Parameters:
        `xph` - the xph
      Returns:
        the period
      Throws:
        `XFValidationException` - the XF validation exception

    - #### getUnit

          public XBRLUnit getUnit(XPathHelper xph)
                           throws XFValidationException

      Description copied from interface: `UnitAspectInterface`
      Gets the unit.
      Specified by:
        `getUnit` in interface `UnitAspectInterface`
      Parameters:
        `xph` - the xph
      Returns:
        the unit
      Throws:
        `XFValidationException` - the XF validation exception

    - #### updateDimensionsContainer

          public void updateDimensionsContainer(FContext fctx,
                                       XPathHelper xph,
                                       boolean bIsOcc)
                                         throws XFValidationException

      Description copied from interface: `ContextComponentRuleInterface`
      Update dimensions container.
      Specified by:
        `updateDimensionsContainer` in interface `ContextComponentRuleInterface`
      Parameters:
        `fctx` - the ctx
        `xph` - the xph
        `bIsOcc` - the b is occ
      Throws:
        `XFValidationException` - the XF validation exception

    - #### getLastEvaluatedContext

          public XBRLContext getLastEvaluatedContext()

      Description copied from interface: `EntityIdentifierAspectInterface`
      Gets the last evaluated context.
      Specified by:
        `getLastEvaluatedContext` in interface `EntityIdentifierAspectInterface`
      Returns:
        the last evaluated context

    - #### resolve

          public void resolve(XMLElementDefinition el,
                     FContext fc,
                     XPathHelper xph,
                     javax.xml.namespace.QName dimName)
                       throws XFValidationException

      Description copied from interface: `DimensionAspectInterface`
      Resolve one dimension in the appropriate dimension container.
      Specified by:
        `resolve` in interface `DimensionAspectInterface`
      Parameters:
        `el` - This is the concept definition for which the dimension is going to be resolved
        `fc` - the fc
        `xph` - the xph
        `dimName` - the dim name
      Throws:
        `XFValidationException` - the XF validation exception

    - #### getDimension

          public javax.xml.namespace.QName getDimension()

      Description copied from interface: `DimensionAspectInterface`
      Gets the dimension.
      Specified by:
        `getDimension` in interface `DimensionAspectInterface`
      Returns:
        the dimension

    - #### getLocation

          public XBRLFactsList getLocation(XBRLInstance instance,
                                  XPathHelper xph)

      Description copied from interface: `LocationAspectInterface`
      Returns the location for a new item or tuple .
      Specified by:
        `getLocation` in interface `LocationAspectInterface`
      Parameters:
        `instance` - the instance that is being constructed
        `xph` - the xph
      Returns:
        the location

    - #### getSource

          public javax.xml.namespace.QName getSource()

      Access to the source from other classes.
      Specified by:
        `getSource` in interface `EntityIdentifierAspectInterface`
      Returns:
        QName