com.ihr.xbrl.om.xdt

## Class XDTDimensionUse

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

-     public class XDTDimensionUse
      extends java.lang.Object

  The Class XDTDimensionUse.
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XDTDimensionUse(XDTProcessor processor, XDTDimension dimension, DTSBase base, DefinitionLinkbase tempDefLb, int arcroleType, int contextElement)` Instantiates a new XDT dimension use.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `int` | `getArcroleType()` Returns XDTHypercubeUse.ALL or XDTHypercubeUse.NOTALL depending on this dimension use is in a positive or negative Hypercube
    `int` | `getContextElement()` Returns XDTHypercubeUse.SEGMENT or XDTHypercubeUse.SCENARIO depending on where the hypercube declares this dimension shall be used on
    `XDTDimension` | `getDimension()` Access to the dimension definition on this dimension use.
    `java.util.Iterator<javax.xml.namespace.QName>` | `getDomain()` Returns an iterator over the entire domain, some members may not be usable use the function isUsable to check each member's usability.
    `javax.xml.namespace.QName` | `getExplicitMemberValue(XBRLDimensionsContainer container)` Helper method, not used inside the XDT validation engine but available for applications using the XDT model returns the value (QName) from the context container or from the default value of the dimension.
    `javax.xml.namespace.QName` | `getExplicitMemberValue(XBRLFactItem fact, int container)` Helper method, not used inside the XDT validation engine but available for applications using the XDT model returns the value (QName) from the context or from the default value of the dimension.
    `java.lang.String` | `getName()` Returns a text representation of the QName for this dimension including the prefix and local name.
    `int` | `getNumberOfMembers()` Returns the number of members in the domain (usable and not usable).
    `java.util.Collection<XDTDomainMemberUse>` | `getUsesOfDomainMembers()` Access to the dimension domain using the object model of the XDT representation.
    `int` | `hashCode()`
    `boolean` | `isUsable(javax.xml.namespace.QName member)` Returns true if the member belongs to the domain and is usable.
    `boolean` | `validate(XMLFragment info, java.lang.StringBuffer dimensionValidation, XDTValidationDimension valDimension, java.lang.String contextId)` This method validates the content of a dimension against the domain of members for the dimension.

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

      `getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XDTDimensionUse

          public XDTDimensionUse(XDTProcessor processor,
                         XDTDimension dimension,
                         DTSBase base,
                         DefinitionLinkbase tempDefLb,
                         int arcroleType,
                         int contextElement)

      Instantiates a new XDT dimension use.
      Parameters:
        `processor` - the processor
        `dimension` - the dimension
        `base` - the base
        `tempDefLb` - the temp def lb
        `arcroleType` - the arcrole type
        `contextElement` - the context element

  - ### Method Detail

    - #### getUsesOfDomainMembers

          public java.util.Collection<XDTDomainMemberUse> getUsesOfDomainMembers()

      Access to the dimension domain using the object model of the XDT representation. This is the uses of the objects independent of the syntax in the taxonomy.

      The returned collection is ordered according to the order attribute of the relationships in the taxonomy

      Returns:
        Collection of XDTDomainMemberUse objects that represents the use of Domain Members of a dimension

    - #### validate

          public boolean validate(XMLFragment info,
                         java.lang.StringBuffer dimensionValidation,
                         XDTValidationDimension valDimension,
                         java.lang.String contextId)

      This method validates the content of a dimension against the domain of members for the dimension.
      Parameters:
        `info` - the nodeInfo of the explicit dimension usage in the context of the fact or null if the default value will be used
        `dimensionValidation` - the dimension validation
        `valDimension` - Keeps track of the validation history for this dimension
        `contextId` - the context id
      Returns:
        boolean indicating if the dimension is satisfied or throws XDTRuntimeException if there is an XDT error

    - #### getExplicitMemberValue

          public javax.xml.namespace.QName getExplicitMemberValue(XBRLFactItem fact,
                                                         int container)

      Helper method, not used inside the XDT validation engine but available for applications using the XDT model returns the value (QName) from the context or from the default value of the dimension.
      Parameters:
        `fact` - the XBRLFactItem
        `container` - either XDTHypercubeUse.SEGMENT or XDTHypercubeUse.SCENARIO
      Returns:
        QName the value or null if no value exist

    - #### getExplicitMemberValue

          public javax.xml.namespace.QName getExplicitMemberValue(XBRLDimensionsContainer container)

      Helper method, not used inside the XDT validation engine but available for applications using the XDT model returns the value (QName) from the context container or from the default value of the dimension.
      Parameters:
        `container` - XBRLDimensionsContaienr object
      Returns:
        QName the value or null if no value exist

    - #### getDimension

          public XDTDimension getDimension()

      Access to the dimension definition on this dimension use.
      Returns:
        XDTDimension instance associated with this XDTDimensionUse

    - #### getArcroleType

          public int getArcroleType()

      Returns XDTHypercubeUse.ALL or XDTHypercubeUse.NOTALL depending on this dimension use is in a positive or negative Hypercube
      Returns:
        integer constant defined in XDTHypercubeUse

    - #### getContextElement

          public int getContextElement()

      Returns XDTHypercubeUse.SEGMENT or XDTHypercubeUse.SCENARIO depending on where the hypercube declares this dimension shall be used on
      Returns:
        the context element

    - #### getName

          public java.lang.String getName()

      Returns a text representation of the QName for this dimension including the prefix and local name. If the prefix is not defined the localName will be returned
      Returns:
        String representation of the QName

    - #### getDomain

          public java.util.Iterator<javax.xml.namespace.QName> getDomain()

      Returns an iterator over the entire domain, some members may not be usable use the function isUsable to check each member's usability.
      Returns:
        Iterator

    - #### getNumberOfMembers

          public int getNumberOfMembers()

      Returns the number of members in the domain (usable and not usable).
      Returns:
        the number of members

    - #### isUsable

          public boolean isUsable(javax.xml.namespace.QName member)

      Returns true if the member belongs to the domain and is usable.
      Parameters:
        `member` - the member
      Returns:
        boolean

    - #### hashCode

          public int hashCode()

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

    - #### equals

          public boolean equals(java.lang.Object obj)

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