XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class ContextImpl

java.lang.Object
  extended by org.xbrlapi.impl.FragmentImpl
      extended by org.xbrlapi.impl.FactDimensionContainerImpl
          extended by org.xbrlapi.impl.ContextImpl
All Implemented Interfaces:
Comparable<Fragment>, Context, FactDimensionContainer, Fragment

public class ContextImpl
extends FactDimensionContainerImpl
implements Context

Author:
Geoffrey Shuetrim (geoff@galexy.net)

Field Summary
 
Fields inherited from class org.xbrlapi.impl.FragmentImpl
logger
 
Constructor Summary
ContextImpl()
           
 
Method Summary
 boolean equals(Context context)
          Tests if the context is c-equal to another context See the XBRL 2.1 specification for a definition of c-equal.
 Entity getEntity()
          Get the entity of the context.
 Period getPeriod()
          Get the period of the context.
 FragmentList<Item> getReferencingItems()
           
 Scenario getScenario()
          Get the scenario of the context.
 
Methods inherited from class org.xbrlapi.impl.FactDimensionContainerImpl
getId
 
Methods inherited from class org.xbrlapi.impl.FragmentImpl
appendElementSchemeXPointer, appendID, appendMetadataElement, compareTo, equals, getAllChildren, getAncestorOrSelf, getBuilder, getChild, getChildren, getDataRootElement, getDocumentNode, getFragmentIndex, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguage, getLabelsWithLanguageAndRole, getLabelsWithLanguageAndRole, getLabelsWithRole, getLabelsWithRole, getLocalname, getLocalnameFromQName, getMetaAttribute, getMetadataRootElement, getNamespaceFromQName, getNamespaceURI, getNetworks, getNetworksFromWithArcrole, getNetworksFromWithRoleAndArcrole, getNetworksWithArcrole, getParent, getParentElement, getParentIndex, getPrecedingSiblings, getPrefixFromQName, getReferences, getReferencingLocators, getRelationshipsToWithArcrole, getRelatives, getResource, getSequenceToParentElement, getSequenceToParentElementAsString, getSimpleLinks, getStore, getType, getURI, getXPath, hashCode, isa, isNewFragment, removeElementSchemeXPointer, removeID, removeMetaAttribute, removeMetadataElement, removeRelationship, setBuilder, setFragmentIndex, setMetaAttribute, setParentIndex, setPrecedingSiblings, setResource, setSequenceToParentElement, setStore, setURI
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xbrlapi.FactDimensionContainer
getId
 
Methods inherited from interface org.xbrlapi.Fragment
appendElementSchemeXPointer, appendID, appendMetadataElement, equals, getAllChildren, getAncestorOrSelf, getBuilder, getDataRootElement, getDocumentNode, getFragmentIndex, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguage, getLabelsWithLanguageAndRole, getLabelsWithLanguageAndRole, getLabelsWithRole, getLabelsWithRole, getLocalname, getLocalnameFromQName, getMetaAttribute, getMetadataRootElement, getNamespaceFromQName, getNamespaceURI, getNetworks, getNetworksFromWithArcrole, getNetworksFromWithRoleAndArcrole, getNetworksWithArcrole, getParent, getParentElement, getParentIndex, getPrecedingSiblings, getPrefixFromQName, getReferences, getReferencingLocators, getRelationshipsToWithArcrole, getRelatives, getResource, getSequenceToParentElement, getSequenceToParentElementAsString, getSimpleLinks, getStore, getType, getURI, getXPath, hashCode, isa, isNewFragment, removeElementSchemeXPointer, removeID, removeMetaAttribute, removeMetadataElement, removeRelationship, setBuilder, setFragmentIndex, setMetaAttribute, setParentIndex, setPrecedingSiblings, setResource, setSequenceToParentElement, setStore, setURI
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

ContextImpl

public ContextImpl()
Method Detail

getEntity

public Entity getEntity()
                 throws XBRLException
Get the entity of the context.

Specified by:
getEntity in interface Context
Throws:
XBRLException - if the entity is missing or if more than one entity is in the context.
See Also:
Context.getEntity()

getPeriod

public Period getPeriod()
                 throws XBRLException
Get the period of the context.

Specified by:
getPeriod in interface Context
Throws:
XBRLException - if the period is missing from the context or there is more than one period in the context.
See Also:
Context.getPeriod()

getScenario

public Scenario getScenario()
                     throws XBRLException
Get the scenario of the context.

Specified by:
getScenario in interface Context
Returns:
the scenario if one exists or null if there is no scenario.
Throws:
XBRLException - if there is more than one scenario.
See Also:
Context.getScenario()

equals

public boolean equals(Context context)
               throws XBRLException
Tests if the context is c-equal to another context See the XBRL 2.1 specification for a definition of c-equal.

Specified by:
equals in interface Context
Parameters:
context - The context being compared.
Returns:
true if this context is c-equal to the specified one and false otherwise.
Throws:
XBRLException
See Also:
Context.equals(Context)

getReferencingItems

public FragmentList<Item> getReferencingItems()
                                       throws XBRLException
Specified by:
getReferencingItems in interface FactDimensionContainer
Overrides:
getReferencingItems in class FactDimensionContainerImpl
Returns:
the list of items in the instance that reference this context. The list is empty if no facts in the instance reference this context.
Throws:
XBRLException
See Also:
FactDimensionContainer.getReferencingItems()

SourceForge Logo