com.ihr.xbrl.om.instance
Class XBRLFactTuple

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.XBRLFactTuple
All Implemented Interfaces:
ObtainHistoryInterface, StoreHistoryInterface, XBRLRelationshipPoint, XBRLFactsList, XBRLValidation, XMLHasParent, java.lang.Cloneable, javax.xml.namespace.NamespaceContext

public class XBRLFactTuple
extends XBRLFact
implements XBRLFactsList


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ihr.xbrl.om.XBRLValidation
XBRLValidation.Direction
 
Field Summary
 
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
 
Constructor Summary
XBRLFactTuple(XBRLFactsList parent, XBRLTuple tupleDecl)
          Creates a new tuple
 
Method Summary
 void add(int index, XBRLFact fact)
          Resets the nillable status to false automatically.
 boolean add(XBRLFact fact)
          Resets the nillable status to false automatically.
 void addOrForwardItem(XBRLFactItem item)
          Called internally to register new facts in the instance document
 void clear()
          Eliminates all this fact content
 XBRLFactTuple clone()
           
 XBRLFactTuple clone(DTSContainer newDTS)
          Clone current fact but in a new DTSContainer
 boolean equals(java.lang.Object obj)
          Sets a new XPathFunctionResolver for this object
 void forwardItem(XBRLFactItem item)
           
 org.jdom.Element generateNode(boolean relativize, java.net.URI base)
          Generates the XBRLFact jdom node.
 XBRLFact get(int index)
          Returns the element at the selected index position.
 XBRLTuple getElementDefinition()
          Access to the element definition behind this fact
 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.Iterator<java.util.Vector<XBRLFactItem>> getItems()
          Iterator over the items on this facts container
 java.util.Iterator<XBRLFactItem> getItems(XBRLItem itemFrom)
          Iterator over fact items that are instances of the XBRLItem received as a parameter.
 java.util.Iterator<XBRLFactItem> getItemsSg(XBRLItem itemFrom)
          Iterator over fact items that are instances of the XBRLItem received as a parameter of in the substitution group of that item
 int getNumberOfTuples()
          Calculates and returns the number of tuples children of this facts container
 java.util.Iterator<java.util.Vector<XBRLFactTuple>> getTuples()
          Iterator over the tuples on this facts container
 java.util.Iterator<XBRLFactTuple> getTuples(XBRLTuple tupleFrom)
          Iterator over fact tuples that are instances of the XBRLTuple received as a parameter.
 java.util.Iterator<XBRLFactTuple> getTuplesSg(XBRLTuple tupleFrom)
          Iterator over fact tuples that are instances of the XBRLTuple received as a parameter of in the substitution group of that tuple
 net.sf.saxon.s9api.XdmValue getValue()
          Returns the value of this node.
 int hashCode()
          This is from the Object interface and must be implemented by sub classes in order to be able to provide hashCodes
 int indexOf(XBRLFact fact)
          Returns the index position of a fact within this list
 int indexOf(XBRLFact fact, int index)
          Returns the index position of a fact within this list starting at the position indicated by the index parameter
 boolean isDuplicate(XBRLFact otherFact)
          Check if two items are duplicates as defined in the XBRL 2.1 specification
 boolean isNil()
          Return true if the fact is nil it MUST contain a @xsi:nil attribute with value = true
 java.util.Iterator<XBRLFact> iterator()
           
 boolean remove(XBRLFact fact)
          Removes a fact from the facts container
 boolean s_equal2(java.lang.Object other)
          Resolves s_equal2 comparison of this node against the other node.
 void setNil(boolean newValue)
          This method clears the tuple content if the value if set from false to true.
 void setParent(XBRLFactsList parent)
          Sets the parent of this XBRLFact to be the XBRLFactsList object used as a parameter.
 int size()
          Access to the number of elements in the XBRLFactList
 
Methods inherited from class com.ihr.xbrl.om.instance.XBRLFact
addEvent, addEvent, addEvent, createItemOrTupleInstance, createItemOrTupleInstance, generateLocatorToNode, getElements, getHistory, getHistoryAsString, getInstance, getParent, getTaxonomy, getValidationReport, getXPathToRoot, invalidate, invalidate, isOnValidation, pEqual, setId, setValue, setValue, 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, getAttributes, getAttributeStringValue, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getDocument, getFragment, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getId, getLang, getNamespaceURI, getNodeName, getNumberOfAttributes, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticNamespace, getStringValue, getToRelationships, getToRelationships, getToRelationships, getToRelationships, 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
 
Methods inherited from interface com.ihr.xbrl.om.instance.XBRLFactsList
evaluateList, getContainer, getDocument, getInstance, getParent, getXPathToRoot
 
Methods inherited from interface com.ihr.xbrl.om.XMLHasParent
addXMLChild, getBase, removeXMLChild, setParent
 

Constructor Detail

XBRLFactTuple

public XBRLFactTuple(XBRLFactsList parent,
                     XBRLTuple tupleDecl)
Creates a new tuple

Parameters:
parent -
Method Detail

getElementDefinition

public XBRLTuple getElementDefinition()
Description copied from class: XBRLFact
Access to the element definition behind this fact

Overrides:
getElementDefinition in class XBRLFact
Returns:
XMLElementDefinition

clone

public XBRLFactTuple clone()
Overrides:
clone in class XBRLFact

clone

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

Overrides:
clone in class XBRLFact
Returns:
cloned XBRLFact

isNil

public boolean isNil()
Description copied from class: XBRLFact
Return true if the fact is nil it MUST contain a @xsi:nil attribute with value = true

Overrides:
isNil in class XBRLFact
Returns:
boolean

setNil

public void setNil(boolean newValue)
This method clears the tuple content if the value if set from false to true. Then calls the super implementation in XBRLFact.

Overrides:
setNil in class XBRLFact

forwardItem

public void forwardItem(XBRLFactItem item)

getValue

public net.sf.saxon.s9api.XdmValue getValue()
Description copied from class: XMLFragment
Returns the value of this node. If the value has been set to a jdom node then this function returns null If getDocument() is null then this function returns an empty sequence If getDocument() is not null this function tries to return an atomic value this function should be overridden by objects in this API

Overrides:
getValue in class XMLFragment
Returns:
a net.sf.saxon.s9api.XdmValue

generateNode

public org.jdom.Element generateNode(boolean relativize,
                                     java.net.URI base)
                              throws XBRLSerializationException
Description copied from class: XBRLFact
Generates the XBRLFact jdom node. adds the xsi:nil attribute if required

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

add

public boolean add(XBRLFact fact)
Resets the nillable status to false automatically. Then calls the super implementation

Specified by:
add in interface XBRLFactsList

add

public void add(int index,
                XBRLFact fact)
Resets the nillable status to false automatically. Then calls the super implementation

Specified by:
add in interface XBRLFactsList

getItems

public java.util.Iterator<java.util.Vector<XBRLFactItem>> getItems()
Description copied from interface: XBRLFactsList
Iterator over the items on this facts container

Specified by:
getItems in interface XBRLFactsList
Returns:
Iterator<Vector<XBRLFactItem>>

getItems

public java.util.Iterator<XBRLFactItem> getItems(XBRLItem itemFrom)
Description copied from interface: XBRLFactsList
Iterator over fact items that are instances of the XBRLItem received as a parameter.

Specified by:
getItems in interface XBRLFactsList
Parameters:
itemFrom - XBRLItem
Returns:
Iterator<XBRLFactItem>

getTuples

public java.util.Iterator<java.util.Vector<XBRLFactTuple>> getTuples()
Description copied from interface: XBRLFactsList
Iterator over the tuples on this facts container

Specified by:
getTuples in interface XBRLFactsList
Returns:
Iterator<Vector<XBRLFactTuple>>

getTuples

public java.util.Iterator<XBRLFactTuple> getTuples(XBRLTuple tupleFrom)
Description copied from interface: XBRLFactsList
Iterator over fact tuples that are instances of the XBRLTuple received as a parameter.

Specified by:
getTuples in interface XBRLFactsList
Parameters:
tupleFrom - XBRLTuple
Returns:
Iterator<XBRLFactTuple>

getItemsSg

