com.ihr.xbrl.om.exLinks
Class XBRLLinkbase

java.lang.Object
  extended by com.ihr.xbrl.om.XMLFragment
      extended by com.ihr.xbrl.om.XMLDocumentURI
          extended by com.ihr.xbrl.om.XBRLDocument
              extended by com.ihr.xbrl.om.exLinks.XBRLLinkbase
All Implemented Interfaces:
XBRLAllowsDocumentation, XBRLRelationshipPoint, XBRLDTSDocument, XBRLHasDTSTarget, XBRLValidation, XMLHasParent, java.io.Serializable, java.lang.Cloneable, javax.xml.namespace.NamespaceContext

public class XBRLLinkbase
extends XBRLDocument
implements java.io.Serializable, XBRLAllowsDocumentation

Provides the properties of the XBRL Linkbase information item

The [Parent] property is the parent class XBRLDocument

An XBRL Linkbase is just the container of documentation and extended links. The extended links contains the locators, arcs and resources that are connected with the concept definitions in the taxonomy. The Linkbase is just the container element.

According to the XBRL 2.1 specification an XBRL Linkbase can be the root element in a separate document (called external linkbases) or can exist inside an XML schema in xs:annotation/xs:appinfo/link:linkbase elements called embedded linkbases.

Author:
Ignacio
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ihr.xbrl.om.XBRLValidation
XBRLValidation.Direction
 
Field Summary
static javax.xml.namespace.QName linkbaseDocNode
           
 
Fields inherited from class com.ihr.xbrl.om.XBRLDocument
INSTANCE, IXBRL, LINKBASE, TAXONOMY
 
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
XBRLLinkbase(DTSContainer dts)
          Creates a XBRLLinkbase that will contain extended links created later.
XBRLLinkbase(DTSContainer dts, XBRLDocument parent)
          Creates a XBRLLinkbase that will contain extended links created later.
XBRLLinkbase(XBRLDocument parent)
          Creates a XBRLLinkbase that will contain extended links created later.
XBRLLinkbase(XBRLDocument parent, XMLDocumentURI combinedDocument)
          Creates a linkbase, the parent XBRLDocumentURI Item is an XBRL Taxonomy Used to create embedded linkbases, Parent is the parent taxonomy and XMLDocumentURI is the link:linkbase element
XBRLLinkbase(XMLDocumentURI other, boolean bAddToCache)
          Creates a linkbase, the parent XBRLDocumentInformation Item is this object Used to create external linkbases.
 
Method Summary
 void addDocumentation(XBRLDocumentation newDoc)
          Adds a new XBRLDocumentation object to the array of documentation objects
 void checkRoleType(XBRLRoleType roleType, java.net.URI txURI)
           
 void clear()
          Frees-up used memory This method should not be invoqued on live objects in the DTS.
 void discoverDTS(XBRLDTSDocument parent)
          All derived classes MUST implement this method and provide the functionality according to section 3.2 of the XBRL 2.1 specification
 boolean equals(java.lang.Object obj)
          Sets a new XPathFunctionResolver for this object
 org.jdom.Document generateDocNode(boolean relativize, java.net.URI base)
          This class has to be implemented by objects derived from XBRLDocument and must return a org.jdom.Document node with the content of this XBRLDocument object
 java.util.Iterator<XBRLDocumentation> getDocumentation()
          Access to the [Documentation] property
 int getDTSDocumentType()
          Returns the type of DTS Document
 java.lang.String getDTSDocumentTypeName()
           
 java.util.Iterator<XMLFragment> getElements()
          For complex type resources this returns an iterator with all children XML fragments Tthis method may be overwriten by other classes in the hierarchy
 java.lang.String getId()
          Access to the element's id.
 XBRLLinkbaseRef getLinkbaseRef()
          Obtains an XBRLLinkbaseRef object pointing to this taxonomy.
 XBRLDocument getParent()
          Access to the parent property
 java.lang.String getRoleRef()
          Returns a string representing the standard role for linkbaseRef elements pointing to this linkbase object.
 int hashCode()
           
 void readInfoset()
          Read all structures that builds the infoset
 void removeDocumentation(XBRLDocumentation doc)
          Removes a XBRLDocumentation object from the array of documentation objects of this linkbase
 void setDocumentAndReload(net.sf.saxon.s9api.XdmNode node)
          This method is called by the XMLFragment object each time the surrounding XdmNode object is set.
 void setId(java.lang.String id)
          Sets the content of the id attribute of this element the ID MUST not have any space, but null is allowed and removes an id from an XML Fragment.
 void setParent(XBRLDocument newParent)
          Sets the parent of this XBRLLinkbase to a new document.
 
Methods inherited from class com.ihr.xbrl.om.XBRLDocument
addExtendedLink, addIdOfElement, addIdOfElement, addParent, changeElementId, changeExtendedLinkKey, createDocument, createDocument, createDocument, delParent, getAllUsedIds, getComments, getDocument, getDTS, getElementById, getExtendedLink, getExtendedLinks, getExtendedLinks, getParents, isIdUsed, moveNamespacesUp, removeExtendedLink, removeIdOfElement, save, setComments, updateXML
 
Methods inherited from class com.ihr.xbrl.om.XMLDocumentURI
addChild, delChild, generateLocatorToDocument, getBase, getChildren, getDocumentURI, getDTSKey, getLocalFile, getValidationReport, invalidate, invalidate, isInDTS, isOnValidation, setURI, validate
 
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, generateNode, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAttribute, getAttributeQNameValue, getAttributes, getAttributes, getAttributeStringValue, getAttributeValue, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getFragment, getFriendlyName, getFriendlyName, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getLang, getNamespaceURI, getNodeName, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticNamespace, getStringValue, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathNamespaceContext, getXPathToNode, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, isDead, isNamespaceDefined, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolveHRef, resolveHRef, s_equal2, s_equal2, setAttributes, setBase, setDocument, setElements, 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
 
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

linkbaseDocNode

public static final javax.xml.namespace.QName linkbaseDocNode
Constructor Detail

XBRLLinkbase

public XBRLLinkbase(XMLDocumentURI other,
                    boolean bAddToCache)
             throws DTSDiscoveryException
Creates a linkbase, the parent XBRLDocumentInformation Item is this object Used to create external linkbases. The parent of this linkbase will be this document itself.

Parameters:
other - XMLDocumentURI
bAddToCache - boolean
Throws:
DTSDiscoveryException

XBRLLinkbase

public XBRLLinkbase(DTSContainer dts)
Creates a XBRLLinkbase that will contain extended links created later. Initially this is an external linkbase

Parameters:
dts - The DTSContainer object that will own this linkbase

XBRLLinkbase

public XBRLLinkbase(DTSContainer dts,
                    XBRLDocument parent)
Creates a XBRLLinkbase that will contain extended links created later. Sets the parent of the new linkbase to the document in the parent parameter.

For the creation of an embedded linkbase set parent parameter to the taxonomy where this linkbase will be embeded

For the creation of exetarnal taxonomies use null as the parent. The parent wil be set to this document so the linkbase will be external.

Parameters:
dts - The DTSContainer object that will own this linkbase
parent - the linkbase parent document

XBRLLinkbase

public XBRLLinkbase(XBRLDocument parent)
Creates a XBRLLinkbase that will contain extended links created later. Sets the parent to the document in the parameter.

This is the creator for the creation of an embedded linkbase set parent parameter to the taxonomy where this linkbase will be embedded

Parameters:
parent - Actually only the XBRLTaxonomy object where this linkbase will be embedded

XBRLLinkbase

public XBRLLinkbase(XBRLDocument parent,
                    XMLDocumentURI combinedDocument)
             throws DTSDiscoveryException
Creates a linkbase, the parent XBRLDocumentURI Item is an XBRL Taxonomy Used to create embedded linkbases, Parent is the parent taxonomy and XMLDocumentURI is the link:linkbase element

Parameters:
parent - XBRLDocument
combinedDocument - XMLDocumentURI
Throws:
DTSDiscoveryException
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.

Specified by:
clear in interface XBRLDTSDocument
Overrides:
clear in class XBRLDocument
Throws:
java.lang.Throwable

setDocumentAndReload

public void setDocumentAndReload(net.sf.saxon.s9api.XdmNode node)
                          throws XBRLInconsistentDTSException,
                                 com.rs.lic.LicenseVerificationException
Description copied from class: XMLFragment
This method is called by the XMLFragment object each time the surrounding XdmNode object is set. This happens internally by the XBRL API after XML Schema validation is performed so the surrounding XML nodes acquire type information.

Overwrite this method in parent objects in order to refresh objects that depends on the surrounding XML nodes.

Overrides:
setDocumentAndReload in class XBRLDocument
Parameters:
node - the new XdmNode
Throws:
XBRLInconsistentDTSException
com.rs.lic.LicenseVerificationException

