com.ihr.xbrl.om.instance
Class XBRLUnit

java.lang.Object
  extended by com.ihr.xbrl.om.XMLFragment
      extended by com.ihr.xbrl.om.instance.XBRLUnit
All Implemented Interfaces:
XBRLRelationshipPoint, XMLHasParent, java.lang.Cloneable, javax.xml.namespace.NamespaceContext

public class XBRLUnit
extends XMLFragment


Field Summary
static javax.xml.namespace.QName divideQNameNode
           
static javax.xml.namespace.QName PURE
           
static javax.xml.namespace.QName SHARES
           
static javax.xml.namespace.QName unitDenominatorQNameNode
           
static javax.xml.namespace.QName unitNumeratorQNameNode
           
static javax.xml.namespace.QName unitQNameNode
           
 
Fields inherited from class com.ihr.xbrl.om.XMLFragment
CONCEPT_LABEL, CONCEPT_QNAME, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, idQName, NO_POSITION, OrderComparator, PERIOD_TYPE, PERIOD_VALUE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER
 
Constructor Summary
XBRLUnit(DTSContainer dts, java.util.Collection<javax.xml.namespace.QName> numerator, java.util.Collection<javax.xml.namespace.QName> denominator)
          Creates an unit that can be used for XBRLFactNumeric objects
XBRLUnit(DTSContainer dts, net.sf.saxon.s9api.XdmNode root)
           
XBRLUnit(XBRLInstance parent, net.sf.saxon.s9api.XdmNode root)
           
 
Method Summary
 void clear()
          Frees-up used memory This method should not be invoqued on live objects in the DTS.
 XBRLUnit clone()
           
 XBRLUnit clone(DTSContainer newDTS)
           
 boolean equals(java.lang.Object other)
          Evaluates u-equality of two units
 org.jdom.Element generateNode(boolean relativize, java.net.URI base)
          Serializes to a jdom Element the representation of the properties of this Information Item This method should be called from classes derived from this class
 java.util.Collection<javax.xml.namespace.QName> getDenominator()
           
 java.util.Iterator<XMLFragment> getElements()
          For complex type resources this returns an iterator with all children XML fragments Tthis method may be overwriten by other classes in the hierarchy
 java.lang.String getFriendlyName()
          Returns a string description that represents the element content in a form that users can understand.
 java.util.Collection<javax.xml.namespace.QName> getNumerator()
           
 XBRLInstance getParent()
          The parent XMLFragment node of this XMLFragment node.
 int hashCode()
           
 boolean isMoneraty()
          Returns true if the unit is just a monetary value
 boolean s_equal2(java.lang.Object other)
          Resolves s_equal2 comparison of this node against the other node.
 void setParent(XMLHasParent instance)
          Sets the parent of this unit to the instance document specified in the parameter
 java.lang.String toString()
          Returns the XML representation of this object as an String
 XBRLValidationReport validate(XBRLCoreProcessor proc)
           
 void validateISO4217()
           
 void validateShares()
           
 
Methods inherited from class com.ihr.xbrl.om.XMLFragment
addAttribute, addChild, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, delAttribute, delAttribute, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAttribute, getAttributeQNameValue, getAttributes, getAttributes, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getDeclaredNamespaces, getDocument, getFragment, getFriendlyName, getFromRelationships, getFromRelationships, getFromRelationships, getId, getLang, getNamespaceURI, getNodeName, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticNamespace, getStringValue, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathNamespaceContext, getXPathToNode, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, isNamespaceDefined, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolveHRef, resolveHRef, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setId, setLang, setNamespaceContext, setNamespaces, setNode, setNodeName, setValue, setValue, setVariablesDefined, valueEquals, xEqual
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

unitQNameNode

public static final javax.xml.namespace.QName unitQNameNode

divideQNameNode

public static final javax.xml.namespace.QName divideQNameNode

unitNumeratorQNameNode

public static final javax.xml.namespace.QName unitNumeratorQNameNode

unitDenominatorQNameNode

public static final javax.xml.namespace.QName unitDenominatorQNameNode

PURE

public static final javax.xml.namespace.QName PURE

SHARES

public static final javax.xml.namespace.QName SHARES
Constructor Detail

XBRLUnit

public XBRLUnit(DTSContainer dts,
                net.sf.saxon.s9api.XdmNode root)

XBRLUnit

public XBRLUnit(DTSContainer dts,
                java.util.Collection<javax.xml.namespace.QName> numerator,
                java.util.Collection<javax.xml.namespace.QName> denominator)
