com.ihr.xbrl.om.instance
Class XBRLInstance

java.lang.Object
  extended by com.ihr.xbrl.om.XMLFragment
      extended by com.ihr.xbrl.om.XMLDocumentURI
          extended by com.ihr.xbrl.om.XBRLDocument
              extended by com.ihr.xbrl.om.instance.XBRLInstance
All Implemented Interfaces:
XBRLRelationshipPoint, XBRLFactsList, XBRLDTSDocument, XBRLHasDTSTarget, XBRLValidation, XMLHasParent, java.lang.Cloneable, javax.xml.namespace.NamespaceContext

public class XBRLInstance
extends XBRLDocument
implements XBRLFactsList, java.lang.Cloneable

Class that encapsulates the content of an XBRL instance document Instance documents can be created via API calls or can be created from the content of an XML file

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 docNodeName
          The document node name
 
Fields inherited from class com.ihr.xbrl.om.XBRLDocument
INSTANCE, IXBRL, LINKBASE, TAXONOMY
 
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
XBRLInstance(DTSContainer dts)
          Creates a new empty instance document
XBRLInstance(DTSContainer[] dtss)
          Creates a new empty instance document and creates link:schemaRef and link:linkbaseRef elements to all root URIs of the DTSContainers received as a parameter.
XBRLInstance(DTSContainer dts, javax.xml.transform.Source xmlSource)
          Creates an instance document and obtains the content from a javax.xml.transform.Source object The Document URI of this instance will be set to the systemId of the Source provided as a parameter.
XBRLInstance(DTSContainer dts, net.sf.saxon.s9api.XdmNode doc, boolean bAddToCache)
          Creates an instance document and sets the document content to the supplied XdmNode.
XBRLInstance(XMLDocumentURI d, boolean bAddToCache)
          Creates a new empty instance document according to the configuration object received.
 
Method Summary
 void add(int index, XBRLFact fact)
           
 boolean add(XBRLFact fact)
          Adds a new fact to the end of this list of facts
 void addContext(XBRLContext ctx)
          Adds a new context to the instance document.
 void addOrForwardItem(XBRLFactItem item)
          Called internally to register new facts in the instance document
 void addUnit(XBRLUnit unit)
           
 void addXBRLDocument(XBRLDocument doc, XBRLRoleAndArcroleTypes roleOrArcrole)
          Attach a new XBRLDocument directly in the instance regardless it is alreary somewhere under the wood of the DTS.
 void addXBRLDocumentIfNotInDTS(XBRLDocument doc, XBRLRoleAndArcroleTypes roleOrArcrole)
          Attach a new XBRLDocument to the instance document using a linkbaseRef or schemaRed only if the document is not in already in the set of documents that can be discovered from this instance document existing DTS entries.
 void clear()
          Frees-up used memory This method should not be invoqued on live objects in the DTS.
 void clearDTSReferences()
          Removes all schemas, linkbases, roleRefs, arcroleRefs etc in the DTS of this instance document.
 XBRLInstance clone()
           
 void delContext(XBRLContext ctx)
          Removes a context from the instance document.
 void delUnit(XBRLUnit unit)
          Removes an unit from the instance document.
 void delXBRLDocument(XBRLDocument doc)
          Detach an XBRLDocument from the set of XBRLDocuments to include in this instance's DTS.
 void discoverDTS(XBRLDTSDocument parent)
          This process MUST not use Schema Aware XPath expressions and MUST be limited to the elements that cause DTS Discovery.
 boolean equals(java.lang.Object obj)
          Sets a new XPathFunctionResolver for this object
 org.jdom.Document generateDocNode(boolean relativize, java.net.URI base)
          Generates a JDOM representation of the instance document obtains information from the internal objects and not from the NodeInfo document.
 XBRLFact get(int index)
          Returns the element at the selected index position.
 XBRLFact getCacheFact(net.sf.saxon.s9api.XdmNode factNode)
          This function access to a fact item by its surrounding XdmNode.
 XBRLContext getContextById(java.lang.String id)
           
 java.util.Iterator<XBRLContext> getContexts()
          Access to all contexts in the XBRL Instance.
 int getDTSDocumentType()
          Returns the type of DTS Document
 java.lang.String getDTSDocumentTypeName()
           
 java.util.Iterator<java.net.URI> getDTSs()
          Obtains an iterator over the URIs of files that are in the DTS of this instance document
 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
 XBRLFact getFactById(java.lang.String id)
          find the element with the correspondent id and return the instance or tuple pointed to
 XBRLInstance getInstance()
          Access to the instance document on the top of this facts container hierarchy
 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 getNumberOfContexts()
          Returns the number of contexts in this instance document
 int getNumberOfTuples()
          Calculates and returns the number of tuples children of this facts container
 XBRLFactsList getParent()
          The parent XMLFragment node of this XMLFragment node.
 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
 XBRLUnit getUnitById(java.lang.String id)
           
 java.util.Iterator<XBRLUnit> getUnits()
           
 net.sf.saxon.s9api.XdmValue getValue()
          Returns the value of this node.
 java.util.Iterator<java.net.URI> getXBRLDocuments(int type)
          Returns an iterator over documents included in the DTS by this instance that are of the specified type
 java.lang.String getXPathToRoot()
          Returns an XPath 2.0 expression to locate this document's node starting at this document's root This function updates the local namespace context if nodes in the path requires new namespaces to be declared.
 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
static boolean isIXBRL(XMLDocumentURI node)
          Returns true if the XMLDocumentURI is an iXBRL document.
 java.util.Iterator<XBRLFact> iterator()
           
 void merge(XBRLInstance otherInstance)
          Add to this instance document all the facts and contexts from the instance document in the parameter
 void optimize(DTSContainer dts, boolean bRelativizeSchemaRefs, boolean bGenerateSchemalocation)
          Optimize the instance document by removing unused elements
 void readInfoset()
          Read all structures that builds the infoset
 boolean remove(XBRLFact fact)
          Removes a fact from the facts container
 void setDocumentAndReload(net.sf.saxon.s9api.XdmNode node)
          If the content is changed then update the internal objects
 void setParent(XBRLFactsList parent)
          Sets the parent of this facts container to a new parent.
 void setURI(java.net.URI newURI)
          Sets the value of the URI of this XMLDocumentURI If the document is in the cache and the supplied URI is not null or is different from the original URI this method throws an XBRLInternalErrorException
 int size()
          Access to the number of elements in the XBRLFactList
 
Methods inherited from class com.ihr.xbrl.om.XBRLDocument
addExtendedLink, addIdOfElement, addIdOfElement, addParent, changeElementId, changeExtendedLinkKey, createDocument, createDocument, createDocument, delParent, getAllUsedIds, getComments, getDocument, getDTS, getElementById, getExtendedLink, getExtendedLinks, getExtendedLinks, getParents, isIdUsed, moveNamespacesUp, removeExtendedLink, removeIdOfElement, save, setComments, updateXML
 
Methods inherited from class com.ihr.xbrl.om.XMLDocumentURI
addChild, delChild, generateLocatorToDocument, getBase, getChildren, getDocumentURI, getDTSKey, getLocalFile, getValidationReport, invalidate, invalidate, isInDTS, isOnValidation, validate
 
Methods inherited from class com.ihr.xbrl.om.XMLFragment
addAttribute, addChild, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, clone, delAttribute, delAttribute, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNode, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAttribute, getAttributeQNameValue, getAttributes, getAttributes, getAttributeStringValue, getAttributeValue, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getFragment, getFriendlyName, getFriendlyName, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getId, getLang, getNamespaceURI, getNodeName, 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, s_equal2, setAttributes, setBase, setDocument, setElements, setId, 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.instance.XBRLFactsList
evaluateList, getContainer, getDocument
 
Methods inherited from interface com.ihr.xbrl.om.XMLHasParent
addXMLChild, getBase, removeXMLChild, setParent
 

Field Detail

docNodeName

public static final javax.xml.namespace.QName docNodeName
The document node name

Constructor Detail

XBRLInstance

public XBRLInstance(DTSContainer dts,
                    net.sf.saxon.s9api.XdmNode doc,
                    boolean bAddToCache)
             throws DTSDiscoveryException
Creates an instance document and sets the document content to the supplied XdmNode. If the value of the bAddToCache parameter is true the document will be added to the documents cache in the DTS.

Parameters:
dts -
doc -
bAddToCache -
Throws:
DTSDiscoveryException

XBRLInstance

public XBRLInstance(DTSContainer dts)
Creates a new empty instance document

Parameters:
dts - The DTSContainer under which this instance is going to be created

XBRLInstance

public XBRLInstance(XMLDocumentURI d,
                    boolean bAddToCache)
             throws DTSDiscoveryException
Creates a new empty instance document according to the configuration object received. And the content of the XMLDocumentURI is supplied.

This is an internal method and should not be used by applications. This method is called from the XBRLDocument.createDocument(XMLDocumentURI, boolean) method during the creation of an XBRL Instance document.

This constructor is also used by clone() with bAddToCache set to false

Parameters:
d - XMLDocumentURI to transform into an XBRLInstance object
bAddToCache -
Throws:
DTSDiscoveryException

XBRLInstance

public XBRLInstance(DTSContainer[] dtss)
             throws com.rs.lic.LicenseVerificationException
Creates a new empty instance document and creates link:schemaRef and link:linkbaseRef elements to all root URIs of the DTSContainers received as a parameter.

This method was created to facilitate instance document creation inside the formula linkbase.

The incoming DTS are all merged into a new DTSContainer

Parameters:
dtss -
Throws:
com.rs.lic.LicenseVerificationException
XBRLValidationException

XBRLInstance

public XBRLInstance(DTSContainer dts,
                    javax.xml.transform.Source xmlSource)
             throws net.sf.saxon.s9api.SaxonApiException,
                    DTSDiscoveryException
Creates an instance document and obtains the content from a javax.xml.transform.Source object

The Document URI of this instance will be set to the systemId of the Source provided as a parameter. The Source will be transformed into XML nodes and the nodes will be the new document content.

Parameters:
dts - The DTSContainer under which the instance document is going to be created
xmlSource - The Source of the XML nodes to be read
Throws:
net.sf.saxon.s9api.SaxonApiException - in case of problems reading the Source
DTSDiscoveryException
Method Detail

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 XBRLDocument
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 XBRLDocument
Parameters:
obj - Object to compare to
Returns:
boolean value

clone

public XBRLInstance clone()
Overrides:
clone in class XMLFragment

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.

Specified by:
clear in interface XBRLFactsList
Specified by:
clear in interface XBRLDTSDocument
Overrides:
clear in class XBRLDocument
Throws:
java.lang.Throwable

getDTSDocumentType

public int getDTSDocumentType()
Description copied from class: XBRLDocument
Returns the type of DTS Document

Specified by:
getDTSDocumentType in class XBRLDocument
Returns:
DTSDocument.INSTANCE, DTSDocument.TAXONOMY or DTSDocument.LINKBASE

getCacheFact

public XBRLFact getCacheFact(net.sf.saxon.s9api.XdmNode factNode)
This function access to a fact item by its surrounding XdmNode. It is obtained from an internal cache. This function is used inside the formula processor in order to accelerate access to high level objects while working with low level Saxon API.

At this stage, the use of this method is only possible for instance documents obtained from the serialized form (XML files).

Parameters:
factNode - as key to obtain the XBRLFact
Returns:
XBRLFact
Since:
2.7.0

addContext

public void addContext(XBRLContext ctx)
                throws XBRLInconsistentDTSException
Adds a new context to the instance document. Normally contexts are added automatically when a fact is added to a container. This method is here to add contexts to an instance document that are not associated to any fact. The method raises an XBRLInconsistentDTSException if the instance will have two contexts for the same ID This method does not compare the contexts for s_equality. Two s_equal contexts with different IDs may exist in an instance document.

Parameters:
ctx -
Throws:
XBRLInconsistentDTSException

delContext

public void delContext(XBRLContext ctx)
Removes a context from the instance document.

The context should not have fact items in this instance document before it is removed.

All facts in the instance document using this context will be removed from the instance

Parameters:
ctx -
Throws:
XBRLValidationException

delUnit

public void delUnit(XBRLUnit unit)
             throws XBRLInconsistentDTSException
Removes an unit from the instance document. The unit must not be used by items in this instance document before it is removed. An XBRLInconsistentOperationException is thrown if this happens