hashCode

public int hashCode()
Overrides:
hashCode in class XBRLDocument

equals

public boolean equals(java.lang.Object obj)
Description copied from class: XMLFragment
Sets a new XPathFunctionResolver for this object

Overrides:
equals in class XBRLDocument

getDTSDocumentType

public int getDTSDocumentType()
Description copied from class: XBRLDocument
Returns the type of DTS Document

Specified by:
getDTSDocumentType in class XBRLDocument
Returns:
DTSDocument.INSTANCE, DTSDocument.TAXONOMY or DTSDocument.LINKBASE

getDTSDocumentTypeName

public java.lang.String getDTSDocumentTypeName()
Specified by:
getDTSDocumentTypeName in class XBRLDocument

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 newParent)
Sets the parent of this XBRLLinkbase to a new document.

The parent is not informed about this change.

Parameters:
newParent - XBRLDocument

getId

public java.lang.String getId()
Description copied from class: XMLFragment
Access to the element's id. This is not part of the infoset

Overrides:
getId in class XMLFragment
Returns:
the content of the id attribute or null if there is no id attribute

setId

public void setId(java.lang.String id)
           throws XBRLInconsistentDTSException
Description copied from class: XMLFragment
Sets the content of the id attribute of this element the ID MUST not have any space, but null is allowed and removes an id from an XML Fragment. This method may be overwritten by other classes that require storing an indexed table of elements and IDs in order to prevent duplicate IDs to exist

Overrides:
setId in class XMLFragment
Parameters:
id - the new ID
Throws:
XBRLInconsistentDTSException - if the id is not lexicographically valid

getLinkbaseRef

public XBRLLinkbaseRef getLinkbaseRef()
Obtains an XBRLLinkbaseRef object pointing to this taxonomy. This method is used internally by the API.

Returns:
XBRLLinkbaseRef

discoverDTS

public void discoverDTS(XBRLDTSDocument parent)
                 throws DTSDiscoveryException
Description copied from class: XBRLDocument
All derived classes MUST implement this method and provide the functionality according to section 3.2 of the XBRL 2.1 specification

Specified by:
discoverDTS in interface XBRLDTSDocument
Specified by:
discoverDTS in class XBRLDocument
Throws:
DTSDiscoveryException

getDocumentation

public java.util.Iterator<XBRLDocumentation> getDocumentation()
Access to the [Documentation] property

Returns:
Iterator<XBRLDocumentation>

addDocumentation

public void addDocumentation(XBRLDocumentation newDoc)
Adds a new XBRLDocumentation object to the array of documentation objects

Specified by:
addDocumentation in interface XBRLAllowsDocumentation
Parameters:
newDoc - the new XBRLDocumentation to add

removeDocumentation

public void removeDocumentation(XBRLDocumentation doc)
Removes a XBRLDocumentation object from the array of documentation objects of this linkbase

Specified by:
removeDocumentation in interface XBRLAllowsDocumentation
Parameters:
doc - the existing XBRLDocumentation to remove

readInfoset

public void readInfoset()
                 throws XBRLValidationException
Description copied from class: XBRLDocument
Read all structures that builds the infoset

Specified by:
readInfoset in class XBRLDocument
Throws:
XBRLValidationException

checkRoleType

public void checkRoleType(XBRLRoleType roleType,
                          java.net.URI txURI)
                   throws DTSDiscoveryException
Throws:
DTSDiscoveryException

getRoleRef

public java.lang.String getRoleRef()
                            throws XBRLSerializationException
Returns a string representing the standard role for linkbaseRef elements pointing to this linkbase object.

Returns:
a standard role ref or null if there are inconsistencies or it is not possible to obtain one
Throws:
XBRLSerializationException

generateDocNode

public org.jdom.Document generateDocNode(boolean relativize,
                                         java.net.URI base)
                                  throws XBRLSerializationException
Description copied from class: XBRLDocument
This class has to be implemented by objects derived from XBRLDocument and must return a org.jdom.Document node with the content of this XBRLDocument object

Specified by:
generateDocNode in class XBRLDocument
Parameters:
relativize - boolean indicating if all URIs must be relativized
base - URI the base uri to relativize other URIs
Returns:
org.jdom.Document
Throws:
XBRLSerializationException

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 Tthis method may be overwriten by other classes in the hierarchy

Overrides:
getElements in class XMLFragment
Returns:
Iterator


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