com.ihr.xbrl.om.instance
Class XBRLFactItem

java.lang.Object
  extended by com.ihr.xbrl.om.XMLFragment
      extended by com.ihr.xbrl.om.instance.XBRLFact
          extended by com.ihr.xbrl.om.instance.XBRLFactItem
All Implemented Interfaces:
XBRLRelationshipPoint, XBRLValidation, XMLHasParent, java.lang.Cloneable, javax.xml.namespace.NamespaceContext
Direct Known Subclasses:
XBRLFactNonNumeric, XBRLFactNumeric

public abstract class XBRLFactItem
extends XBRLFact

This class represents the instantiation of an xbrli:item on an instance document

Author:
Ignacio

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ihr.xbrl.om.XBRLValidation
XBRLValidation.Direction
 
Field Summary
static javax.xml.namespace.QName contextRef
           
 
Fields inherited from class com.ihr.xbrl.om.instance.XBRLFact
nil
 
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
 
Method Summary
 boolean cEqual(XBRLFactItem factTotal)
          Evaluates if the two instantiation of the items are c-equal
 void clear()
          Eliminates all this fact content
 XBRLFactItem clone()
           
 XBRLFactItem clone(DTSContainer newDTS)
          Clone current fact but in a new DTSContainer
static XBRLFactItem createItemInstance(XBRLFactsList container, XBRLContext ctx, XBRLItem xf, XBRLUnit unit)
          creates an XBRLFactItem that can be either a XBRLFactNumeric or XBRLFactNonNumeric depending on the information provided in extra parameters
static XBRLFact createItemInstance(XBRLFactsList parent, XBRLItem xf, XBRLFactItem otherFact)
           
static XBRLFactItem createItemInstance(XBRLFactsList container, net.sf.saxon.s9api.XdmNode node, XMLFragment xf)
          creates an XBRLFactItem that can be either a XBRLFactNumeric or XBRLFactNonNumeric depending on the data type (derivation included) of the concept definition
 boolean equals(java.lang.Object obj)
          Sets a new XPathFunctionResolver for this object
 org.jdom.Element generateNode(boolean relativize, java.net.URI base)
          Generates the XBRLFactItem jdom node.
 java.util.Iterator<XBRLAttribute> getAttributes()
          Removes the contextRef attribute from the FactItem Parent iterators already removes the id attribute if any.
 XBRLContext getContext()
          Access to the context object
 java.net.URI getDocumentURI()
          Access to the URI property of the instance document for this fact item.
 XBRLItem getElementDefinition()
          Access to the surrounding item declaration for this item
 java.lang.String getStringValue()
          Returns a string representation of the value of this XMLFragment if value is null the function returns null
 int hashCode()
           
 boolean isBlank()
          true if the fact item has no value assigned.
 boolean isDescendantOrSibling(XBRLFactItem otherFact)
          Returns true if otherFact is a descendant or sibling of this fact
abstract  boolean isDuplicate(XBRLFactItem tTarget, boolean reversePEqual)
          For internal purposes only during the calculation of isDuplicate of tuple children elements.
 boolean s_equal2(java.lang.Object other)
          Resolves s_equal2 comparison of this node against the other node.
 void setBlank(boolean value)
          Sets the indicator that this fact item is blank
 void setContext(XBRLContext c)
          Sets the context of this fact
 void setValue(net.sf.saxon.value.AtomicValue value)
           
 void setValue(net.sf.saxon.s9api.XdmValue value)
          Sets the value of this node
abstract  boolean uEqual(XBRLFactItem toFact)
          Check if two items are unit equal as defined in the XBRL 2.1 specification
abstract  boolean vEqual(XBRLFactItem toFact)
          Check if two items are value equal as defined in the XBRL 2.1 specification
 
Methods inherited from class com.ihr.xbrl.om.instance.XBRLFact
createItemOrTupleInstance, createItemOrTupleInstance, generateLocatorToNode, getElements, getFriendlyName, getFriendlyName, getInstance, getParent, getTaxonomy, getValidationReport, getXPathToRoot, invalidate, invalidate, isDuplicate, isNil, isOnValidation, pEqual, setId, setNil, setParent, validate
 
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, getAttributeStringValue, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getDocument, getFragment, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getId, getLang, getNamespaceURI, getNodeName, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticNamespace, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathNamespaceContext, getXPathToNode, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, isDead, isNamespaceDefined, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolveHRef, resolveHRef, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setLang, setNamespaceContext, setNamespaces, setNode, setNodeName, setParent, setVariablesDefined, toString, valueEquals, xEqual
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

contextRef

public static final javax.xml.namespace.QName contextRef
Method Detail

clear

public void clear()
           throws java.lang.Throwable
Eliminates all this fact content

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

clone

public XBRLFactItem clone()
Overrides:
clone in class XBRLFact

clone

public XBRLFactItem clone(DTSContainer newDTS)
Description copied from class: XBRLFact
Clone current fact but in a new DTSContainer

Overrides:
clone in class XBRLFact
Returns:
cloned XBRLFact

createItemInstance

public static XBRLFactItem createItemInstance(XBRLFactsList container,
                                              net.sf.saxon.s9api.XdmNode node,
                                              XMLFragment xf)
                                       throws XBRLValidationException
creates an XBRLFactItem that can be either a XBRLFactNumeric or XBRLFactNonNumeric depending on the data type (derivation included) of the concept definition

Parameters:
container - XBRLFactsContainer where the new fact will be added
node - NodeInfo to process while creating the fact item
xf - XBRLItem concept definition
Returns:
com.ihr.xbrl.om.instance.XBRLFactItem
Throws:
XBRLValidationException

createItemInstance

public static XBRLFactItem createItemInstance(XBRLFactsList container,
                                              XBRLContext ctx,
                                              XBRLItem xf,
                                              XBRLUnit unit)
creates an XBRLFactItem that can be either a XBRLFactNumeric or XBRLFactNonNumeric depending on the information provided in extra parameters

Parameters:
container - XBRLFactsList container of the new fact
ctx - XBRLContext for the new fact
xf - XBRLItem definition
unit - XBRLUnit may be null is item is string item type
Returns:
a new XBRLFactItem

createItemInstance

public static XBRLFact createItemInstance(XBRLFactsList parent,
                                          XBRLItem xf,
                                          XBRLFactItem otherFact)
Parameters:
parent -
xf -
otherFact -
Returns:
XBRLFact

getDocumentURI

public java.net.URI getDocumentURI()
Access to the URI property of the instance document for this fact item.

Returns:
URI from the instance or null if the instance contains no URI.

getStringValue

public java.lang.String getStringValue()
                                throws XBRLSerializationException
Description copied from class: XMLFragment
Returns a string representation of the value of this XMLFragment if value is null the function returns null

Overrides:
getStringValue in class XMLFragment
Returns:
String
Throws:
XBRLSerializationException

getContext

public XBRLContext getContext()
Access to the context object

Returns:
the XBRLContext if found. null if no context is set
Throws:
XBRLValidationException - if the element with the indicated ID is not an XBRL context

setContext

public void setContext(XBRLContext c)
Sets the context of this fact

Parameters:
c - new XBRLContext

getAttributes

public java.util.Iterator<XBRLAttribute> getAttributes()
Removes the contextRef attribute from the FactItem

Parent iterators already removes the id attribute if any.

Overrides:
getAttributes in class XMLFragment
Returns:
Iterator<XBRLAttribute>
See Also:
XMLFragment.getAttributes()

getElementDefinition

public XBRLItem getElementDefinition()
Access to the surrounding item declaration for this item

Overrides:
getElementDefinition in class XBRLFact
Returns:
XBRLItem or null if no item is found (very rare case)
Throws:
XBRLValidationException

cEqual

public boolean cEqual(XBRLFactItem factTotal)
Evaluates if the two instantiation of the items are c-equal

Parameters:
factTotal - XBRLFactItem other fact
Returns:
boolean

vEqual

public abstract boolean vEqual(XBRLFactItem toFact)
Check if two items are value equal as defined in the XBRL 2.1 specification

Parameters:
toFact - the other XBRLFactItem
Returns:
boolean

uEqual

public abstract boolean uEqual(XBRLFactItem toFact)
Check if two items are unit equal as defined in the XBRL 2.1 specification

Parameters:
toFact - the other XBRLFactItem
Returns:
boolean

isBlank

public boolean isBlank()
true if the fact item has no value assigned. No value assigned is different from being null

Returns:
boolean value

setBlank

public void setBlank(boolean value)
Sets the indicator that this fact item is blank

Parameters:
value -

setValue

public void setValue(net.sf.saxon.value.AtomicValue value)
Overrides:
setValue in class XBRLFact

setValue

public void setValue(net.sf.saxon.s9api.XdmValue value)
Description copied from class: XMLFragment
Sets the value of this node

Overrides:
setValue in class XBRLFact

isDescendantOrSibling

public boolean isDescendantOrSibling(XBRLFactItem otherFact)
Returns true if otherFact is a descendant or sibling of this fact

Parameters:
otherFact - XBRLFactItem
Returns:
boolean

generateNode

public org.jdom.Element generateNode(boolean relativize,
                                     java.net.URI base)
                              throws XBRLSerializationException
Generates the XBRLFactItem jdom node. If neccesary, generates the footnotes defined for this node.

Overrides:
generateNode in class XBRLFact
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

hashCode

public int hashCode()
Overrides:
hashCode in class XBRLFact

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

equals

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

Overrides:
equals in class XBRLFact

isDuplicate

public abstract boolean isDuplicate(XBRLFactItem tTarget,
                                    boolean reversePEqual)
For internal purposes only during the calculation of isDuplicate of tuple children elements.

Parameters:
tTarget -
b -
Returns:
boolean value


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