com.ihr.xbrl.om.exLinks
Class XBRLLocator

java.lang.Object
  extended by com.ihr.xbrl.om.XMLFragment
      extended by com.ihr.xbrl.om.exLinks.XLinkElement
          extended by com.ihr.xbrl.om.exLinks.XBRLPointerOfARelationship
              extended by com.ihr.xbrl.om.exLinks.XBRLLocator
All Implemented Interfaces:
XBRLRelationshipPoint, 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
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, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, idQName, NO_POSITION, OrderComparator, PERIOD_TYPE, PERIOD_VALUE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER
 
Constructor Summary
XBRLLocator(DTSContainer dts, net.sf.saxon.s9api.XdmNode node)
           
XBRLLocator(XBRLArc arc, net.sf.saxon.s9api.XdmNode node)
           
XBRLLocator(XMLFragment reference)
           
 
Method Summary
 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.
 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
 XBRLValidationReport validate(XBRLPlugInProcessor proc)
          Executes validation on the instance object and returns a validation report.
 void validateNotEmptyHref(java.net.URI 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, getAttribute, getAttributeQNameValue, getAttributes, getAttributes, getAttributeStringValue, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getDocument, getElements, getFragment, getFriendlyName, getFriendlyName, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getId, getLang, getNamespaceURI, getNodeName, getNumberOfAttributes, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticNamespace, getStringValue, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathNamespaceContext, getXPathToNode, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, hashCode, isDead, isNamespaceDefined, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolveHRef, resolveHRef, s_equal2, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setId, setLang, setNamespaceContext, setNamespaces, setNode, setNodeName, setParent, setValue, setValue, setVariablesDefined, 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)

XBRLLocator

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

XBRLLocator

public XBRLLocator(XMLFragment 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

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

validateNotEmptyHref

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

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
doc - XMLDocumentURI in which uriHRef exist. if null then the XMLDocumentURI is obtained from the cache. If the document has not been loaded in the cache (it is not in the DTS) and the doc parameter is null, most likely, this function will return null.
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

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.

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.


Copyright 2006-2009 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa