com.ihr.xbrl.om.table.definition

## Class PeriodAspectRule

- java.lang.Object
- - com.ihr.xbrl.om.table.definition.PeriodAspectRule

- All Implemented Interfaces:
    PeriodAspectInterface, Aspect<XBRLPeriod>

      public class PeriodAspectRule
      extends java.lang.Object
      implements PeriodAspectInterface

  The Class PeriodAspectRule.
  Author:
    Ignacio

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static javax.xml.namespace.QName` | `duration` The Constant duration.
    `static javax.xml.namespace.QName` | `end` The Constant end.
    `static javax.xml.namespace.QName` | `forever` The Constant forever.
    `static javax.xml.namespace.QName` | `instant` The Constant instant.
    `static javax.xml.namespace.QName` | `resourceName` The Constant resourceName.
    `static javax.xml.namespace.QName` | `start` The Constant start.
    `static javax.xml.namespace.QName` | `value` The Constant value.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PeriodAspectRule(XBRLRuleNode ruleNode, net.sf.saxon.s9api.XdmNode aspectNode)` Instantiates a new period aspect rule.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getAspectClashIdentity()` Returns an object that can be used to evaluate aspect clash.
    `int` | `getAspectType()` Returns a value from the CommonAspectRule class that identifies the aspect type.
    `XBRLPeriod` | `getMember(XBRLStructuralTable table, CellHeader[] header)` Convert this aspect into a proper Member
    `XBRLPeriod` | `getPeriod(XBRLStructuralTable xbrlTable)` Gets the period.
    `XBRLItem.PeriodType` | `getPeriodType(XBRLItem item)` Returns a constant identifying either XBRLItem.DURATION or XBRLItem.INSTANT
    `void` | `resetNode()` Reset node.
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### resourceName

          public static final javax.xml.namespace.QName resourceName

      The Constant resourceName.

    - #### forever

          public static final javax.xml.namespace.QName forever

      The Constant forever.

    - #### instant

          public static final javax.xml.namespace.QName instant

      The Constant instant.

    - #### duration

          public static final javax.xml.namespace.QName duration

      The Constant duration.

    - #### value

          public static final javax.xml.namespace.QName value

      The Constant value.

    - #### start

          public static final javax.xml.namespace.QName start

      The Constant start.

    - #### end

          public static final javax.xml.namespace.QName end

      The Constant end.

  - ### Constructor Detail

    - #### PeriodAspectRule

          public PeriodAspectRule(XBRLRuleNode ruleNode,
                          net.sf.saxon.s9api.XdmNode aspectNode)
                           throws XTValidationException

      Instantiates a new period aspect rule.
      Parameters:
        `ruleNode` - the rule node
        `aspectNode` - the aspect node
      Throws:
        `XTValidationException` - the XT validation exception

  - ### Method Detail

    - #### 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

    - #### getPeriod

          public XBRLPeriod getPeriod(XBRLStructuralTable xbrlTable)

      Description copied from interface: `PeriodAspectInterface`
      Gets the period.
      Specified by:
        `getPeriod` in interface `PeriodAspectInterface`
      Parameters:
        `xbrlTable` - the xbrl table
      Returns:
        the period

    - #### getAspectClashIdentity

          public java.lang.Object getAspectClashIdentity()

      Description copied from interface: `Aspect`
      Returns an object that can be used to evaluate aspect clash.
      Specified by:
        `getAspectClashIdentity` in interface `Aspect<XBRLPeriod>`
      Returns:
        the aspect clash identity

    - #### getAspectType

          public int getAspectType()

      Description copied from interface: `Aspect`
      Returns a value from the CommonAspectRule class that identifies the aspect type.
      Specified by:
        `getAspectType` in interface `Aspect<XBRLPeriod>`
      Returns:
        the aspect type

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getMember

          public XBRLPeriod getMember(XBRLStructuralTable table,
                             CellHeader[] header)
                               throws XTValidationException

      Description copied from interface: `Aspect`
      Convert this aspect into a proper Member depending on the aspect type. Member can be used later to search for facts that satisfy the set of members
      Specified by:
        `getMember` in interface `Aspect<XBRLPeriod>`
      Parameters:
        `table` - the table
        `header` - the header
      Returns:
        the member
      Throws:
        `XTValidationException` - the XT validation exception

    - #### resetNode

          public void resetNode()

      Description copied from interface: `PeriodAspectInterface`
      Reset node.
      Specified by:
        `resetNode` in interface `PeriodAspectInterface`