com.ihr.xbrl.om.exLinks

## Class XBRLExtendedLink

- java.lang.Object
- - com.ihr.xbrl.om.XMLFragment
  - - com.ihr.xbrl.om.exLinks.XLinkElement
    - - com.ihr.xbrl.om.exLinks.XBRLExtendedLink

- All Implemented Interfaces:
    HasAdditionalEqualityForReassignation, XBRLAllowsDocumentation, XBRLRelationshipPoint, Thinable, XBRLDTSDocument, XBRLValidation, XMLHasParent, java.lang.Cloneable, javax.xml.namespace.NamespaceContext
  Direct Known Subclasses:
    CalculationLinkbase, DefinitionLinkbase, FootnoteLinkbase, FormulaLinkbase, GenericLinkbase, LabelLinkbase, OtherLinkbase, PresentationLinkbase, ReferenceLinkbase, VersionLinkbase

      public abstract class XBRLExtendedLink
      extends XLinkElement
      implements XBRLDTSDocument, XBRLAllowsDocumentation, XBRLValidation

  The Class XBRLExtendedLink.

- - ### Nested Class Summary

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

      `XBRLValidation.Direction`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `standard_role_URI` The standard role URI http://www.xbrl.org/2003/role/link

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDocumentation(XBRLDocumentation doc)` Adds a new XBRLDocumentation object to this object.
    `void` | `addRelationship(XBRLRelationship relationship)` Adds the relationship.
    `void` | `addResource(XBRLResource resource)` This method adds a XBRLResource to the Extended Link container.
    `void` | `clear()` Frees-up used memory This method should not be invoqued on live objects in the DTS.
    `void` | `clearCaches()` Used to clear memory used during the DTS loading process.
    `static XBRLExtendedLink` | `createExtendedLink(XBRLDocument parent, DTSBase base)` Creates the extended link.
    `static XBRLExtendedLink` | `createExtendedLink(XBRLDocument parent, javax.xml.namespace.QName rootElementName, XBRLRoleType role)` Creates the extended link.
    `static XBRLExtendedLink` | `createExtendedLink(XBRLDocument parent, net.sf.saxon.s9api.XdmNode node)` Creates the extended link.
    `void` | `discoverDTS(XBRLDTSDocument parent)` Fires the rules of DTS Discovery for this object.
    `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
    `java.util.Iterator<XBRLArcroleType>` | `getArcroles()` Access to all used arcroles.
    `XBRLArcroleType` | `getArcroleType(java.lang.String arcrole)` Returns the arcroleType of an arc on this extended link resolved using the corresponding arcroleRef element or the static definition in the specifications.
    `java.util.Iterator<XBRLArc>` | `getArcs()` Return an Iterator object over all arcs in the extended link.
    `java.util.Iterator<XBRLAttribute>` | `getAttributes()` Access to the [Attributes] property.
    `java.util.Iterator<XBRLDocumentation>` | `getDocumentation()` Access to the [Documentation] property.
    `DTSBase` | `getDTSBase()` Gets the DTS base.
    `java.net.URI` | `getDTSKey()` Provides a key that can be used to index the document in the cache.
    `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.
    `abstract java.lang.String` | `getExtendedLinkTypeName()` Returns a localized constant string indicating the extended link type
    `java.lang.String` | `getFriendlyName()` Returns a string description that represents the element content in a form that users can understand.
    `javax.xml.namespace.QName` | `getLinkbaseType()` Access to the [linkbaseType] property This is the QName of the extended link element which is the root ot this extended link.
    `GeneralIterable<XBRLLocator>` | `getLocators()` Access to all locators in an extended link.
    `int` | `getNumberOfResources()` Returns how many resources exists in this extended link.
    `XBRLDocument` | `getParent()` Access to the [Parent] property.
    `java.util.Iterator<XBRLRelationship>` | `getRelationships()` Access to the [Relationships] information item.
    `java.util.Iterator<XBRLResource>` | `getResources()` Return an iterator over all resources that exist on this extended link.
    `XBRLRoleType` | `getRoleType()` Access to the [Role Type] property of this object Validates this extended link QName in on the used on list of the roleType.
    `abstract java.util.Collection<java.lang.String>` | `getStandardDefinedRolesOnResources()` Returns a collection of role URIs that the XBRL 2.1 standard defines to be used on resources on this extended link
    `abstract java.util.Collection<javax.xml.namespace.QName>` | `getStandardResourceNodeNames()` Returns a collection of resource node names that are allowed to exist on this extended link.
    `abstract javax.xml.namespace.QName` | `getStaticLinkbaseType()` This function MUST be implemented by classes derived from this class.
    `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` | `isOnValidation()` When validation is a recursive process, this function returns true if the object going to be validated is already under validation.
    `abstract boolean` | `isStandardExtendedLink()` Returns true if the extended link belongs to the XBRL 2.1 specification.
    `void` | `removeDocumentation(XBRLDocumentation doc)` Remove a XBRLDocumentation object to this object.
    `boolean` | `removeRelationship(XBRLRelationship relationship)` Removes the relationship.
    `void` | `removeResource(XBRLResource resource)` Removes the resource.
    `void` | `setDTSBase(DTSBase base)` Sets the DTS base.
    `void` | `setParent(XBRLDocument parent)` Sets the parent of this extended link.
    `void` | `setRole(java.lang.String newRole)` Sets the value of the xlink:role attribute to a specific value.
    `void` | `setRoleType(XBRLRoleType newRoleType)` Sets the role type.
    `XBRLValidationReport` | `validate(XBRLPlugInProcessor proc)` Executes validation on the instance object and returns a validation report.
    `boolean` | `wouldBeDuplicateArc(XBRLRelationship rel)` Checks wether or not the relationship in the parameter will be a duplicate relationship in this extended link.

    - ### 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, 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, getFriendlyName, 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, setId, 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.XBRLAllowsDocumentation

      `getContainer`

    - ### Methods inherited from interface com.ihr.xbrl.om.XMLHasParent

      `addXMLChild, getBase, removeXMLChild, setParent`

- - ### Field Detail

    - #### standard_role_URI

          public static final java.lang.String standard_role_URI

      The standard role URI http://www.xbrl.org/2003/role/link
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getDTSKey

          public java.net.URI getDTSKey()

      Description copied from interface: `XBRLDTSDocument`
      Provides a key that can be used to index the document in the cache.
      Specified by:
        `getDTSKey` in interface `XBRLDTSDocument`
      Returns:
        URI

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

      Specified by:
        `clear` in interface `XBRLDTSDocument`
      Overrides:
        `clear` in class `XMLFragment`
      Throws:
        `java.lang.Throwable` - the throwable

    - #### getParent

          public XBRLDocument getParent()

      Access to the [Parent] property.
      Specified by:
        `getParent` in interface `XMLHasParent`
      Overrides:
        `getParent` in class `XMLFragment`
      Returns:
        XBRLDocument

    - #### setParent

          public void setParent(XBRLDocument parent)

      Sets the parent of this extended link.
      Parameters:
        `parent` - the new XBRLDocument that will be the parent

    - #### setDTSBase

          public void setDTSBase(DTSBase base)
                          throws XBRLInconsistentDTSException

      Sets the DTS base.
      Parameters:
        `base` - the new DTS base
      Throws:
        `XBRLInconsistentDTSException` - the XBRL inconsistent dts exception

    - #### getDTSBase

          public DTSBase getDTSBase()

      Gets the DTS base.
      Returns:
        the DTS base

    - #### equals

          public boolean equals(java.lang.Object other)

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

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `XMLFragment`

    - #### createExtendedLink

          public static XBRLExtendedLink createExtendedLink(XBRLDocument parent,
                                            DTSBase base)
                                                     throws XBRLInconsistentDTSException

      Creates the extended link.
      Parameters:
        `parent` - XBRLDocument
        `base` - DTSBase
      Returns:
        XBRLExtendedLink
      Throws:
        `XBRLInconsistentDTSException` - the XBRL inconsistent dts exception

    - #### createExtendedLink

          public static XBRLExtendedLink createExtendedLink(XBRLDocument parent,
                                            javax.xml.namespace.QName rootElementName,
                                            XBRLRoleType role)
                                                     throws XBRLInconsistentDTSException

      Creates the extended link.
      Parameters:
        `parent` - the parent
        `rootElementName` - the root element name
        `role` - the role
      Returns:
        the XBRL extended link
      Throws:
        `XBRLInconsistentDTSException` - the XBRL inconsistent dts exception

    - #### createExtendedLink

          public static XBRLExtendedLink createExtendedLink(XBRLDocument parent,
                                            net.sf.saxon.s9api.XdmNode node)

      Creates the extended link.
      Parameters:
        `parent` - the parent
        `node` - the node
      Returns:
        the XBRL extended link

    - #### discoverDTS

          public void discoverDTS(XBRLDTSDocument parent)
                           throws DTSDiscoveryException,
                                  com.rs.lic.LicenseVerificationException

      Description copied from interface: `XBRLDTSDocument`
      Fires the rules of DTS Discovery for this object.
      Specified by:
        `discoverDTS` in interface `XBRLDTSDocument`
      Parameters:
        `parent` - the parent
      Throws:
        `DTSDiscoveryException` - the DTS discovery exception
        `com.rs.lic.LicenseVerificationException` - the license verification exception

    - #### getStaticLinkbaseType

          public abstract javax.xml.namespace.QName getStaticLinkbaseType()

      This function MUST be implemented by classes derived from this class.
      Returns:
        QName indicating the LinkbaseType like xbrli:footnoteLinkbase etc.

    - #### getExtendedLinkTypeName

          public abstract java.lang.String getExtendedLinkTypeName()

      Returns a localized constant string indicating the extended link type
      Returns:
        String
      Since:
        2.6.10.31

    - #### getLinkbaseType

          public javax.xml.namespace.QName getLinkbaseType()

      Access to the [linkbaseType] property This is the QName of the extended link element which is the root ot this extended link.
      Returns:
        QName

    - #### getDocumentation

          public java.util.Iterator<XBRLDocumentation> getDocumentation()

      Access to the [Documentation] property.
      Returns:
        Iterator

    - #### addDocumentation

          public void addDocumentation(XBRLDocumentation doc)

      Description copied from interface: `XBRLAllowsDocumentation`
      Adds a new XBRLDocumentation object to this object.
      Specified by:
        `addDocumentation` in interface `XBRLAllowsDocumentation`
      Parameters:
        `doc` - the doc

    - #### removeDocumentation

          public void removeDocumentation(XBRLDocumentation doc)

      Description copied from interface: `XBRLAllowsDocumentation`
      Remove a XBRLDocumentation object to this object.
      Specified by:
        `removeDocumentation` in interface `XBRLAllowsDocumentation`
      Parameters:
        `doc` - the doc

    - #### getAttributes

          public java.util.Iterator<XBRLAttribute> getAttributes()

      Access to the [Attributes] property.
      Overrides:
        `getAttributes` in class `XMLFragment`
      Returns:
        Iterator
      See Also:
        `XMLFragment.getAllAttributes()`

    - #### getRoleType

          public XBRLRoleType getRoleType()

      Access to the [Role Type] property of this object Validates this extended link QName in on the used on list of the roleType.
      Returns:
        XBRLRoleType

    - #### setRoleType

          public void setRoleType(XBRLRoleType newRoleType)

      Sets the role type.
      Parameters:
        `newRoleType` - the new role type

    - #### setRole

          public void setRole(java.lang.String newRole)

      Description copied from class: `XLinkElement`
      Sets the value of the xlink:role attribute to a specific value.
      Overrides:
        `setRole` in class `XLinkElement`
      Parameters:
        `newRole` - the new role

    - #### addRelationship

          public void addRelationship(XBRLRelationship relationship)
                               throws XBRLInconsistentDTSException

      Adds the relationship.
      Parameters:
        `relationship` - the relationship
      Throws:
        `XBRLInconsistentDTSException` - the XBRL inconsistent dts exception

    - #### isStandardExtendedLink

          public abstract boolean isStandardExtendedLink()

      Returns true if the extended link belongs to the XBRL 2.1 specification. This means it is a PresentationLinkbase, CalculationLinkbase, DefinitionLinkbase, LabelLinkbase, FootnoteLinkbase or ReferenceLinkbase
      Returns:
        a boolean value that is true for XBRL 2.1 extended links only
      Since:
        2.7.7

    - #### removeRelationship

          public boolean removeRelationship(XBRLRelationship relationship)
                                     throws XBRLInconsistentDTSException

      Removes the relationship.
      Parameters:
        `relationship` - the relationship
      Returns:
        true, if successful
      Throws:
        `XBRLInconsistentDTSException` - the XBRL inconsistent dts exception

    - #### 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 `XMLFragment`
      Returns:
        Non empty String. Internationalization is enabled

    - #### getArcroles

          public java.util.Iterator<XBRLArcroleType> getArcroles()

      Access to all used arcroles. This resolves arcroleURI values to the correspodent arcroleType element The iterator contains XBRLArcroleType elements
      Returns:
        Iterator

    - #### getArcroleType

          public XBRLArcroleType getArcroleType(java.lang.String arcrole)

      Returns the arcroleType of an arc on this extended link resolved using the corresponding arcroleRef element or the static definition in the specifications. Returns null if the arcrole is not used by relationships on this extended link (even for static arcroles).
      Parameters:
        `arcrole` - the arcrole
      Returns:
        the arcrole type
      Since:
        2.7.4

    - #### getRelationships

          public java.util.Iterator<XBRLRelationship> getRelationships()

      Access to the [Relationships] information item.
      Returns:
        the relationships

    - #### getStandardResourceNodeNames

          public abstract java.util.Collection<javax.xml.namespace.QName> getStandardResourceNodeNames()

      Returns a collection of resource node names that are allowed to exist on this extended link.
      Returns:
        collection of QNames, if no resources are allowed this is an empty collection of QNames

    - #### getStandardDefinedRolesOnResources

          public abstract java.util.Collection<java.lang.String> getStandardDefinedRolesOnResources()

      Returns a collection of role URIs that the XBRL 2.1 standard defines to be used on resources on this extended link
      Returns:
        collection of strings

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

    - #### wouldBeDuplicateArc

          public boolean wouldBeDuplicateArc(XBRLRelationship rel)
                                      throws XBRLValidationException

      Checks wether or not the relationship in the parameter will be a duplicate relationship in this extended link.
      Parameters:
        `rel` - the relationship that is not in this link and will be tested
      Returns:
        true if this is the case
      Throws:
        `XBRLValidationException` - the XBRL validation exception

    - #### getArcs

          public java.util.Iterator<XBRLArc> getArcs()
                                              throws XBRLValidationException

      Return an Iterator object over all arcs in the extended link. Arcs are not relationships. One arc may represent one or many relationships. Applications working with a DTS should use getRelationships instead. This method only serves applications that wants to access to the content of the extended link as it is serialized in the file. The Iterator over arcs is created each time this function is called.
      Returns:
        Iterator over XBRLArc objects
      Throws:
        `XBRLValidationException` - If there are unrecoverable XBRL errors in the arc

    - #### getResources

          public java.util.Iterator<XBRLResource> getResources()

      Return an iterator over all resources that exist on this extended link.
      Returns:
        Iterator

    - #### getNumberOfResources

          public int getNumberOfResources()

      Returns how many resources exists in this extended link.
      Returns:
        integer number

    - #### addResource

          public void addResource(XBRLResource resource)
                           throws XBRLDuplicateException

      This method adds a XBRLResource to the Extended Link container.

      Try to avoid calling this method directly and use the setParent(XBRLExtendedLink) method of the resource instead.

      Parameters:
        `resource` - the resource
      Throws:
        `XBRLDuplicateException` - the XBRL duplicate exception

    - #### removeResource

          public void removeResource(XBRLResource resource)

      Removes the resource.
      Parameters:
        `resource` - the resource

    - #### getLocators

          public GeneralIterable<XBRLLocator> getLocators()

      Access to all locators in an extended link. Locators are obtained form the locators cache that, in turn, are all locators in this extended link. Applications consuming the XBRL Infoset should not be used locators for anything. They are created automatically during the serialization phase. This method is here for applications that wants to access to the content of an extended link as it is serialized in an extended link.
      Returns:
        Iterator<XBRLLocator>

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

    - #### clearCaches

          public void clearCaches()

      Used to clear memory used during the DTS loading process.

      For internal purposes only

      Since:
        2.6.8

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

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

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

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