com.ihr.xbrl.om.table.structural

## Class TableStructuralNode

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

- All Implemented Interfaces:
    StructuralNodeInterface

      public class TableStructuralNode
      extends java.lang.Object
      implements StructuralNodeInterface

  This is the implementation class for the StructuralNodeInterface interface. Every element in a table header is represented with an instance of this class
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TableStructuralNode(XBRLDefinitionNodeUse base, TableStructuralNode parent)` Creates an instance of a TableStructuralNode and collects all aspects indicated in the definition node indicated in the base parameter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addChild(TableStructuralNode child)` Append a new children to this tree node.
    `java.util.Iterator<Aspect>` | `getAspects()` Allows to iterate all aspects on this node.
    `int` | `getAspectsCount()` Access to the number of aspects at this level.
    `XBRLDefinitionNodeUse` | `getBase()` Access to the XBRLDefinitionNodeUse element that is the source of this TableStructuralNode.
    `TableStructuralNode` | `getNodeAt(int index)` Access a specific TableStructuralNode by index.
    `int` | `getNodeCount()` Number of children nodes.
    `java.util.Iterator<TableStructuralNode>` | `getNodes()` Allows to iterate all nodes in the right representation order.
    `TableStructuralNode` | `getParent()` Access to the parent node of this StructuralNodeInterface.
    `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

    - #### TableStructuralNode

          public TableStructuralNode(XBRLDefinitionNodeUse base,
                             TableStructuralNode parent)

      Creates an instance of a TableStructuralNode and collects all aspects indicated in the definition node indicated in the base parameter.
      Parameters:
        `base` - the XBRLDefinitionNodeUse that is the source of this TableStructuralNode
        `parent` - the parent TableStructuralNode to allow navigation up on the tree. This is null for root nodes

  - ### Method Detail

    - #### getAspects

          public java.util.Iterator<Aspect> getAspects()

      Allows to iterate all aspects on this node. If no aspects are defined this returns an empty iterator
      Returns:
        Iterator on all aspects

    - #### getParent

          public TableStructuralNode 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

    - #### getAspectsCount

          public int getAspectsCount()

      Access to the number of aspects at this level.
      Returns:
        integer value

    - #### getBase

          public XBRLDefinitionNodeUse getBase()

      Access to the XBRLDefinitionNodeUse element that is the source of this TableStructuralNode.
      Returns:
        XBRLDefinitionNodeUse base XBRL Resource

    - #### addChild

          public boolean addChild(TableStructuralNode child)

      Append a new children to this tree node.
      Parameters:
        `child` - node to add at the end of the collection
      Returns:
        boolean if the node was added

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

    - #### getNodes

          public java.util.Iterator<TableStructuralNode> 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

    - #### getNodeAt

          public TableStructuralNode 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

    - #### getNodeCount

          public int getNodeCount()

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