com.ihr.xbrl.om.xdt

## Class XDTDimensionalPrimaryItem

- java.lang.Object
- - com.ihr.xbrl.om.xdt.XDTDimensionalPrimaryItem

- Direct Known Subclasses:
    XDTDimensionalPrimaryItemForGUIs

      public class XDTDimensionalPrimaryItem
      extends java.lang.Object

  This is the infoset object that encapsulates a concept declaration in its dimensional space.

  This dimensional representation process all item declarations extracting all hypercubes and resolving the valid combinations

  Valid combinations are stored depending on the container type

  Note: This object is NOT USED during the XDT validation. It is used only in the analysis of the XBRL Dimensional Infoset

  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XDTDimensionalPrimaryItem(XDTPrimaryItem pri)` Primary item for which scenario combinations and segment combinations will be calculated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Collection<XDTDimensionUse>` | `getDimensions(XBRLRoleType role)` Access to all dimensions declared in hypercubes related with this primary item in a particular role.
    `XDTPrimaryItem` | `getPrimaryItem()` Obtains the primary item this XDTDimensionalPrimaryItem is based on.
    `java.util.Collection<XBRLRoleType>` | `getRolesForDimensions()` Access to the XBRLRoleTypes this primary item has dimensions.
    `java.util.Collection<XDTValidCombinationSet>` | `getScenarioCombinations()` Gets the scenario combinations.
    `java.util.Collection<XDTValidCombinationSet>` | `getSegmentCombinations()` Gets the segment combinations.
    `boolean` | `isRequiredDimension(javax.xml.namespace.QName dim, int container)` Returns true if the dimension dim exist in all combinations and all combination sets are closed.
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### XDTDimensionalPrimaryItem

          public XDTDimensionalPrimaryItem(XDTPrimaryItem pri)

      Primary item for which scenario combinations and segment combinations will be calculated.
      Parameters:
        `pri` - XDTPrimaryItem

  - ### Method Detail

    - #### isRequiredDimension

          public boolean isRequiredDimension(javax.xml.namespace.QName dim,
                                    int container)

      Returns true if the dimension dim exist in all combinations and all combination sets are closed.

      This method is used by GUIs to determine if a dimension is optional or required for a primary item. If the dimension is optional, there is no "pagination" over values of this dimension. But there may be "filtering" over the values of the dimension.

      Also, when a dimension is optional, a dimension value called "Not Reported" may appear in GUIs when the selected combination does not contains the dimension dim.

      Parameters:
        `dim` - the dimension for which required is calculated
        `container` - integer indicating the dimension container, either XDTHypercubeUse.SEGMENT or XDTHypercubeUse.SCENARIO
      Returns:
        boolean value
      Since:
        2.6.11

    - #### getPrimaryItem

          public XDTPrimaryItem getPrimaryItem()

      Obtains the primary item this XDTDimensionalPrimaryItem is based on.
      Returns:
        XDTPrimaryItem

    - #### toString

          public java.lang.String toString()

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

    - #### getScenarioCombinations

          public java.util.Collection<XDTValidCombinationSet> getScenarioCombinations()

      Gets the scenario combinations.
      Returns:
        the scenarioCombinations

    - #### getSegmentCombinations

          public java.util.Collection<XDTValidCombinationSet> getSegmentCombinations()

      Gets the segment combinations.
      Returns:
        the segmentCombinations

    - #### getRolesForDimensions

          public java.util.Collection<XBRLRoleType> getRolesForDimensions()

      Access to the XBRLRoleTypes this primary item has dimensions.
      Returns:
        the roles for dimensions

    - #### getDimensions

          public java.util.Collection<XDTDimensionUse> getDimensions(XBRLRoleType role)

      Access to all dimensions declared in hypercubes related with this primary item in a particular role.
      Parameters:
        `role` - the role
      Returns:
        the dimensions