com.ihr.xbrl.om
Class DTSContainer

java.lang.Object
  extended by com.ihr.xbrl.om.DTSContainer
All Implemented Interfaces:
Stopable, java.io.Serializable

public class DTSContainer
extends java.lang.Object
implements Stopable, java.io.Serializable

The DTSContainer is the root class that ties all pieces in a DTS together

One instance of a DTSContainer is required on the creator of almost every object in this API.

You can obtain the DTSContainer on every object derived from XMLFragment

Correspondence table between objects in the XBRL Infoset and this API

ClassInfoset Object
DTSContainer 2.2.1 DTS Information Item
XBRLDocument 2.2.2 XBRL Document Information Item
XBRLTaxonomy 2.2.3 XBRL Taxonomy Information Item
XBRLImport 2.2.4 XBRL Imported XBRL Taxonomy Information Item
XBRLRoleType 2.2.5 XBRL Role Type Information Item
XBRLArcroleType 2.2.6 XBRL Arcrole Type Information Item
XBRLUsedOn 2.2.7 XBRL Used On Information Item
XMLElementDefinition 2.2.8 XBRL Concept Information Item
XBRLItem 2.2.9 XBRL Item Information Item
XBRLTuple 2.2.10 XBRL Tuple Information Item
XBRLLinkbase 2.2.11 XBRL Linkbase Information Item
XBRLExtendedLink 2.2.12 XBRL Extended Link Information Item
XBRLDocumentation 2.2.13 XBRL Documentation Information Item
XBRLRelationship 2.2.14 XBRL Relationship Information Item
XBRLResource 2.2.15 XBRL Resource Information Item

The DTSContainer implements the Stopable interface in order to allow the GUI to request the cancellation of the operation of opening a DTS.

Author:
Ignacio
See Also:
Serialized Form

Nested Class Summary
static class DTSContainer.IteratorConcepts
          This class joins an iterator over XBRLItem and another iterator over XBRLTuple together into a single Iterator over XMLElementDefinition objects.
static class DTSContainer.ProcessorAndSchemaCompiler
          Helper class to encapsulate the saxonica Processor of this DTSContainer and a saxonica SchemaCompiler together.
 
Field Summary
static java.lang.String ALWAYS_ADD_ref_2006_02_27_xsd_SCHEMA_TO_DTS
          ALWAYS_ADD_ref_2006_02_27_xsd_SCHEMA_TO_DTS is defined as "http://www.reportingstandard.com/properties/always_add_ref_2006_02_27_schema_to_DTS" Possible value is a string that can be converted into a boolean "true" or "false" Default value is "false" Some taxonomies does not incorporate the URL of the reference schema http://www.xbrl.org/2006/ref-2006-02-27.xsd to the DTS but use its namespace in the reference linkbase instead.
static java.lang.String CONSIDER_COMPARISON_WITH_NUMBER_WITH_PRECISION_ZERO_AS_INCONSISTENCY
          CONSIDER_COMPARISON_WITH_NUMBER_WITH_PRECISION_ZERO_AS_INCONSISTENCY is defined as "http://www.reportingstandard.com/properties/compare-with-number-p-zero-is-inconsistency" Possible value is a String that can be converted into a boolean "true" or "false" Default value is "false" According to the XBRL 2.1 specification in the simple equation A = B + C, if A is zero with precision 0 the comparison must return true regardless the value of B + C.
static java.lang.String CONSIDER_DUPLICATES_AS_INCONSISTENCIES
          CONSIDER_DUPLICATES_AS_INCONSISTENCIES is defined as "http://www.reportingstandard.com/properties/duplicate-is-inconsistency" Possible value is a String that can be converted into a boolean "true" or "false" Default value is "false" According to the XBRL 2.1 specification duplicates must be ignored for calculation checking.
static int FAST
          FAST is a constant for the mode parameter in the isInstanceOfThisDTS(Source, int) function.
static int FULL
          FULL is a constant for the mode parameter in the isInstanceOfThisDTS(Source, int) function.
static int GENERATION_MODE_NODEINFO
          ORIGINAL serialization method means that the serialization of this object will be made using the document that was first read from source file.
static int GENERATION_MODE_OBJECTS
          GENERATION_MODE_OBJECTS serialization method means that the serialization of this object will be made using the object model and objects in the infoset
 java.util.logging.Logger logger
          All log information goes throwgh this logger
static java.lang.String SEQUAL_MODE
          The SEQUAL_MODE property indicates if the s-equal function follow the rules of the XBRL 2.1 specification or if it should follow the interpretation made by the authors of the XBRL formula specification.
static java.lang.String USE_CACHE_PROPERTY
          USE_CACHE_PROPERTY is defined as "http://www.reportingstandard.com/properties/use-cache" Possible values are String that can be converted to a boolean "true" or "false" Default value is "true" Cache is read form the catalog file XBRLCatalog.xml There may be catalog files at the folder where the tool is initiated, or in the user's home directory or both.
static java.lang.String USE_SEQUAL_AS_FORMULA_COMPLIANT
          USE_SEQUAL_AS_FORMULA_COMPLIANT is defined as FORMULA_COMPLIANT.
static java.lang.String USE_SEQUAL_AS_XBRL_COMPLIANT
          USE_SEQUAL_AS_XBRL_COMPLIANT is defined as XBRL_COMPLIANT.
static java.lang.String USE_XDT_1_0_AS_OF_18_SEP_2006
          USE_XDT_1_0_AS_OF_18_SEP_2006 is defined as XDT_18_SEP_2006.
static java.lang.String USE_XDT_1_0_AS_OF_7_SEP_2009
          USE_XDT_1_0_AS_OF_7_SEP_2009 is defined as XDT_7_SEP_2009.
static java.lang.String USE_XEQUAL_AS_FORMULA_COMPLIANT
          USE_XEQUAL_AS_FORMULA_COMPLIANT is defined as FORMULA_COMPLIANT.
static java.lang.String USE_XEQUAL_AS_XBRL_COMPLIANT
          USE_XEQUAL_AS_XBRL_COMPLIANT is defined as XBRL_COMPLIANT.
static java.lang.String XBRL_BASE
          The XBRL_BASE property indicates the directory that will be used as base for resolution of files that during the DTS Discovery process.
static java.lang.String XDT_VERSION
          The XDT_VERSION property indicates the version of the Dimensions Specification to be used.
static java.lang.String XEQUAL_MODE
          The XEQUAL_MODE property indicates if the x-equal function follow the rules of the XBRL 2.1 specification or if it should follow the interpretation made by the authors of the XBRL formula specification.
 
Method Summary
 void addArcroleType(XBRLArcroleType arcrole)
          Register a new arcroleType declaration.
 void addDocumentToDTS(XBRLDTSDocument d)
          Adds a document to the DTS container objects.
 void addError(java.lang.Exception e)
           
 void addResource(XBRLResource resource)
          The XBRLResouce initializer calls this method to store a new resource in the DTSContainer cache.
 void addRoleType(XBRLRoleType role)
          Register a new roleType declaration.
 void addRoleTypeForExtendedLink(javax.xml.namespace.QName linkbaseType, XBRLRoleType role)
           
 void addValidationException(XBRLValidationException e)
           
 boolean cacheContains(java.net.URI documentURI)
          Interrogates objects in the cache of documents indexed by documentURI returns true if the documentURI is on the cache The document URI is normalized and absolutized before the index search operation fragments are removed because the cache contains documents.
 XMLDocumentURI cacheGet(java.net.URI documentURI)
          Obtains a document from the cache indexed by document URI The URI is absolutized and normalized before comparison
 void cachePut(XMLDocumentURI documentURI)
          Stores a document in the cache indexed by document URI The URI is absolutized and normalized before stored being stored
 void cacheRemove(java.net.URI url)
          Removes a document form the cache.
 XBRLResource cacheResource(XBRLExtendedLink parent, net.sf.saxon.s9api.XdmNode ni, java.lang.Class<? extends XBRLResource> name)
          Obtains a resource from the cache or creates a new resource corresponding to the node supplied as a parameter and stores it in the cache for further reference.
 java.util.Iterator<XBRLTaxonomy> cacheSchemaByNamespace(java.lang.String namespace)
          Obtains a series of XBRLTaxonomy objects from the cache based on the namespace declared in the XBRLTaxonomy schema Results are not indexed Returns the empty sequence if the namespace is not found in the DTS
 int cacheSize()
          Returns the number of files in the cache
 void clear()
          Similarly to the clear method in collections, this method frees up memory and resources used in this object.
 void delArcroleType(XBRLArcroleType arcrole)
          Unregister a loaded arcroleType declaration.
 void delConcept(javax.xml.namespace.QName concept)
          Removes a concept form the DTS and removes also all relationships this concept participates on.
 void delDocumentFromDTS(XBRLDTSDocument d)
           
 void delResource(XBRLResource resource)
           
 void delRoleType(XBRLRoleType role)
          Unregister a registered roleType
 void delRoleTypeForExtendedLink(javax.xml.namespace.QName linkbaseType, XBRLRoleType role)
           
 boolean equals(java.lang.Object obj)
           
 XBRLArcroleType getArcroleType(java.lang.String uri)
          Access to the arcroleType object from the URI.
 java.util.Iterator<XBRLArcroleType> getArcroleTypes()
          Access to an iterator over defined XBRL Arcrole Types defined on all taxonomies in the loaded DTS.
 DTSBase getBase(javax.xml.namespace.QName linkbaseType, XBRLRoleType role)
          Obtains a base for the specified linkbaseType and role type.
 java.util.Iterator<XBRLRoleType> getBaseRoles(javax.xml.namespace.QName linkbaseType)
          Iterator over all roles used on xlink:role attributes on extended links Iterator elements can be casted to XBRLRoleType objects
 java.util.Iterator<XBRLRoleType> getBaseRoleTypes(javax.xml.namespace.QName extendedLinkQName)
          Return an iterator over all XBRLRoleType elements where DTSBase exists.
 java.util.Iterator<javax.xml.namespace.QName> getBaseTypes()
          Returns an iterator over the QNames of all DTSBases in the DTS this is all types of containers of relationships.
 java.net.URI getBaseURI()
          Access to the base URI for the XBRL processor
 XMLDocumentURI getCacheElement(int index)
          Returns the nth element in the cache
 XMLFragment getConcept(javax.xml.namespace.QName concept)
          Returns a concept declaration in the DTS regardless it is a tuple, item or pure element returns null if the concept is not defined in the DTS or if the value of the QName for the concept parameter is null
 java.util.Iterator<XMLElementDefinition> getConcepts()
          Iterator over all XBRL Concept declarations (Items and Tuples) in the DTS (crosses all taxonomies)
 net.sf.saxon.s9api.Processor getConfiguration()
          Obtains the Saxonica Processor object used by all elements in this DTS
 javax.xml.transform.URIResolver getDTSURIResolver()
          Access to the URIResolver of this DTSContainer.
 java.lang.String[] getErrors()
           
 net.sf.saxon.s9api.Processor getFastConfiguration()
          Method to access to the Processor corresponding to this DTSContainer and the status of this DTSContainer.
 java.util.Iterator<XBRLItem> getItemDeclarations()
          Iterator over all Item concepts declarations in the DTS (crosses all taxonomies)
 java.util.Iterator<java.lang.String> getLanguages()
          Returns an iterator over all languages used in labels in the DTS
 XBRLLinkbase getLinkbaseByURI(java.net.URI u)
          Returns the XBRLLinkbase corresponding to the Document URI or null if the URI cannot be found
 java.util.Iterator<java.net.URI> getLinkbaseURIs()
          Returns an iterator over all linkbase documents in the DTS
 java.lang.String getName()
          Returns back the DTS name, this is useful for GUIs only.
static DTSContainer.ProcessorAndSchemaCompiler getNewConfiguration(boolean schemaAware, DTSContainer dts, java.util.Properties props)
          Creates a new Configuration object.
 int getNumberOfItemDeclarations()
           
 int getNumberOfLinkbaseURIs()
          Returns the number of linkbase URIs in the DTS
 int getNumberOfTaxonomyURIs()
          Returns the number of taxonomy URIs in the DTS
 int getNumberOfTupleDeclarations()
           
 XBRLPlugInProcessor getProcessor(java.lang.String processorname)
          Returns a registered plug-in processor based on the processor name.
 java.util.Iterator<XBRLPlugInProcessor> getProcessors()
          Access to all registered plug-in processors
 java.util.Properties getProperties()
          Access to the properties of this DTSContainer
 DTSLoadingBarInterface getRegisteredBar()
          If this DTSContainer has a registered object that implements the DTSLoadingBarInterface interface this function returns it.
 XBRLRelationship getRelationship(java.lang.String extendedLink, javax.xml.namespace.QName relationshipType, java.lang.String arcrole, java.util.Vector<XMLFragment> attributes, XMLFragment source, XMLFragment target)
          Returns the relationship that matches the search criteria.
 java.util.Iterator<XBRLRelationship> getRelationships(DTSBase base)
          Return all relationships in a DTSBase.
 XMLFragment getResource(java.lang.String resourceRole, javax.xml.namespace.QName resourceType, java.lang.String content, java.util.Vector<XMLFragment> attributes, net.sf.saxon.value.Value value, java.util.Vector<java.lang.String> xpathChildren)
          Search for a resource in the DTS with the given id.
 XBRLResource getResource(XBRLResource res)
          Locates a resource in the DTS that is identical to the resource received as a parameter.
 java.util.Iterator<XBRLResource> getResources()
          Make sure the DTS has beed validated or the list of resources may not be complete.
 XBRLRoleType getRoleType(java.lang.String uri)
          Access to the roleType object from the URI.
 java.util.Iterator<XBRLRoleType> getRoleTypes()
          Access to an iterator over defined XBRL Role Types defined on all taxonomies in the loaded DTS.
 java.net.URI getRootURI()
           
 java.net.URI[] getRootURIs()
           
 com.saxonica.schema.SchemaCompiler getSchemaCompiler()
          Returns the current schema compiler for this configuration object.
 int getSerializationMethod()
          Obtains the value of the serialization method.
 XBRLArcroleType getStaticArcroleTypeByURI(java.lang.String arcrole)
           
static DTSContainer getStaticContainer()
          The static container exist only for static objects like standard roleTypes and standard arcroleTypes that are not used on any specific DTS.
 XBRLRoleType getStaticRoleTypeByURI(java.lang.String role)
           
 java.util.Iterator<XBRLTaxonomy> getTaxonomyByNamespace(java.lang.String namespace)
          Returns an iterator over all taxonomy schemas that matches the corresponding namespace Never returns null
 java.util.Iterator<XBRLTaxonomy> getTaxonomyByPrefix(java.lang.String conceptPrefix)
          Returns an iterator over all taxonomy schemas whose target namespace matches the prefix.
 XBRLTaxonomy getTaxonomyByURI(java.net.URI u)
          Returns the XBRLTaxonomy corresponding to the Document URI
 java.util.Iterator<java.net.URI> getTaxonomyURIs()
          Returns an iterator over all taxonomy documents in the DTS
 java.util.Iterator<XBRLTuple> getTupleDeclarations()
          Iterator over all Tuple concept declarations in the DTS (crosses all taxonomies)
 XBRLXSDTypeDefinition getTypeDefinition(javax.xml.namespace.QName type)
          Find the type definition for the specific QName This function does not find new types defined in taxonomy schemas that has not been read from XML files.
 XBRLValidationReport getValidationReport()
          Access to the internal validation report.
 int hashCode()
           
 void installDTSURIResolver(javax.xml.transform.URIResolver resolver)
          Sets a new resolver to this DTSContainer object.
 boolean isBaseDefined(javax.xml.namespace.QName linkbaseType, XBRLRoleType role)
          Returns true if there is a DTSbase defined in the DTS for the given role and of the specified linkbaseType
 boolean isDocumentInDTS(java.net.URI key)
          Returns true if the document is in the DTS.
 boolean isDocumentInDTS(XBRLDTSDocument d)
          Search the different DTS document containers and try to find the document in the cache.
 XBRLInstance isInstanceOfThisDTS(javax.xml.transform.Source xmlSource, int mode)
          Check whether or not the document in the xmlSource is an instance document according to this DTS.
 boolean isInstanceOfThisDTS(XBRLInstance instance, int mode)
          Check whether or not the instance document received as a parameter can be used in this DTSContainer.
 XBRLDocument load(javax.xml.transform.Source source)
          Load a DTS.
 XBRLDocument[] load(javax.xml.transform.Source[] ss)
          Load a DTS from a set of urls.
 XBRLDocument load(java.net.URI url)
          Load a DTS.
 XBRLDocument[] load(java.net.URI[] url)
          Load a DTS from a set of urls.
 void loadExtraSchemas()
          Called internally by the API when extra schemas must be loaded in the configuration object and schema compiler
 void loadIntoConfiguration()
          Switch the configuration object to strict schema validation, then loads all documents in this DTS (thus in the cache) into the configuration object.
 void loadIntoConfiguration(XBRLTaxonomy taxonomy)
          Load a new schema into the schema compiler.
static DTSContainer mergeDTSs(DTSContainer[] dtss)
          Merges several DTSs into a single DTS
static DTSContainer newCompatibleContainer(net.sf.saxon.s9api.Processor proc, java.util.Properties props)
          Creates a new DTSContainer that is compatible with the Processor suppied as a parameter.
static DTSContainer newEmptyContainer()
          Method used to create a new empty DTSContainer.
static DTSContainer newEmptyContainer(java.util.Properties props)
          Method used to create a new empty DTSContainer.
 void readInfoset()
          Method used to populate the object model in all objects defined within this DTS
 void recompile()
          Recompile schemas loaded into the schemaconfiguration.
 void registerBar(DTSLoadingBarInterface bar)
          Sets the loading bar object that will be informed about progress in the loading process.
 void registerProcessor(java.lang.String processorname, XBRLPlugInProcessor processor)
          Called by the processor to self register
 XMLFragment resolveXPointer(java.net.URI uriHref, XMLDocumentURI doc)
          resolve the XPointer to the node pointed to The href MUST be absolute
 void save(boolean relativize)
          Save all files in the DTS.
 boolean sEqualMode()
          The default value of the SEQUAL_MODE is XBRL_COMPLIANT but the conformance suite of the formula processor requires it to be set to FORMULA_COMPLIANT.
 void setName(java.lang.String name)
          Sets the name of this DTS to the specified name.
 void setProperties(java.util.Properties newProps)
          internal method using during class constructors
 void setProperty(java.lang.String name, java.lang.String value)
          Sets a DTSConfiguration property
 void setRootURI(java.net.URI newURI)
           
 void setSerializationMethod(int method)
          Sets the serialization method to OBJECTS or ORIGINAL.
 boolean shouldStop()
          This function will be called by classes that knows what to do if the loading proces of a DTS has been cancelled by the user.
 void stop()
          This method will be called by another thread in order to request this process to stop execution.
 boolean xEqualMode()
          The default value of the XEQUAL_MODE is XBRL_COMPLIANT but the conformance suite of the formula processor requires it to be set to FORMULA_COMPLIANT.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_CACHE_PROPERTY

public static final java.lang.String USE_CACHE_PROPERTY
USE_CACHE_PROPERTY is defined as "http://www.reportingstandard.com/properties/use-cache" Possible values are String that can be converted to a boolean "true" or "false" Default value is "true" Cache is read form the catalog file XBRLCatalog.xml There may be catalog files at the folder where the tool is initiated, or in the user's home directory or both.

See Also:
Constant Field Values

CONSIDER_DUPLICATES_AS_INCONSISTENCIES

public static final java.lang.String CONSIDER_DUPLICATES_AS_INCONSISTENCIES
CONSIDER_DUPLICATES_AS_INCONSISTENCIES is defined as "http://www.reportingstandard.com/properties/duplicate-is-inconsistency" Possible value is a String that can be converted into a boolean "true" or "false" Default value is "false" According to the XBRL 2.1 specification duplicates must be ignored for calculation checking. Very often this is a problem in real projects that wanted to detect if the incoming instance is trying to avoid calculation checks by submitting duplicates in the instance. Setting this value to "true" generates an "inconsistency" warning in case a calculation rule has been skipped due to the existence of a duplicate fact in the instance document.

Since:
2.6.3
See Also:
Constant Field Values

CONSIDER_COMPARISON_WITH_NUMBER_WITH_PRECISION_ZERO_AS_INCONSISTENCY

public static final java.lang.String CONSIDER_COMPARISON_WITH_NUMBER_WITH_PRECISION_ZERO_AS_INCONSISTENCY
CONSIDER_COMPARISON_WITH_NUMBER_WITH_PRECISION_ZERO_AS_INCONSISTENCY is defined as "http://www.reportingstandard.com/properties/compare-with-number-p-zero-is-inconsistency" Possible value is a String that can be converted into a boolean "true" or "false" Default value is "false" According to the XBRL 2.1 specification in the simple equation A = B + C, if A is zero with precision 0 the comparison must return true regardless the value of B + C. If this property has the value "true" a warning will be raised if this condition happens.

Since:
2.6.5
See Also:
Constant Field Values

ALWAYS_ADD_ref_2006_02_27_xsd_SCHEMA_TO_DTS

public static final java.lang.String ALWAYS_ADD_ref_2006_02_27_xsd_SCHEMA_TO_DTS
ALWAYS_ADD_ref_2006_02_27_xsd_SCHEMA_TO_DTS is defined as "http://www.reportingstandard.com/properties/always_add_ref_2006_02_27_schema_to_DTS" Possible value is a string that can be converted into a boolean "true" or "false" Default value is "false" Some taxonomies does not incorporate the URL of the reference schema http://www.xbrl.org/2006/ref-2006-02-27.xsd to the DTS but use its namespace in the reference linkbase instead. This is poor design in XML terms because the same namespace could potentially be driven to a different URL. But there is no way to open a DTS if it contains this error so we have had to add this property in order to deal with this. Taxonomies that constains this problem are: Central Bank of India created by IRIS and Fujitsu.

See Also:
Constant Field Values

USE_XDT_1_0_AS_OF_18_SEP_2006

public static final java.lang.String USE_XDT_1_0_AS_OF_18_SEP_2006
USE_XDT_1_0_AS_OF_18_SEP_2006 is defined as XDT_18_SEP_2006.

This is one of the possible values of the XDT_VERSION property of the DTSContainer.

See Also:
Constant Field Values

USE_XDT_1_0_AS_OF_7_SEP_2009

public static final java.lang.String USE_XDT_1_0_AS_OF_7_SEP_2009
USE_XDT_1_0_AS_OF_7_SEP_2009 is defined as XDT_7_SEP_2009.

This is one of the possible values of the XDT_VERSION property of the DTSContainer.

See Also:
Constant Field Values

USE_XEQUAL_AS_XBRL_COMPLIANT

public static final java.lang.String USE_XEQUAL_AS_XBRL_COMPLIANT
USE_XEQUAL_AS_XBRL_COMPLIANT is defined as XBRL_COMPLIANT.

This is one of the possible value of the XEQUAL_MODE property.

See Also:
Constant Field Values

USE_XEQUAL_AS_FORMULA_COMPLIANT

public static final java.lang.String USE_XEQUAL_AS_FORMULA_COMPLIANT
USE_XEQUAL_AS_FORMULA_COMPLIANT is defined as FORMULA_COMPLIANT.

This is one of the possible value of the XEQUAL_MODE property.

See Also:
Constant Field Values

XEQUAL_MODE

public static java.lang.String XEQUAL_MODE
The XEQUAL_MODE property indicates if the x-equal function follow the rules of the XBRL 2.1 specification or if it should follow the interpretation made by the authors of the XBRL formula specification.

The value of the XEQUAL_MODE constant is "http://www.reportingstandard.com/properties/x-equal"

The default value for the property is USE_XEQUAL_AS_XBRL_COMPLIANT which is safer in all conditions except when passing the XBRL functions comformance suite.


USE_SEQUAL_AS_XBRL_COMPLIANT

public static final java.lang.String USE_SEQUAL_AS_XBRL_COMPLIANT
USE_SEQUAL_AS_XBRL_COMPLIANT is defined as XBRL_COMPLIANT.

This is one of the possible value of the SEQUAL_MODE property.

See Also:
Constant Field Values

USE_SEQUAL_AS_FORMULA_COMPLIANT

public static final java.lang.String USE_SEQUAL_AS_FORMULA_COMPLIANT
USE_SEQUAL_AS_FORMULA_COMPLIANT is defined as FORMULA_COMPLIANT.

This is one of the possible value of the SEQUAL_MODE property.

See Also:
Constant Field Values

SEQUAL_MODE

public static java.lang.String SEQUAL_MODE
The SEQUAL_MODE property indicates if the s-equal function follow the rules of the XBRL 2.1 specification or if it should follow the interpretation made by the authors of the XBRL formula specification.

The value of the SEQUAL_MODE constant is "http://www.reportingstandard.com/properties/s-equal"

The default value for the property is USE_SEQUAL_AS_XBRL_COMPLIANT which is safer in all conditions except when passing the XBRL functions comformance suite.


XDT_VERSION

public static java.lang.String XDT_VERSION
The XDT_VERSION property indicates the version of the Dimensions Specification to be used. The possible values are USE_XDT_1_0_AS_OF_18_SEP_2006 or USE_XDT_1_0_AS_OF_7_SEP_2009; both are defined as constants to the DTSContainer object for convenience.

The value of the XDT_VERSION constant is "http://www.reportingstandard.com/properties/xdt-version".

The default value for the property it refers to is USE_XDT_1_0_AS_OF_7_SEP_2009 which is the lastest release with errata corrections of the XDT specification.


XBRL_BASE

public static java.lang.String XBRL_BASE
The XBRL_BASE property indicates the directory that will be used as base for resolution of files that during the DTS Discovery process.

The data type of this property is a URI. Users MUST take care the provided String can be converted into a URI

The default value depends on the existence of a value for the environment variable XBRLCATALOGPATH.

if that variable is set. the default value will be ${XBRLCATALOGPATH}/Other/

if that variable is not set, the default value is the directory where the processor is running. "user.dir"/

Note that the xbrl-base is a directory so the method reading this property value ensures the value ends with a slash character "/" in order to allow proper resolution of local files.


FAST

public static final int FAST
FAST is a constant for the mode parameter in the isInstanceOfThisDTS(Source, int) function. It indicates that the comparison of the DTS will use only the files explicitly referenced in this file and not the files inside files referenced in this file (no recurse discovery of DTS files). This is faster but DTSs that contains the same files using different starting points will not be found.

See Also:
Constant Field Values

FULL

public static final int FULL
FULL is a constant for the mode parameter in the isInstanceOfThisDTS(Source, int) function. It indicates that the comparison of the DTS will use all files in the DTS of both documents. This is slowest than FAST comparison but will detect all DTS that are the same DTS regardless the starting points of discovery are the same on both DTSs under comparison.

See Also:
Constant Field Values

logger

public java.util.logging.Logger logger
All log information goes throwgh this logger


GENERATION_MODE_NODEINFO

public static final int GENERATION_MODE_NODEINFO
ORIGINAL serialization method means that the serialization of this object will be made using the document that was first read from source file. This consumes more memory but is safer in terms of storing into the database the same objects that were sent to the processor. This is a global setting for all linkbases, schemas and instance documents.

See Also:
Constant Field Values

GENERATION_MODE_OBJECTS

public static final int GENERATION_MODE_OBJECTS
GENERATION_MODE_OBJECTS serialization method means that the serialization of this object will be made using the object model and objects in the infoset

See Also:
Constant Field Values
Method Detail

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Sets a DTSConfiguration property

Parameters:
name -
value -

setProperties

public void setProperties(java.util.Properties newProps)
internal method using during class constructors

Parameters:
newProps -

getProperties

public java.util.Properties getProperties()
Access to the properties of this DTSContainer

Returns:
Properties object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

registerBar

public void registerBar(DTSLoadingBarInterface bar)
Sets the loading bar object that will be informed about progress in the loading process. Set this to null to deactivate bar

Parameters:
bar - DTSLoadingBar object

getRegisteredBar

public DTSLoadingBarInterface getRegisteredBar()
If this DTSContainer has a registered object that implements the DTSLoadingBarInterface interface this function returns it. Otherwise it returns null.

This function is used internally by the API in order to send messages to the GUI during the process of dts discovery and loading a DTS into the object model.

Returns:
DTSLoadingBarInterface
Since:
2.6.8

getDTSURIResolver

public javax.xml.transform.URIResolver getDTSURIResolver()
Access to the URIResolver of this DTSContainer. The URIResolver can be changed if there is a need to obtain documents from different sources like a database, cache etc. Some URIResolvers like the DatabaseURIResolver operates in cascade mode and requires to know the current URIResolver in order to set it as the next resolver in the cascade.

Returns:
URIResolver

installDTSURIResolver

public void installDTSURIResolver(javax.xml.transform.URIResolver resolver)
Sets a new resolver to this DTSContainer object. The URIResolver will be used to locate files in the DTS.

Parameters:
resolver -

setName

public void setName(java.lang.String name)
Sets the name of this DTS to the specified name. DTS Names are useful for GUIs only

Parameters:
name -

getName

public java.lang.String getName()
Returns back the DTS name, this is useful for GUIs only. If the dts name is not set, this function provides a new name for this DTS that is the constant string "DTS" followed by a number that will be incremented on each use.

Returns:
String, never returns null

clear

public void clear()
           throws java.lang.Throwable
Similarly to the clear method in collections, this method frees up memory and resources used in this object. Do not call this method unless you are absolutely sure the DTS is no longer needed anymore. This includes objects created and using this DTS as a reference.

Throws:
XBRLValidationException
java.lang.Throwable

newEmptyContainer

public static DTSContainer newEmptyContainer()
                                      throws com.rs.lic.LicenseVerificationException
Method used to create a new empty DTSContainer.

After object instantiation you may be interested in using any of the load methods in order to load the DTS into the container.

The default DTSContainer created using this method takes the default value for all DTS properties.

The USE_CACHE_PROPERTY value is true

Returns:
DTSContainer
Throws:
com.rs.lic.LicenseVerificationException
Since:
1.0

newEmptyContainer

public static DTSContainer newEmptyContainer(java.util.Properties props)
                                      throws com.rs.lic.LicenseVerificationException
Method used to create a new empty DTSContainer. Use the load method to load the DTS into the container

Returns:
DTSContainer
Throws:
com.rs.lic.LicenseVerificationException

newCompatibleContainer

public static DTSContainer newCompatibleContainer(net.sf.saxon.s9api.Processor proc,
                                                  java.util.Properties props)
                                           throws com.rs.lic.LicenseVerificationException
Creates a new DTSContainer that is compatible with the Processor suppied as a parameter. This is useful when there will be XPath Expressions executed in the application that requires also access to XBRL nodes.

Parameters:
proc - Processor (saxonica s9api)
props - Properties. May be null.
Returns:
DTSContainer
Throws:
com.rs.lic.LicenseVerificationException

mergeDTSs

public static DTSContainer mergeDTSs(DTSContainer[] dtss)
                              throws com.rs.lic.LicenseVerificationException
Merges several DTSs into a single DTS

Parameters:
dtss - DTSContainer[] array of DTSs to merge into a single DTS
Returns:
DTSContainer
Throws:
com.rs.lic.LicenseVerificationException - Only thrown when the license is limited to a set of files and there is a file in the DTS that is out of the valid list of files under the license
XBRLValidationException

getStaticContainer

public static DTSContainer getStaticContainer()
The static container exist only for static objects like standard roleTypes and standard arcroleTypes that are not used on any specific DTS. When a static role type is used in a DTS a copy of the static role type is returned instead and the dts of that role type is changed from the static dts container to the calling container.

Returns:
DTSContainer

addDocumentToDTS

public void addDocumentToDTS(XBRLDTSDocument d)
Adds a document to the DTS container objects. Depending on the document type this is added to different object containers.

Parameters:
d - XMLDocumentURI

delDocumentFromDTS

public void delDocumentFromDTS(XBRLDTSDocument d)

save

public void save(boolean relativize)
          throws XBRLSerializationException
Save all files in the DTS. Files loaded from the web or official locations cached to local files will not be saved and will be silently ignored. Only files with a file: URI scheme will be saved. Instance documents are not part of the DTS so they are not saved calling this method.

Parameters:
relativize - true if the URIs will be relativized according to the parent document. False to absolutize all URIs
Throws:
XBRLSerializationException
Since:
2.6.4

isDocumentInDTS

public boolean isDocumentInDTS(XBRLDTSDocument d)
Search the different DTS document containers and try to find the document in the cache. return false if the document in not in the DTS

Parameters:
d - XMLDocumentURI
Returns:
boolean

isDocumentInDTS

public boolean isDocumentInDTS(java.net.URI key)
Returns true if the document is in the DTS.

Note: The URI must be absolute and the URI text MUST NOT have non US-ASII characters. Non US-ASCII characters must be transformed into escaped UTF-8 characters previously to calling this function.

Parameters:
key - the Document URI to search for
Returns:
boolean

getBaseTypes

public java.util.Iterator<javax.xml.namespace.QName> getBaseTypes()
Returns an iterator over the QNames of all DTSBases in the DTS this is all types of containers of relationships.

Returns:
Iterator

getBaseRoles

public java.util.Iterator<XBRLRoleType> getBaseRoles(javax.xml.namespace.QName linkbaseType)
Iterator over all roles used on xlink:role attributes on extended links Iterator elements can be casted to XBRLRoleType objects

Parameters:
linkbaseType -
Returns:
Iterator an Iterator over all XBRLRoleType objects used in the DTS
Throws:
XBRLValidationException

addRoleTypeForExtendedLink

public void addRoleTypeForExtendedLink(javax.xml.namespace.QName linkbaseType,
                                       XBRLRoleType role)

delRoleTypeForExtendedLink

public void delRoleTypeForExtendedLink(javax.xml.namespace.QName linkbaseType,
                                       XBRLRoleType role)

isBaseDefined

public boolean isBaseDefined(javax.xml.namespace.QName linkbaseType,
                             XBRLRoleType role)
Returns true if there is a DTSbase defined in the DTS for the given role and of the specified linkbaseType

Parameters:
linkbaseType - QName
role - XBRLRoleType
Returns:
boolean

getBase

public DTSBase getBase(javax.xml.namespace.QName linkbaseType,
                       XBRLRoleType role)
Obtains a base for the specified linkbaseType and role type. bases are stored in a cache of returned bases to accelerate applications if a DTSBase is not found a new empty DTSBase is created a base is an object that contains a set of extended links of the same linkbaseType and role. Multiple relationships with different arcroles are inside the same base object.

Parameters:
linkbaseType - QName
role - XBRLRoleType
Returns:
DTSBase object
Throws:
XBRLValidationException
DTSDiscoveryException

getBaseRoleTypes

public java.util.Iterator<XBRLRoleType> getBaseRoleTypes(javax.xml.namespace.QName extendedLinkQName)
Return an iterator over all XBRLRoleType elements where DTSBase exists. If there are none a new empty set is created.

Parameters:
extendedLinkQName - QName
Returns:
Iterator

getConfiguration

public net.sf.saxon.s9api.Processor getConfiguration()
Obtains the Saxonica Processor object used by all elements in this DTS

Returns:
Processor

recompile

public void recompile()
               throws DTSDiscoveryException
Recompile schemas loaded into the schemaconfiguration. This method would be only called by DTS editors that requires the schemas in the DTS to be loaded again

Throws:
DTSDiscoveryException

getFastConfiguration

public net.sf.saxon.s9api.Processor getFastConfiguration()
Method to access to the Processor corresponding to this DTSContainer and the status of this DTSContainer.

If schemas has been already compiled this method returns the shared Processor. If the status of this DTSContainer is still reading external files then a new Processor non schema aware will be created.

Returns:
Processor

getNewConfiguration

public static DTSContainer.ProcessorAndSchemaCompiler getNewConfiguration(boolean schemaAware,
                                                                          DTSContainer dts,
                                                                          java.util.Properties props)
Creates a new Configuration object. If the new configuration object is SchemaAware then the core schemas for XBRL are loaded.

Parameters:
schemaAware - boolean (true if the new configuration object MUST be schema aware)
dts - a DTSContainer object suitable to provide schemas from the cache or null if not available at this time
props - Properties to the DTSConfiguration object
Returns:
ProcessorAndSchemaCompiler

cacheContains

public boolean cacheContains(java.net.URI documentURI)
Interrogates objects in the cache of documents indexed by documentURI returns true if the documentURI is on the cache

The document URI is normalized and absolutized before the index search operation

fragments are removed because the cache contains documents.

Parameters:
documentURI -
Returns:
boolean true if the document refrenced by the documentURI is already in the cache

cacheSchemaByNamespace

public java.util.Iterator<XBRLTaxonomy> cacheSchemaByNamespace(java.lang.String namespace)
Obtains a series of XBRLTaxonomy objects from the cache based on the namespace declared in the XBRLTaxonomy schema

Results are not indexed

Returns the empty sequence if the namespace is not found in the DTS

Parameters:
namespace - String
Returns:
Iterator<XBRLTaxonomy> the XBRLTaxonomy object that defines the specified namespace

cacheGet

public XMLDocumentURI cacheGet(java.net.URI documentURI)
Obtains a document from the cache indexed by document URI The URI is absolutized and normalized before comparison

Parameters:
documentURI -
Returns:
The XMLDocumentURI stored in the cache or null if the document is not in the cache

cacheSize

public int cacheSize()
Returns the number of files in the cache


getCacheElement

public XMLDocumentURI getCacheElement(int index)
Returns the nth element in the cache


cachePut

public void cachePut(XMLDocumentURI documentURI)
Stores a document in the cache indexed by document URI The URI is absolutized and normalized before stored being stored

Parameters:
documentURI -

cacheRemove

public void cacheRemove(java.net.URI url)
Removes a document form the cache. The document is identified by its URI

Parameters:
url - URI

cacheResource

public XBRLResource cacheResource(XBRLExtendedLink parent,
                                  net.sf.saxon.s9api.XdmNode ni,
                                  java.lang.Class<? extends XBRLResource> name)
Obtains a resource from the cache or creates a new resource corresponding to the node supplied as a parameter and stores it in the cache for further reference.

resources are indexed by the NodeInfo element

Parameters:
parent - - Extended link where the XBRLResource resides. Can be null if the XBRLResource is in the cache.
ni - - NodeInfo, cannot be null
name - - class of the resource to be created if no resource exist in the cache
Returns:
The XBRLResource object from the cache or just created

addResource

public void addResource(XBRLResource resource)
                 throws XBRLDuplicateException
The XBRLResouce initializer calls this method to store a new resource in the DTSContainer cache. This method is for internal use.

Parameters:
resource -
Throws:
XBRLDuplicateResource
XBRLValidationException
XBRLDuplicateException

getResource

public XBRLResource getResource(XBRLResource res)
Locates a resource in the DTS that is identical to the resource received as a parameter. This function should be called by applications tring to create a resource programatically when the new resource creation has raised a XBRLDuplicateResource exception. The parameter is the resource that was about to be created. Returns the existing resource that has already been added to the parent container.

Parameters:
res - XBRLResource
Returns:
XBRLResource

getLanguages

public java.util.Iterator<java.lang.String> getLanguages()
Returns an iterator over all languages used in labels in the DTS

Returns:
Iterator

delResource

public void delResource(XBRLResource resource)

load

public XBRLDocument load(java.net.URI url)
                  throws DTSDiscoveryException,
                         com.rs.lic.LicenseVerificationException
Load a DTS. The DTS Discovery rules start at the given uri. If the uri is relative, the absolute uri is calculated automatically. All files in the DTS are schema validated. Some of the schemas may not be part of the DTS. All Infoset properties of the loaded files are readed The load process does not include XBRL 2.1 validation

Parameters:
url - a Taxonomy schema, linkbase or instance document
Returns:
an XBRLDocument object
Throws:
DTSDiscoveryException - is XBRL errors were found
com.rs.lic.LicenseVerificationException - Only thrown when the license is limited to a set of files and there is a file in the DTS for which there is no license

load

public XBRLDocument[] load(java.net.URI[] url)
                    throws DTSDiscoveryException,
                           com.rs.lic.LicenseVerificationException
Load a DTS from a set of urls. The DTS Discovery rules start at every one of the urls in the set. If the url is relative, the absolute uri is calculated automatically using the current folder as the base url. All files in the DTS are schema validated. Some of the schemas may not be part of the DTS. All Infoset properties of the loaded files are readed The load process does not include XBRL 2.1 validation. It includes: - DTS discovery - Schema validation - Infoset process

Parameters:
url - an array of Taxonomy schemas, linkbases or instance documents
Returns:
an XBRLDocument object
Throws:
DTSDiscoveryException - is XBRL errors were found
com.rs.lic.LicenseVerificationException - Only thrown when the license is limited to a set of files and there is a file in the DTS for which there is no license

load

public XBRLDocument load(javax.xml.transform.Source source)
                  throws DTSDiscoveryException,
                         com.rs.lic.LicenseVerificationException
Load a DTS. The DTS Discovery rules start at the URL indicated in the SystemID of the source object received as a parameter. If the uri is relative, the absolute uri is calculated automatically. All files in the DTS are schema validated. Some of the schemas may not be part of the DTS. All Infoset properties of the loaded files are readed The load process does not include XBRL 2.1 validation

Parameters:
source - a Taxonomy schema, linkbase or instance document as a javax.xml.transform.Source. Note the SystemId value in the source will be used for the resolution of relative URLs in the file
Returns:
an XBRLDocument object
Throws:
DTSDiscoveryException - is XBRL errors were found
com.rs.lic.LicenseVerificationException - Only thrown when the license is limited to a set of files and there is a file in the DTS for which there is no license
Since:
2.6.4

load

public XBRLDocument[] load(javax.xml.transform.Source[] ss)
                    throws DTSDiscoveryException,
                           com.rs.lic.LicenseVerificationException
Load a DTS from a set of urls. The DTS Discovery rules start at every one of the urls in the set. If the url is relative, the absolute uri is calculated automatically using the current folder as the base url. All files in the DTS are schema validated. Some of the schemas may not be part of the DTS. All Infoset properties of the loaded files are readed The load process does not include XBRL 2.1 validation. It includes: - DTS discovery - Schema validation - Infoset process

Parameters:
ss - array of Source objects
Returns:
array of XBRLDocument objects
Throws:
DTSDiscoveryException
com.rs.lic.LicenseVerificationException
Since:
2.6.4

loadIntoConfiguration

public void loadIntoConfiguration()
                           throws XBRLValidationException,
                                  com.rs.lic.LicenseVerificationException
Switch the configuration object to strict schema validation, then loads all documents in this DTS (thus in the cache) into the configuration object. Finally, the Infoset is populated

Throws:
XBRLValidationException
com.rs.lic.LicenseVerificationException - Thrown if there is a file in the DTS for which the license is not valid. Only happens if the license is limited to a set of files. Open licenses does not generate this exception

getRootURI

public java.net.URI getRootURI()

getRootURIs

public java.net.URI[] getRootURIs()

setRootURI

public void setRootURI(java.net.URI newURI)
Parameters:
newURI -

loadIntoConfiguration

public void loadIntoConfiguration(XBRLTaxonomy taxonomy)
                           throws net.sf.saxon.type.SchemaException
Load a new schema into the schema compiler. If the schema already exist in the configuration object it is not loaded

Parameters:
taxonomy -
Throws:
net.sf.saxon.type.SchemaException

addError

public void addError(java.lang.Exception e)

getErrors

public java.lang.String[] getErrors()

getStaticArcroleTypeByURI

public XBRLArcroleType getStaticArcroleTypeByURI(java.lang.String arcrole)

getStaticRoleTypeByURI

public XBRLRoleType getStaticRoleTypeByURI(java.lang.String role)

getRelationships

public java.util.Iterator<XBRLRelationship> getRelationships(DTSBase base)
                                                      throws XBRLValidationException
Return all relationships in a DTSBase.

Parameters:
base - DTSBase The base to be interrogated
Returns:
Iterator
Throws:
XBRLValidationException

setSerializationMethod

public void setSerializationMethod(int method)
Sets the serialization method to OBJECTS or ORIGINAL.

OBJECTS means that the objects that are part of this document will be used to serialize the document. This is the default value and it is safe because during the loading phase the infoset is read and the infoset contains an object model representation of all possible content.

ORIGINAL is faster and even safer than OBJECTS unless the application has changed things in the objects of this document.

Parameters:
method - integer code of the new Method

getSerializationMethod

public int getSerializationMethod()
Obtains the value of the serialization method. This is either OBJECTS or ORIGINAL

Returns:
integer constant

getArcroleType

public XBRLArcroleType getArcroleType(java.lang.String uri)
Access to the arcroleType object from the URI. If the same arcroleType is declared in more than one XBRLTaxonomy of the DTS the function returns just one of them. If the arcroleType is not declared in the DTS the function returns null the function tries to locate the arcroleType definition in the following order: 1) in the DTS cache (All defined in a taxonomy schema in the DTS) 2) statically defined in the XBRL 2.1 specification 3) in the set of virtual arcroleTypes (arcroleTypes not defined in the DTS but used in generic linkbases)

Parameters:
uri - String with the arcroleURI to search for
Returns:
an XBRLArcroleType object
Throws:
XBRLValidationException

getRoleType

public XBRLRoleType getRoleType(java.lang.String uri)
Access to the roleType object from the URI. If the same roleType is declared in more than one XBRLTaxonomy of the DTS the function returns just one of them. If the roleType is not declared in the DTS the function returns null the function tries to locate the roleType definition in the following order: 1) in the DTS cache (All defined in a taxonomy schema in the DTS) 2) statically defined in the XBRL 2.1 specification 3) in the set of virtual roleTypes (roleTypes not defined in the DTS but used in generic linkbases)

Parameters:
uri - String with the roleURI to search for
Returns:
XBRLRoleType
Throws:
XBRLRuntimeException

getRoleTypes

public java.util.Iterator<XBRLRoleType> getRoleTypes()
Access to an iterator over defined XBRL Role Types defined on all taxonomies in the loaded DTS.

Returns:
Iterator<XBRLRoleType>
Throws:
XBRLRuntimeException - encapsulating XBRLValidationException if any occurs during the process of reading role types

getArcroleTypes

public java.util.Iterator<XBRLArcroleType> getArcroleTypes()
Access to an iterator over defined XBRL Arcrole Types defined on all taxonomies in the loaded DTS.

Returns:
Iterator<XBRLArcroleType>
Throws:
XBRLRuntimeException - encapsulating XBRLValidationException if any occurs during the process of reading arcrole types

addRoleType

public void addRoleType(XBRLRoleType role)
Register a new roleType declaration. This function is called from the XBRLTaxonomy object when the roleTypes are read.

Parameters:
role -
Throws:
XBRLValidationException

delRoleType

public void delRoleType(XBRLRoleType role)
Unregister a registered roleType

Parameters:
role - XBRLRoleType

addArcroleType

public void addArcroleType(XBRLArcroleType arcrole)
Register a new arcroleType declaration. This function is called from the XBRLTaxonomy object when the arcroleTypes are read.

Parameters:
arcrole - XBRLArcroleType definition to add to this DTS
Throws:
XBRLValidationException

delArcroleType

public void delArcroleType(XBRLArcroleType arcrole)
Unregister a loaded arcroleType declaration.

Parameters:
arcrole - XBRLArcroleType

getNumberOfItemDeclarations

public int getNumberOfItemDeclarations()
                                throws XBRLValidationException
Returns:
the number of item declarations in the whole DTS. Only XBRLConcepts in the xbrli:item substitution group counts
Throws:
XBRLValidationException

getNumberOfTupleDeclarations

public int getNumberOfTupleDeclarations()
                                 throws XBRLValidationException
Returns:
the number of tuple declarations in the whole DTS. Only XBRLConcepts in the xbrli:tuple substitution group counts
Throws:
XBRLValidationException

getItemDeclarations

public java.util.Iterator<XBRLItem> getItemDeclarations()
Iterator over all Item concepts declarations in the DTS (crosses all taxonomies)

Returns:
Iterator<XBRLItem>

getTupleDeclarations

public java.util.Iterator<XBRLTuple> getTupleDeclarations()
Iterator over all Tuple concept declarations in the DTS (crosses all taxonomies)

Returns:
Iterator<XBRLTuple>

getConcepts

public java.util.Iterator<XMLElementDefinition> getConcepts()
Iterator over all XBRL Concept declarations (Items and Tuples) in the DTS (crosses all taxonomies)

Returns:
Iterator<XMLElementDefinition>

getResources

public java.util.Iterator<XBRLResource> getResources()
Make sure the DTS has beed validated or the list of resources may not be complete.

Returns:
Iterator≶XBRLResource>

getTaxonomyByPrefix

public java.util.Iterator<XBRLTaxonomy> getTaxonomyByPrefix(java.lang.String conceptPrefix)
Returns an iterator over all taxonomy schemas whose target namespace matches the prefix. This function is used to find the apropriate namespace in a loop. Use with caution, because different namespaces in different files may use the same prefix. If there is no taxonomies matching the prefix, the function returns an empty sequence

Parameters:
conceptPrefix -
Returns:
Iterator<XBRLTaxonomy>

getTaxonomyByNamespace

public java.util.Iterator<XBRLTaxonomy> getTaxonomyByNamespace(java.lang.String namespace)
Returns an iterator over all taxonomy schemas that matches the corresponding namespace Never returns null

Parameters:
namespace -
Returns:
Iterator<XBRLTaxonomy>

getTaxonomyURIs

public java.util.Iterator<java.net.URI> getTaxonomyURIs()
Returns an iterator over all taxonomy documents in the DTS

Returns:
Iterator<URI>

getNumberOfTaxonomyURIs

public int getNumberOfTaxonomyURIs()
Returns the number of taxonomy URIs in the DTS

Returns:
int

getLinkbaseURIs

public java.util.Iterator<java.net.URI> getLinkbaseURIs()
Returns an iterator over all linkbase documents in the DTS

Returns:
Iterator

getNumberOfLinkbaseURIs

public int getNumberOfLinkbaseURIs()
Returns the number of linkbase URIs in the DTS

Returns:
int

getTaxonomyByURI

public XBRLTaxonomy getTaxonomyByURI(java.net.URI u)
Returns the XBRLTaxonomy corresponding to the Document URI

Parameters:
u - URI of the taxonomy to retrieve
Returns:
XBRLTaxonomy

getLinkbaseByURI

public XBRLLinkbase getLinkbaseByURI(java.net.URI u)
Returns the XBRLLinkbase corresponding to the Document URI or null if the URI cannot be found

Parameters:
u - URI of the taxonomy to retrieve
Returns:
XBRLLinkbase object

readInfoset

public void readInfoset()
                 throws XBRLValidationException
Method used to populate the object model in all objects defined within this DTS

Throws:
XBRLValidationException

getConcept

public XMLFragment getConcept(javax.xml.namespace.QName concept)

Returns a concept declaration in the DTS regardless it is a tuple, item or pure element

returns null if the concept is not defined in the DTS or if the value of the QName for the concept parameter is null

Parameters:
concept -
Returns:
XMLFragment or null

delConcept

public void delConcept(javax.xml.namespace.QName concept)
Removes a concept form the DTS and removes also all relationships this concept participates on.

Parameters:
concept - QName
Since:
2.6.4

getRelationship

public XBRLRelationship getRelationship(java.lang.String extendedLink,
                                        javax.xml.namespace.QName relationshipType,
                                        java.lang.String arcrole,
                                        java.util.Vector<XMLFragment> attributes,
                                        XMLFragment source,
                                        XMLFragment target)
Returns the relationship that matches the search criteria. Only one relationship in the DTS matches the criteria returns null if no relationship can be found

Parameters:
extendedLink -
relationshipType -
arcrole -
attributes -
source -
target -
Throws:
XBRLValidationException

getResource

public XMLFragment getResource(java.lang.String resourceRole,
                               javax.xml.namespace.QName resourceType,
                               java.lang.String content,
                               java.util.Vector<XMLFragment> attributes,
                               net.sf.saxon.value.Value value,
                               java.util.Vector<java.lang.String> xpathChildren)
                        throws XBRLValidationException
Search for a resource in the DTS with the given id. TODO: deal with complex type resources, currenlty only simple type resources can be searched using parameters FIXED: Versioning now uses XPointers to locate resources

Parameters:
resourceRole - String
resourceType - QName
content - String "simple" or "complex"
attributes - Vector attributes defined in the root element
value - the value for simple type resources
Returns:
XMLFragment representing the resource or null if not found
Throws:
XBRLValidationException

isInstanceOfThisDTS

public boolean isInstanceOfThisDTS(XBRLInstance instance,
                                   int mode)
Check whether or not the instance document received as a parameter can be used in this DTSContainer. This requires first that the two Saxon configuration objects share compatible containers and then that the instance DTS matches the loaded DTS. Calling to this function requires that the DTS of the instance document received as a parameter being already dicovered. Otherwise the comparison will fail.

Parameters:
instance -
mode - can be DTSContainer.FAST constant or DTSContainer.FULL (slowest) comparison. FULL comparison considers the whole DTS. FAST comparison considers only the files explicitly referenced in this file.
Returns:
boolean value

isInstanceOfThisDTS

public XBRLInstance isInstanceOfThisDTS(javax.xml.transform.Source xmlSource,
                                        int mode)
Check whether or not the document in the xmlSource is an instance document according to this DTS. Source objects may not have the system-id set to the absolute path.

Parameters:
xmlSource -
mode - can be DTSContainer.FAST constant or DTSContainer.FULL (slowest) comparison. FULL comparison considers the whole DTS. FAST comparison considers only the files explicitly referenced in this file.
Returns:
DocumentInfo or null if there is no match
Throws:
com.rs.lic.LicenseVerificationException - Thrown if the license does not allow one of the files in the DTS. Can onl occur if the license is limited to a set of files

getTypeDefinition

public XBRLXSDTypeDefinition getTypeDefinition(javax.xml.namespace.QName type)
Find the type definition for the specific QName

This function does not find new types defined in taxonomy schemas that has not been read from XML files.

Parameters:
type - QName
Returns:
the XBRLTypeDefinition or null

addValidationException

public void addValidationException(XBRLValidationException e)
Parameters:
e -

getValidationReport

public XBRLValidationReport getValidationReport()
Access to the internal validation report. This report is not complete. It contains only validation problems during the DTS loading process.

Returns:
XBRLValidationReport

loadExtraSchemas

public void loadExtraSchemas()
                      throws XBRLSchemaException
Called internally by the API when extra schemas must be loaded in the configuration object and schema compiler

Throws:
XBRLSchemaException

getSchemaCompiler

public com.saxonica.schema.SchemaCompiler getSchemaCompiler()
Returns the current schema compiler for this configuration object. This method is used to resolve unresolved references to already loaded schemas.

This method is for internal use only.

Returns:
SchemaCompiler

stop

public void stop()
Description copied from interface: Stopable
This method will be called by another thread in order to request this process to stop execution.

There is no warantee the process will stop inmediatelly

Specified by:
stop in interface Stopable

shouldStop

public boolean shouldStop()
This function will be called by classes that knows what to do if the loading proces of a DTS has been cancelled by the user. The functions returns true if the user has requested cancellation.

Returns:
boolean value. True if the user has requested cancellation.

getProcessor

public XBRLPlugInProcessor getProcessor(java.lang.String processorname)
Returns a registered plug-in processor based on the processor name. There is just one instance of a processor per dts instance and processor name. For example, there is just one XBRLDimensions processor for a loaded DTS or just one XBRLFormula processor for a loaded DTS. This function returns the registered, loaded, and instantiated processor using the processor name as a key.

Processors are created by calling the create function of the processor main class. they automatically self register within the DTS that is used as a parameter. Further calls to the create method using the same DTS as a parameter will always return the already registered processor.

Parameters:
processorname - Processor token name (statically defined on each processor class)
Returns:
XBRLPlugInProcessor or null if it is not registered
Since:
2.6.8

registerProcessor

public void registerProcessor(java.lang.String processorname,
                              XBRLPlugInProcessor processor)
Called by the processor to self register

Parameters:
processorname -
processor -
Since:
2.6.8

getProcessors

public java.util.Iterator<XBRLPlugInProcessor> getProcessors()
Access to all registered plug-in processors

Returns:
Iterator over registered processors
Since:
2.6.9

xEqualMode

public boolean xEqualMode()
The default value of the XEQUAL_MODE is XBRL_COMPLIANT but the conformance suite of the formula processor requires it to be set to FORMULA_COMPLIANT.

This is because some test cases in the formula comformance sute assumes that the comparison of XBRL entities texts are trim before thay are compared but this operation is not required in the XBRL specification.

Returns:
true or false depending on the value of the XEQUAL_MODE property on this DTSContainer instance.

sEqualMode

public boolean sEqualMode()
The default value of the SEQUAL_MODE is XBRL_COMPLIANT but the conformance suite of the formula processor requires it to be set to FORMULA_COMPLIANT.

This is because some test cases in the formula comformance sute assumes that the comparison of nodes should skip ids in nested nodes while this is not stated in the XBRL 2.1 specification.

Returns:
true or false depending on the value of the SEQUAL_MODE property on this DTSContainer instance.

getBaseURI

public java.net.URI getBaseURI()
Access to the base URI for the XBRL processor

Returns:
an URI whose value depends on the XBRL_BASE property of the XBRL processor or null if there is an error.
See Also:
XBRL_BASE

resolveXPointer

public XMLFragment resolveXPointer(java.net.URI uriHref,
                                   XMLDocumentURI doc)
                            throws XBRLValidationException
resolve the XPointer to the node pointed to The href MUST be absolute

Parameters:
uriHref - the URI to resolve
doc - XMLDocumentURI in which uriHRef exist. if null then the XMLDocumentURI is obtained from the cache.
Returns:
XMLFragment
Throws:
XBRLValidationException


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