public java.util.Iterator<XBRLFactItem> getItemsSg(XBRLItem itemFrom)
Description copied from interface: XBRLFactsList
Iterator over fact items that are instances of the XBRLItem received as a parameter of in the substitution group of that item

Specified by:
getItemsSg in interface XBRLFactsList
Parameters:
itemFrom - XBRLItem
Returns:
Iterator<XBRLFactItem>

getTuplesSg

public java.util.Iterator<XBRLFactTuple> getTuplesSg(XBRLTuple tupleFrom)
Description copied from interface: XBRLFactsList
Iterator over fact tuples that are instances of the XBRLTuple received as a parameter of in the substitution group of that tuple

Specified by:
getTuplesSg in interface XBRLFactsList
Returns:
Iterator<XBRLFactTuple>

getNumberOfTuples

public int getNumberOfTuples()
Description copied from interface: XBRLFactsList
Calculates and returns the number of tuples children of this facts container

Specified by:
getNumberOfTuples in interface XBRLFactsList
Returns:
integer value

iterator

public java.util.Iterator<XBRLFact> iterator()
Specified by:
iterator in interface XBRLFactsList

remove

public boolean remove(XBRLFact fact)
Description copied from interface: XBRLFactsList
Removes a fact from the facts container

Specified by:
remove in interface XBRLFactsList
Returns:
boolean

setParent

public void setParent(XBRLFactsList parent)
Description copied from class: XBRLFact
Sets the parent of this XBRLFact to be the XBRLFactsList object used as a parameter.

Setting the parent does not adds the fact as child of the parent element. This function do the following steps:

  1. if there are no changes (current parent is the same object as the object used as a parameter) then the function does nothing
  2. inform the old parent to remove the reference to the children
  3. sets parent of this object to be the object submitted as a parameter
  4. if the fact was assigned from a different instance document. Then relationships in the original instance document are removed from the new item.

Specified by:
setParent in interface XBRLFactsList
Overrides:
setParent in class XBRLFact

addOrForwardItem

public void addOrForwardItem(XBRLFactItem item)
Description copied from interface: XBRLFactsList
Called internally to register new facts in the instance document

Specified by:
addOrForwardItem in interface XBRLFactsList

size

public int size()
Description copied from interface: XBRLFactsList
Access to the number of elements in the XBRLFactList

Specified by:
size in interface XBRLFactsList
Returns:
integer

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 XBRLFact
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 XBRLFact
Parameters:
modifiers - integer
Returns:
a String representation of this fact.

get

public XBRLFact get(int index)
Description copied from interface: XBRLFactsList
Returns the element at the selected index position. The first element is at position 0

Specified by:
get in interface XBRLFactsList
Parameters:
index - integer
Returns:
XBRLFact at position indicated by index parameter

indexOf

public int indexOf(XBRLFact fact)
Description copied from interface: XBRLFactsList
Returns the index position of a fact within this list

Specified by:
indexOf in interface XBRLFactsList
Parameters:
fact - XBRLFact
Returns:
integer

indexOf

public int indexOf(XBRLFact fact,
                   int index)
Description copied from interface: XBRLFactsList
Returns the index position of a fact within this list starting at the position indicated by the index parameter

Specified by:
indexOf in interface XBRLFactsList
Parameters:
fact - XBRLFact
index - integer
Returns:
integer

clear

public void clear()
Description copied from class: XBRLFact
Eliminates all this fact content

Specified by:
clear in interface XBRLFactsList
Overrides:
clear in class XBRLFact

hashCode

public int hashCode()
Description copied from interface: XBRLFactsList
This is from the Object interface and must be implemented by sub classes in order to be able to provide hashCodes

Specified by:
hashCode in interface XBRLFactsList
Overrides:
hashCode in class XBRLFact
Returns:
integer

equals

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

Specified by:
equals in interface XBRLFactsList
Overrides:
equals in class XBRLFact
Parameters:
obj - Object to compare to
Returns:
boolean value

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

isDuplicate

public boolean isDuplicate(XBRLFact otherFact)
Description copied from class: XBRLFact
Check if two items are duplicates as defined in the XBRL 2.1 specification

Specified by:
isDuplicate in class XBRLFact
Parameters:
otherFact - the other XBRLFactItem
Returns:
boolean


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