XBRLInstance: Difference between revisions
From XBRLWiki
Jump to navigationJump to search
No edit summary |
|||
Line 9: | Line 9: | ||
* all references to XBRLTaxonomies, XBRLLinkbases, XBRLRoleRef and XBRLArcroleRef required for obtaining the DTS. | * all references to XBRLTaxonomies, XBRLLinkbases, XBRLRoleRef and XBRLArcroleRef required for obtaining the DTS. | ||
===How to create an instance of a XBRLInstance=== | ===How to create an instance of a XBRLInstance object=== | ||
There are several ways: | There are several ways depending on what you are doing: | ||
* If the user have just created a new empty [[DTSContainer]] object and the purpose is to read the content of an XBRL report (and the whole referenced DTS) then the simplest way is to use one of the load methods in the [[DTSContainer]] object passing the document URI of the XBRL report. The returned object is an XBRLDocument that can be casted to an XBRLInstance. | |||
* If the user has already loaded a DTS (from a taxonomy file) and the purpose is to create a new XBRLInstance (in order to populate it with facts) then the user can use any of the available [http://www.reportingstandard.com/apidoc/com/ihr/xbrl/om/instance/XBRLInstance.html#constructor_summary constructors]. The most commonly used constructor is [http://www.reportingstandard.com/apidoc/com/ihr/xbrl/om/instance/XBRLInstance.html#XBRLInstance(com.ihr.xbrl.om.DTSContainer) XBRLInstance(com.ihr.xbrl.om.DTSContainer)] that accepts the current DTSContainer as a parameter and allows the user to start adding facts programatically. | |||
See the examples section above. | |||
===Remarks=== | ===Remarks=== |
Revision as of 17:01, 26 June 2009
Description
A XBRLInstance object represents the content of an XBRL Report. This is:
- all XBRL facts , and
- all XBRL contexts, and
- all XBRL units, and
- all Footnote Linkbases, and
- all references to XBRLTaxonomies, XBRLLinkbases, XBRLRoleRef and XBRLArcroleRef required for obtaining the DTS.
How to create an instance of a XBRLInstance object
There are several ways depending on what you are doing:
- If the user have just created a new empty DTSContainer object and the purpose is to read the content of an XBRL report (and the whole referenced DTS) then the simplest way is to use one of the load methods in the DTSContainer object passing the document URI of the XBRL report. The returned object is an XBRLDocument that can be casted to an XBRLInstance.
- If the user has already loaded a DTS (from a taxonomy file) and the purpose is to create a new XBRLInstance (in order to populate it with facts) then the user can use any of the available constructors. The most commonly used constructor is XBRLInstance(com.ihr.xbrl.om.DTSContainer) that accepts the current DTSContainer as a parameter and allows the user to start adding facts programatically.
See the examples section above.
Remarks
The XBRLInstance object is able to automatically change its content in order to keep consistency during operations with the XBRLInstance. For example, the action of adding a new XBRLFact item to the report may automatically add a new context, a new unit and a new reference to the required taxonomy schema to the report. Deleting the last concept using an XBRLUnit will make the serializable version of the XBRLInstance not to contain the unreferenced unit.
The XBRLInstance object implements the XBRLFactsList interface.