com.ihr.xbrl.om.table.definition

## Class XBRLTable

- java.lang.Object
- - com.ihr.xbrl.om.XMLFragment
  - - com.ihr.xbrl.om.exLinks.XLinkElement
    - - com.ihr.xbrl.om.exLinks.XBRLPointerOfARelationship
      - - com.ihr.xbrl.om.exLinks.XBRLResource
        - - com.ihr.xbrl.om.table.XBRLTableResource
          - - com.ihr.xbrl.om.table.definition.XBRLTable

- All Implemented Interfaces:
    HasAdditionalEqualityForReassignation, XBRLRelationshipPoint, HasFilters, HasParentChildAttribute, HasTableProcessor, Thinable, XBRLValidation, XBRLValueKey, XMLHasParent, java.lang.Cloneable, javax.xml.namespace.NamespaceContext

      public class XBRLTable
      extends XBRLTableResource
      implements HasParentChildAttribute, HasFilters

  This is a table in the definition model.
  Author:
    Ignacio

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.ihr.xbrl.om.table.HasParentChildAttribute

      `HasParentChildAttribute.ParentChildEnum`

    - ### Nested classes/interfaces inherited from interface com.ihr.xbrl.om.XBRLValidation

      `XBRLValidation.Direction`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static javax.xml.namespace.QName` | `aspectModel` The Constant aspectModel.
    `static javax.xml.namespace.QName` | `table` The Constant table.

    - ### Fields inherited from class com.ihr.xbrl.om.exLinks.XBRLResource

      `log, nullResource`

    - ### Fields inherited from class com.ihr.xbrl.om.exLinks.XLinkElement

      `actuate, ACTUATE, ARC, arcrole, ARCROLE, ETITLE, EXTENDED, from, FROM, href, HREF, label, LABEL, LOCATOR, RESOURCE, role, ROLE, show, SHOW, SIMPLE, title, TITLE, to, TO, TYPE`

    - ### Fields inherited from class com.ihr.xbrl.om.XMLFragment

      `CONCEPT_LABEL, CONCEPT_QNAME, EASY_TO_READ, ELEMENT_LABEL, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, HIDE_COMMON_ACCURACY, idQName, NO_POSITION, OrderComparator, OrderComparator2, PERIOD_TYPE, PERIOD_VALUE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER`

    - ### Fields inherited from interface com.ihr.xbrl.om.table.HasParentChildAttribute

      `parentChilOrder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLTable(XBRLTableProcessor xbrlTableProcessor, XBRLResource res)` Creates a new table in the definition model.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getAspectModel()` Returns either XBRLVariablesHolder.MODEL_DIMENSIONAL or XBRLVariablesHolder.MODEL_NON_DIMENSIONAL
    `java.util.Iterator<Axis>` | `getAxis()` Access to an iterator of the axis that exists in the table due to the existence of table-breakdown relationships.
    `java.util.Iterator<XBRLBreakdownUse>` | `getBreakdowns(Axis axis)` Gets the breakdowns.
    `java.util.Iterator<XBRLFilterUse>` | `getFilters()` Gets the filters.
    `XBRLVariableParameter` | `getParameter(net.sf.saxon.s9api.QName parameterName)` Access to a single table parameter from the parameter name.
    `java.util.Collection<net.sf.saxon.s9api.QName>` | `getParameterNames()` Access to all table parameter names
    `HasParentChildAttribute.ParentChildEnum` | `getParentChildOrder()` Returns the value of the parentChildOrder attribute as one value of the ParentChildEnum enumeration.
    `java.util.Iterator<XBRLStructuralTable>` | `getStructuralTables(EditorSource editorSource, OpenAspectValueResolver externalResolver)` Returns an iterator over all structural tables defined from this table definition.
    `XBRLTableSet` | `getTableSet(EditorSource editorSource, OpenAspectValueResolver externalResolver)` Builds up the table set for this table.
    `boolean` | `isAxisExplicitlyDefined(Axis axis)` Returns true if the table contains an explicit definition of the axis passed in as the axis parameter.
    `boolean` | `isParentChildOrderDefined()` Returns true when the resource contains an attribute with explicit definition of the parentChildOrder.
    `void` | `prepare(EditorSource editorSource, OpenAspectValueResolver externalResolver)` For this table, this method prepares the entire table set and for each table in the table set it prepares the structural table.
    `void` | `resetTable()` This method traverse all elements in the definition layer and cleans up all evaluated and cached resources so the table can be evaluated again. it is calles by the API automatically each time a table in the tableSet is evaluated

    - ### Methods inherited from class com.ihr.xbrl.om.table.XBRLTableResource

      `getFPXPathCompiler, getProcessor, isSpecificationVersion`

    - ### Methods inherited from class com.ihr.xbrl.om.exLinks.XBRLResource

      `addChild, clear, equals, generateLocatorToNode, generateNode, getAttributes, getDTSBase, getFriendlyName, getFriendlyName, getParent, getResourceIdentifier, getRoleType, getType, getValidationReport, getValueKey, hashCode, invalidate, invalidate, isComplexType, isOnValidation, isSimpleType, setComplexType, setDTSBase, setId, setParent, setRole, setRoleType, setSimpleType, setValue, validate`

    - ### Methods inherited from class com.ihr.xbrl.om.exLinks.XLinkElement

      `getActuate, getArcrole, getFromTxt, getHRef, getLabel, getRole, getShow, getStaticLabel, getSType, getTitle, getToTxt, isRequiredAttribute, isValidAttribute, setActuate, setArcrole, setFrom, setHRef, setLabel, setShow, setSType, setTitle, setTo`

    - ### Methods inherited from class com.ihr.xbrl.om.XMLFragment

      `addAttribute, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, clone, clone, delAttribute, delAttribute, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAllAttributes, getAttribute, getAttributeBooleanValue, getAttributeQNameValue, getAttributes, getAttributeStringValue, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getDocument, getElements, getElementsHashCode, getFragment, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getGenericLabelText, getId, getLang, getNamespaceURI, getNodeName, getNumberOfAttributes, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticContext, getStaticNamespace, getStringValue, getToolTipText, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathExecutable, getXPathNamespaceContext, getXPathToNode, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, isDead, isNamespaceDefined, isXdmDocumentAttached, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolve_equal2, resolveHRef, resolveHRef, s_equal2, s_equal2, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setLang, setNamespaceContext, setNamespaces, setNode, setNodeName, setParent, setRegenerateNodeIfnotFound, setValue, setVariablesDefined, size, thin, toString, valueEquals, xEqual`

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

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

    - ### Methods inherited from interface com.ihr.xbrl.om.exLinks.XBRLRelationshipPoint

      `addFromRelationship, addToRelationship, getFromRelationships, getToRelationships, removeFromRelationship, removeToRelationship`

