com.ihr.xbrl.om.exLinks

## Class XBRLLocator

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

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

      public class XBRLLocator
      extends XBRLPointerOfARelationship
      implements XBRLValidation

  This is not part of the XBRL Infoset. Locators are auxiliary objects.
  Author:
    Ignacio

- - ### 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 javax.xml.namespace.QName` | `standardLocQName` This is link:loc the element name of standard locators .

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLLocator(DTSContainer dts, net.sf.saxon.s9api.XdmNode node)` Instantiates a new XBRL locator.
    `XBRLLocator(XBRLArc arc, net.sf.saxon.s9api.XdmNode node)` Instantiates a new XBRL locator.
    `XBRLLocator(XMLFragment reference)` Instantiates a new XBRL locator.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `XBRLArc` | `getArc()` Access to the [parent] property.
    `XMLDocumentURI` | `getHRefDocument()` Obtains the document this locator is pointing to.
    `XBRLExtendedLink` | `getParent()` The parent XMLFragment node of this XMLFragment node.
    `XMLFragment` | `getReference()` Access to the [Reference] property.
    `XBRLRoleType` | `getRoleType()` Access to the [Role Type] property The resource is validated against the content of the roleType information Return null if no roleType exist on resource.
    `XBRLValidationReport` | `getValidationReport()` Access to the last stored validation report.
    `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.
    `boolean` | `isStandardLoc()` Returns true if the surrounding node is a link:loc returns false if this object is in the substitution group of link:loc but not a link:loc .
    `void` | `setRoleType(XBRLRoleType role)` Sets the role type.
    `XBRLValidationReport` | `validate(XBRLPlugInProcessor proc)` Executes validation on the instance object and returns a validation report.
    `void` | `validateNotEmptyHref(java.net.URI href)` Validate not empty href.
    `void` | `validateXPointer(java.net.URI uriHref)` resolve the XPointer to the node pointed to and returns the XMLFragment it points to or null if none can be found.

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

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

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

      `addAttribute, addChild, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, clear, clone, clone, delAttribute, delAttribute, equals, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAllAttributes, getAttribute, getAttributeBooleanValue, getAttributeQNameValue, getAttributes, getAttributes, getAttributeStringValue, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getDocument, getElements, getElementsHashCode, getFragment, getFriendlyName, 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, hashCode, 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`

- - ### Field Detail

    - #### standardLocQName

          public static final javax.xml.namespace.QName standardLocQName

      This is link:loc the element name of standard locators .

  - ### Constructor Detail

    - #### XBRLLocator

          public XBRLLocator(DTSContainer dts,
                     net.sf.saxon.s9api.XdmNode node)

      Instantiates a new XBRL locator.
      Parameters:
        `dts` - the dts
        `node` - the node

    - #### XBRLLocator

          public XBRLLocator(XBRLArc arc,
                     net.sf.saxon.s9api.XdmNode node)

      Instantiates a new XBRL locator.
      Parameters:
        `arc` - the arc
        `node` - the node

    - #### XBRLLocator

          public XBRLLocator(XMLFragment reference)

      Instantiates a new XBRL locator.
      Parameters:
        `reference` - the reference

  - ### Method Detail

    - #### getArc

          public XBRLArc getArc()

      Access to the [parent] property.
      Returns:
        XBRLArc

    - #### getParent

          public XBRLExtendedLink getParent()

      Description copied from class: `XMLFragment`
      The parent XMLFragment node of this XMLFragment node.

      For XBRLAttribute nodes, the parent is the element node.

      For Document nodes the returned value is null

      For Embedded document nodes, the returned value is the parent element node.

      Specified by:
        `getParent` in interface `XMLHasParent`
      Overrides:
        `getParent` in class `XMLFragment`
      Returns:
        the parent XMLFragment possible parents are: XBRLItem, XBRLTuple, XBRLImport, XBRLLinkbase, XBRLExtendedLink, XBRLDocumentation, XBRLRelationship, XBRLResource.

    - #### getReference

          public XMLFragment getReference()
                                   throws XBRLValidationException

      Access to the [Reference] property.
      Returns:
        XMLFragment
      Throws:
        `XBRLValidationException` - the XBRL validation exception

    - #### getHRefDocument

          public XMLDocumentURI getHRefDocument()
                                         throws XBRLValidationException

      Obtains the document this locator is pointing to. The fragment is not returned by this method If the locator is not a link:loc then the document is loaded in a new DTSContainer
      Returns:
        XMLDocumentURI
      Throws:
        `XBRLValidationException` - the XBRL validation exception

    - #### validateNotEmptyHref

          public void validateNotEmptyHref(java.net.URI href)
                                    throws XBRLValidationExceptionInvalidEmptyHRef

      Validate not empty href.
      Parameters:
        `href` - the href
      Throws:
        `XBRLValidationExceptionInvalidEmptyHRef` - the XBRL validation exception invalid empty h ref

    - #### validateXPointer

          public void validateXPointer(java.net.URI uriHref)
                                throws XBRLValidationException

      resolve the XPointer to the node pointed to and returns the XMLFragment it points to or null if none can be found.

      The href MUST be absolute.

      Parameters:
        `uriHref` - the URI to resolve
      Throws:
        `XBRLValidationException` - if the URI cannot be resolved according to the rules in the XBRL 2.1 specification

    - #### isStandardLoc

          public boolean isStandardLoc()

      Returns true if the surrounding node is a link:loc returns false if this object is in the substitution group of link:loc but not a link:loc .
      Returns:
        boolean

    - #### getRoleType

          public XBRLRoleType getRoleType()

      Access to the [Role Type] property The resource is validated against the content of the roleType information Return null if no roleType exist on resource.
      Returns:
        XBRLRoleType

    - #### setRoleType

          public void setRoleType(XBRLRoleType role)

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

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