XBRLResource: Difference between revisions

From XBRLWiki
Jump to navigationJump to search
(Created page with '====Remember to add==== The creation of a relationship that involves a resource that does not have a parent may thow an unexpected error. If the user decides to unset the parent …')
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
====Remember to add====
===Description===
The creation of a relationship that involves a resource that does not have a parent may thow an unexpected error. If the user decides to unset the parent of the resource
 
XBRL Resources are the containers of information that may be associated with concept definitions in XBRL. The association is established using relationships. An XBRL Resource is an XML Element that is also an xlink resource.
 
According to the definition of the XBRL Infoset, a DTS (represented in the API as a [[DTSContainer]] object) has a collection of all resources defined in the DTS.
 
===How to create an instance of an XBRLResource===
 
The API offers a method that creates a new instance of an XBRL resource [[http://www.reportingstandard.com/apidoc/com/ihr/xbrl/om/exLinks/XBRLResource.html#XBRLResource(com.ihr.xbrl.om.exLinks.XBRLExtendedLink,~javax.xml.namespace.QName,~boolean) XBRLResource(XBRLExtendedLink container, QName type, boolean addToParent)]].
 
Calling this method requires three parameters:
* The ''container'' parameter is an instance of an extended link. It could be a LabelLink, a ReferenceLink, a FootnoteLink, a GenericLink or any custom extended link.
* The ''type'' parameter is the QName of the root element of the resource. The schema with the element definition must be previously loaded in the set of schemas available in the [[DTSContainer]] before the resource is created.
* The ''addToParent'' parameter is a boolean value. If ''true'' the extended link container element is informed about the existence of a new resource.
 
The creation of a resource automatically detects the resource type according to the type definition in the XML Schema.
 
According to the type definition of the resource element the resource can be of two possible types:
 
===Simple type resources===
Simple content type resource (like label resources), in this case the resource content does not contain nested XML elements
 
====Read access====
 
====Write access====
 
===Complex type resources===
Complex content type resources (like references), in this case the resource content contains nested XML elements.
 
====Read access====
 
====Write access====

Latest revision as of 11:47, 30 August 2009

Description

XBRL Resources are the containers of information that may be associated with concept definitions in XBRL. The association is established using relationships. An XBRL Resource is an XML Element that is also an xlink resource.

According to the definition of the XBRL Infoset, a DTS (represented in the API as a DTSContainer object) has a collection of all resources defined in the DTS.

How to create an instance of an XBRLResource

The API offers a method that creates a new instance of an XBRL resource [XBRLResource(XBRLExtendedLink container, QName type, boolean addToParent)].

Calling this method requires three parameters:

  • The container parameter is an instance of an extended link. It could be a LabelLink, a ReferenceLink, a FootnoteLink, a GenericLink or any custom extended link.
  • The type parameter is the QName of the root element of the resource. The schema with the element definition must be previously loaded in the set of schemas available in the DTSContainer before the resource is created.
  • The addToParent parameter is a boolean value. If true the extended link container element is informed about the existence of a new resource.

The creation of a resource automatically detects the resource type according to the type definition in the XML Schema.

According to the type definition of the resource element the resource can be of two possible types:

Simple type resources

Simple content type resource (like label resources), in this case the resource content does not contain nested XML elements

Read access

Write access

Complex type resources

Complex content type resources (like references), in this case the resource content contains nested XML elements.

Read access

Write access