XBRLAPI

A Java API for XBRL


org.xbrlapi.aspects
Class ContextAspect

java.lang.Object
  extended by org.xbrlapi.aspects.BaseAspect
      extended by org.xbrlapi.aspects.ContextAspect
All Implemented Interfaces:
Serializable, Aspect
Direct Known Subclasses:
EntityIdentifierAspect, PeriodAspect, QuarterlyPeriodAspect, ScenarioAspect, ScenarioRemainderAspect, SegmentAspect, SegmentRemainderAspect

public abstract class ContextAspect
extends BaseAspect
implements Aspect

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

Field Summary
 
Fields inherited from class org.xbrlapi.aspects.BaseAspect
values
 
Fields inherited from interface org.xbrlapi.aspects.Aspect
ENTITY_IDENTIFIER, LOCATION, PERIOD, SCENARIO, SEGMENT, UNIT
 
Constructor Summary
ContextAspect(AspectModel model)
           
 
Method Summary
 boolean equals(Object obj)
           
protected  Context getContextFromStore(Fact fact)
           
 String getKey(Fact fact)
          This basic implementation has a unique key for each fact This is not efficient from a memory footprint perspective and should be overridden where feasible.
 int hashCode()
           
protected  void initialize()
           
 
Methods inherited from class org.xbrlapi.aspects.BaseAspect
addFact, addValue, clearFacts, clearSelectionCriterion, getAncestorCount, getAspectModel, getAxis, getDescendantCount, getFacts, getFragment, getIterator, getLabelFromElement, getLabelFromElements, getMatchingFacts, getSelectionCriterion, getTransformer, getValue, getValues, getValuesByHierarchy, hasSelectionCriterion, hasValue, hasValue, isEmpty, isMissing, isOrphan, isSingular, setAspectModel, setAxis, setSelectionCriterion, setTransformer, size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xbrlapi.aspects.Aspect
addFact, addValue, clearFacts, clearSelectionCriterion, getAncestorCount, getAspectModel, getAxis, getDescendantCount, getFacts, getFragment, getFragmentFromStore, getIterator, getMatchingFacts, getSelectionCriterion, getTransformer, getType, getValue, getValue, getValues, getValuesByHierarchy, hasSelectionCriterion, hasValue, hasValue, isEmpty, isMissing, isOrphan, isSingular, setAspectModel, setAxis, setSelectionCriterion, setTransformer, size
 

Constructor Detail

ContextAspect

public ContextAspect(AspectModel model)
              throws XBRLException
Throws:
XBRLException
Method Detail

initialize

protected void initialize()

getContextFromStore

protected Context getContextFromStore(Fact fact)
                               throws XBRLException
Returns:
the context of the fact.
Throws:
XBRLException
See Also:
Aspect.getFragmentFromStore(Fact)

getKey

public String getKey(Fact fact)
              throws XBRLException
Description copied from class: BaseAspect
This basic implementation has a unique key for each fact This is not efficient from a memory footprint perspective and should be overridden where feasible.

Specified by:
getKey in interface Aspect
Overrides:
getKey in class BaseAspect
Parameters:
fact - The fact to get an aspect key for.
Returns:
the unique string identifying the fragment that is part of the aspect value for the given fact. This should be the empty string if the fact does not have a value for the aspect.
Throws:
XBRLException
See Also:
Aspect.getKey(Fact)

hashCode

public int hashCode()
Overrides:
hashCode in class BaseAspect
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Overrides:
equals in class BaseAspect
See Also:
Object.equals(java.lang.Object)

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