Re: [Xbrlapi-developer] XBRLAPI - Question on dimensions
Brought to you by:
shuetrim
From: Geoff S. <ge...@ga...> - 2009-09-07 02:38:04
|
2009/9/4 Edouard Guérin <edo...@sm...> > Hi Geoffrey, > > I'm a BI consultant and I use your good API to read some XBRL instances. > You did a great job, it's fantastic ! > I am glad that it is working for you. > > But I have a question about the dimensions. > I can't get the dimensions of my instance. > > For example : > > [..] > <xbrli:scenario> > <xbrldi:explicitMember > > dimension="d-sac:ActiviteDimension">d-sac:ToutesZones</xbrldi:explicitMember> > <xbrldi:explicitMember > > dimension="d-scu:MonnaieDimension">d-scu:ToutesMonnaies</xbrldi:explicitMember> > </xbrli:scenario> > [..] > > My code is : > > instance.getScenario().getChildElements() // get 2 lines > > I want to read the dimensions from my taxonomy but I can't access to my XML > dimensions files with this. > Have you an idea to reads labels and code from my taxonomy ? > You should use the additional XDT dimensions module that is released as a separate JAR file (and is bundled with the monolithic Jar file). If you use the loader that is provided in that module, then each dimension value and each dimension/hypercube declaration will be recognised as an XDT dimension construct and will result in an XDT object in the data store. Then, you are able to work with the XDT dimension values/labels etc as you wish. Note, though, that this module gives you access to the dimension stuff without giving you much assistance with validation of XDT dimension values. Examples of how to do this are provided in the unit tests org.xbrlapi.xdt.tests ... You can also get some insight into dimensions usage from the code implementing the dimensional aspect model (see the org.xbrlapi.xdt.aspects package). Regards Geoff Shuetrim > > Exemple of dimension taxonomy : > > <link:label xlink:type="resource" > xlink:role="http://www.xbrl.org/2003/role/label" > xlink:label="label_d-sac_ToutesZones_001" > xlink:title="label_d-sac_ToutesZones_001" id="label_d-sac_ToutesZones_001" > xml:lang="fr">Toutes zones</link:label> > <link:labelArc xlink:type="arc" > xlink:arcrole="http://www.xbrl.org/2003/arcrole/concept-label" > xlink:from="d-sac_ToutesZones" xlink:to="label_d-sac_ToutesZones_001" > xlink:title="d-sac_ToutesZones to label_d-sac_ToutesZones_001"/> > <link:label xlink:type="resource" > xlink:role=" > http://www.banque-france.fr/fr/supervi/supervi_banc/reporting/surfi/role/code > " > xlink:label="label_d-sac_ToutesZones_002" > xlink:title="label_d-sac_ToutesZones_002" id="label_d-sac_ToutesZones_002" > xml:lang="fr">SB0</link:label> > > I want to get "Toutes zones" and "SB0" from my scenario, is it possible ? > > Best regards, > > -- > Edouard Guérin > Consultant décisionnel > Smile - Open Source Solutions > www.smile.fr > > |