XBRLAPI

A Java API for XBRL


org.xbrlapi.xdt.values
Class DimensionValueAccessorImpl

java.lang.Object
  extended by org.xbrlapi.xdt.values.DimensionValueAccessorImpl
All Implemented Interfaces:
DimensionValueAccessor

public class DimensionValueAccessorImpl
extends Object
implements DimensionValueAccessor

Author:
Geoff Shuetrim (geoff@galexy.net)

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
DimensionValueAccessorImpl()
          Create a dimension value accessor.
 
Method Summary
 boolean equalValues(Item first, Item second, Dimension dimension)
          TODO move this equalValues method out of the dimension value accessor.
 Concept getDomainMemberFromOpenContextComponent(OpenContextComponent occ, Dimension dimension)
           
 DimensionValue getExplicitDimensionValue(Item item, Dimension dimension)
           
 Element getTypedDimensionContentFromOpenContextComponent(OpenContextComponent occ, Dimension dimension)
           
 DimensionValue getTypedDimensionValue(Item item, Dimension dimension)
           
 DimensionValue getValue(Item item, Dimension dimension)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

DimensionValueAccessorImpl

public DimensionValueAccessorImpl()
Create a dimension value accessor.

Method Detail

getValue

public DimensionValue getValue(Item item,
                               Dimension dimension)
                        throws XBRLException
Specified by:
getValue in interface DimensionValueAccessor
Parameters:
item - The item to get the dimension value for.
dimension - The dimension to get the value for.
Returns:
the value of the named dimension for the specified fact or null if the fact does not have a value for the specified dimension.
Throws:
XBRLException
See Also:
DimensionValueAccessor.getValue(org.xbrlapi.Item, org.xbrlapi.xdt.Dimension)

getTypedDimensionValue

public DimensionValue getTypedDimensionValue(Item item,
                                             Dimension dimension)
                                      throws XBRLException
Specified by:
getTypedDimensionValue in interface DimensionValueAccessor
Parameters:
item - The fact to get the typed dimension value for.
dimension - The dimension to get the value for.
Returns:
the element containing the typed dimension value. This is a child element of the segment or scenario that contains the typed dimension value.
Throws:
XBRLException
See Also:
DimensionValueAccessor.getTypedDimensionValue(Item, Dimension)

getExplicitDimensionValue

public DimensionValue getExplicitDimensionValue(Item item,
                                                Dimension dimension)
                                         throws XBRLException
Specified by:
getExplicitDimensionValue in interface DimensionValueAccessor
Parameters:
item - The fact to get the explicit dimension value for.
dimension - The dimension to get the value for.
Returns:
the value of the explicit dimension or null if there is none.
Throws:
XBRLException
See Also:
DimensionValueAccessor.getExplicitDimensionValue(Item, Dimension)

getDomainMemberFromOpenContextComponent

public Concept getDomainMemberFromOpenContextComponent(OpenContextComponent occ,
                                                       Dimension dimension)
                                                throws XBRLException
Specified by:
getDomainMemberFromOpenContextComponent in interface DimensionValueAccessor
Parameters:
occ - The open context component fragment (segment or scenario) to get the dimension value from
dimension - The dimension
Returns:
The domain member that is the dimension value for the item.
Throws:
XBRLException
See Also:
DimensionValueAccessor.getDomainMemberFromOpenContextComponent(OpenContextComponent, Dimension)

getTypedDimensionContentFromOpenContextComponent

public Element getTypedDimensionContentFromOpenContextComponent(OpenContextComponent occ,
                                                                Dimension dimension)
                                                         throws XBRLException
Specified by:
getTypedDimensionContentFromOpenContextComponent in interface DimensionValueAccessor
Parameters:
occ - The open context component fragment (segment or scenario) to get the dimension value from
dimension - The dimension
Returns:
The child element of the OCC that contains the typed dimension value or null if there is none.
Throws:
XBRLException
See Also:
DimensionValueAccessor.getTypedDimensionContentFromOpenContextComponent(OpenContextComponent, Dimension)

equalValues

public boolean equalValues(Item first,
                           Item second,
                           Dimension dimension)
                    throws XBRLException
Description copied from interface: DimensionValueAccessor
TODO move this equalValues method out of the dimension value accessor.

Specified by:
equalValues in interface DimensionValueAccessor
Parameters:
first - The first item.
second - The second item.
dimension - The dimension.
Returns:
true if the first and second items have equal values for the specified dimension and false otherwise.
Throws:
XBRLException
See Also:
DimensionValueAccessor.equalValues(org.xbrlapi.Item, org.xbrlapi.Item, org.xbrlapi.xdt.Dimension)

Get Java XBRL API implementation at SourceForge.net. Fast, secure and Free Open Source software downloads