Parameters:
unit -
Throws:
XBRLInconsistentDTSException

getFactById

public XBRLFact getFactById(java.lang.String id)
                     throws XBRLValidationException
find the element with the correspondent id and return the instance or tuple pointed to

Parameters:
id -
Returns:
XMLFragment
Throws:
XBRLValidationException

merge

public void merge(XBRLInstance otherInstance)
Add to this instance document all the facts and contexts from the instance document in the parameter

Parameters:
otherInstance - is the document to include into this document
Throws:
java.net.MalformedURLException
XBRLValidationException
FormulaRuntimeException

setDocumentAndReload

public void setDocumentAndReload(net.sf.saxon.s9api.XdmNode node)
                          throws XBRLInconsistentDTSException,
                                 com.rs.lic.LicenseVerificationException
If the content is changed then update the internal objects

Overrides:
setDocumentAndReload in class XBRLDocument
Parameters:
node - the new XdmNode
Throws:
XBRLInconsistentDTSException
com.rs.lic.LicenseVerificationException

optimize

public void optimize(DTSContainer dts,
                     boolean bRelativizeSchemaRefs,
                     boolean bGenerateSchemalocation)
Optimize the instance document by removing unused elements. - unreferenced context are removed - unreferenced units are removed

Parameters:
bRelativizeSchemaRefs - turn the content of xlink:href relative to the documentURI
bGenerateSchemalocation - creates a xsi:schemaLocation element
Throws:
net.sf.saxon.trans.XPathException

getDTSDocumentTypeName

public java.lang.String getDTSDocumentTypeName()
Specified by:
getDTSDocumentTypeName in class XBRLDocument

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

generateDocNode

public org.jdom.Document generateDocNode(boolean relativize,
                                         java.net.URI base)
                                  throws XBRLSerializationException
Generates a JDOM representation of the instance document obtains information from the internal objects and not from the NodeInfo document. The NodeInfo document is not updated

Specified by:
generateDocNode in class XBRLDocument
Parameters:
relativize - boolean indicating if all URIs must be relativized
base - URI the base uri to relativize other URIs
Returns:
org.jdom.Document
Throws:
XBRLValidationException
XBRLSerializationException

setURI

public void setURI(java.net.URI newURI)
            throws DTSDiscoveryException
Description copied from class: XMLDocumentURI
Sets the value of the URI of this XMLDocumentURI If the document is in the cache and the supplied URI is not null or is different from the original URI this method throws an XBRLInternalErrorException

Overrides:
setURI in class XMLDocumentURI
Parameters:
newURI - URI
Throws:
DTSDiscoveryException

discoverDTS

public void discoverDTS(XBRLDTSDocument parent)
                 throws DTSDiscoveryException,
                        com.rs.lic.LicenseVerificationException
This process MUST not use Schema Aware XPath expressions and MUST be limited to the elements that cause DTS Discovery.

Specified by:
discoverDTS in interface XBRLDTSDocument
Specified by:
discoverDTS in class XBRLDocument
Throws:
com.rs.lic.LicenseVerificationException
DTSDiscoveryException

getContexts

public java.util.Iterator<XBRLContext> getContexts()
Access to all contexts in the XBRL Instance. If the instance document has been created from an external file this function may return duplicate XBRL Contexts in the iterator. If the XBRL Instance has been created from the API, the API already eliminates duplicate contexts automatically.

Note that the serialization process will eliminate duplicate contexts automatically if they exists.

Returns:
Iterator over all XBRL contexts in the instance.

getNumberOfContexts

public int getNumberOfContexts()
Returns the number of contexts in this instance document

Returns:
Integer value
Throws:
XBRLValidationException

getUnits

public java.util.Iterator<XBRLUnit> getUnits()

addXBRLDocumentIfNotInDTS

public void addXBRLDocumentIfNotInDTS(XBRLDocument doc,
                                      XBRLRoleAndArcroleTypes roleOrArcrole)
                               throws XBRLValidationException
Attach a new XBRLDocument to the instance document using a linkbaseRef or schemaRed only if the document is not in already in the set of documents that can be discovered from this instance document existing DTS entries.

The document to attach MUST have a URI. The roleOrArcrole parameter may be null and is null in if the doc parameter is a taxonomy schema.

