XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class UnitImpl

java.lang.Object
  extended by org.xbrlapi.impl.XMLImpl
      extended by org.xbrlapi.impl.FragmentImpl
          extended by org.xbrlapi.impl.FactDimensionContainerImpl
              extended by org.xbrlapi.impl.UnitImpl
All Implemented Interfaces:
Serializable, Comparable<XML>, FactDimensionContainer, Fragment, Unit, XML

public class UnitImpl
extends FactDimensionContainerImpl
implements Unit

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

Field Summary
 
Fields inherited from class org.xbrlapi.impl.XMLImpl
logger
 
Constructor Summary
UnitImpl()
           
 
Method Summary
 boolean equals(Unit unit)
          Tests if the unit is u-equal to another unit
 NodeList getDenominatorMeasures()
          Get the set of measure elements in the denominator.
 NodeList getNumeratorMeasures()
          Get the numerator set of measures for the unit
 List<Item> getReferencingItems()
           
 List<Measure> getResolvedDenominatorMeasures()
           
 List<Measure> getResolvedNumeratorMeasures()
           
 boolean hasDenominator()
          Determines if the unit has a denominator
 
Methods inherited from class org.xbrlapi.impl.FactDimensionContainerImpl
getId
 
Methods inherited from class org.xbrlapi.impl.FragmentImpl
appendElementSchemeXPointer, appendID, getAllChildren, getAllChildrenIndices, getAncestorOrSelf, getChild, getChildren, getChildren, getChildrenIndices, getDataRootElement, getElementSchemeXPointerExpression, getIDXPointerExpression, getLabels, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguageAndResourceRole, getLabelsWithLanguageAndResourceRoleAndLinkRole, getLabelsWithResourceRole, getLanguage, getLanguage, getLanguageName, getLanguageName, getLocalname, getLocalnameFromQName, getNamespace, getNamespaceFromQName, getParent, getParentElement, getParentIndex, getPrefixFromQName, getReferences, getReferencesWithLanguage, getReferencesWithLanguageAndResourceRoleAndLinkRole, getReferencesWithLanguageAndRole, getReferencesWithResourceRole, getReferencingLocators, getSequenceToParentElement, getSequenceToParentElementAsString, getSimpleLinks, getURI, getXPath, getXPointerExpression, isAncestorOf, isChild, isNewFragment, isRoot, setParentIndex, setSequenceToParentElement, setURI
 
Methods inherited from class org.xbrlapi.impl.XMLImpl
appendMetadataElement, compareTo, equals, finalize, getBuilder, getDocumentNode, getIndex, getMetaAttribute, getMetadataRootElement, getStore, getType, hashCode, hasMetaAttribute, isa, isa, removeMetaAttribute, removeMetadataElement, serialize, serialize, serialize, setBuilder, setIndex, setMetaAttribute, setResource, setStore, updateInStore
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xbrlapi.FactDimensionContainer
getId
 
Methods inherited from interface org.xbrlapi.Fragment
appendElementSchemeXPointer, appendID, getAllChildren, getAllChildrenIndices, getAncestorOrSelf, getChild, getChildren, getChildren, getChildrenIndices, getDataRootElement, getElementSchemeXPointerExpression, getIDXPointerExpression, getLabels, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguageAndResourceRole, getLabelsWithLanguageAndResourceRoleAndLinkRole, getLabelsWithResourceRole, getLanguage, getLanguage, getLanguageName, getLanguageName, getLocalname, getLocalnameFromQName, getNamespace, getNamespaceFromQName, getParent, getParentElement, getParentIndex, getPrefixFromQName, getReferences, getReferencesWithLanguage, getReferencesWithLanguageAndResourceRoleAndLinkRole, getReferencesWithLanguageAndRole, getReferencesWithResourceRole, getReferencingLocators, getSequenceToParentElement, getSequenceToParentElementAsString, getSimpleLinks, getURI, getXPath, getXPointerExpression, isAncestorOf, isChild, isNewFragment, isRoot, setParentIndex, setSequenceToParentElement, setURI
 
Methods inherited from interface org.xbrlapi.XML
appendMetadataElement, equals, getBuilder, getDocumentNode, getIndex, getMetaAttribute, getMetadataRootElement, getStore, getType, hashCode, hasMetaAttribute, isa, isa, removeMetaAttribute, removeMetadataElement, serialize, serialize, serialize, setBuilder, setIndex, setMetaAttribute, setResource, setStore, updateInStore
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

UnitImpl

public UnitImpl()
Method Detail

getReferencingItems

public List<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()

getNumeratorMeasures

public NodeList getNumeratorMeasures()
                              throws XBRLException
Description copied from interface: Unit
Get the numerator set of measures for the unit

Specified by:
getNumeratorMeasures in interface Unit
Returns:
the numerator measure set
Throws:
XBRLException
See Also:
Unit.getNumeratorMeasures()

getResolvedNumeratorMeasures

public List<Measure> getResolvedNumeratorMeasures()
                                           throws XBRLException
Specified by:
getResolvedNumeratorMeasures in interface Unit
Returns:
a list of resolved numerator measures.
Throws:
XBRLException
See Also:
Unit.getResolvedNumeratorMeasures()

getResolvedDenominatorMeasures

public List<Measure> getResolvedDenominatorMeasures()
                                             throws XBRLException
Specified by:
getResolvedDenominatorMeasures in interface Unit
Returns:
a list of resolved denominator measures. If there is no denominator then it returns an empty list.
Throws:
XBRLException
See Also:
Unit.getResolvedDenominatorMeasures()

hasDenominator

public boolean hasDenominator()
                       throws XBRLException
Determines if the unit has a denominator

Specified by:
hasDenominator in interface Unit
Returns:
true if the unit has a denominator that has at least one measure in it, and false otherwise.
Throws:
XBRLException
See Also:
Unit.hasDenominator()

getDenominatorMeasures

public NodeList getDenominatorMeasures()
                                throws XBRLException
Get the set of measure elements in the denominator.

Specified by:
getDenominatorMeasures in interface Unit
Returns:
the denominator measure set.
Throws:
XBRLException - if the denominator does not exist.
See Also:
Unit.getDenominatorMeasures()

equals

public boolean equals(Unit unit)
               throws XBRLException
Tests if the unit is u-equal to another unit

Specified by:
equals in interface Unit
Parameters:
unit - The unit being compared.
Returns:
true if the units are u-equal and false otherwise
Throws:
XBRLException
See Also:
Unit.equals(Unit)

Get Java XBRL API implementation at SourceForge.net.