Creates an unit that can be used for XBRLFactNumeric objects

Parameters:
dts - DTSContainer, the DTS of this unit
numerator - Collection<QName> elements in the numerator, cannot be null
denominator - Collection<QName> elements in the denominator, can be null

XBRLUnit

public XBRLUnit(XBRLInstance parent,
                net.sf.saxon.s9api.XdmNode root)
         throws XBRLInconsistentDTSException
Parameters:
xbrlInstance -
next -
Throws:
XBRLInconsistentDTSException
Method Detail

clear

public void clear()
           throws java.lang.Throwable
Description copied from class: XMLFragment
Frees-up used memory

This method should not be invoqued on live objects in the DTS. It is automatically invoqued by the API when an object is no longer used and referenced by other objects. It is save not to call it directly.

Overrides:
clear in class XMLFragment
Throws:
java.lang.Throwable

getParent

public XBRLInstance getParent()
Description copied from class: XMLFragment
The parent XMLFragment node of this XMLFragment node.

For XBRLAttribute nodes, the parent is the element node.

For Document nodes the returned value is null

For Embedded document nodes, the returned value is the parent element node.

Specified by:
getParent in interface XMLHasParent
Overrides:
getParent in class XMLFragment
Returns:
the parent XMLFragment possible parents are: XBRLItem, XBRLTuple, XBRLImport, XBRLLinkbase, XBRLExtendedLink, XBRLDocumentation, XBRLRelationship, XBRLResource.

clone

public XBRLUnit clone()
Overrides:
clone in class XMLFragment

clone

public XBRLUnit clone(DTSContainer newDTS)
Overrides:
clone in class XMLFragment

validateISO4217

public void validateISO4217()
                     throws XBRLValidationException
Throws:
XBRLValidationException

validateShares

public void validateShares()
                    throws XBRLValidationException
Throws:
XBRLValidationException

validate

public XBRLValidationReport validate(XBRLCoreProcessor proc)

hashCode

public int hashCode()
Overrides:
hashCode in class XMLFragment

equals

public boolean equals(java.lang.Object other)
Evaluates u-equality of two units

Overrides:
equals in class XMLFragment

s_equal2

public boolean s_equal2(java.lang.Object other)
Description copied from class: XMLFragment
Resolves s_equal2 comparison of this node against the other node.

Overrides:
s_equal2 in class XMLFragment
Parameters:
other - The other node (preferably an XMLFragment) that contains a non null NodeInfo document.
Returns:
boolean

generateNode

public org.jdom.Element generateNode(boolean relativize,
                                     java.net.URI base)
                              throws XBRLSerializationException
Description copied from class: XMLFragment
Serializes to a jdom Element the representation of the properties of this Information Item This method should be called from classes derived from this class

Overrides:
generateNode in class XMLFragment
Parameters:
relativize - boolean indicating if URIs should be relativized to the base URI (see next argument)
base - the URI to which some attributes of this object should be relativided
Returns:
a clone of the surrounding jdom Element so it can be incorporated into multiple trees
Throws:
XBRLSerializationException

getNumerator

public java.util.Collection<javax.xml.namespace.QName> getNumerator()

getDenominator

public java.util.Collection<javax.xml.namespace.QName> getDenominator()

isMoneraty

public boolean isMoneraty()
Returns true if the unit is just a monetary value

Returns:
boolean

getElements

public java.util.Iterator<XMLFragment> getElements()
Description copied from class: XMLFragment
For complex type resources this returns an iterator with all children XML fragments Tthis method may be overwriten by other classes in the hierarchy

Overrides:
getElements in class XMLFragment
Returns:
Iterator

setParent

public void setParent(XMLHasParent instance)
               throws XBRLInconsistentDTSException
Sets the parent of this unit to the instance document specified in the parameter

Specified by:
setParent in interface XMLHasParent
Overrides:
setParent in class XMLFragment
Parameters:
instance - XBRLInstance
Throws:
XBRLInconsistentDTSException - if the context contains facts in a previous unattached instance

getFriendlyName

public java.lang.String getFriendlyName()
Description copied from class: XMLFragment
Returns a string description that represents the element content in a form that users can understand. This method may be overridden by parent classes.

Remarks, this method may return very long names not suitable for user interface

Overrides:
getFriendlyName in class XMLFragment
Returns:
Non empty String. Internationalization is enabled

toString

public java.lang.String toString()
Description copied from class: XMLFragment
Returns the XML representation of this object as an String

Overrides:
toString in class XMLFragment


Copyright 2006-2009 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa