com.ihr.xbrl.om.instance

## Class XBRLFactsListImpl

- java.lang.Object
- - com.ihr.xbrl.om.instance.XBRLFactsListImpl

- All Implemented Interfaces:
    XBRLFactsList, XMLHasParent

      public class XBRLFactsListImpl
      extends java.lang.Object
      implements XBRLFactsList

  Implementation of the XBRLFactsList interface in a class that can hold a list of facts but is not a fact itself (tuple or instance) and does not have any representation in XML nodes.
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLFactsListImpl(DTSContainer dts, XBRLFactsList parent)` Instantiates a new XBRL facts list impl.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(int index, XBRLFact fact)` Resets the nillable status to false automatically.
    `boolean` | `add(XBRLFact fact)` Resets the nillable status to false automatically.
    `void` | `addOrForwardItem(XBRLFactItem item)` Called internally to register new facts in the instance document.
    `void` | `addXMLChild(XMLHasParent child)` Adds the xml child.
    `void` | `clear()` Removes all children elements in this XBRLFactList.
    `XBRLFactsListImpl` | `clone()`
    `XBRLFactsListImpl` | `clone(DTSContainer newDTS, XBRLFactsList parent)` Clone.
    `boolean` | `equals(java.lang.Object obj)` This function should be implemented by sub classes in order to properly implement.
    `net.sf.saxon.s9api.XdmValue` | `evaluateList(java.lang.String string)` Access to the surrounding method in the XMLFragment.
    `void` | `forwardItem(XBRLFactItem item)` Forward item.
    `XBRLFact` | `get(int index)` Returns the element at the selected index position.
    `java.net.URI` | `getBase()` Gets the base.
    `DTSContainer` | `getContainer()` Access to the surrounding container object.
    `net.sf.saxon.s9api.XdmNode` | `getDocument()` Access to the surrounding XdmDocument from the XMLFragment.
    `XBRLInstance` | `getInstance()` Access to the instance document on the top of this facts container hierarchy.
    `java.util.Iterator<java.util.Vector<XBRLFactItem>>` | `getItems()` Iterator over the items on this facts container.
    `java.util.Iterator<XBRLFactItem>` | `getItems(XBRLItem itemFrom)` Iterator over fact items that are instances of the XBRLItem received as a parameter.
    `java.util.Iterator<XBRLFactItem>` | `getItemsSg(XBRLItem itemFrom)` Iterator over fact items that are instances of the XBRLItem received as a parameter of in the substitution group of that item.
    `int` | `getNumberOfTuples()` Calculates and returns the number of tuples children of this facts container .
    `XBRLFactsList` | `getParent()` Access to the parent document, Instance or tuple.
    `java.util.Iterator<java.util.Vector<XBRLFactTuple>>` | `getTuples()` Iterator over the tuples on this facts container.
    `java.util.Iterator<XBRLFactTuple>` | `getTuples(XBRLTuple tupleFrom)` Iterator over fact tuples that are instances of the XBRLTuple received as a parameter.
    `java.util.Iterator<XBRLFactTuple>` | `getTuplesSg(XBRLTuple tupleFrom)` Iterator over fact tuples that are instances of the XBRLTuple received as a parameter of in the substitution group of that tuple.
    `java.lang.String` | `getXPathToRoot()` Access to the surrounding method from the XMLFragment.
    `int` | `hashCode()` This is from the Object interface and must be implemented by sub classes in order to be able to provide hashCodes.
    `int` | `indexOf(XBRLFact fact)` Returns the index position of a fact within this list.
    `int` | `indexOf(XBRLFact fact, int index)` Returns the index position of a fact within this list starting at the position indicated by the index parameter.
    `boolean` | `isXdmDocumentAttached()` Checks if is xdm document attached.
    `java.util.Iterator<XBRLFact>` | `iterator()` Iterator.
    `boolean` | `remove(XBRLFact fact)` Removes a fact from the facts container.
    `void` | `removeXMLChild(XMLHasParent child)` Removes the xml child.
    `void` | `setParent(XBRLFactsList parent)` Sets the parent of this facts container to a new parent.
    `void` | `setParent(XMLHasParent parent)` Sets the parent.
    `int` | `size()` Access to the number of elements in the XBRLFactList.

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

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

- - ### Constructor Detail

    - #### XBRLFactsListImpl

          public XBRLFactsListImpl(DTSContainer dts,
                           XBRLFactsList parent)

      Instantiates a new XBRL facts list impl.
      Parameters:
        `dts` - the dts
        `parent` - the parent. If the parent is set to null, facts can be added but not removed from previous parent

  - ### Method Detail

    - #### clone

          public XBRLFactsListImpl clone()

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

    - #### clone

          public XBRLFactsListImpl clone(DTSContainer newDTS,
                                XBRLFactsList parent)

      Clone.
      Parameters:
        `newDTS` - the new dts
        `parent` - the parent
      Returns:
        the XBRL facts list impl

    - #### forwardItem

          public void forwardItem(XBRLFactItem item)

      Forward item.
      Parameters:
        `item` - the item

    - #### add

          public boolean add(XBRLFact fact)

      Resets the nillable status to false automatically. Then calls the super implementation
      Specified by:
        `add` in interface `XBRLFactsList`
      Parameters:
        `fact` - the fact
      Returns:
        true, if successful

    - #### add

          public void add(int index,
                 XBRLFact fact)

      Resets the nillable status to false automatically. Then calls the super implementation
      Specified by:
        `add` in interface `XBRLFactsList`
      Parameters:
        `index` - the index
        `fact` - the fact

    - #### getItems

          public java.util.Iterator<java.util.Vector<XBRLFactItem>> getItems()

      Description copied from interface: `XBRLFactsList`
      Iterator over the items on this facts container.
      Specified by:
        `getItems` in interface `XBRLFactsList`
      Returns:
        Iterator<Vector<XBRLFactItem>>

    - #### getItems

          public java.util.Iterator<XBRLFactItem> getItems(XBRLItem itemFrom)

      Description copied from interface: `XBRLFactsList`
      Iterator over fact items that are instances of the XBRLItem received as a parameter.
      Specified by:
        `getItems` in interface `XBRLFactsList`
      Parameters:
        `itemFrom` - XBRLItem
      Returns:
        Iterator<XBRLFactItem>

    - #### getTuples

          public java.util.Iterator<java.util.Vector<XBRLFactTuple>> getTuples()

      Description copied from interface: `XBRLFactsList`
      Iterator over the tuples on this facts container.
      Specified by:
        `getTuples` in interface `XBRLFactsList`
      Returns:
        Iterator<Vector<XBRLFactTuple>>

    - #### getTuples

          public java.util.Iterator<XBRLFactTuple> getTuples(XBRLTuple tupleFrom)

      Description copied from interface: `XBRLFactsList`
      Iterator over fact tuples that are instances of the XBRLTuple received as a parameter.
      Specified by:
        `getTuples` in interface `XBRLFactsList`
      Parameters:
        `tupleFrom` - XBRLTuple
      Returns:
        Iterator<XBRLFactTuple>

    - #### getItemsSg

          public java.util.Iterator<XBRLFactItem> getItemsSg(XBRLItem itemFrom)

      Description copied from interface: `XBRLFactsList`
      Iterator over fact items that are instances of the XBRLItem received as a parameter of in the substitution group of that item.
      Specified by:
        `getItemsSg` in interface `XBRLFactsList`
      Parameters:
        `itemFrom` - XBRLItem
      Returns:
        Iterator<XBRLFactItem>

    - #### getTuplesSg

          public java.util.Iterator<XBRLFactTuple> getTuplesSg(XBRLTuple tupleFrom)

      Description copied from interface: `XBRLFactsList`
      Iterator over fact tuples that are instances of the XBRLTuple received as a parameter of in the substitution group of that tuple.
      Specified by:
        `getTuplesSg` in interface `XBRLFactsList`
      Parameters:
        `tupleFrom` - the tuple from
      Returns:
        Iterator<XBRLFactTuple>

    - #### getNumberOfTuples

          public int getNumberOfTuples()

      Description copied from interface: `XBRLFactsList`
      Calculates and returns the number of tuples children of this facts container .
      Specified by:
        `getNumberOfTuples` in interface `XBRLFactsList`
      Returns:
        integer value

    - #### iterator

          public java.util.Iterator<XBRLFact> iterator()

      Description copied from interface: `XBRLFactsList`
      Iterator.
      Specified by:
        `iterator` in interface `XBRLFactsList`
      Returns:
        the iterator

    - #### remove

          public boolean remove(XBRLFact fact)

      Description copied from interface: `XBRLFactsList`
      Removes a fact from the facts container.
      Specified by:
        `remove` in interface `XBRLFactsList`
      Parameters:
        `fact` - the fact
      Returns:
        boolean

    - #### setParent

          public void setParent(XBRLFactsList parent)

      Description copied from interface: `XBRLFactsList`
      Sets the parent of this facts container to a new parent.
      Specified by:
        `setParent` in interface `XBRLFactsList`
      Parameters:
        `parent` - the new parent

    - #### addOrForwardItem

          public void addOrForwardItem(XBRLFactItem item)

      Description copied from interface: `XBRLFactsList`
      Called internally to register new facts in the instance document.
      Specified by:
        `addOrForwardItem` in interface `XBRLFactsList`
      Parameters:
        `item` - the item

    - #### size

          public int size()

      Description copied from interface: `XBRLFactsList`
      Access to the number of elements in the XBRLFactList.
      Specified by:
        `size` in interface `XBRLFactsList`
      Returns:
        integer

    - #### get

          public XBRLFact get(int index)

      Description copied from interface: `XBRLFactsList`
      Returns the element at the selected index position. The first element is at position 0
      Specified by:
        `get` in interface `XBRLFactsList`
      Parameters:
        `index` - integer
      Returns:
        XBRLFact at position indicated by index parameter

    - #### indexOf

          public int indexOf(XBRLFact fact)

      Description copied from interface: `XBRLFactsList`
      Returns the index position of a fact within this list.
      Specified by:
        `indexOf` in interface `XBRLFactsList`
      Parameters:
        `fact` - XBRLFact
      Returns:
        integer

    - #### indexOf

          public int indexOf(XBRLFact fact,
                    int index)

      Description copied from interface: `XBRLFactsList`
      Returns the index position of a fact within this list starting at the position indicated by the index parameter.
      Specified by:
        `indexOf` in interface `XBRLFactsList`
      Parameters:
        `fact` - XBRLFact
        `index` - integer
      Returns:
        integer

    - #### clear

          public void clear()

      Description copied from interface: `XBRLFactsList`
      Removes all children elements in this XBRLFactList.
      Specified by:
        `clear` in interface `XBRLFactsList`

    - #### hashCode

          public int hashCode()

      Description copied from interface: `XBRLFactsList`
      This is from the Object interface and must be implemented by sub classes in order to be able to provide hashCodes.
      Specified by:
        `hashCode` in interface `XBRLFactsList`
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        integer

    - #### equals

          public boolean equals(java.lang.Object obj)

      Description copied from interface: `XBRLFactsList`
      This function should be implemented by sub classes in order to properly implement.
      Specified by:
        `equals` in interface `XBRLFactsList`
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `obj` - Object to compare to
      Returns:
        boolean value

    - #### setParent

          public void setParent(XMLHasParent parent)
                         throws XBRLInconsistentDTSException

      Description copied from interface: `XMLHasParent`
      Sets the parent.
      Specified by:
        `setParent` in interface `XMLHasParent`
      Parameters:
        `parent` - the new parent
      Throws:
        `XBRLInconsistentDTSException` - the XBRL inconsistent dts exception

    - #### addXMLChild

          public void addXMLChild(XMLHasParent child)
                           throws XBRLInconsistentDTSException

      Description copied from interface: `XMLHasParent`
      Adds the xml child.
      Specified by:
        `addXMLChild` in interface `XMLHasParent`
      Parameters:
        `child` - the child
      Throws:
        `XBRLInconsistentDTSException` - the XBRL inconsistent dts exception

    - #### removeXMLChild

          public void removeXMLChild(XMLHasParent child)

      Description copied from interface: `XMLHasParent`
      Removes the xml child.
      Specified by:
        `removeXMLChild` in interface `XMLHasParent`
      Parameters:
        `child` - the child

    - #### getBase

          public java.net.URI getBase()

      Description copied from interface: `XMLHasParent`
      Gets the base.
      Specified by:
        `getBase` in interface `XMLHasParent`
      Returns:
        the base

    - #### getParent

          public XBRLFactsList getParent()

      Description copied from interface: `XBRLFactsList`
      Access to the parent document, Instance or tuple.
      Specified by:
        `getParent` in interface `XBRLFactsList`
      Specified by:
        `getParent` in interface `XMLHasParent`
      Returns:
        XMLFragment that is a XBRLInstance or XBRLFactTuple

    - #### getInstance

          public XBRLInstance getInstance()

      Description copied from interface: `XBRLFactsList`
      Access to the instance document on the top of this facts container hierarchy.
      Specified by:
        `getInstance` in interface `XBRLFactsList`
      Returns:
        XBRLInstance

    - #### getContainer

          public DTSContainer getContainer()

      Description copied from interface: `XBRLFactsList`
      Access to the surrounding container object.
      Specified by:
        `getContainer` in interface `XBRLFactsList`
      Returns:
        DTSContainer

    - #### getDocument

          public net.sf.saxon.s9api.XdmNode getDocument()

      Description copied from interface: `XBRLFactsList`
      Access to the surrounding XdmDocument from the XMLFragment.
      Specified by:
        `getDocument` in interface `XBRLFactsList`
      Returns:
        XdmNode according to saxon s9api

    - #### getXPathToRoot

          public java.lang.String getXPathToRoot()

      Description copied from interface: `XBRLFactsList`
      Access to the surrounding method from the XMLFragment.
      Specified by:
        `getXPathToRoot` in interface `XBRLFactsList`
      Returns:
        String

    - #### evaluateList

          public net.sf.saxon.s9api.XdmValue evaluateList(java.lang.String string)

      Description copied from interface: `XBRLFactsList`
      Access to the surrounding method in the XMLFragment.
      Specified by:
        `evaluateList` in interface `XBRLFactsList`
      Parameters:
        `string` - the string
      Returns:
        an XdmValue from the saxonica s9api

    - #### isXdmDocumentAttached

          public boolean isXdmDocumentAttached()

      Description copied from interface: `XBRLFactsList`
      Checks if is xdm document attached.
      Specified by:
        `isXdmDocumentAttached` in interface `XBRLFactsList`
      Returns:
        true, if is xdm document attached