XBRLAPI

A Java API for XBRL


org.xbrlapi.aspects
Class AspectImpl

java.lang.Object
  extended by org.xbrlapi.aspects.AspectImpl
All Implemented Interfaces:
Serializable, Aspect
Direct Known Subclasses:
ConceptAspect, DimensionAspect, EntityAspect, LocationAspect, PeriodAspect, ScenarioAspect, ScenarioRemainderAspect, SegmentAspect, SegmentRemainderAspect, TupleAspect, UnitAspect

public abstract class AspectImpl
extends Object
implements Aspect

Abstract implementation of common aspect methods.

Author:
Geoff Shuetrim (geoff@galexy.net)
See Also:
Serialized Form

Field Summary
protected  Domain domain
           
 
Constructor Summary
AspectImpl(Domain domain)
           
 
Method Summary
 Domain getDomain()
           
 AspectValue getValue(Context context)
           
 AspectValue getValue(Unit unit)
           
 boolean isExtensible()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xbrlapi.aspects.Aspect
getId, getMissingValue, getValue
 

Field Detail

domain

protected Domain domain
Constructor Detail

AspectImpl

public AspectImpl(Domain domain)
           throws XBRLException
Parameters:
domain - The domain for this aspect.
Throws:
XBRLException - if the domain is null or the domain aspect ID does not match the ID of the aspect it is being associated with.
Method Detail

getDomain

public Domain getDomain()
Specified by:
getDomain in interface Aspect
Returns:
The domain of valid values for this aspect.
See Also:
Aspect.getDomain()

isExtensible

public boolean isExtensible()
Specified by:
isExtensible in interface Aspect
Returns:
true if the aspect can be defined by DTS augmentations and false otherwise. True for XDT dimensions, for example, and false for concept and location aspects, for example.
See Also:
Aspect.isExtensible()

getValue

public AspectValue getValue(Context context)
                     throws XBRLException
Specified by:
getValue in interface Aspect
Parameters:
context - The context to get the aspect value from.
Returns:
the aspect value for the context or the missing aspect value if the context does not define a value for the aspect.
Throws:
XBRLException
See Also:
Aspect.getValue(Context)

getValue

public AspectValue getValue(Unit unit)
                     throws XBRLException
Specified by:
getValue in interface Aspect
Parameters:
unit - The unit to get the aspect value from.
Returns:
the aspect value for the context or the missing aspect value if the unit does not define a value for the aspect.
Throws:
XBRLException
See Also:
Aspect.getValue(Unit)

Get Java XBRL API implementation at SourceForge.net.