Parameters:
doc - the new XBRLTaxonomy or XBRLLinkbase to attach
roleOrArcrole - XBRLRoleAndArcroleTypes, optional
Throws:
XBRLValidationException
See Also:
addXBRLDocument(XBRLDocument, XBRLRoleAndArcroleTypes)

addXBRLDocument

public void addXBRLDocument(XBRLDocument doc,
                            XBRLRoleAndArcroleTypes roleOrArcrole)
Attach a new XBRLDocument directly in the instance regardless it is alreary somewhere under the wood of the DTS. The document to be attached MUST have a URI

Parameters:
doc - the new XBRLTaxonomy or XBRLLinkbase to attach
roleOrArcrole - XBRLRoleAndArcroleTypes can be null and is null for taxonomy and linkbase documents
See Also:
addXBRLDocumentIfNotInDTS(XBRLDocument, XBRLRoleAndArcroleTypes)

getXBRLDocuments

public java.util.Iterator<java.net.URI> getXBRLDocuments(int type)
Returns an iterator over documents included in the DTS by this instance that are of the specified type

Parameters:
type - can be XBRLDocument.TAXONOMY or XBRLDocument.LINKBASE
Returns:
Iterator
Throws:
XBRLRuntimeException - encapsulating XBRLValidationExceptions in the rare case where the document has not been validated and contains XBRL Validation errors

delXBRLDocument

public void delXBRLDocument(XBRLDocument doc)
Detach an XBRLDocument from the set of XBRLDocuments to include in this instance's DTS.

Parameters:
doc - the XBRLTaxonomy or XBRLLinkbase to detach

getDTSs

public java.util.Iterator<java.net.URI> getDTSs()
                                         throws XBRLValidationException
Obtains an iterator over the URIs of files that are in the DTS of this instance document

Returns:
Iterator
Throws:
java.net.MalformedURLException
XBRLValidationException

getContextById

public XBRLContext getContextById(java.lang.String id)
                           throws XBRLValidationException
Throws:
XBRLValidationException

getUnitById

public XBRLUnit getUnitById(java.lang.String id)
                     throws XBRLValidationException
Throws:
XBRLValidationException

readInfoset

public void readInfoset()
                 throws XBRLValidationException
Description copied from class: XBRLDocument
Read all structures that builds the infoset

Specified by:
readInfoset in class XBRLDocument
Throws:
XBRLValidationException

addUnit

public void addUnit(XBRLUnit unit)
             throws XBRLInconsistentDTSException
Parameters:
unit -
Throws:
XBRLValidationException
XBRLInconsistentDTSException

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

getXPathToRoot

public java.lang.String getXPathToRoot()
Description copied from class: XMLFragment
Returns an XPath 2.0 expression to locate this document's node starting at this document's root This function updates the local namespace context if nodes in the path requires new namespaces to be declared.

Specified by:
getXPathToRoot in interface XBRLFactsList
Overrides:
getXPathToRoot in class XMLFragment
Returns:
String

add

public boolean add(XBRLFact fact)
Description copied from interface: XBRLFactsList
Adds a new fact to the end of this list of facts

Specified by:
add in interface XBRLFactsList

add

public void add(int index,
                XBRLFact fact)
Specified by:
add in interface XBRLFactsList

getInstance

public XBRLInstance getInstance()
Description copied from interface: XBRLFactsList
Access to the instance document on the top of this facts container hierarchy

Specified by:
getInstance in interface XBRLFactsList
Returns:
XBRLInstance

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>

getParent

public XBRLFactsList 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 XBRLFactsList
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.

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>>

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>

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>

iterator

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

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

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 interface: XBRLFactsList
Sets the parent of this facts container to a new parent.

Specified by:
setParent in interface XBRLFactsList

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

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

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

isIXBRL

public static boolean isIXBRL(XMLDocumentURI node)
Returns true if the XMLDocumentURI is an iXBRL document. False otherwise

Parameters:
node -
Returns:

clearDTSReferences

public void clearDTSReferences()
Removes all schemas, linkbases, roleRefs, arcroleRefs etc in the DTS of this instance document. This also removes all fact items in the instance but does not removes contexts and units.



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