public class XBRLInstance extends XBRLDocument implements java.lang.Cloneable
XBRLDocument.LockInfo, XBRLDocument.XBRLDocumentType
XBRLValidation.Direction
Modifier and Type | Field and Description |
---|---|
static javax.xml.namespace.QName |
docNodeName
The document root node name xbrli:xbrl.
|
static net.sf.saxon.om.StructuredQName |
sqnDocNodeName
The Constant sqnDocNodeName.
|
Constructor and Description |
---|
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,
boolean deepProcess)
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,
XBRLInstance instanceBasedOn)
Creates an empty instance optionally based on another instance.
|
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 doc,
boolean bAddToCache)
Creates a new empty instance document according to the configuration object received.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear.
|
XBRLInstance |
clone()
Clone.
|
void |
copyHistory(XBRLInstance fromInstance)
This method copy all history details from instance in the fromInstance parameter
to facts in this instance document.
|
void |
deduplicate()
Eliminate duplicate identical facts on this instance.
|
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)
Equals.
|
XMLDocumentImpl |
generateDocNode()
Generates an XML representation of the instance document
obtains information from the internal objects and not from the
NodeInfo document.
|
XBRLContext |
getContextById(java.lang.String id)
Gets the context by id.
|
XBRLDocument.XBRLDocumentType |
getDTSDocumentType()
Gets the DTS document type.
|
java.lang.String |
getDTSDocumentTypeName()
Gets the DTS document type name.
|
XBRLFact |
getFactById(java.lang.String id)
find the element with the correspondent id and return the instance
or tuple pointed to.
|
XBRLInstanceRootNode |
getInstanceRootNode()
Gets the instance root node.
|
XBRLUnit |
getUnitById(java.lang.String id)
Gets the unit that contains an id attribute that matches the value
of the id parameter.
|
java.lang.String |
getXPathToRoot()
Gets the x path to root.
|
int |
hashCode()
Hash code.
|
static boolean |
isIXBRL(XMLDocumentURI documentNode)
Returns true if the XMLDocumentURI is an iXBRL document.
|
static boolean |
isIXBRL1_1(XMLDocumentURI documentNode)
Returns true if the XMLDocumentURI is an iXBRL 1.1 document.
|
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
|
static java.util.Collection<java.lang.String> |
prepareComments(java.lang.String description)
Prepare comments.
|
void |
readInfoset()
Read infoset.
|
void |
setOldDocument(net.sf.saxon.s9api.XdmNode fakeNode)
This method is here to dynamically set the property oldDocument so this
instance will be converted to current DTSContainer.
|
void |
setRootNode(XBRLInstanceRootNode instance)
Sets the root node.
|
boolean |
setURI(java.net.URI newURI)
Sets the URI.
|
java.lang.String |
toString()
To string.
|
addComment, addIdOfElement, addIdOfElement, addParent, changeElementId, checkCleanDocumentInfo, createDocument, createDocument, createDocument, createDynamicDocument, delParent, generateId, getAllUsedIds, getComments, getDocumentInfo, getDTS, getElementById, getElementsById, getOrCreateTableId, getParents, getRoleRef, getTreeModel, isContentModified, isDynamic, isIdUsed, isOfficialURI, lock, registerChangeIdListener, registerChangeIdListener, release, removeComments, removeIdOfElement, removeIdOfElement, resolveURI, save, save, save, setComments, setLockInfo, setModified, setReadingInfoset, unregisterChangeIdListener, unsetLockInfo, updateXML
addChild, delChild, evaluateList, getBase, getChildren, getContainer, getDocument, getDocumentRootNode, getDocumentURI, getDocumentURICode, getDTSDiscoveryInfo, getDTSKey, getFriendlyName, getLocalFile, getOldDocument, getPackageName, getPackageVersion, getPrefix, getPrefixes, getValidationReport, getXBRLDocumentInfo, invalidate, invalidate, isInDTS, isOnValidation, setContainer, setDocumentURICode, setDTSDiscoveryInfo, setDTSKey, setNodeName, setRootNode, setXBRLDocumentInfo, validate
public static final javax.xml.namespace.QName docNodeName
public static final net.sf.saxon.om.StructuredQName sqnDocNodeName
public XBRLInstance(DTSContainer dts, net.sf.saxon.s9api.XdmNode doc, boolean bAddToCache) throws DTSDiscoveryException
dts
- the dtsdoc
- the docbAddToCache
- the b add to cacheDTSDiscoveryException
- the DTS discovery exceptionpublic XBRLInstance(DTSContainer dts)
dts
- The DTSContainer under which this instance is going to be createdpublic XBRLInstance(XMLDocumentURI doc, boolean bAddToCache) throws DTSDiscoveryException
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
doc
- XMLDocumentURI to transform into an XBRLInstance objectbAddToCache
- the b add to cacheDTSDiscoveryException
- the DTS discovery exceptionpublic XBRLInstance(DTSContainer dts, XBRLInstance instanceBasedOn)
dts
- The DTSContainer under which this instance is going to be createdinstanceBasedOn
- The instance under wich this instance is based, maybe nullpublic XBRLInstance(DTSContainer[] dtss) throws com.rs.lic.LicenseVerificationException
This method was created to facilitate instance document creation inside the formula linkbase.
The incoming DTS are all merged into a new DTSContainer
dtss
- the dtsscom.rs.lic.LicenseVerificationException
- the license verification exceptionpublic XBRLInstance(DTSContainer dts, javax.xml.transform.Source xmlSource, boolean deepProcess) throws net.sf.saxon.s9api.SaxonApiException, DTSDiscoveryException
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.
dts
- The DTSContainer under which the instance document is going to be createdxmlSource
- The Source of the XML nodes to be readdeepProcess
- boolean, true if the xmlSource is schema validated and nodes can be processed. false otherwisenet.sf.saxon.s9api.SaxonApiException
- in case of problems reading the SourceDTSDiscoveryException
- the DTS discovery exceptionpublic int hashCode()
hashCode
in class XBRLDocument
public boolean equals(java.lang.Object obj)
equals
in class XBRLDocument
obj
- the objpublic XBRLInstance clone()
clone
in class java.lang.Object
public void clear() throws java.lang.Throwable
clear
in interface XBRLDTSDocument
clear
in class XBRLDocument
java.lang.Throwable
- the throwablepublic XBRLDocument.XBRLDocumentType getDTSDocumentType()
getDTSDocumentType
in class XBRLDocument
public XBRLFact getFactById(java.lang.String id) throws XBRLValidationException
id
- the idXBRLValidationException
- the XBRL validation exceptionpublic XBRLInstanceRootNode getInstanceRootNode()
public void setRootNode(XBRLInstanceRootNode instance)
instance
- the new root nodepublic void merge(XBRLInstance otherInstance)
otherInstance
- is the document to include into this documentpublic void optimize(DTSContainer dts, boolean bRelativizeSchemaRefs, boolean bGenerateSchemalocation)
dts
- the dtsbRelativizeSchemaRefs
- turn the content of xlink:href relative to the documentURIbGenerateSchemalocation
- creates a xsi:schemaLocation elementpublic java.lang.String getDTSDocumentTypeName()
getDTSDocumentTypeName
in class XBRLDocument
public XMLDocumentImpl generateDocNode() throws XBRLSerializationException
generateDocNode
in class XBRLDocument
XBRLSerializationException
- the XBRL serialization exceptionpublic static java.util.Collection<java.lang.String> prepareComments(java.lang.String description) throws XBRLSerializationException
description
- the descriptionXBRLSerializationException
- the XBRL serialization exceptionpublic boolean setURI(java.net.URI newURI) throws DTSDiscoveryException
setURI
in class XMLDocumentURI
newURI
- the new URIDTSDiscoveryException
- the DTS discovery exceptionpublic void discoverDTS(XBRLDTSDocument parent) throws DTSDiscoveryException, com.rs.lic.LicenseVerificationException
discoverDTS
in interface XBRLDTSDocument
discoverDTS
in class XBRLDocument
parent
- the parentDTSDiscoveryException
- the DTS discovery exceptioncom.rs.lic.LicenseVerificationException
- the license verification exceptionpublic XBRLContext getContextById(java.lang.String id) throws XBRLValidationException
id
- the idXBRLValidationException
- the XBRL validation exceptionpublic XBRLUnit getUnitById(java.lang.String id) throws XBRLValidationException
id
- the unit idXBRLValidationException
- if the object referenced by the id
is not an XBRLUnitpublic void readInfoset() throws XBRLValidationException
readInfoset
in class XBRLDocument
XBRLValidationException
- the XBRL validation exceptionpublic java.lang.String getXPathToRoot()
getXPathToRoot
in class XMLDocumentURI
public static boolean isIXBRL(XMLDocumentURI documentNode)
documentNode
- the nodepublic static boolean isIXBRL1_1(XMLDocumentURI documentNode)
documentNode
- the nodepublic void copyHistory(XBRLInstance fromInstance)
fromInstance
- the instance document whose facts history is going to be copied into this instance factspublic java.lang.String toString()
toString
in class XBRLDocument
public void deduplicate()
public void setOldDocument(net.sf.saxon.s9api.XdmNode fakeNode)
fakeNode
- the new old documentCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa