com.ihr.xbrl.om.taxonomy
Class XBRLItem

java.lang.Object
  extended by com.ihr.xbrl.om.XMLFragment
      extended by com.ihr.xbrl.om.taxonomy.XMLElementDefinition
          extended by com.ihr.xbrl.om.taxonomy.XBRLItem
All Implemented Interfaces:
XBRLRelationshipPoint, XBRLValueKey, XMLHasParent, java.io.Serializable, java.lang.Cloneable, javax.xml.namespace.NamespaceContext

public class XBRLItem
extends XMLElementDefinition
implements java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
static class XBRLItem.BalanceType
          Enumeration defining the possible content of the xbrli:balance attribute.
static class XBRLItem.PeriodType
          Enumeration defining the content of the xbrli:periodType attribute but also used to report the type of a XBRLPeriod object inside an XBRLContext.
 
Field Summary
static javax.xml.namespace.QName balance
          The value of the balance attribute if it is present
static javax.xml.namespace.QName default_
          The [default] property
static javax.xml.namespace.QName periodType
          The [Period Type] property
static javax.xml.namespace.QName substitutionGroup
          This is xbrli:item
 
Fields inherited from class com.ihr.xbrl.om.taxonomy.XMLElementDefinition
abstract_, ALL, block, EMPTY, EXTENSION, final_, fixed, name, nillable, nullConcept, RESTRICTION, SUBSTITUTION, type, UNDEFINED
 
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
XBRLItem(XBRLTaxonomy parent, java.lang.String name, java.lang.String _default, XBRLXSDTypeDefinition type, javax.xml.namespace.QName substitutionGroup, XBRLItem.PeriodType periodType, XBRLItem.BalanceType balance, java.lang.Boolean _abstract, java.lang.Boolean nillable, int block, int _final, java.lang.String fixed)
          Creates and XBRL Item definition.
XBRLItem(XBRLTaxonomy parent, net.sf.saxon.s9api.XdmNode node)
           
XBRLItem(XMLElementDefinition other)
          Creates an item using the properties of the concept received as a parameter Adds the new concept to the parent taxonomy schema.
 
Method Summary
 void clear()
          Frees-up used memory This method should not be invoqued on live objects in the DTS.
 boolean equals(java.lang.Object other)
          Sets a new XPathFunctionResolver for this object
 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
 XBRLItem.BalanceType getBalance()
          Access to the [Balance] property of the concept definition
 java.lang.String getDefault()
          Access to the [Default] property
 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.lang.String getFriendlyName(int modifiers, LabelsProvider lp)
          Returns a string description that represents the element content in a form that users can understand.
 java.util.Collection<XBRLItem> getInSubstitutionGroup()
          Returns a collection of elements that are in the substitution group of this element or has this element in the substitution group hierarchy
 XBRLItem.PeriodType getPeriodType()
          returns XBRLItem.DURATION or XBRLItem.INSTANT
 int hashCode()
           
 boolean isFraction()
          Returns true or false depending on this XBRLItem is an XBRL fractionItemType or not This method has been added in order to facilitate the development of the formula specification.
 boolean isInSubstitutionGroup(javax.xml.namespace.QName name)
           
 boolean isMonetaryType()
          Check if this concept definition is a monetaryItemType or derived from monetaryItemType in the type hierarchy and return true if this is the case
 boolean isNumeric()
          Returns true if the type is derived from one of the list fractionItemType decimalItemType floatItemType doubleItemType monetaryItemType sharesItemType pureItemType integerItemType nonPositiveIntegerItemType negativeIntegerItemType longItemType intItemType shortItemType byteItemType nonNegativeIntegerItemType unsignedLongItemType unsignedIntItemType unsignedShortItemType unsignedByteItemType positiveIntegerItemType)
 boolean isPureType()
          Check if this concept definition is a pureItemType or derived from pureItemType in the type hierarchy and return true if this is the case
 boolean isSharesType()
          Check if this concept definition is a sharesItemType or derived from sharesItemType in the type hierarchy and return true if this is the case
 boolean isXBRLType()
           
 XBRLItem.BalanceType setBalance(XBRLItem.BalanceType newValue)
          Sets the value of the [Balance] property or reset it if newValue is null
 java.lang.String setDefault(java.lang.String newValue)
           
 void setIsFraction(boolean newValue)
          Normally the information about isFraction is obtained from the element data type but when the element data type cannot be obtained this method can help in setting up a suitable value so applications can work as if the data type were obtained from the surrounding node.
 void setIsMonetaryType(boolean newValue)
          Sets the flag that indicates this item is of the monetary type.
 void setIsNumeric(boolean newValue)
          Normally the information about isNumeric is obtained from the element data type but when the element data type cannot be obtained this method can help in setting up a suitable value so applications can work as if the data type were obtained from the surrounding node.
 void setIsXBRLType(boolean newValue)
          Sets the flag that indicates if this concept is of the XBRL derived types or not.
 XBRLItem.PeriodType setPeriodType(XBRLItem.PeriodType newValue)
          Sets the value of the [Period Type] property or resets it if newValue is null.
 XBRLXSDTypeDefinition setType(XBRLXSDTypeDefinition type)
          Sets the item type to the type specified in the XBRLXSDTypeDefinition object or unset the type definition if the attribute value is null
 XBRLValidationReport validate(XBRLCoreProcessor proc)
           
 
Methods inherited from class com.ihr.xbrl.om.taxonomy.XMLElementDefinition
generateLocatorToNode, getAbstract, getAttributes, getBlock, getBlock, getBlock, getChildren, getFinal, getFinal, getFinal, getFixed, getName, getNillable, getParent, getQName, getSimpleContentValidator, getSubstitutionGroup, getSubstitutionGroupHierarchy, getType, getValueKey, isInSubstitutionGroup, setAbstract, setBlock, setFinal, setFixed, setId, setName, setNillable, setParent, setSubstitutionGroup
 
Methods inherited from class com.ihr.xbrl.om.XMLFragment
addAttribute, addChild, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, clone, clone, delAttribute, delAttribute, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAttribute, getAttributeQNameValue, getAttributes, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getDeclaredNamespaces, getDocument, getFragment, 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, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setLang, setNamespaceContext, setNamespaces, setNode, setNodeName, setParent, setValue, setValue, setVariablesDefined, toString, valueEquals, xEqual
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ihr.xbrl.om.exLinks.XBRLRelationshipPoint
addFromRelationship, addToRelationship, getFromRelationships, getToRelationships, removeFromRelationship, removeToRelationship
 

Field Detail

substitutionGroup

public static final javax.xml.namespace.QName substitutionGroup
This is xbrli:item


periodType

public static final javax.xml.namespace.QName periodType
The [Period Type] property


default_

public static final javax.xml.namespace.QName default_
The [default] property


balance

public static final javax.xml.namespace.QName balance
The value of the balance attribute if it is present

Constructor Detail

XBRLItem

public XBRLItem(XMLElementDefinition other)
Creates an item using the properties of the concept received as a parameter Adds the new concept to the parent taxonomy schema.

Parameters:
other - XMLElementDefinition
Throws:
XBRLValidationException

XBRLItem

public XBRLItem(XBRLTaxonomy parent,
                net.sf.saxon.s9api.XdmNode node)

XBRLItem

public XBRLItem(XBRLTaxonomy parent,
                java.lang.String name,
                java.lang.String _default,
                XBRLXSDTypeDefinition type,
                javax.xml.namespace.QName substitutionGroup,
                XBRLItem.PeriodType periodType,
                XBRLItem.BalanceType balance,
                java.lang.Boolean _abstract,
                java.lang.Boolean nillable,
                int block,
                int _final,
                java.lang.String fixed)
         throws XBRLValidationException
Creates and XBRL Item definition. The new element is not added to the parent. It MUST be added to a taxonomy after creation.

Parameters:
parent - XBRLTaxonomy parent taxonomy
name - String concept name
_default - String default value, can be null
type - XBRLXSDTypeDefinition (xbrli based type)
substitutionGroup - QName (item or based on item)
periodType - PeriodType enum { UNDEFINED_PERIOD_TYPE | INSTANT | DURATION | FOREVER }
balance - BalanceType enum { DEBIT | CREDIT | NO_BALANCE }
_abstract - Boolean
nillable - Boolean
block - int (see XMLElementDefinition)
_final - int (see XMLElementDefinition)
fixed - String fixed value, can be null
Throws:
XBRLValidationException - if the new concept definition has XBRL errors
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 XMLElementDefinition
Throws:
java.lang.Throwable

hashCode

public int hashCode()
Overrides:
hashCode in class XMLElementDefinition

equals

public boolean equals(java.lang.Object other)
Description copied from class: XMLFragment
Sets a new XPathFunctionResolver for this object

Overrides:
equals in class XMLElementDefinition

setType

public XBRLXSDTypeDefinition setType(XBRLXSDTypeDefinition type)
Description copied from class: XMLElementDefinition
Sets the item type to the type specified in the XBRLXSDTypeDefinition object or unset the type definition if the attribute value is null

Overrides:
setType in class XMLElementDefinition
Parameters:
type - new XBRLXSDTypeDefinition or null
Returns:
old type definition XBRLXSDTypeDefinition

getPeriodType

public XBRLItem.PeriodType getPeriodType()
returns XBRLItem.DURATION or XBRLItem.INSTANT

Returns:
PeriodType

setPeriodType

public XBRLItem.PeriodType setPeriodType(XBRLItem.PeriodType newValue)
Sets the value of the [Period Type] property or resets it if newValue is null.

Parameters:
newValue - the integer constant indicating the new value or null
Returns:
the old value or null
Since:
2.6.5

getDefault

public java.lang.String getDefault()
Access to the [Default] property


setDefault

public java.lang.String setDefault(java.lang.String newValue)

getBalance

public XBRLItem.BalanceType getBalance()
Access to the [Balance] property of the concept definition

Returns:
BalanceType BalanceType.NO_BALANCE or BalanceType.DEBIT or BalanceType.CREDIT

setBalance

public XBRLItem.BalanceType setBalance(XBRLItem.BalanceType newValue)
Sets the value of the [Balance] property or reset it if newValue is null

Parameters:
newValue - the new constant for the value of the balance attribute
Returns:
the old value
Since:
2.6.5

validate

public XBRLValidationReport validate(XBRLCoreProcessor proc)

isPureType

public boolean isPureType()
Check if this concept definition is a pureItemType or derived from pureItemType in the type hierarchy and return true if this is the case

Returns:
boolean

isSharesType

public boolean isSharesType()
Check if this concept definition is a sharesItemType or derived from sharesItemType in the type hierarchy and return true if this is the case

Returns:
boolean

isMonetaryType

public boolean isMonetaryType()
Check if this concept definition is a monetaryItemType or derived from monetaryItemType in the type hierarchy and return true if this is the case

Returns:
boolean

setIsMonetaryType

public void setIsMonetaryType(boolean newValue)
Sets the flag that indicates this item is of the monetary type. This information is normally extracted from the data type thus there is no need to call this method. This method is here because some applications may not have access to the data type, in these cases, if the information is available, applications can use this method to set the flag manually

Parameters:
newValue - boolean

isXBRLType

public boolean isXBRLType()
Returns:
boolean

setIsXBRLType

public void setIsXBRLType(boolean newValue)
Sets the flag that indicates if this concept is of the XBRL derived types or not. This information is normally extracted from the data type so there is no need to call this method if the object has been build from nodes or the type property has been set to a specific type based on XML nodes. Applications that does not have such information but have information about if this concept is XBRL or not can use this method to avoid future errors.

Parameters:
newValue - boolean

isNumeric

public boolean isNumeric()
Returns true if the type is derived from one of the list fractionItemType decimalItemType floatItemType doubleItemType monetaryItemType sharesItemType pureItemType integerItemType nonPositiveIntegerItemType negativeIntegerItemType longItemType intItemType shortItemType byteItemType nonNegativeIntegerItemType unsignedLongItemType unsignedIntItemType unsignedShortItemType unsignedByteItemType positiveIntegerItemType)

Returns:
boolean

isFraction

public boolean isFraction()
Returns true or false depending on this XBRLItem is an XBRL fractionItemType or not This method has been added in order to facilitate the development of the formula specification.

Returns:
boolean true if the type is xbrli:fractionItemType or derived on xbrli:fractionItemType false otherwise
Since:
2.6.9

setIsNumeric

public void setIsNumeric(boolean newValue)
Normally the information about isNumeric is obtained from the element data type but when the element data type cannot be obtained this method can help in setting up a suitable value so applications can work as if the data type were obtained from the surrounding node.

Parameters:
newValue - boolean value

setIsFraction

public void setIsFraction(boolean newValue)
Normally the information about isFraction is obtained from the element data type but when the element data type cannot be obtained this method can help in setting up a suitable value so applications can work as if the data type were obtained from the surrounding node.

Parameters:
newValue - boolean value

isInSubstitutionGroup

public boolean isInSubstitutionGroup(javax.xml.namespace.QName name)
Parameters:
name -
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 XMLElementDefinition
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

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

getInSubstitutionGroup

public java.util.Collection<XBRLItem> getInSubstitutionGroup()
Description copied from class: XMLElementDefinition
Returns a collection of elements that are in the substitution group of this element or has this element in the substitution group hierarchy

Overrides:
getInSubstitutionGroup in class XMLElementDefinition
Returns:
Collection<XBRLItem>

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 XMLElementDefinition
Returns:
Non empty String. Internationalization is enabled

getFriendlyName

public java.lang.String getFriendlyName(int modifiers,
                                        LabelsProvider lp)
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 override by parent classes.

This function accepts flags that are defined as constants in XMLFragment in order to modify the output.

Overrides:
getFriendlyName in class XMLElementDefinition
Parameters:
modifiers - integer
Returns:
Non empty String. Internationalization is enabled


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