- - ### Field Detail

    - #### aspectModel

          public static final javax.xml.namespace.QName aspectModel

      The Constant aspectModel.

    - #### table

          public static final javax.xml.namespace.QName table

      The Constant table.

  - ### Constructor Detail

    - #### XBRLTable

          public XBRLTable(XBRLTableProcessor xbrlTableProcessor,
                   XBRLResource res)
                    throws XTValidationException

      Creates a new table in the definition model.
      Parameters:
        `xbrlTableProcessor` - the xbrl table processor
        `res` - the res
      Throws:
        `XTValidationException` - the XT validation exception

  - ### Method Detail

    - #### getStructuralTables

          public java.util.Iterator<XBRLStructuralTable> getStructuralTables(EditorSource editorSource,
                                                                    OpenAspectValueResolver externalResolver)
                                                                      throws XTValidationException,
                                                                             XFException

      Returns an iterator over all structural tables defined from this table definition. At this point this method just creates one XBRLStructuralTable because the PWD-2013-05-17 contains no table parameters but at a later time, while implementing the REC, this method shall return a true iterator over a set of structural models This method is not stable and may be removed later. The point is that it may be more efficient to build the structural model only for the already know and selected table parameter values. At this point in the development (PWD-2013-05-17) we don't know how to evaluate all possible structural models and it looks like there is a 1 to 1 relationship between a Definition model and Structural model. This is the reason this method returns just one XBRLStructural model. But for sure this is not what is stated in the REC version.
      Parameters:
        `editorSource` - optional EditorSoruce to inject values that belongs to the editor and are still not part of the instance document
        `externalResolver` - optional, class that will provide user selected values for dimensions in the Z axis
      Returns:
        Iterator
      Throws:
        `XTValidationException` - raised only during DTS loading
        `XFException` - the XF exception

    - #### getTableSet

          public XBRLTableSet getTableSet(EditorSource editorSource,
                                 OpenAspectValueResolver externalResolver)
                                   throws XTValidationException,
                                          XFException

      Builds up the table set for this table. The editorSource parameter is optional. If it is null the editor source is ignored. If it is an instance of the EditorSource interface then during the generation of the table layout the editor source may inject values on the open definitions so new rows or columns or values in a dimension in the Z axis might appear
      Parameters:
        `editorSource` - optional EditorSoruce to inject values that belongs to the editor and are still not part of the instance document
        `externalResolver` - optional, class that will provide user selected values for dimensions in the Z axis
      Returns:
        XBRLTableSet new or cached
      Throws:
        `XTValidationException` - the XT validation exception
        `XFException` - the XF exception

    - #### getAxis

          public java.util.Iterator<Axis> getAxis()

      Access to an iterator of the axis that exists in the table due to the existence of table-breakdown relationships.
      Returns:
        the axis

    - #### isAxisExplicitlyDefined

          public boolean isAxisExplicitlyDefined(Axis axis)

      Returns true if the table contains an explicit definition of the axis passed in as the axis parameter.
      Parameters:
        `axis` - the axis
      Returns:
        true, if is axis explicitly defined

    - #### getAspectModel

          public int getAspectModel()

      Returns either XBRLVariablesHolder.MODEL_DIMENSIONAL or XBRLVariablesHolder.MODEL_NON_DIMENSIONAL
      Returns:
        one of the two constants

    - #### isParentChildOrderDefined

          public boolean isParentChildOrderDefined()

      Description copied from interface: `HasParentChildAttribute`
      Returns true when the resource contains an attribute with explicit definition of the parentChildOrder.
      Specified by:
        `isParentChildOrderDefined` in interface `HasParentChildAttribute`
      Returns:
        true when getParentChildOrder() will not return UNDEFINED

    - #### getParentChildOrder

          public HasParentChildAttribute.ParentChildEnum getParentChildOrder()

      Description copied from interface: `HasParentChildAttribute`
      Returns the value of the parentChildOrder attribute as one value of the ParentChildEnum enumeration.
      Specified by:
        `getParentChildOrder` in interface `HasParentChildAttribute`
      Returns:
        one of the values in the ParentChildEnum enumeration

    - #### getBreakdowns

          public java.util.Iterator<XBRLBreakdownUse> getBreakdowns(Axis axis)

      Gets the breakdowns.
      Parameters:
        `axis` - the axis
      Returns:
        the breakdowns

    - #### getFilters

          public java.util.Iterator<XBRLFilterUse> getFilters()

      Gets the filters.
      Specified by:
        `getFilters` in interface `HasFilters`
      Returns:
        the vFilters

    - #### getParameterNames

          public java.util.Collection<net.sf.saxon.s9api.QName> getParameterNames()

      Access to all table parameter names
      Specified by:
        `getParameterNames` in interface `HasFilters`
      Returns:
        Collection of QNames, one for each parameter name defined on this table
      See Also:
        `getParameter(QName)`

    - #### getParameter

          public XBRLVariableParameter getParameter(net.sf.saxon.s9api.QName parameterName)

      Access to a single table parameter from the parameter name.
      Parameters:
        `parameterName` - a QName
      Returns:
        an XBRLVariableParameter instance

    - #### resetTable

          public void resetTable()

      This method traverse all elements in the definition layer and cleans up all evaluated and cached resources so the table can be evaluated again. it is calles by the API automatically each time a table in the tableSet is evaluated

    - #### prepare

          public void prepare(EditorSource editorSource,
                     OpenAspectValueResolver externalResolver)
                       throws XFException,
                              XTValidationException

      For this table, this method prepares the entire table set and for each table in the table set it prepares the structural table. Call this method before working with a table.
      Parameters:
        `editorSource` - optional EditorSoruce to inject values that belongs to the editor and are still not part of the instance document
        `externalResolver` - optional, class that will provide user selected values for dimensions in the Z axis
      Throws:
        `XFException` - the XF exception
        `XTValidationException` - the XT validation exception