com.ihr.xbrl.dts

## Class TypedDimensionsDomainController

- java.lang.Object
- - java.util.Dictionary<K,V>
  - - java.util.Hashtable<Dimension<?>,java.util.HashSet<XMLFragmentMember>>
    - - com.ihr.xbrl.dts.TypedDimensionsDomainController

- All Implemented Interfaces:
    InstanceExplorerListener, java.io.Serializable, java.lang.Cloneable, java.util.Map<Dimension<?>,java.util.HashSet<XMLFragmentMember>>

      public class TypedDimensionsDomainController
      extends java.util.Hashtable<Dimension<?>,java.util.HashSet<XMLFragmentMember>>
      implements InstanceExplorerListener

  This class is a container for domain members of typed dimensions classified by dimension. It can be used to store the values of typed dimensions found in an instance document or can also be used without an instance document for storing the information that the GUI can later use to let the user choose what the typed dimension value will be for a specific dimension.
  Author:
    Ignacio
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TypedDimensionsDomainController(DTSContainer dts)` Instantiates a new typed dimensions domain controller.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.HashSet<XMLFragmentMember>` | `get(java.lang.Object key)` Never returns null if key is an instance of Dimension
    `java.lang.String` | `get(javax.xml.namespace.QName dimensionName, XMLFragment dimensionValue)` Obtains the text representing a typed dimension value.
    `DTSContainer` | `getDTSContainer()` Gets the DTS container.
    `java.lang.String` | `getNameForFragment(XMLFragmentMember member)` Returns the text assigned to the member passed as a parameter.
    `static java.lang.String` | `getNameFromFragmentNodes(XMLFragmentMember member)` generates a string that represents the member based on the nodes received in the member parameter.
    `void` | `instanceEvent(InstanceExplorerEvent e)` Instance event.
    `void` | `setDTSContainer(DTSContainer dts)` Sets the DTS container.
    `void` | `setNameForValue(XMLFragmentMember member, java.lang.String name)` Stores a name for the member used as parameter
    `void` | `setValueForDimension(Dimension<?> key, XMLFragment value, java.lang.String name)` Stores a value for a typed dimension in the dimension domain container.

    - ### Methods inherited from class java.util.Hashtable

      `clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values`

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

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

- - ### Constructor Detail

    - #### TypedDimensionsDomainController

          public TypedDimensionsDomainController(DTSContainer dts)

      Instantiates a new typed dimensions domain controller.
      Parameters:
        `dts` - the dts

  - ### Method Detail

    - #### setDTSContainer

          public void setDTSContainer(DTSContainer dts)

      Sets the DTS container.
      Parameters:
        `dts` - the new DTS container

    - #### getDTSContainer

          public DTSContainer getDTSContainer()

      Gets the DTS container.
      Returns:
        the DTS container

    - #### get

          public java.util.HashSet<XMLFragmentMember> get(java.lang.Object key)

      Never returns null if key is an instance of Dimension. if no HashSet is stored a new one is created for the dimension
      Specified by:
        `get` in interface `java.util.Map<Dimension<?>,java.util.HashSet<XMLFragmentMember>>`
      Overrides:
        `get` in class `java.util.Hashtable<Dimension<?>,java.util.HashSet<XMLFragmentMember>>`
      Parameters:
        `key` - the key
      Returns:
        the hash set

    - #### setValueForDimension

          public void setValueForDimension(Dimension<?> key,
                                  XMLFragment value,
                                  java.lang.String name)

      Stores a value for a typed dimension in the dimension domain container.

      if name is null a name is created from the text in the nodes of the fragment value.

      Parameters:
        `key` - Dimension<?> dimension
        `value` - the XMLFragment
        `name` - the assigned name or null if a name will be assigned automatically

    - #### setNameForValue

          public void setNameForValue(XMLFragmentMember member,
                             java.lang.String name)

      Stores a name for the member used as parameter
      Parameters:
        `member` - the member for which the name will be stored
        `name` - the name to be stored or null, in this case a name will be created.

    - #### getNameForFragment

          public java.lang.String getNameForFragment(XMLFragmentMember member)

      Returns the text assigned to the member passed as a parameter.
      Parameters:
        `member` - instance of XMLFragmentMember
      Returns:
        the stored String or null if nothing is stored

    - #### getNameFromFragmentNodes

          public static java.lang.String getNameFromFragmentNodes(XMLFragmentMember member)

      generates a string that represents the member based on the nodes received in the member parameter.
      Parameters:
        `member` - XMLFragmentMember
      Returns:
        String

    - #### instanceEvent

          public void instanceEvent(InstanceExplorerEvent e)

      Description copied from interface: `InstanceExplorerListener`
      Instance event.
      Specified by:
        `instanceEvent` in interface `InstanceExplorerListener`
      Parameters:
        `e` - the e

    - #### get

          public java.lang.String get(javax.xml.namespace.QName dimensionName,
                             XMLFragment dimensionValue)

      Obtains the text representing a typed dimension value.
      Parameters:
        `dimensionName` - as a QName
        `dimensionValue` - as an XMLFragment
      Returns:
        the string