com.ihr.xbrl.om.table.layout

## Class FactsListClassifier

- java.lang.Object
- - com.ihr.xbrl.om.table.layout.FactsListClassifier

-     public class FactsListClassifier
      extends java.lang.Object

  This class will maintain a set of facts indexed by the distinct values of the facts aspects. The idea is to use this class to rapidly find a fact from a set of aspects or a set of facts that satisfies some aspects.
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FactsListClassifier(XBRLFactsList input)` Instantiates a new facts list classifier.
    `FactsListClassifier(XBRLFactsList input, int aspectsFocus)` Instantiates a new facts list classifier.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFact(XBRLFact fact)` Adds the fact.
    `void` | `addFact(XBRLFact fact, int aspectsFocus)` Adds the fact.
    `void` | `clear()` Clear.
    `void` | `delFact(XBRLFact fact)` Del fact.
    `java.util.Set<?>` | `getAspectDistinctValues(int aspect, javax.xml.namespace.QName dimension)` Gets the aspect distinct values.
    `CompanyKey` | `getFirstCompany()` This method is required in order to work with multiple companies in the same XBRL report.
    `java.util.Collection<XBRLFact>` | `search(java.util.Collection<java.lang.Object> members)` Searches for facts satisfying all aspects in the collection.
    `java.util.HashSet<XBRLFactItem>` | `searchDimensionsANDAlt(java.util.Collection<DimensionAndMemberQNamesPair> input)` Search classified facts for all facts that contains all dimensions indicated in the input.
    `java.util.HashSet<XBRLFactItem>` | `searchDimensionsOR(java.util.Collection<DimensionAndMemberQNamesPair> input)` Search classified facts for all facts that contains at least one of the dimension and member pairs indicated in the input.
    `java.util.HashSet<XBRLFactItem>` | `searchExplicitDimensionsAND(java.util.Collection<DimensionAndMemberQNamesPair> input)` Search classified facts for all facts that contains all dimensions indicated in the input.
    `java.util.HashSet<XBRLFactItem>` | `searchTypedDimensionsAND(java.util.Collection<DimensionAndFragmentMemberPair> input)` Search classified facts for all facts that contains all dimensions indicated in the input.
    `void` | `setOpenAspectValueResolver(OpenAspectValueResolver externalResolver)` Sets the open aspect value resolver.

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

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

- - ### Constructor Detail

    - #### FactsListClassifier

          public FactsListClassifier(XBRLFactsList input)

      Instantiates a new facts list classifier.
      Parameters:
        `input` - the input

    - #### FactsListClassifier

          public FactsListClassifier(XBRLFactsList input,
                             int aspectsFocus)

      Instantiates a new facts list classifier.
      Parameters:
        `input` - the input
        `aspectsFocus` - the aspects focus

  - ### Method Detail

    - #### searchExplicitDimensionsAND

          public java.util.HashSet<XBRLFactItem> searchExplicitDimensionsAND(java.util.Collection<DimensionAndMemberQNamesPair> input)

      Search classified facts for all facts that contains all dimensions indicated in the input.
      Parameters:
        `input` - Collection of pairs of QName and Member
      Returns:
        HashSet with the intersection of all facts satisfying selection criteria

    - #### searchTypedDimensionsAND

          public java.util.HashSet<XBRLFactItem> searchTypedDimensionsAND(java.util.Collection<DimensionAndFragmentMemberPair> input)

      Search classified facts for all facts that contains all dimensions indicated in the input.
      Parameters:
        `input` - Collection of pairs of QName and Member
      Returns:
        HashSet with the intersection of all facts satisfying selection criteria

    - #### searchDimensionsANDAlt

          public java.util.HashSet<XBRLFactItem> searchDimensionsANDAlt(java.util.Collection<DimensionAndMemberQNamesPair> input)

      Search classified facts for all facts that contains all dimensions indicated in the input.
      Parameters:
        `input` - Collection of pairs of QName and Member
      Returns:
        HashSet with the intersection of all facts satisfying selection criteria

    - #### searchDimensionsOR

          public java.util.HashSet<XBRLFactItem> searchDimensionsOR(java.util.Collection<DimensionAndMemberQNamesPair> input)

      Search classified facts for all facts that contains at least one of the dimension and member pairs indicated in the input.
      Parameters:
        `input` - Collection of pairs of QName and Member
      Returns:
        HashSet with the intersection of all facts satisfying selection criteria

    - #### addFact

          public void addFact(XBRLFact fact)

      Adds the fact.
      Parameters:
        `fact` - the fact

    - #### addFact

          public void addFact(XBRLFact fact,
                     int aspectsFocus)

      Adds the fact.
      Parameters:
        `fact` - the fact
        `aspectsFocus` - the aspects focus

    - #### delFact

          public void delFact(XBRLFact fact)

      Del fact.
      Parameters:
        `fact` - the fact

    - #### clear

          public void clear()

      Clear.

    - #### getAspectDistinctValues

          public java.util.Set<?> getAspectDistinctValues(int aspect,
                                                 javax.xml.namespace.QName dimension)

      Gets the aspect distinct values.
      Parameters:
        `aspect` - the aspect
        `dimension` - the dimension
      Returns:
        the aspect distinct values

    - #### search

          public java.util.Collection<XBRLFact> search(java.util.Collection<java.lang.Object> members)

      Searches for facts satisfying all aspects in the collection.
      Parameters:
        `members` - the members
      Returns:
        the collection

    - #### getFirstCompany

          public CompanyKey getFirstCompany()

      This method is required in order to work with multiple companies in the same XBRL report.
      Returns:
        the first company

    - #### setOpenAspectValueResolver

          public void setOpenAspectValueResolver(OpenAspectValueResolver externalResolver)

      Sets the open aspect value resolver.
      Parameters:
        `externalResolver` - the new open aspect value resolver