public class UnitToString
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getUnitHtml(XBRLUnit unit)
Works identically as
getUnitString(XBRLUnit) except that the
returned string is HTML code that can be used for tooltips. |
static java.lang.String |
getUnitHtml(XBRLUnit unit,
XBRLItem item)
Works identically as
#getUnitString(XBRLUnit, XBRLFactNumeric) except that the
returned string is HTML code that can be used for tooltips. |
static java.lang.String |
getUnitString(XBRLUnit unit)
This static method returns the representation character for an XBRL Unit.
|
static java.lang.String |
getUnitString(XBRLUnit unit,
XBRLItem item)
This static method returns the representation character for an XBRL Unit.
|
static java.lang.String |
getUnitSymbol(javax.xml.namespace.QName q)
Returns a text string representing the symbol for this unit
or null if no one is set.
|
public static java.lang.String getUnitSymbol(javax.xml.namespace.QName q)
Returns a text string representing the symbol for this unit or null if no one is set.
It is possible adding more symbols in an XML file that is a resource read by this class the first time the class is instantiated.
q
- the qpublic static java.lang.String getUnitString(XBRLUnit unit)
If the unit is a simple unit, then the representation is the unit character or an string that represents the monetary unit. for example "$" is returned for iso4017:USD and "CLP" is returned for iso4217:CLP
If the unit is composed by a set of units in the numerator then a string representing the product of the units is returned. Example iso4217:USD,iso4217:CLP would return "$ × CLP".
If the unit has numerator units and denominator units the division character "/" is put in the position required to make the unit representation meaningful.
unit
- XBRLUnit objectpublic static java.lang.String getUnitString(XBRLUnit unit, XBRLItem item)
If the unit is a simple unit, then the representation is the unit character or an string that represents the monetary unit. for example "$" is returned for iso4017:USD and "CLP" is returned for iso4217:CLP
If the unit is composed by a set of units in the numerator then a string representing the product of the units is returned. Example iso4217:USD,iso4217:CLP would return "$ × CLP".
If the unit is xbrli:pure and the item is num:percentItemType the returned string is "%"
If the unit has numerator units and denominator units the division character "/" is put in the position required to make the unit representation meaningful.
unit
- XBRLUnit objectitem
- the XBRLItem used to report the value.public static java.lang.String getUnitHtml(XBRLUnit unit)
getUnitString(XBRLUnit)
except that the
returned string is HTML code that can be used for tooltips.unit
- XBRLUnitgetUnitString(XBRLUnit)
Copyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa