|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ihr.xbrl.om.XMLFragment
com.ihr.xbrl.om.XMLDocumentURI
com.ihr.xbrl.om.XBRLDocument
public abstract class XBRLDocument
Contains the Properties of the object 2.2.2 XBRL Document Information Item The [Document URI] property is provided by the parent class XMLDocumentURI The [Document Information Item] property is provided by the root class XMLFragment The [Additional Properties] Properties are provided by classes derived by extension of this class
| Field Summary | |
|---|---|
static int |
INSTANCE
|
static int |
IXBRL
|
static int |
LINKBASE
|
static int |
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 | |
|---|---|
XBRLDocument(DTSContainer dts,
javax.xml.transform.Source xmlSource)
Creates an XBRLDocument form a Source object that can be used to obtain the XML nodes of the document content. |
|
| Method Summary | |
|---|---|
void |
addExtendedLink(XBRLExtendedLink newExtendedLink)
|
boolean |
addIdOfElement(XMLFragment newElement)
Adds the id of newElement to the set of IDs stored in this document. |
boolean |
addIdOfElement(XMLFragment newElement,
java.lang.String id)
Adds the id of newElement to the set of IDs stored in this document. |
void |
addParent(XBRLDocument parent)
Add a new XBRLDocument as parent of this document |
void |
changeElementId(XMLFragment newEl,
java.lang.String oldId,
java.lang.String newId)
Changes the key of an element in the internal itemsById hashtable but does not change the id on the target element. |
void |
changeExtendedLinkKey(net.sf.saxon.s9api.XdmNode oldKey,
net.sf.saxon.s9api.XdmNode newKey,
XBRLExtendedLink link)
|
void |
clear()
Frees-up used memory This method should not be invoqued on live objects in the DTS. |
static XMLDocumentURI |
createDocument(DTSContainer dts,
java.net.URI baseURI,
java.net.URI theURI,
boolean addToCache,
XBRLDTSDocument parent)
Creates a Document, (instance, taxonomy or linkbase) by accessing the root element and looking at the document type. |
static XMLDocumentURI |
createDocument(DTSContainer dts,
java.net.URI baseURI,
java.net.URI theURI,
javax.xml.transform.Source source,
boolean addToCache,
XBRLDTSDocument parent)
Creates a Document, (instance, taxonomy or linkbase) by accessing the root element and looking at the document type if the document is not a linkbase, schema or xbrl instance returns null. |
static XMLDocumentURI |
createDocument(XMLDocumentURI node,
boolean addToCache)
Transforms the XMLDocumentURI in the node parameter into a XBRLDocument Linkbase, Taxonomy or Instance depending on the root node |
void |
delParent(XBRLDocument parent)
|
abstract void |
discoverDTS(XBRLDTSDocument parent)
All derived classes MUST implement this method and provide the functionality according to section 3.2 of the XBRL 2.1 specification |
boolean |
equals(java.lang.Object oe)
Sets a new XPathFunctionResolver for this object |
abstract org.jdom.Document |
generateDocNode(boolean relativize,
java.net.URI base)
This class has to be implemented by objects derived from XBRLDocument and must return a org.jdom.Document node with the content of this XBRLDocument object |
java.util.Iterator<java.lang.String> |
getAllUsedIds()
This method returns an iterator over all ids used by elements in this document |
java.util.Collection<java.lang.String> |
getComments()
Access to the comments in the file |
net.sf.saxon.s9api.XdmNode |
getDocument()
Returns the surrounding XML Node |
void |
getDTS()
Launches the rules for DTSDiscovery process that will eventually add more objects to the DTSContainer |
abstract int |
getDTSDocumentType()
Returns the type of DTS Document |
abstract java.lang.String |
getDTSDocumentTypeName()
|
XMLFragment |
getElementById(java.lang.String id)
This method returns the XMLFragment associated to the id received as a parameter. |
XBRLExtendedLink |
getExtendedLink(net.sf.saxon.s9api.XdmNode key)
|
java.util.Iterator<XBRLExtendedLink> |
getExtendedLinks()
Returns an iterator over all extended links on this container. |
java.util.Iterator<XBRLExtendedLink> |
getExtendedLinks(XBRLRoleType role)
Returns an iterator over all extended links on this container filtered by the specific role type indicated in the role parameter. |
java.util.Iterator<XBRLDocument> |
getParents()
Access to the [Parents] property |
int |
hashCode()
|
boolean |
isIdUsed(java.lang.String id)
This method returns true if the id indicated as a parameter corresponds to an XMLFragment in this XBRLDocument |
static void |
moveNamespacesUp(org.jdom.Document jdomDocument)
Internal method used during serialization of XML files. |
abstract void |
readInfoset()
Read all structures that builds the infoset |
void |
removeExtendedLink(XBRLExtendedLink link)
|
void |
removeIdOfElement(XMLFragment element)
|
void |
save(boolean relativize)
Save the file to the indicated document URI Directories in the path of the file name are created automatically |
void |
setComments(java.util.Collection<java.lang.String> fileComments)
Sets a new collection of comments for this file. |
void |
setDocumentAndReload(net.sf.saxon.s9api.XdmNode node)
This method is called by the XMLFragment object each time the surrounding XdmNode object is set. |
void |
updateXML(boolean relativize)
Updates the XML content of the XBRLDocument so the next call to save or to XdmNode getDocument() will obtain a fresh copy with all changes made in the object library. |
| Methods inherited from class com.ihr.xbrl.om.XMLDocumentURI |
|---|
addChild, delChild, generateLocatorToDocument, getBase, getChildren, getDocumentURI, getDTSKey, getLocalFile, isInDTS, setURI, validate |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int INSTANCE
public static final int TAXONOMY
public static final int LINKBASE
public static final int IXBRL
| Constructor Detail |
|---|
public XBRLDocument(DTSContainer dts,
javax.xml.transform.Source xmlSource)
throws net.sf.saxon.s9api.SaxonApiException
This creator just creates the XBRLDocument and passes sets the document content to the nodes read from the Source
dts - The DTSContainer under which the document will be createdxmlSource - the XML Source
net.sf.saxon.s9api.SaxonApiException - in case of problems reading the source document| Method Detail |
|---|
public net.sf.saxon.s9api.XdmNode getDocument()
XMLFragment
getDocument in class XMLFragment
public void setDocumentAndReload(net.sf.saxon.s9api.XdmNode node)
throws XBRLInconsistentDTSException,
com.rs.lic.LicenseVerificationException
XMLFragmentOverwrite this method in parent objects in order to refresh objects that depends on the surrounding XML nodes.
setDocumentAndReload in class XMLFragmentnode - the new XdmNode
XBRLInconsistentDTSException
com.rs.lic.LicenseVerificationExceptionpublic boolean equals(java.lang.Object oe)
XMLFragment
equals in class XMLDocumentURIpublic int hashCode()
hashCode in class XMLDocumentURI
public static XMLDocumentURI createDocument(DTSContainer dts,
java.net.URI baseURI,
java.net.URI theURI,
boolean addToCache,
XBRLDTSDocument parent)
throws DTSDiscoveryException,
com.rs.lic.LicenseVerificationException
The Document may not be ever part of any DTS.
The Document is first obtained from the cache. If it is not there, then it is loaded from the URI or Source and stored into the cache.
The following documents are ignored and this functions returns null.
dts - DTSContainer for the new documenttheURI - URI of the document to generateaddToCache - - boolean indicating if the new document will be added to the cache or not
DTSDiscoveryException
com.rs.lic.LicenseVerificationException
public static XMLDocumentURI createDocument(DTSContainer dts,
java.net.URI baseURI,
java.net.URI theURI,
javax.xml.transform.Source source,
boolean addToCache,
XBRLDTSDocument parent)
throws DTSDiscoveryException,
com.rs.lic.LicenseVerificationException
The Document may not be part of any DTS.
The Document is first obtained from the cache. If it is not there, then it is loaded from the URI and stored into the cache.
the source parameter is an javax.xml.transform.Source object from which the document will be generated
dts - theURI - source - addToCache - parent -
DTSDiscoveryException
com.rs.lic.LicenseVerificationException
public static XMLDocumentURI createDocument(XMLDocumentURI node,
boolean addToCache)
throws com.rs.lic.LicenseVerificationException,
DTSDiscoveryException
node - the XMLDocumentURI object to transformaddToCache - true if the document MUST be added to the cache
com.rs.lic.LicenseVerificationException
DTSDicoveryException
DTSDiscoveryExceptionpublic abstract int getDTSDocumentType()
public abstract java.lang.String getDTSDocumentTypeName()
public abstract void discoverDTS(XBRLDTSDocument parent)
throws DTSDiscoveryException,
com.rs.lic.LicenseVerificationException
discoverDTS in interface XBRLDTSDocumentdiscoverDTS in class XMLDocumentURIDTSDiscoveryException
com.rs.lic.LicenseVerificationException
public abstract void readInfoset()
throws XBRLValidationException
XBRLValidationException
public void getDTS()
throws DTSDiscoveryException,
com.rs.lic.LicenseVerificationException
DTSDiscoveryException
com.rs.lic.LicenseVerificationExceptionpublic java.util.Iterator<XBRLExtendedLink> getExtendedLinks()
public java.util.Iterator<XBRLExtendedLink> getExtendedLinks(XBRLRoleType role)
role - the XBRLRoleType for filtering
public XBRLExtendedLink getExtendedLink(net.sf.saxon.s9api.XdmNode key)
throws DTSDiscoveryException
DTSDiscoveryException
public void changeExtendedLinkKey(net.sf.saxon.s9api.XdmNode oldKey,
net.sf.saxon.s9api.XdmNode newKey,
XBRLExtendedLink link)
public void addExtendedLink(XBRLExtendedLink newExtendedLink)
newExtendedLink - public void removeExtendedLink(XBRLExtendedLink link)
link - public java.util.Iterator<XBRLDocument> getParents()
public void addParent(XBRLDocument parent)
parent - public void delParent(XBRLDocument parent)
public boolean addIdOfElement(XMLFragment newElement)
Don't call this method from inside XMLFragment.getId() or methods overridden by subclasses. Call
the addIdOfElement(XMLFragment, String) method instead.
newElement - element from which the ID will be obtained
XBRLDuplicateException - if the ID already exist in the instance
public boolean addIdOfElement(XMLFragment newElement,
java.lang.String id)
newElement - element to be added. The ID will not be obtained from the nodeid - to be set for this XMLFragment. The ID must be the real id set on this element node in the id attribute
public void removeIdOfElement(XMLFragment element)
element -
public void changeElementId(XMLFragment newEl,
java.lang.String oldId,
java.lang.String newId)
throws XBRLInconsistentDTSException
newEl - element definitionoldId - newId - the new ID of the element in the table
XBRLInconsistentDTSExceptionpublic java.util.Iterator<java.lang.String> getAllUsedIds()
public boolean isIdUsed(java.lang.String id)
id - String
public XMLFragment getElementById(java.lang.String id)
Subclasses of this class may contain methods that returns the appropriate object for an id. Use this method as a last resort if you don't know or you don't care about the returned object type.
id - string, the id of the element to retrieve
public void save(boolean relativize)
throws XBRLSerializationException
relativize - true if elements inside the file would be relative to the file or base URI
java.io.IOException
XBRLValidationException
XBRLSerializationException
public void updateXML(boolean relativize)
throws XBRLSerializationException
relativize - boolean value indicating if URLs (in locators, linkbaseRefs, etc...) will be relativized
using the document URL as a base URL.
XBRLSerializationExceptionpublic static void moveNamespacesUp(org.jdom.Document jdomDocument)
jdomDocument -
public abstract org.jdom.Document generateDocNode(boolean relativize,
java.net.URI base)
throws XBRLSerializationException
relativize - boolean indicating if all URIs must be relativizedbase - URI the base uri to relativize other URIs
XBRLValidationException
java.net.MalformedURLException
XBRLSerializationExceptionpublic java.util.Collection<java.lang.String> getComments()
public void setComments(java.util.Collection<java.lang.String> fileComments)
fileComments - Collection
public void clear()
throws java.lang.Throwable
XMLFragmentThis 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.
clear in interface XBRLDTSDocumentclear in class XMLDocumentURIjava.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||