XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class NonNumericItemImpl

java.lang.Object
  extended by org.xbrlapi.impl.XMLImpl
      extended by org.xbrlapi.impl.FragmentImpl
          extended by org.xbrlapi.impl.FactImpl
              extended by org.xbrlapi.impl.ItemImpl
                  extended by org.xbrlapi.impl.NonNumericItemImpl
All Implemented Interfaces:
Serializable, Comparable<XML>, Fact, Fragment, Item, NonNumericItem, XML

public class NonNumericItemImpl
extends ItemImpl
implements NonNumericItem

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

Field Summary
 
Fields inherited from class org.xbrlapi.impl.XMLImpl
logger
 
Constructor Summary
NonNumericItemImpl()
           
 
Method Summary
 String getValue()
           
 String getXmlValue()
           
 
Methods inherited from class org.xbrlapi.impl.ItemImpl
getContext, getContextId
 
Methods inherited from class org.xbrlapi.impl.FactImpl
getConcept, getInstance, getTuple, isFraction, isNil, isNumeric, isTuple
 
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.Item
getContext, getContextId
 
Methods inherited from interface org.xbrlapi.Fact
getConcept, getInstance, getTuple, isFraction, isNil, isNumeric, isTuple
 
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

NonNumericItemImpl

public NonNumericItemImpl()
Method Detail

getValue

public String getValue()
                throws XBRLException
Specified by:
getValue in interface NonNumericItem
Returns:
the value of fact with leading and trailing spaces deleted or null if the fact is nil.
Throws:
XBRLException
See Also:
NonNumericItem.getValue()

getXmlValue

public String getXmlValue()
                   throws XBRLException
Specified by:
getXmlValue in interface NonNumericItem
Returns:
null if the fact is nil. Otherwise value of fact with leading and trailing spaces deleted and with some attempts made to ensure that the content is ready to be rendered as a chunk within an XHTML document. This involves:
  1. Replacing all &nbsp; occurrences with &#160;
  2. Replacing all &ndash; occurrences with &#8211;
  3. Replacing all &lt; ... &gt; occurrences with < ... > to retrieve escaped angle bracket pairs

This will not be effective in some cases where there are escaped characters that are intended to be escaped but that are falsely recognised as being part of the XML markup and thus unescaped.

TODO refine the algorithm for handling text content of fact values where characters have been escaped.
Throws:
XBRLException
See Also:
NonNumericItem.getXmlValue()

Get Java XBRL API implementation at SourceForge.net.