com.ihr.xbrl.om.table.layout

## Class CellHeader

- java.lang.Object
- - com.ihr.xbrl.om.table.layout.CellHeader

- Direct Known Subclasses:
    OpenCellHeader

      public class CellHeader
      extends java.lang.Object

  The Class CellHeader.
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CellHeader(Group group, XBRLStructuralNode nu, CellHeader parent, EffectiveBreakdown effectiveBreakdown, int openNodeValueIndex)` Instantiates a new cell header.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addChildren(CellHeader cellHeader)` Adds the children.
    `CellHeader` | `findAspect(Aspect<?> aspect, java.util.Hashtable<CellHeader,Aspect<?>> byAspectCell)` Find aspect.
    `java.util.Iterator<AspectAndDistanceToLeaf>` | `getAspects(java.lang.String tag)` Returns the consolidated aspects from this cell header and up to the first cell header.
    `java.util.Collection<CellHeader>` | `getChildren()` Gets the children.
    `int` | `getColNumber()` Access to the absolute column number after dealing with horizontal span and cells in the left of this cell.
    `Group` | `getGroup()` Gets the group.
    `int` | `getIndexNumber()` For open nodes, this is a relative number starting from 0 that indicates this column index relaive to the parent.
    `java.lang.String` | `getLabel()` Returns a proper label for the cell based on the cell type and the aspects linked with this cell along with the parameters set in the DTS such as preferred languages.
    `CellHeader` | `getParent()` Gets the parent.
    `int` | `getRowNumber()` Access to the absolute row number after dealing with vertical in previous cells.
    `int` | `getSpan()` Gets the span.
    `XBRLStructuralNode` | `getTableStructuralNode()` Gets the table structural node.
    `java.util.HashSet<java.lang.String>` | `getTagSelector()` Gets the tag selector.
    `boolean` | `hasRollUp()` this method returns true if this cell has a descendant roll up cell.
    `boolean` | `isLeaf()` Checks if is leaf.
    `boolean` | `isOpen()` Returns true when this cell header represents an open node.
    `boolean` | `isRollUp()` Checks if is roll up.
    `boolean` | `isRollUpPositionLeft()` Returns true if this cell has a roll up cell on the left.
    `boolean` | `isRollUpPositionRight()` Returns true if this cell has a roll up cell on the right.
    `boolean` | `isTitle()` A cell is title when it contains children in a group that is not the group of this cell.
    `int` | `setRowColumnNumber(int rowNumber, int columnNumber)` Sets the row column number.
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### CellHeader

          public CellHeader(Group group,
                    XBRLStructuralNode nu,
                    CellHeader parent,
                    EffectiveBreakdown effectiveBreakdown,
                    int openNodeValueIndex)

      Instantiates a new cell header.
      Parameters:
        `group` - the group this cell belongs to
        `nu` - the structural node this cell is derived from
        `parent` - the parent cell header up in the hierarchy
        `effectiveBreakdown` - the effective breakdown
        `openNodeValueIndex` - if the CellHeader comes from an open structural node, this is the index of the value to be used for this column

  - ### Method Detail

    - #### getRowNumber

          public int getRowNumber()

      Access to the absolute row number after dealing with vertical in previous cells. This might be a virtual cell in some cases.
      Returns:
        the rowNumber

    - #### getColNumber

          public int getColNumber()

      Access to the absolute column number after dealing with horizontal span and cells in the left of this cell.
      Returns:
        the colNumber

    - #### getIndexNumber

          public int getIndexNumber()

      For open nodes, this is a relative number starting from 0 that indicates this column index relaive to the parent. It is used to serve as an index in a matrix
      Returns:
        relative

    - #### getTableStructuralNode

          public XBRLStructuralNode getTableStructuralNode()

      Gets the table structural node.
      Returns:
        the Definition node Use

    - #### getParent

          public CellHeader getParent()

      Gets the parent.
      Returns:
        the parent

    - #### getGroup

          public Group getGroup()

      Gets the group.
      Returns:
        the group

    - #### isLeaf

          public boolean isLeaf()

      Checks if is leaf.
      Returns:
        true, if is leaf

    - #### addChildren

          public void addChildren(CellHeader cellHeader)

      Adds the children.
      Parameters:
        `cellHeader` - the cell header

    - #### getSpan

          public int getSpan()

      Gets the span.
      Returns:
        the span

    - #### getChildren

          public java.util.Collection<CellHeader> getChildren()

      Gets the children.
      Returns:
        the children

    - #### setRowColumnNumber

          public int setRowColumnNumber(int rowNumber,
                               int columnNumber)

      Sets the row column number.
      Parameters:
        `rowNumber` - the row number
        `columnNumber` - the column number
      Returns:
        the int

    - #### toString

          public java.lang.String toString()

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

    - #### getTagSelector

          public java.util.HashSet<java.lang.String> getTagSelector()

      Gets the tag selector.
      Returns:
        the tag selector

    - #### findAspect

          public CellHeader findAspect(Aspect<?> aspect,
                              java.util.Hashtable<CellHeader,Aspect<?>> byAspectCell)

      Find aspect.
      Parameters:
        `aspect` - the aspect
        `byAspectCell` - (optional) if not null, this hashtable will be set so the cell header can be used to locate the aspect later
      Returns:
        the cell header

    - #### getAspects

          public java.util.Iterator<AspectAndDistanceToLeaf> getAspects(java.lang.String tag)

      Returns the consolidated aspects from this cell header and up to the first cell header.
      Parameters:
        `tag` - the tag
      Returns:
        the aspects

    - #### isRollUp

          public boolean isRollUp()

      Checks if is roll up.
      Returns:
        true, if is roll up

    - #### getLabel

          public java.lang.String getLabel()

      Returns a proper label for the cell based on the cell type and the aspects linked with this cell along with the parameters set in the DTS such as preferred languages.
      Returns:
        the label

    - #### isTitle

          public boolean isTitle()

      A cell is title when it contains children in a group that is not the group of this cell.
      Returns:
        true, if is title

    - #### isOpen

          public boolean isOpen()

      Returns true when this cell header represents an open node.
      Returns:
        true, if is open

    - #### hasRollUp

          public boolean hasRollUp()

      this method returns true if this cell has a descendant roll up cell.
      Returns:
        true, if successful

    - #### isRollUpPositionLeft

          public boolean isRollUpPositionLeft()

      Returns true if this cell has a roll up cell on the left.
      Returns:
        true, if is roll up position left

    - #### isRollUpPositionRight

          public boolean isRollUpPositionRight()

      Returns true if this cell has a roll up cell on the right.
      Returns:
        true, if is roll up position right