com.ihr.xbrl.om.xdt

## Class XDTInfosetConsumer

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

-     public class XDTInfosetConsumer
      extends java.lang.Object

  Consumes information from the XBRL Infoset in order to build the XDT Infoset This class builds the XDT Infoset and provides access to it. The XDT Infoset can be analyzed using a list of primary items.
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XDTInfosetConsumer(XDTProcessor xdt)` Creates XDTInfoset objects for versioning This removes "CONSUMES" information from the XBRL Infoset The construction analyzes all primary items in the DTS building its "effective" combinations and provides access to them to applications using this object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Iterator<javax.xml.namespace.QName>` | `getAbstractPrimaryItems()` Returns an iterator over the QNames that represent primary items with dimensional information processed.
    `XDTDimensionalPrimaryItem` | `getPrimaryItem(javax.xml.namespace.QName key)` Returns an XDTDimensionalPrimaryItem object that is an encapsulation of a XDTPrimaryObject with the set of valid combinations for the segment and for the scenario.
    `java.util.Iterator<javax.xml.namespace.QName>` | `getPrimaryItems()` Returns an iterator over the QNames that represent primary items with dimensional information processed.
    `XDTProcessor` | `getXdt()` Gets the xdt.
    `static java.util.HashSet<XDTValidCombinationSet>` | `intersection(java.util.Collection<XDTValidCombinationSet> set1, java.util.Collection<XDTValidCombinationSet> set2)` Combine two sets of combinations "intersection" operator means that only common members between set1 and set2 are valid
    `static java.util.HashSet<XDTValidCombinationSet>` | `union(java.util.Collection<XDTValidCombinationSet> set1, java.util.Collection<XDTValidCombinationSet> set2)` Combine two sets of combinations "union" operator means that all members from set1 are valid and all members of set2 are valid but no duplicates can exist.

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

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

- - ### Constructor Detail

    - #### XDTInfosetConsumer

          public XDTInfosetConsumer(XDTProcessor xdt)

      Creates XDTInfoset objects for versioning This removes "CONSUMES" information from the XBRL Infoset The construction analyzes all primary items in the DTS building its "effective" combinations and provides access to them to applications using this object.
      Parameters:
        `xdt` - the xdt

  - ### Method Detail

    - #### getPrimaryItems

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

      Returns an iterator over the QNames that represent primary items with dimensional information processed. Only non abstract elements are returned by this iterator. Abstract elements are returned separately from non abstract elements.
      Returns:
        Iterator<QName> over all primary items in the DTS

    - #### getAbstractPrimaryItems

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

      Returns an iterator over the QNames that represent primary items with dimensional information processed. Only abstract elements are returned by this iterator. Abstract elements are returned separately from non abstract elements.
      Returns:
        Iterator<QName> over all primary items in the DTS

    - #### getPrimaryItem

          public XDTDimensionalPrimaryItem getPrimaryItem(javax.xml.namespace.QName key)

      Returns an XDTDimensionalPrimaryItem object that is an encapsulation of a XDTPrimaryObject with the set of valid combinations for the segment and for the scenario.

      The method first search on non abstract items. If not found, then it search on abstract items.

      If the concept definition does not have any dimension this function returns null;

      Parameters:
        `key` - the key
      Returns:
        XDTDimensionalPrimaryItem

    - #### union

          public static java.util.HashSet<XDTValidCombinationSet> union(java.util.Collection<XDTValidCombinationSet> set1,
                                                        java.util.Collection<XDTValidCombinationSet> set2)

      Combine two sets of combinations "union" operator means that all members from set1 are valid and all members of set2 are valid but no duplicates can exist.
      Parameters:
        `set1` - HashSet first cartesian product to combine
        `set2` - HashSet second cartesian product to combine with
      Returns:
        HashSet the result of the "union" operation

    - #### intersection

          public static java.util.HashSet<XDTValidCombinationSet> intersection(java.util.Collection<XDTValidCombinationSet> set1,
                                                               java.util.Collection<XDTValidCombinationSet> set2)

      Combine two sets of combinations "intersection" operator means that only common members between set1 and set2 are valid
      Parameters:
        `set1` - Collection cartesian product first operator
        `set2` - Collection cartesian product second operator
      Returns:
        the result of the "intersection" operation as a HashSet

    - #### getXdt

          public XDTProcessor getXdt()

      Gets the xdt.
      Returns:
        the xdt