com.ihr.xbrl.om.table.structural

## Class XBRLStructuralBreakdown

- java.lang.Object
- - com.ihr.xbrl.om.table.structural.XBRLStructuralBreakdown

- All Implemented Interfaces:
    StructuralNodeInterface

      public class XBRLStructuralBreakdown
      extends java.lang.Object
      implements StructuralNodeInterface

  There is just one structural breakdown for each axis in a structural table model implementation on this API. so, this instance is considered the "root" node for every axis. The XBRLStructuralBreakdown contains an ordered list of TableStructualNode instances that, in turn, contains additional children in a tree structure. The spec says: "A breakdown is modelled as an ordered tree of structural nodes. Each of these nodes contributes zero or more constraints to the breakdown." The spec says: "A closed definition node which does not contribute common properties to its children MUST contribute at least one structural node to the table."
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLStructuralBreakdown(Axis axis, XBRLStructuralTable xbrlTable)` Creates a structural model table for the indicated axis and table in the definition model.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Axis` | `getAxis()` Access to the axis this XBRLStructuralNode was created for.
    `XBRLBreakdown` | `getBreakdown(int idx)` Access to one breakdown for the given index
    `java.util.Iterator<XBRLBreakdown>` | `getBreakdowns()` Access to an iterator over all breakdowns on this Structural Breakdown.
    `int` | `getNBreakdowns()` Access to the number of breakdowns on this axis.
    `XBRLStructuralNode` | `getNodeAt(int index)` Access a specific TableStructuralNode by index.
    `int` | `getNodeCount()` Number of children nodes.
    `int` | `getNodeCount(XBRLBreakdown bd)` Returns the number of nodes on this structural breakdown that belongs to the particular XBRLBreakdown passed in as a parameter.
    `java.util.Iterator<XBRLStructuralNode>` | `getNodes()` Allows to iterate all nodes in the right representation order.
    `java.util.Iterator<XBRLStructuralNode>` | `getNodes(XBRLBreakdown bd)` Returns an iterator over TableStructuralNode that belongs to the particular XBRLBreakdown passed in as a parameter.
    `XBRLStructuralNode` | `getParent()` Access to the parent node of this StructuralNodeInterface.
    `XBRLStructuralTable` | `getTable()` Access to the XBRLTable resource that is the origin on this XBRLStructuralBreakdown.
    `boolean` | `isLeaf()` last node in a tree is leaf node.

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

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

- - ### Constructor Detail

    - #### XBRLStructuralBreakdown

          public XBRLStructuralBreakdown(Axis axis,
                                 XBRLStructuralTable xbrlTable)
                                  throws XTValidationException

      Creates a structural model table for the indicated axis and table in the definition model. This constructor is used from the API
      Parameters:
        `axis` - the axis to process from the table
        `xbrlTable` - the xbrl table
      Throws:
        `XTValidationException` - the XT validation exception

  - ### Method Detail

    - #### getBreakdowns

          public java.util.Iterator<XBRLBreakdown> getBreakdowns()

      Access to an iterator over all breakdowns on this Structural Breakdown. There may be more than one for the same axis. Cartesian product is calculated in the layout model.
      Returns:
        Iterator over XBRLBreakdown on this axis

    - #### getNBreakdowns

          public int getNBreakdowns()

      Access to the number of breakdowns on this axis.
      Returns:
        the number of breakdowns for this axis on this structural breakdown

    - #### getBreakdown

          public XBRLBreakdown getBreakdown(int idx)

      Access to one breakdown for the given index
      Parameters:
        `idx` - the breakdown index starting from 0
      Returns:
        a XBRLBreakdown instance

    - #### getAxis

          public Axis getAxis()

      Access to the axis this XBRLStructuralNode was created for.
      Returns:
        the axis

    - #### getTable

          public XBRLStructuralTable getTable()

      Access to the XBRLTable resource that is the origin on this XBRLStructuralBreakdown.
      Returns:
        the table

    - #### getNodes

          public java.util.Iterator<XBRLStructuralNode> getNodes()

      Description copied from interface: `StructuralNodeInterface`
      Allows to iterate all nodes in the right representation order.
      Specified by:
        `getNodes` in interface `StructuralNodeInterface`
      Returns:
        an iterator over all TableStructuralNode at this level

    - #### getNodes

          public java.util.Iterator<XBRLStructuralNode> getNodes(XBRLBreakdown bd)

      Returns an iterator over TableStructuralNode that belongs to the particular XBRLBreakdown passed in as a parameter.
      Parameters:
        `bd` - The breakdown to extract TableStructuralNode(s) from
      Returns:
        Iterator or empty iterator

    - #### getNodeCount

          public int getNodeCount(XBRLBreakdown bd)

      Returns the number of nodes on this structural breakdown that belongs to the particular XBRLBreakdown passed in as a parameter. This method is used to properly compute effective breakdown projection the important point is when a breakdown has no nodes because that eliminates existing nodes in other breakdowns in the same axis
      Parameters:
        `bd` - the bd
      Returns:
        the node count

    - #### getNodeAt

          public XBRLStructuralNode getNodeAt(int index)

      Description copied from interface: `StructuralNodeInterface`
      Access a specific TableStructuralNode by index.
      Specified by:
        `getNodeAt` in interface `StructuralNodeInterface`
      Parameters:
        `index` - integer
      Returns:
        TableStructuralNode

    - #### isLeaf

          public boolean isLeaf()

      Description copied from interface: `StructuralNodeInterface`
      last node in a tree is leaf node.
      Specified by:
        `isLeaf` in interface `StructuralNodeInterface`
      Returns:
        true if this is the leaf node

    - #### getNodeCount

          public int getNodeCount()

      Description copied from interface: `StructuralNodeInterface`
      Number of children nodes.
      Specified by:
        `getNodeCount` in interface `StructuralNodeInterface`
      Returns:
        integer

    - #### getParent

          public XBRLStructuralNode getParent()

      Description copied from interface: `StructuralNodeInterface`
      Access to the parent node of this StructuralNodeInterface. If this node is the root the parent is null
      Specified by:
        `getParent` in interface `StructuralNodeInterface`
      Returns:
        TableStructuralNode parent node or null