com.ihr.xbrl.om.taxonomy

## Class XBRLItem

- java.lang.Object
- - com.ihr.xbrl.om.XMLFragment
  - - com.ihr.xbrl.om.taxonomy.XMLElementDefinition
    - - com.ihr.xbrl.om.taxonomy.XBRLItem

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

      public class XBRLItem
      extends XMLElementDefinition
      implements java.io.Serializable, XBRLValidation

  The Class XBRLItem.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `XBRLItem.BalanceType` Enumeration defining the possible content of the xbrli:balance attribute.
    `static class` | `XBRLItem.PeriodType` Enumeration defining the content of the xbrli:periodType attribute but also used to report the type of a XBRLPeriod object inside an XBRLContext.

    - ### 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` | `balance` The value of the balance attribute if it is present.
    `static javax.xml.namespace.QName` | `default_` The [default] property.
    `static javax.xml.namespace.QName` | `periodTypeAttribute` The [Period Type] property.
    `static javax.xml.namespace.QName` | `substitutionGroup` This is xbrli:item.

    - ### Fields inherited from class com.ihr.xbrl.om.taxonomy.XMLElementDefinition

      `abstract_, ALL, block, EMPTY, EXTENSION, final_, fixed, name, nillable, nullConcept, RESTRICTION, SUBSTITUTION, type, UNDEFINED`

    - ### 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`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLItem(XBRLTaxonomy parent, java.lang.String name, java.lang.String _default, XBRLXSDTypeDefinition type, javax.xml.namespace.QName substitutionGroup, XBRLItem.PeriodType periodType, XBRLItem.BalanceType balance, java.lang.Boolean _abstract, java.lang.Boolean nillable, int block, int _final, java.lang.String fixed)` Creates and XBRL Item definition.
    `XBRLItem(XBRLTaxonomy parent, net.sf.saxon.s9api.XdmNode node)` Instantiates a new XBRL item.
    `XBRLItem(XMLElementDefinition other)` Creates an item using the properties of the concept received as a parameter Adds the new concept to the parent taxonomy schema.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Frees-up used memory This method should not be invoqued on live objects in the DTS.
    `boolean` | `equals(java.lang.Object other)` Sets a new XPathFunctionResolver for this object.
    `org.jdom.Element` | `generateNode(boolean relativize, java.net.URI base)` Serializes to a jdom Element the representation of the properties of this Information Item This method should be called from classes derived from this class
    `XBRLItem.BalanceType` | `getBalance()` Access to the [Balance] property of the concept definition.
    `java.lang.String` | `getDefault()` Access to the [Default] property.
    `java.util.Iterator<XMLFragment>` | `getElements()` For complex type resources this returns an iterator with all children XML fragments This method may be overwriten by other classes in the hierarchy.
    `java.lang.String` | `getFriendlyName()` Returns a string description that represents the element content in a form that users can understand.
    `java.lang.String` | `getFriendlyName(int modifiers, LabelsProvider lp)` Returns a string description that represents the element content in a form that users can understand.
    `java.util.Collection<XBRLItem>` | `getInSubstitutionGroup()` Gets the in substitution group.
    `XBRLItem.PeriodType` | `getPeriodType()` returns XBRLItem.DURATION or XBRLItem.INSTANT
    `XBRLValidationReport` | `getValidationReport()` Access to the last stored validation report.
    `int` | `hashCode()`
    `void` | `invalidate()` Invalidates the XBRLFact for XBRL validation.
    `boolean` | `invalidate(XBRLValidation.Direction dir)` Invalidates this object and the elements in the XML tree according with the parameter in dir This method is used by GUI tools that requires to reset validation before a manual validation cycle is started.
    `boolean` | `isFraction()` Returns true or false depending on this XBRLItem is an XBRL fractionItemType or not This method has been added in order to facilitate the development of the formula specification.
    `boolean` | `isInSubstitutionGroup(javax.xml.namespace.QName name)` Checks if is in substitution group.
    `boolean` | `isMonetaryType()` Check if this concept definition is a monetaryItemType or derived from monetaryItemType in the type hierarchy and return true if this is the case.
    `boolean` | `isNumeric()` Returns true if the type is derived from one of the list fractionItemType decimalItemType floatItemType doubleItemType monetaryItemType sharesItemType pureItemType integerItemType nonPositiveIntegerItemType negativeIntegerItemType longItemType intItemType shortItemType byteItemType nonNegativeIntegerItemType unsignedLongItemType unsignedIntItemType unsignedShortItemType unsignedByteItemType positiveIntegerItemType).
    `boolean` | `isOnValidation()` When validation is a recursive process, this function returns true if the object going to be validated is already under validation.
    `boolean` | `isPureType()` Check if this concept definition is a pureItemType or derived from pureItemType in the type hierarchy and return true if this is the case.
    `boolean` | `isSharesType()` Check if this concept definition is a sharesItemType or derived from sharesItemType in the type hierarchy and return true if this is the case.
    `boolean` | `isXBRLType()` Checks if is XBRL type.
    `XBRLItem.BalanceType` | `setBalance(XBRLItem.BalanceType newValue)` Sets the value of the [Balance] property or reset it if newValue is null.
    `java.lang.String` | `setDefault(java.lang.String newValue)` Sets the default.
    `void` | `setIsFraction(boolean newValue)` Normally the information about isFraction is obtained from the element data type but when the element data type cannot be obtained this method can help in setting up a suitable value so applications can work as if the data type were obtained from the surrounding node.
    `void` | `setIsMonetaryType(boolean newValue)` Sets the flag that indicates this item is of the monetary type.
    `void` | `setIsNumeric(boolean newValue)` Normally the information about isNumeric is obtained from the element data type but when the element data type cannot be obtained this method can help in setting up a suitable value so applications can work as if the data type were obtained from the surrounding node.
    `void` | `setIsXBRLType(boolean newValue)` Sets the flag that indicates if this concept is of the XBRL derived types or not.
    `XBRLItem.PeriodType` | `setPeriodType(XBRLItem.PeriodType newValue)` Sets the value of the [Period Type] property or resets it if newValue is null.
    `XBRLXSDTypeDefinition` | `setType(XBRLXSDTypeDefinition type)` Sets the item type to the type specified in the XBRLXSDTypeDefinition object or unset the type definition if the attribute value is null.
    `XBRLValidationReport` | `validate(XBRLPlugInProcessor proc)` Executes validation on the instance object and returns a validation report.

    - ### Methods inherited from class com.ihr.xbrl.om.taxonomy.XMLElementDefinition

      `generateLocatorToNode, getAbstract, getAttributes, getBlock, getBlock, getBlock, getChildren, getContentValidator, getFinal, getFinal, getFinal, getFixed, getName, getNillable, getParent, getQName, getSimpleContentValidator, getSubstitutionGroup, getSubstitutionGroupHierarchy, getType, getValueKey, isAbstract, isInSubstitutionGroup, isTotal, setAbstract, setBlock, setFinal, setFixed, setId, setName, setNillable, setParent, setSubstitutionGroup`

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

      `addAttribute, addChild, 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, 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, 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

    - #### substitutionGroup

          public static final javax.xml.namespace.QName substitutionGroup

      This is xbrli:item.

    - #### periodTypeAttribute

          public static final javax.xml.namespace.QName periodTypeAttribute

      The [Period Type] property.

    - #### default_

          public static final javax.xml.namespace.QName default_

      The [default] property.

    - #### balance

          public static final javax.xml.namespace.QName balance

      The value of the balance attribute if it is present.

  - ### Constructor Detail

    - #### XBRLItem

          public XBRLItem(XMLElementDefinition other)

      Creates an item using the properties of the concept received as a parameter Adds the new concept to the parent taxonomy schema.
      Parameters:
        `other` - XMLElementDefinition

    - #### XBRLItem

          public XBRLItem(XBRLTaxonomy parent,
                  net.sf.saxon.s9api.XdmNode node)

      Instantiates a new XBRL item.
      Parameters:
        `parent` - the parent
        `node` - the node

    - #### XBRLItem

          public XBRLItem(XBRLTaxonomy parent,
                  java.lang.String name,
                  java.lang.String _default,
                  XBRLXSDTypeDefinition type,
                  javax.xml.namespace.QName substitutionGroup,
                  XBRLItem.PeriodType periodType,
                  XBRLItem.BalanceType balance,
                  java.lang.Boolean _abstract,
                  java.lang.Boolean nillable,
                  int block,
                  int _final,
                  java.lang.String fixed)
                   throws XBRLValidationException

      Creates and XBRL Item definition. The new element is not added to the parent. It MUST be added to a taxonomy after creation.
      Parameters:
        `parent` - XBRLTaxonomy parent taxonomy
        `name` - String concept name
        `_default` - String default value, can be null
        `type` - XBRLXSDTypeDefinition (xbrli based type)
        `substitutionGroup` - QName (item or based on item)
        `periodType` - PeriodType enum { UNDEFINED_PERIOD_TYPE | INSTANT | DURATION | FOREVER }
        `balance` - BalanceType enum { DEBIT | CREDIT | NO_BALANCE }
        `_abstract` - Boolean
        `nillable` - Boolean
        `block` - int (see XMLElementDefinition)
        `_final` - int (see XMLElementDefinition)
        `fixed` - String fixed value, can be null
      Throws:
        `XBRLValidationException` - if the new concept definition has XBRL errors

  - ### Method Detail

    - #### clear

          public void clear()
                     throws java.lang.Throwable

      Description copied from class: `XMLFragment`
      Frees-up used memory

      This method should not be invoqued on live objects in the DTS. It is automatically invoqued by the API when an object is no longer used and referenced by other objects. It is save not to call it directly.

      Overrides:
        `clear` in class `XMLElementDefinition`
      Throws:
        `java.lang.Throwable` - the throwable

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `XMLElementDefinition`

    - #### equals

          public boolean equals(java.lang.Object other)

      Description copied from class: `XMLFragment`
      Sets a new XPathFunctionResolver for this object.
      Overrides:
        `equals` in class `XMLElementDefinition`
      Parameters:
        `other` - the other
      Returns:
        true, if successful

    - #### setType

          public XBRLXSDTypeDefinition setType(XBRLXSDTypeDefinition type)

      Description copied from class: `XMLElementDefinition`
      Sets the item type to the type specified in the XBRLXSDTypeDefinition object or unset the type definition if the attribute value is null.
      Overrides:
        `setType` in class `XMLElementDefinition`
      Parameters:
        `type` - new XBRLXSDTypeDefinition or null
      Returns:
        old type definition XBRLXSDTypeDefinition

    - #### getPeriodType

          public XBRLItem.PeriodType getPeriodType()

      returns XBRLItem.DURATION or XBRLItem.INSTANT
      Returns:
        PeriodType

    - #### setPeriodType

          public XBRLItem.PeriodType setPeriodType(XBRLItem.PeriodType newValue)

      Sets the value of the [Period Type] property or resets it if newValue is null.
      Parameters:
        `newValue` - the integer constant indicating the new value or null
      Returns:
        the old value or null
      Since:
        2.6.5

    - #### getDefault

          public java.lang.String getDefault()

      Access to the [Default] property.
      Returns:
        the default

    - #### setDefault

          public java.lang.String setDefault(java.lang.String newValue)

      Sets the default.
      Parameters:
        `newValue` - the new value
      Returns:
        the string

    - #### getBalance

          public XBRLItem.BalanceType getBalance()

      Access to the [Balance] property of the concept definition.
      Returns:
        BalanceType BalanceType.NO_BALANCE or BalanceType.DEBIT or BalanceType.CREDIT

    - #### setBalance

          public XBRLItem.BalanceType setBalance(XBRLItem.BalanceType newValue)

      Sets the value of the [Balance] property or reset it if newValue is null.
      Parameters:
        `newValue` - the new constant for the value of the balance attribute
      Returns:
        the old value
      Since:
        2.6.5

    - #### isPureType

          public boolean isPureType()

      Check if this concept definition is a pureItemType or derived from pureItemType in the type hierarchy and return true if this is the case.
      Returns:
        boolean

    - #### isSharesType

          public boolean isSharesType()

      Check if this concept definition is a sharesItemType or derived from sharesItemType in the type hierarchy and return true if this is the case.
      Returns:
        boolean

    - #### isMonetaryType

          public boolean isMonetaryType()

      Check if this concept definition is a monetaryItemType or derived from monetaryItemType in the type hierarchy and return true if this is the case.
      Returns:
        boolean

    - #### setIsMonetaryType

          public void setIsMonetaryType(boolean newValue)

      Sets the flag that indicates this item is of the monetary type. This information is normally extracted from the data type thus there is no need to call this method. This method is here because some applications may not have access to the data type, in these cases, if the information is available, applications can use this method to set the flag manually
      Parameters:
        `newValue` - boolean

    - #### isXBRLType

          public boolean isXBRLType()

      Checks if is XBRL type.
      Returns:
        boolean

    - #### setIsXBRLType

          public void setIsXBRLType(boolean newValue)

      Sets the flag that indicates if this concept is of the XBRL derived types or not. This information is normally extracted from the data type so there is no need to call this method if the object has been build from nodes or the type property has been set to a specific type based on XML nodes. Applications that does not have such information but have information about if this concept is XBRL or not can use this method to avoid future errors.
      Parameters:
        `newValue` - boolean

    - #### isNumeric

          public boolean isNumeric()

      Returns true if the type is derived from one of the list fractionItemType decimalItemType floatItemType doubleItemType monetaryItemType sharesItemType pureItemType integerItemType nonPositiveIntegerItemType negativeIntegerItemType longItemType intItemType shortItemType byteItemType nonNegativeIntegerItemType unsignedLongItemType unsignedIntItemType unsignedShortItemType unsignedByteItemType positiveIntegerItemType).
      Returns:
        boolean

    - #### isFraction

          public boolean isFraction()

      Returns true or false depending on this XBRLItem is an XBRL fractionItemType or not This method has been added in order to facilitate the development of the formula specification.
      Returns:
        boolean true if the type is xbrli:fractionItemType or derived on xbrli:fractionItemType false otherwise
      Since:
        2.6.9

    - #### setIsNumeric

          public void setIsNumeric(boolean newValue)

      Normally the information about isNumeric is obtained from the element data type but when the element data type cannot be obtained this method can help in setting up a suitable value so applications can work as if the data type were obtained from the surrounding node.
      Parameters:
        `newValue` - boolean value

    - #### setIsFraction

          public void setIsFraction(boolean newValue)

      Normally the information about isFraction is obtained from the element data type but when the element data type cannot be obtained this method can help in setting up a suitable value so applications can work as if the data type were obtained from the surrounding node.
      Parameters:
        `newValue` - boolean value

    - #### isInSubstitutionGroup

          public boolean isInSubstitutionGroup(javax.xml.namespace.QName name)

      Checks if is in substitution group.
      Parameters:
        `name` - the name
      Returns:
        boolean

    - #### generateNode

          public org.jdom.Element generateNode(boolean relativize,
                                      java.net.URI base)
                                        throws XBRLSerializationException

      Description copied from class: `XMLFragment`
      Serializes to a jdom Element the representation of the properties of this Information Item This method should be called from classes derived from this class
      Overrides:
        `generateNode` in class `XMLElementDefinition`
      Parameters:
        `relativize` - boolean indicating if URIs should be relativized to the base URI (see next argument)
        `base` - the URI to which some attributes of this object should be relativided
      Returns:
        a clone of the surrounding jdom Element so it can be incorporated into multiple trees
      Throws:
        `XBRLSerializationException` - the XBRL serialization exception

    - #### getElements

          public java.util.Iterator<XMLFragment> getElements()

      Description copied from class: `XMLFragment`
      For complex type resources this returns an iterator with all children XML fragments This method may be overwriten by other classes in the hierarchy.
      Overrides:
        `getElements` in class `XMLFragment`
      Returns:
        Iterator

    - #### getInSubstitutionGroup

          public java.util.Collection<XBRLItem> getInSubstitutionGroup()

      Gets the in substitution group.
      Overrides:
        `getInSubstitutionGroup` in class `XMLElementDefinition`
      Returns:
        Collection<XBRLItem>

    - #### getFriendlyName

          public java.lang.String getFriendlyName()

      Description copied from class: `XMLFragment`
      Returns a string description that represents the element content in a form that users can understand. This method may be overridden by parent classes.

      Remarks, this method may return very long names not suitable for user interface

      Overrides:
        `getFriendlyName` in class `XMLElementDefinition`
      Returns:
        Non empty String. Internationalization is enabled

    - #### getFriendlyName

          public java.lang.String getFriendlyName(int modifiers,
                                         LabelsProvider lp)

      Description copied from class: `XMLFragment`
      Returns a string description that represents the element content in a form that users can understand. This method may be override by parent classes.

      This function accepts flags that are defined as constants in XMLFragment in order to modify the output.

      - `XMLFragment.XPOINTER` includes the element position in the source file using the XPointer specification. Note, if the document is created from objects the value may not be available
      - `XMLFragment.XPATH` includes the element position in the source file using XPATH. Note, if the document is created from objects the value may not be available
      - `XMLFragment.NO_POSITION` does not include the element position in the source file.
      - `XMLFragment.CONCEPT_QNAME` for XBRLItem, XBRLTuple and XMLElementDefinition.
      - `XMLFragment.CONCEPT_LABEL` for XBRLItem and XBRLTuple.
      - `XMLFragment.FACT_QNAME` for facts.
      - `XMLFragment.FACT_CONCEPT_LABEL` for facts.
      - `XMLFragment.SHORT_TEXT` for resources, returns the resource text, id or xlink:label
      - `XMLFragment.EASY_TO_READ` for contexts, returns the context date and dimensions in a user friendly text representation
      Overrides:
        `getFriendlyName` in class `XMLElementDefinition`
      Parameters:
        `modifiers` - integer
        `lp` - the lp
      Returns:
        Non empty String. Internationalization is enabled

    - #### getValidationReport

          public XBRLValidationReport getValidationReport()

      Description copied from interface: `XBRLValidation`
      Access to the last stored validation report.
      Specified by:
        `getValidationReport` in interface `XBRLValidation`
      Returns:
        XBRLValidationReport or null if the object has not been validated or no errors exists

    - #### validate

          public XBRLValidationReport validate(XBRLPlugInProcessor proc)

      Description copied from interface: `XBRLValidation`
      Executes validation on the instance object and returns a validation report.

      The validation result may be cached internally. A call to `XBRLValidation.invalidate(Direction)` clears the validation cache.

      Specified by:
        `validate` in interface `XBRLValidation`
      Parameters:
        `proc` - the processor under which the object is going to be validated. Note the same object can be validated on multiple processors.
      Returns:
        the validation report or null if no errors.

    - #### invalidate

          public void invalidate()

      Description copied from interface: `XBRLValidation`
      Invalidates the XBRLFact for XBRL validation.
      Specified by:
        `invalidate` in interface `XBRLValidation`

    - #### invalidate

          public boolean invalidate(XBRLValidation.Direction dir)

      Description copied from interface: `XBRLValidation`
      Invalidates this object and the elements in the XML tree according with the parameter in dir

      This method is used by GUI tools that requires to reset validation before a manual validation cycle is started.

      Specified by:
        `invalidate` in interface `XBRLValidation`
      Parameters:
        `dir` - see the `XBRLValidation.Direction` enumeration for more information.
      Returns:
        true, if successful

    - #### isOnValidation

          public boolean isOnValidation()

      Description copied from interface: `XBRLValidation`
      When validation is a recursive process, this function returns true if the object going to be validated is already under validation. This prevents a recursive loop to enter the same validation component in an infinite loop.
      Specified by:
        `isOnValidation` in interface `XBRLValidation`
      Returns:
        true if the document is under validation. Means, the validation has not finished.