com.batavia.xbrl.instance
Interface InstanceDocument

All Superinterfaces:
XbrlDocument, XmlDocument

public interface InstanceDocument
extends XbrlDocument

XBRL instances are XML fragments with root element, xbrl. XBRL instances contain facts, with each fact corresponding to a concept defined in their supporting DTS. XBRL instances also contain context and unit elements that provide additional information needed to interpret the facts in the instance.

Copyright 2006 J2R BV, The Netherlands.

Part of Licensed Materials.

www.batavia-xbrl.com

Author:
Ron van Ardenne

Method Summary
 void addXbrl(Xbrl newChild)
          Add a XBRL element child to the root of this document
 Xbrl createRoot(java.lang.String namespacePrefix, java.lang.String targetNamespaceUri, java.lang.String urlTaxonomySchema, java.lang.String specPrefix, java.lang.String specNamespaceUri, DiscoverableTaxonomySet DTS)
          Create a Xbrl Root based on the given TaxonomySchema.
 void deleteEmptyFacts()
          Should be called after a instance is generated from a DTS, some facts are filled with data and all unused facts should be removed.
 ValidationDocument fromXbrl(byte[] data, java.lang.String systemId)
          Initialize this document with XBRL content from the data found in the data byte array and set its id with the given systemid while perfoming XML schema validation.
 ValidationDocument fromXbrl(java.io.InputStream data, java.lang.String systemId)
          Initialize this document with XBRL content from the data found in the data stream and set its id with the given systemid while perfoming XML schema validation.
 void fromXbrl(java.lang.String systemId, boolean useDtsCache)
          Initialize this document with XBRL content from the data found at the location indicated by the given systemid while perfoming XML schema validation.
 void fromXbrlWithoutValidation(java.lang.String systemId, boolean useDtsCache)
          Initialize this document with XBRL content from the data found at the location indicated by the given systemid without perfoming XML schema validation.
 ValidationDocument getAllXbrlValidationMessages()
           
 java.lang.String getNrOfReportedFacts(Network network)
          Determine the nr of reported facts on concepts that are presnet in nthe given network
 com.j2r.xbrl.taxonomy.DTSContainer getSupportingDTScontainer(boolean useDtsCache)
          Each Instance Document can have multiple XBRL elements.
 java.util.List getXbrlElements()
           
 boolean reValidate(ValidationDocument allMsgs)
          Validate the instance again
 boolean schemaRefsAndDtsesValid()
          test whether schemarefs and dts-es are valid
 void setXbrlElements(java.util.List xbrlElements)
           
 void toPtviXbrl(java.io.OutputStream data)
          write the PTVI xbrl content of this element to the stream. delagate to the children
 
Methods inherited from interface com.batavia.xbrl.XbrlDocument
fromXbrl, fromXbrl, setRoot, toXbrl
 
Methods inherited from interface com.batavia.xml.XmlDocument
fromXml, getRoot, getSystemId, setRoot, setSystemId, toXml, toXml, validate
 

Method Detail

deleteEmptyFacts

void deleteEmptyFacts()
Should be called after a instance is generated from a DTS, some facts are filled with data and all unused facts should be removed.


createRoot

Xbrl createRoot(java.lang.String namespacePrefix,
                java.lang.String targetNamespaceUri,
                java.lang.String urlTaxonomySchema,
                java.lang.String specPrefix,
                java.lang.String specNamespaceUri,
                DiscoverableTaxonomySet DTS)
Create a Xbrl Root based on the given TaxonomySchema. The taxonomy's target namespace is prefixed with the given namespacePrefix. Return it so that the caller can influence the childs value/children/attributes

Parameters:
qName -
Returns:
Xbrl new Root that is already added to parent when returned

getSupportingDTScontainer

com.j2r.xbrl.taxonomy.DTSContainer getSupportingDTScontainer(boolean useDtsCache)
Each Instance Document can have multiple XBRL elements. Each XBRL element is supported by its own DTS. The DTSes that support the XBRL elements in this document are accessible through this DTSContainer.

Returns:
DTSContainer holds DTS objects for XBRL elements in this document.

fromXbrlWithoutValidation

void fromXbrlWithoutValidation(java.lang.String systemId,
                               boolean useDtsCache)
                               throws XbrlException
Initialize this document with XBRL content from the data found at the location indicated by the given systemid without perfoming XML schema validation.

Parameters:
systemId -
Throws:
XbrlException

fromXbrl

void fromXbrl(java.lang.String systemId,
              boolean useDtsCache)
              throws XbrlException
Initialize this document with XBRL content from the data found at the location indicated by the given systemid while perfoming XML schema validation.

Parameters:
systemId -
useDtsCache -
Throws:
XbrlException

fromXbrl

ValidationDocument fromXbrl(byte[] data,
                            java.lang.String systemId)
                            throws XbrlException
Initialize this document with XBRL content from the data found in the data byte array and set its id with the given systemid while perfoming XML schema validation.

Parameters:
data -
systemId -
Returns:
Throws:
XbrlException

fromXbrl

ValidationDocument fromXbrl(java.io.InputStream data,
                            java.lang.String systemId)
                            throws XbrlException
Initialize this document with XBRL content from the data found in the data stream and set its id with the given systemid while perfoming XML schema validation.

Parameters:
data -
systemId -
Returns:
Throws:
XbrlException

toPtviXbrl

void toPtviXbrl(java.io.OutputStream data)
write the PTVI xbrl content of this element to the stream. delagate to the children


addXbrl

void addXbrl(Xbrl newChild)
Add a XBRL element child to the root of this document

Parameters:
newChild -

getXbrlElements

java.util.List getXbrlElements()
Returns:
List holding the xbrlElements that are contained in this document.

setXbrlElements

void setXbrlElements(java.util.List xbrlElements)
Parameters:
xbrlElements - The xbrlElements to set.

getAllXbrlValidationMessages

ValidationDocument getAllXbrlValidationMessages()
Returns:
Returns the xbrlValidationMessages for this document.

getNrOfReportedFacts

java.lang.String getNrOfReportedFacts(Network network)
Determine the nr of reported facts on concepts that are presnet in nthe given network

Parameters:
network -
Returns:

reValidate

boolean reValidate(ValidationDocument allMsgs)
                   throws XbrlException
Validate the instance again

Parameters:
allMsgs -
Returns:
Throws:
XbrlException

schemaRefsAndDtsesValid

boolean schemaRefsAndDtsesValid()
test whether schemarefs and dts-es are valid

Returns: