com.ihr.xbrl.dts

## Interface Dimension<T>

- Type Parameters:
    `T` - the generic type
  All Superinterfaces:
    java.lang.Comparable<Dimension<?>>
  All Known Implementing Classes:
    DDimension, DpDimension, EDimension, IdentifierDimension, PDimension, PeriodDimension, PeriodDimensionDuration, PeriodDimensionInstant, TDimension, UndefDimension, VirtualDimension, XDimension

      public interface Dimension<T>
      extends java.lang.Comparable<Dimension<?>>

  This is a representation of something that is a dimension in an instance document or DTS.

  Dimensions are, for example, the Time dimension, the Units dimension, the Entity dimension and every other XDT defined dimension that exist in the DTS

  Author:
    Ignacio

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `Dimension.DimensionType` The Enum DimensionType.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static javax.xml.namespace.QName` | `defaultDimensionsXBRL` The Constant defaultDimensionsXBRL.
    `static javax.xml.namespace.QName` | `duplicatesDimension` The Constant duplicatesDimension.
    `static javax.xml.namespace.QName` | `entityDimension` The Constant entityDimension.
    `static javax.xml.namespace.QName` | `formLineDimenion` The Constant formLineDimenion.
    `static javax.xml.namespace.QName` | `instantModeDimension` The Constant instantModeDimension.
    `static javax.xml.namespace.QName` | `instantOnDurationDimension` The Constant instantOnDurationDimension.
    `static javax.xml.namespace.QName` | `periodDimensionDuration` The Constant periodDimensionDuration.
    `static javax.xml.namespace.QName` | `periodDimensionInstant` The Constant periodDimensionInstant.
    `static int` | `POSITION_AVAIL` Suggested position for new dimensions is POSITION_AVAIL when the new dimension goes in the table of available dimensions.
    `static int` | `POSITION_COLUMN_HEADERS` Suggested position for new dimensions is POSITION_COLUMN_HEADERS when the new dimension goes in the header of columns.
    `static int` | `POSITION_ROW_HEADERS` Suggested position for new dimensions is POSITION_ROW_HEADERS when the new dimension goes in the header of rows.
    `static int` | `POSITION_UNKOWN` This constant is used to indicate that the position is not given so other options shall be used.
    `static java.lang.String` | `RSDimensionsNameNamespace` The Constant RSDimensionsNameNamespace.
    `static java.lang.String` | `RSDimensionsNameNamespacePrefix` The Constant RSDimensionsNameNamespacePrefix.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addMember(Member<?> member)` Adds a new dimension member to the end of the members of this dimension.
    `boolean` | `bHasFixedName()` This function returns true if the dimension has a fixed name that must be obtained via a call to `getDimensionName()`.
    `boolean` | `delMember(Member<?> member)` Removes an existing dimension member from the dimension domain.
    `boolean` | `equals(java.lang.Object other)` Equals.
    `boolean` | `factMatches(XDTFactWithVirtualDimensions item, Member<?> mem, java.util.HashSet<javax.xml.namespace.QName> dimsToMatchOnThisRound, java.lang.Object contextualExtraInformation)` Fact matches.
    `Member<?>` | `findMember(Member<?> mem)` Search the Dimension domain for an occurrence of the mem member.
    `Member<?>` | `getDefault()` for explicit dimensions this function returns the default member if any is defined.
    `java.lang.String` | `getDimensionName()` This function will be used to obtain a dimension name for things that does not have a label like the Period dimension or the Identifier dimension.
    `java.util.Collection<Member<?>>` | `getDomain()` Returns an ordered collection of members.
    `Member<?>` | `getMemberFromString(java.lang.String value)` Returns the domain member whose test representation matches the string value or null.
    `java.util.Collection<Member<?>>` | `getMembers()` Returns an ordered collection of members.
    `javax.xml.namespace.QName` | `getName()` Every Dimension must have a dimension QName.
    `int` | `getSuggestedInitialPosition(javax.xml.namespace.QName selectedPrimaryItem)` Returns the suggested initial placement position of the graphical element in the GUI.
    `Dimension.DimensionType` | `getType()` returns either com.ihr.xbrl.om.xdt.XDTDimension.TYPED, com.ihr.xbrl.om.xdt.XDTDimension.EXPLICIT depending on the type of the surrounding dimension.
    `int` | `hashCode()` Hash code.
    `boolean` | `isPrimary()` Returns true if the dimension is linked with a primary item and thus it is a PDimension or a DDimension.
    `boolean` | `isTree()` Returns true if the representation of this dimension could be a tree of elements or false if it is a list of items.
    `void` | `setAllowDuplicates(boolean allowDuplicates)` If the value is true then it is possible for the dimension to contain two identical members as two different member values.

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Field Detail

    - #### RSDimensionsNameNamespace

          static final java.lang.String RSDimensionsNameNamespace

      The Constant RSDimensionsNameNamespace.
      See Also:
        Constant Field Values

    - #### RSDimensionsNameNamespacePrefix

          static final java.lang.String RSDimensionsNameNamespacePrefix

      The Constant RSDimensionsNameNamespacePrefix.
      See Also:
        Constant Field Values

    - #### entityDimension

          static final javax.xml.namespace.QName entityDimension

      The Constant entityDimension.

    - #### periodDimensionInstant

          static final javax.xml.namespace.QName periodDimensionInstant

      The Constant periodDimensionInstant.

    - #### periodDimensionDuration

          static final javax.xml.namespace.QName periodDimensionDuration

      The Constant periodDimensionDuration.

    - #### defaultDimensionsXBRL

          static final javax.xml.namespace.QName defaultDimensionsXBRL

      The Constant defaultDimensionsXBRL.

    - #### duplicatesDimension

          static final javax.xml.namespace.QName duplicatesDimension

      The Constant duplicatesDimension.

    - #### instantModeDimension

          static final javax.xml.namespace.QName instantModeDimension

      The Constant instantModeDimension.

    - #### formLineDimenion

          static final javax.xml.namespace.QName formLineDimenion

      The Constant formLineDimenion.

    - #### instantOnDurationDimension

          static final javax.xml.namespace.QName instantOnDurationDimension

      The Constant instantOnDurationDimension.

    - #### POSITION_UNKOWN

          static final int POSITION_UNKOWN

      This constant is used to indicate that the position is not given so other options shall be used. Now that there is a RenderHintsProcessor that reads render hints from a linkbase. this value is returned by that processor to indicate there is no information available.
      See Also:
        Constant Field Values

    - #### POSITION_AVAIL

          static final int POSITION_AVAIL

      Suggested position for new dimensions is POSITION_AVAIL when the new dimension goes in the table of available dimensions. This is also named the Z axis
      See Also:
        Constant Field Values

    - #### POSITION_COLUMN_HEADERS

          static final int POSITION_COLUMN_HEADERS

      Suggested position for new dimensions is POSITION_COLUMN_HEADERS when the new dimension goes in the header of columns. This is also named the X axis
      See Also:
        Constant Field Values

    - #### POSITION_ROW_HEADERS

          static final int POSITION_ROW_HEADERS

      Suggested position for new dimensions is POSITION_ROW_HEADERS when the new dimension goes in the header of rows. This is also named the Y axis
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getName

          javax.xml.namespace.QName getName()

      Every Dimension must have a dimension QName.
      Returns:
        QName

    - #### setAllowDuplicates

          void setAllowDuplicates(boolean allowDuplicates)

      If the value is true then it is possible for the dimension to contain two identical members as two different member values. If the value is false, a call to a method addMember will always check the existence of the member before the member is added to the dimension
      Parameters:
        `allowDuplicates` - the new allow duplicates

    - #### addMember

          boolean addMember(Member<?> member)

      Adds a new dimension member to the end of the members of this dimension. returns true if the member is new, false if the member already exist
      Parameters:
        `member` - the member
      Returns:
        true, if successful

    - #### delMember

          boolean delMember(Member<?> member)

      Removes an existing dimension member from the dimension domain.
      Parameters:
        `member` - the member to remove
      Returns:
        true, if successful

    - #### bHasFixedName

          boolean bHasFixedName()

      This function returns true if the dimension has a fixed name that must be obtained via a call to `getDimensionName()`.
      Returns:
        boolean

    - #### getDimensionName

          java.lang.String getDimensionName()

      This function will be used to obtain a dimension name for things that does not have a label like the Period dimension or the Identifier dimension.
      Returns:
        String

    - #### getSuggestedInitialPosition

          int getSuggestedInitialPosition(javax.xml.namespace.QName selectedPrimaryItem)

      Returns the suggested initial placement position of the graphical element in the GUI. This value is a constant defined in this interface
      Parameters:
        `selectedPrimaryItem` - this is the selected primary item in the GUI
      Returns:
        integer constant defined in this interface

    - #### getMembers

          java.util.Collection<Member<?>> getMembers()

      Returns an ordered collection of members. If the members are hierarchically organized then the ordering includes parents first, when a parent has children, then the list of children from the first one to the last one then the parent continues.
      Returns:
        Collection of members

    - #### getDomain

          java.util.Collection<Member<?>> getDomain()

      Returns an ordered collection of members. If the members are hierarchically organized then the ordering includes only the parent elements.
      Returns:
        Collection of members

    - #### isTree

          boolean isTree()

      Returns true if the representation of this dimension could be a tree of elements or false if it is a list of items.
      Returns:
        boolean value (never calculated)

    - #### isPrimary

          boolean isPrimary()

      Returns true if the dimension is linked with a primary item and thus it is a PDimension or a DDimension.
      Returns:
        boolean value

    - #### findMember

          Member<?> findMember(Member<?> mem)

      Search the Dimension domain for an occurrence of the mem member. If found. the found member is returned. otherwise null is returned
      Parameters:
        `mem` - the member to search on this dimension domain
      Returns:
        the member found or null

    - #### factMatches

          boolean factMatches(XDTFactWithVirtualDimensions item,
                            Member<?> mem,
                            java.util.HashSet<javax.xml.namespace.QName> dimsToMatchOnThisRound,
                            java.lang.Object contextualExtraInformation)

      Fact matches.
      Parameters:
        `item` - the item
        `mem` - the mem
        `dimsToMatchOnThisRound` - the dims to match on this round
        `contextualExtraInformation` - the contextual extra information
      Returns:
        true, if successful

    - #### getDefault

          Member<?> getDefault()

      for explicit dimensions this function returns the default member if any is defined.
      Returns:
        the default

    - #### getType

          Dimension.DimensionType getType()

      returns either com.ihr.xbrl.om.xdt.XDTDimension.TYPED, com.ihr.xbrl.om.xdt.XDTDimension.EXPLICIT depending on the type of the surrounding dimension. Also returns -1 if the dimension is the primary item or a pre defined dimension in XBRL as the time dimension or the company dimension
      Returns:
        integer constant defined in com.ihr.xbrl.om.xdt.XDTDimension class

    - #### hashCode

          int hashCode()

      Hash code.
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        the int

    - #### equals

          boolean equals(java.lang.Object other)

      Equals.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `other` - the other
      Returns:
        true, if successful

    - #### getMemberFromString

          Member<?> getMemberFromString(java.lang.String value)

      Returns the domain member whose test representation matches the string value or null.
      Parameters:
        `value` - the value
      Returns:
        the member from string