com.ihr.xbrl.om.exLinks
Class XBRLExtendedLink

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.XBRLExtendedLink
All Implemented Interfaces:
XBRLAllowsDocumentation, XBRLRelationshipPoint, XBRLDTSDocument, 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


Field Summary
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, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, idQName, NO_POSITION, OrderComparator, PERIOD_TYPE, PERIOD_VALUE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER
 
Method Summary
 void addDocumentation(XBRLDocumentation doc)
          Adds a new XBRLDocumentation object to this object
 void addRelationship(XBRLRelationship 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)
           
static XBRLExtendedLink createExtendedLink(XBRLDocument parent, javax.xml.namespace.QName rootElementName, XBRLRoleType role)
           
static XBRLExtendedLink createExtendedLink(XBRLDocument parent, net.sf.saxon.s9api.XdmNode node)
           
 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.
 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()
           
 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 Tthis 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
 java.util.Iterator<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  javax.xml.namespace.QName getStaticLinkbaseType()
          This function MUST be implemented by classes derived from this class
 int hashCode()
           
 void removeDocumentation(XBRLDocumentation doc)
          Remove a XBRLDocumentation object to this object
 boolean removeRelationship(XBRLRelationship relationship)
           
 void removeResource(XBRLResource resource)
           
 void setDTSBase(DTSBase 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)
           
 XBRLValidationReport validate(XBRLCoreProcessor proc)
          Performs XLink valiadtion at the arcs level
abstract  void validateNewRelationship(XBRLRelationship rel)
           
 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, getAttribute, getAttributeQNameValue, getAttributes, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getDeclaredNamespaces, getDocument, getFragment, getFriendlyName, getFromRelationships, getFromRelationships, getFromRelationships, getId, getLang, getNamespaceURI, getNodeName, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticNamespace, getStringValue, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathNamespaceContext, getXPathToNode, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, 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
 
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

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
Throws:
XBRLInconsistentDTSException

getDTSBase

public DTSBase getDTSBase()

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

hashCode

public int hashCode()
Overrides:
hashCode in class XMLFragment

createExtendedLink

public static XBRLExtendedLink createExtendedLink(XBRLDocument parent,
                                                  DTSBase base)
                                           throws XBRLInconsistentDTSException
Parameters:
parent - XBRLDocument
base - DTSBase
Returns:
XBRLExtendedLink
Throws:
XBRLInconsistentDTSException

createExtendedLink

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

createExtendedLink

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

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
Throws:
DTSDiscoveryException
com.rs.lic.LicenseVerificationException

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

removeDocumentation

public void removeDocumentation(XBRLDocumentation doc)
Description copied from interface: XBRLAllowsDocumentation
Remove a XBRLDocumentation object to this object

Specified by:
removeDocumentation in interface XBRLAllowsDocumentation

getAttributes

public java.util.Iterator<XBRLAttribute> getAttributes()
Access to the [Attributes] property

Overrides:
getAttributes in class XMLFragment
Returns:
Iterator

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
Throws:
XBRLValidationException

setRoleType

public void setRoleType(XBRLRoleType newRoleType)

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

addRelationship

public void addRelationship(XBRLRelationship relationship)
                     throws XBRLInconsistentDTSException
Parameters:
relationship -
Throws:
XBRLValidationException
XBRLValidationException
XBRLInconsistentDTSException

validateNewRelationship

public abstract void validateNewRelationship(XBRLRelationship rel)
                                      throws XBRLValidationException
Throws:
XBRLValidationException

removeRelationship

public boolean removeRelationship(XBRLRelationship relationship)
                           throws XBRLInconsistentDTSException
Parameters:
relationship -
Throws:
XBRLInconsistentDTSException
XBRLValidationException

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
Throws:
XBRLValidationException

getRelationships

public java.util.Iterator<XBRLRelationship> getRelationships()
Access to the [Relationships] information item

Throws:
XBRLValidationException
XBRLValidationException

validate

public XBRLValidationReport validate(XBRLCoreProcessor proc)
Performs XLink valiadtion at the arcs level


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

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

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
Throws:
XBRLValidationException

getNumberOfResources

public int getNumberOfResources()
Returns how many resources exists in this extended link

Returns:
integer number
Throws:
XBRLValidationException

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 -
Throws:
XBRLDuplicateException

removeResource

public void removeResource(XBRLResource resource)
Parameters:
resource -

getLocators

public java.util.Iterator<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 Tthis 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


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