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 AUTHENTICATOR_DELEGATE_INSTANCE
          The AUTHENTICATOR_DELEGATE_INSTANCE property is the instance of an object implementing java.net.Authenticator that will be registered as the default authenticator.
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 java.lang.String DEFAULT_DIMENSIONS_APPLICANCY
          The DEFAULT_DIMENSIONS_APPLICANCY property indicates how the Formula Functions (this does not affects Dimensions Validation) returns the value of a Fact item when the Fact item is NOT reported for a dimension that contains a default value.
static java.lang.String DEFAULTS_ALWAYS_APPLY
          Possible value for the DEFAULT_DIMENSIONS_APPLICANCY property
static java.lang.String DEFAULTS_NOT_APPLY
          Possible value for the DEFAULT_DIMENSIONS_APPLICANCY property
static java.lang.String DTS_DISCOVERY_ON_DIFFERENT_FILE_NAMES
          The DTS_DISCOVERY_ON_DIFFERENT_FILE_NAMES property specifies how the processor reacts when a reference to a file differs from the real file name on the file system but the file subsystem resolves to the same file name.
static java.lang.String DTS_PROXY_HEADER
          The DTS_PROXY_HEADER property is the head of the following three properties: DTS_PROXY_HEADER/address/{n} indicates the proxy address DTS_PROXY_HEADER/port/{n} indicates the proxy port number (no defaults are recognized) DTS_PROXY_HEADER/type/{n} indicates the proxy type "HTTP" or "SOCKS" are recognized types.
static java.lang.String DTS_RESOLVER
          The DTS_RESOLVER property is used in order to add additional DTS URI resolvers to the default ones after the DTS configuration process has been finished.
static java.lang.String ERROR_PROPERTY_VALUE
          This is set to the constant value "error"
static int FAST
          FAST is a constant for the mode parameter in the isInstanceOfThisDTS(Source, int) function.
static java.lang.String FORMULA_PROCESSOR_DEFAULT_MESSAGE_ROLE
          The FORMULA_PROCESSOR_DEFAULT_MESSAGE_ROLE property indicates the default role URI string that will be used for the resolution of the winning message when no role (null) is indicated or when no message is found for the selected role (second opportunity).
static java.lang.String FORMULA_PROCESSOR_ENABLE_ASSERTION_MESSAGE_EXTENSIONS
          The FORMULA_PROCESSOR_ENABLE_ASSERTION_MESSAGE_EXTENSIONS property indicates if the processor will calculate and return custom messages during the evaluation of assertions.
static java.lang.String FORMULA_PROCESSOR_GENERAL_VARIABLE_SCHEMA_AWARE
          The FORMULA_PROCESSOR_GENERAL_VARIABLE_SCHEMA_AWARE property contains a value 'true' or 'false' that defines the behavior of the XPath expression evaluation for General Variables.
static java.lang.String FORMULA_PROCESSOR_PARALLEL_PROCESSING_EXPERIMENTAL
          The FORMULA_PROCESSOR_PARALLEL_PROCESSING_EXPERIMENTAL property enables the formula processor to execute formulas in parallel.
static java.lang.String FORMULA_PROCESSOR_PARAMETER_RESOLVER
          The FORMULA_PROCESSOR_PARAMETER_RESOLVER property is used in order to add additional Variable Parameter resolvers to the formula processor.
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
static java.lang.String GENERIC_LABEL_VERSION
          GENERIC_LABEL_VERSION is defined as "http://www.reportingstandard.com/properties/generic-linkbase/label-version" Possible values of this property are USE_GENERIC_LABEL_AS_OF_22_JUNE_2009 or USE_GENERIC_LABEL_AS_OF_CURRENT_EXPERIMENTAL.
static java.lang.String GENERIC_LINKBASE_REQUIRE_ROLEREF_ARCROLEREF
          GENERIC_LINKBASE_REQUIRE_ROLEREF_ARCROLEREF is defined as "http://www.reportingstandard.com/properties/generic-linkbase/require-roleRef-arcroleRef" Possible value is a String that can be converted into a boolean "true" or "false" Default value is "true" if the PROCESSORS_SEQUENCE property contains the formula processor and "false" otherwise.
static java.lang.String GENERIC_REFERENCE_VERSION
          GENERIC_REFERENCE_VERSION is defined as "http://www.reportingstandard.com/properties/generic-linkbase/reference-version" Possible values of this property are USE_GENERIC_REFERENCE_AS_OF_22_JUNE_2009 or USE_GENERIC_REFERENCE_AS_OF_CURRENT_EXPERIMENTAL.
static java.lang.String IGNORE_PROPERTY_VALUE
          This is set to the constant value "ignore"
 org.apache.log4j.Logger log
          All log information goes through this logger
static java.lang.String LOG_LEVEL
          The log level that will be set to the standard logger at com.ihr.xbrl The value must be a valid string representation of the level as indicated in the log4j logging package.
static java.lang.String LOGGER_NAME
          LOGGER_NAME is defined as com.ihr.xbrl and is final
static java.lang.String PROCESSORS_SEQUENCE
          The PROCESSORS_SEQUENCE property contains a comma separated list of processors responsible of performing DTS validation The default value for the PROCESSORS_SEQUENCE property is XBRLCoreProcessor.PROCESSORNAME which is "XBRL21Core" Note: In order to perform XBRL 2.1 validation and XBRL Dimensions 1.0 validation, the value of this property must be set to XBRLCoreProcessor.PROCESSORNAME,XDTProcessor.PROCESSORNAME this is: "XBRL21Core,XBRLDimensions" Processors extensibility: Creating your own processors for project specific validation rules Processor factories are loaded during the static initialization of the DTSContainer class.
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_GENERIC_LABEL_AS_OF_22_JUNE_2009
          USE_GENERIC_LABEL_AS_OF_22_JUNE_2009 is defined as GENERIC_LABEL_22_JUN_2009.
static java.lang.String USE_GENERIC_LABEL_CURRENT_EXPERIMENTAL
          USE_GENERIC_LABEL_AS_OF_CURRENT_EXPERIMENTAL is defined as GENERIC_LABEL_CURRENT_EXPERIMENTAL.
static java.lang.String USE_GENERIC_REFERENCE_AS_OF_22_JUNE_2009
          USE_GENERIC_REFERENCE_AS_OF_22_JUNE_2009 is defined as GENERIC_REFERENCE_22_JUN_2009.
static java.lang.String USE_GENERIC_REFERENCE_CURRENT_EXPERIMENTAL
          USE_GENERIC_REFERENCE_AS_OF_CURRENT_EXPERIMENTAL is defined as GENERIC_REFERENCE_CURRENT_EXPERIMENTAL.
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 WARNING_PROPERTY_VALUE
          This is set to the constant value "warning"
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 XBRL_VERSION
          The XBRL_VERSION property indicates the version of the XBRL specification to be used when multiple editions of the XBRL 2.1 specification causes different behavior of the XBRL processor.
static java.lang.String XBRL_VERSION_2_JUL_2008
          Default value for the XBRL Processor in production.
static java.lang.String XBRL_VERSION_EXPERIMENTAL_BUG_368
          Experimental value of the XBRL Processor according to the BUG 368.
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 addInconsistencey(XBRLInconsistency 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 documentURI)
          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)
           
 void doCallInstallDTSURIResolver(HasCreateDTSUriResolver instanceClass)
          Executes a call to the method createAndRegisterDTSUriResolver on the class passed in as a parameter.
 void doCallInstallFormulaParameterResolver(HasCreateFormulaParameterResolver instanceClass)
           
 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.
static java.lang.Class<? extends XBRLProcessorFactory> getProcessorFactory(java.lang.String processorName)
          Accesss to the processor factory class for 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.
static java.lang.String[] getRegisteredProcessorNames()
          Access to all registered processor names
 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(java.net.URI xpointerIdentifier)
          Resolves an XBRLResource from its XPointer identifier.
 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.net.URI getTempURL()
          Returns a URL pointin to a temporary folder in the local drive.
 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.
 void installFormulaParameterResolver(XBRLFormulaParametersResolver parameterResolver)
          Sets a new resolver to this XBRLFormulaParametersResolver 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.
 boolean isGeneralVariableSchemaAware()
          This method returns the value of the property FORMULA_PROCESSOR_GENERAL_VARIABLE_SCHEMA_AWARE
See FORMULA_PROCESSOR_GENERAL_VARIABLE_SCHEMA_AWARE for more information.
 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.
static void registerProcessorFactory(java.lang.String name, java.lang.Class<? extends XBRLProcessorFactory> clazz)
          Register a new processor factory for the indicated processor name
 XMLFragment resolveXPointer(java.net.URI uriHref, XMLDocumentURI doc)
          resolve the XPointer to the node pointed to and returns the XMLFragment it points to or null if none can be found.
 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 to set the properties of this DTSContainer.
 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.
 XBRLValidationReport validate()
          Executes all registered validators indicated in the PROCESSORS_SEQUENCE property of this DTS and returns the XBRLValidationReport instance with the validation result.
 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

GENERIC_LINKBASE_REQUIRE_ROLEREF_ARCROLEREF

public static final java.lang.String GENERIC_LINKBASE_REQUIRE_ROLEREF_ARCROLEREF
GENERIC_LINKBASE_REQUIRE_ROLEREF_ARCROLEREF is defined as "http://www.reportingstandard.com/properties/generic-linkbase/require-roleRef-arcroleRef" Possible value is a String that can be converted into a boolean "true" or "false"

Default value is "true" if the PROCESSORS_SEQUENCE property contains the formula processor and "false" otherwise.

All defined extended links in the XBRL 2.1 specification (presentationLink, calculationLink, definitionLink, labelLink and referenceLink) requires the existence of a roleRef element pointing to the role definition for roles not defined in the XBRL 2.1 specification and arcroleRef element pointing to the arcrole definition for arcroles not defined in the XBRL 2.1 specification. For consistency reasons, the Generic Links 1.0 specification (Recommendation 22 June 2009) requires the same constraints on roles and arcroles used in generic links. Just sticking to the wording of the XBRL 2.1 specification, roleRef and arcroleRef elements would not be required on generic links.

The GENERIC_LINKBASE_REQUIRE_ROLEREF_ARCROLEREF allows the processor to raise an error (DTSDiscoveryException) if roles or arcroles defined in generic links does not contain a roleRef arcroleRef element (as required in the Generic Links 1.0); in this case, the property value should be "true" or not raise an error as defined in the XBRL 2.1 specification without the constraints defined in the Generic Links 1.0; in this case, the property value should be "false".

See Also:
Constant Field Values

GENERIC_LABEL_VERSION

public static final java.lang.String GENERIC_LABEL_VERSION
GENERIC_LABEL_VERSION is defined as "http://www.reportingstandard.com/properties/generic-linkbase/label-version" Possible values of this property are USE_GENERIC_LABEL_AS_OF_22_JUNE_2009 or USE_GENERIC_LABEL_AS_OF_CURRENT_EXPERIMENTAL.

The schema for the Generic labels 1.0 specification defined on June 22 2009 contains an arcrole definition for the arcrole type http://xbrl.org/arcrole/2008/element-label. That arcrole type contains an attribute called cyclesAllowed whose value was "none".

The (currently not dated) version of the errata corrections for the Generic labels 1.0 specification changes the value of the cyclesAllowed attribute from "none" to "undirected". For this reason the property adjust the processor for using the original or the newest version of that schema.

The default value for this property is USE_GENERIC_LABEL_AS_OF_22_JUNE_2009. Note this value will be changed at a later time.

See Also:
Constant Field Values

GENERIC_REFERENCE_VERSION

public static final java.lang.String GENERIC_REFERENCE_VERSION
GENERIC_REFERENCE_VERSION is defined as "http://www.reportingstandard.com/properties/generic-linkbase/reference-version" Possible values of this property are USE_GENERIC_REFERENCE_AS_OF_22_JUNE_2009 or USE_GENERIC_REFERENCE_AS_OF_CURRENT_EXPERIMENTAL.

The schema for the Generic references 1.0 specification defined on June 22 2009 contains an arcrole definition for the arcrole type http://xbrl.org/arcrole/2008/element-reference. That arcrole type contains an attribute called cyclesAllowed whose value was "none".

The (currently not dated) version of the errata corrections for the Generic references 1.0 specification changes the value of the cyclesAllowed attribute from "none" to "undirected". For this reason the property adjust the processor for using the original or the newest version of that schema.

The default value for this property is USE_GENERIC_REFERENCE_AS_OF_22_JUNE_2009. Note this value will be changed at a later time.

See Also:
Constant Field Values

USE_GENERIC_LABEL_AS_OF_22_JUNE_2009

public static final java.lang.String USE_GENERIC_LABEL_AS_OF_22_JUNE_2009
USE_GENERIC_LABEL_AS_OF_22_JUNE_2009 is defined as GENERIC_LABEL_22_JUN_2009.

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

See Also:
Constant Field Values

USE_GENERIC_LABEL_CURRENT_EXPERIMENTAL

public static final java.lang.String USE_GENERIC_LABEL_CURRENT_EXPERIMENTAL
USE_GENERIC_LABEL_AS_OF_CURRENT_EXPERIMENTAL is defined as GENERIC_LABEL_CURRENT_EXPERIMENTAL.

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

Note: the specification wording still has not been approved. The new specification version changes the cyclesAllowed attribute on the arcrole definition for element-label relationships from none to undirected

See Also:
Constant Field Values

USE_GENERIC_REFERENCE_AS_OF_22_JUNE_2009

public static final java.lang.String USE_GENERIC_REFERENCE_AS_OF_22_JUNE_2009
USE_GENERIC_REFERENCE_AS_OF_22_JUNE_2009 is defined as GENERIC_REFERENCE_22_JUN_2009.

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

See Also:
Constant Field Values

USE_GENERIC_REFERENCE_CURRENT_EXPERIMENTAL

public static final java.lang.String USE_GENERIC_REFERENCE_CURRENT_EXPERIMENTAL
USE_GENERIC_REFERENCE_AS_OF_CURRENT_EXPERIMENTAL is defined as GENERIC_REFERENCE_CURRENT_EXPERIMENTAL.

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

Note: the specification wording still has not been approved. The new specification version changes the cyclesAllowed attribute on the arcrole definition for element-reference relationships from none to undirected

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

See Also:
Constant Field Values

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

See Also:
Constant Field Values

XDT_VERSION

public static final 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.

See Also:
Constant Field Values

XBRL_VERSION

public static final java.lang.String XBRL_VERSION
The XBRL_VERSION property indicates the version of the XBRL specification to be used when multiple editions of the XBRL 2.1 specification causes different behavior of the XBRL processor.

As of 02/07/2008 Reporting Standard has found no differences in the XBRL processor implementation with previous XBRL 2.1 implementations. The default value of this property is XBRL_VERSION_2_JUL_2008 XBRL_VERSION_2_JUL_2008

As of 26/07/2010 the XBRL 2.1 specification working group is working (for longer than a year) in changing how summation-item works and the recognition of zero with precision zero. There is a new value for experimental purposes that is XBRL_VERSION_EXPERIMENTAL_BUG_368. XBRL_VERSION_EXPERIMENTAL_BUG_368

See Also:
Constant Field Values

XBRL_VERSION_2_JUL_2008

public static final java.lang.String XBRL_VERSION_2_JUL_2008
Default value for the XBRL Processor in production.

See Also:
XBRL_VERSION, Constant Field Values

XBRL_VERSION_EXPERIMENTAL_BUG_368

public static final java.lang.String XBRL_VERSION_EXPERIMENTAL_BUG_368
Experimental value of the XBRL Processor according to the BUG 368. This definition will be changed later if the working group finally approves the changes and the new specification has a date.

See Also:
XBRL_VERSION, Constant Field Values

XBRL_BASE

public static final 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.

See Also:
Constant Field Values

DTS_DISCOVERY_ON_DIFFERENT_FILE_NAMES

public static final java.lang.String DTS_DISCOVERY_ON_DIFFERENT_FILE_NAMES
The DTS_DISCOVERY_ON_DIFFERENT_FILE_NAMES property specifies how the processor reacts when a reference to a file differs from the real file name on the file system but the file subsystem resolves to the same file name. This is, for example, the case of Windows file systems that does not distinguish between upper case file names and lower case file names. The value of this property can be set as "warning" (this is the default), "error" or "ignore".

If set to "warning", the processor will add an inconsistency to the validation phase. The inconsistency will indicate that the DTS will be valid on certain systems like "Windows" because windows does not distinguish between uppercase file names and lowercase file names, but it will not be valid on "Unix" because unix considers upper case file names different from lower case file names.

If set to "error", the processor will consider this as an error even if the processor is running on a windows system and the file name can be resolved to a local file. This is our recommended value when running on a server validating incoming files on a regulator system

If set to "ignore", the processor will ignore and this "problem" is detected, the processor will ignore it.

See Also:
Constant Field Values

DTS_RESOLVER

public static final java.lang.String DTS_RESOLVER
The DTS_RESOLVER property is used in order to add additional DTS URI resolvers to the default ones after the DTS configuration process has been finished. The DTS_RESOLVER property value must be an instance of a class implementing the HasCreateDTSUriResolver interface. The DTSContainer will call the createAndRegisterDTSUriResolver method in order to let the class create and register the new URI resolver.

In case multiple DTS_RESOLVER shall be added in a chain by the calling application, the calling application may use an instance of the class MultiDTSUriResolverFactory which implements the functionality of creating all of them and registering to the DTSContainer in the proper order. Refer to the documentation of the MultiDTSUriResolverFactory for more information.

See Also:
MultiDTSUriResolverFactory, Constant Field Values

LOG_LEVEL

public static final java.lang.String LOG_LEVEL
The log level that will be set to the standard logger at com.ihr.xbrl

The value must be a valid string representation of the level as indicated in the log4j logging package. This is typically ALL, TRACE, DEBUG, WARN, ERROR or OFF.

Use ALL for the processor to generate all debug messages sent to appenders registered for loggers at com.ihr.xbrl !!WARNING!! this may slow down performance.

Default value is Level.ERROR

See Also:
Constant Field Values

DTS_PROXY_HEADER

public static final java.lang.String DTS_PROXY_HEADER
The DTS_PROXY_HEADER property is the head of the following three properties: Where {n} is a sequential number starting with 0.

Use this properties in order to set a collection of proxies that will be used in turn for opening external files.

Note the taxonomy cache is independent from the proxies. The taxonomy cache always takes preference over any proxy configurations. Taxonomy cache sources are local files or the XBRL Database.

See Also:
Constant Field Values

AUTHENTICATOR_DELEGATE_INSTANCE

public static final java.lang.String AUTHENTICATOR_DELEGATE_INSTANCE
The AUTHENTICATOR_DELEGATE_INSTANCE property is the instance of an object implementing java.net.Authenticator that will be registered as the default authenticator. Authentication may be required by web servers or by proxy servers.

See Also:
Constant Field Values

PROCESSORS_SEQUENCE

public static final java.lang.String PROCESSORS_SEQUENCE
The PROCESSORS_SEQUENCE property contains a comma separated list of processors responsible of performing DTS validation

The default value for the PROCESSORS_SEQUENCE property is XBRLCoreProcessor.PROCESSORNAME which is "XBRL21Core"

Note: In order to perform XBRL 2.1 validation and XBRL Dimensions 1.0 validation, the value of this property must be set to XBRLCoreProcessor.PROCESSORNAME,XDTProcessor.PROCESSORNAME this is: "XBRL21Core,XBRLDimensions"

Processors extensibility: Creating your own processors for project specific validation rules

Processor factories are loaded during the static initialization of the DTSContainer class. It is possible users create additional factories to be registered during the static initialization according to the following rules:

    • The -Dxbrl.processors system property may contain a comma separated list of processor factory classes
  • It is not possible to override standard processor names (Core XBRL 2.1, Dimensions and Formula)

    In case of any error during the initialization of custom XBRL processors a RuntimeException is produced encapsulating an XBRLInitializationException. The XBRL Processor may be in an unusable status in this case. Regular processors for XBRL 2.1, Dimensions and Formula processing are safe and does not raise XBRLInitialization exceptions.

    See Also:
    Constant Field Values

    WARNING_PROPERTY_VALUE

    public static final java.lang.String WARNING_PROPERTY_VALUE
    This is set to the constant value "warning"

    See Also:
    Constant Field Values

    ERROR_PROPERTY_VALUE

    public static final java.lang.String ERROR_PROPERTY_VALUE
    This is set to the constant value "error"

    See Also:
    Constant Field Values

    IGNORE_PROPERTY_VALUE

    public static final java.lang.String IGNORE_PROPERTY_VALUE
    This is set to the constant value "ignore"

    See Also:
    Constant Field Values

    FORMULA_PROCESSOR_GENERAL_VARIABLE_SCHEMA_AWARE

    public static final java.lang.String FORMULA_PROCESSOR_GENERAL_VARIABLE_SCHEMA_AWARE
    The FORMULA_PROCESSOR_GENERAL_VARIABLE_SCHEMA_AWARE property contains a value 'true' or 'false' that defines the behavior of the XPath expression evaluation for General Variables.

    Default value is 'true'

    If the value is 'true' then the XPath expression will be schema aware. Nodes returned by the evaluation of the XPath expression will be typed according with the data types defined in the schemas.

    If the value is 'false' then the XPath expression will NOT be schema aware. Nodes returned by the evaluation of the XPath expression will NOT be typed (they will be Untyped nodes) and data conversion will be necessary in the XPath expressions using them.

    Before 09/01/2011, The formula tests suite contained one test case that requires to load an external XML file using the doc() XPath function. That target XML file was NOT valid against the referenced schema. After 09/01/2011 the tests suite was changed in order make the XML file schema aware.

    See Also:
    Constant Field Values

    FORMULA_PROCESSOR_PARAMETER_RESOLVER

    public static final java.lang.String FORMULA_PROCESSOR_PARAMETER_RESOLVER
    The FORMULA_PROCESSOR_PARAMETER_RESOLVER property is used in order to add additional Variable Parameter resolvers to the formula processor.

    The FORMULA_PROCESSOR_PARAMETER_RESOLVER property value must be an instance of a class implementing the HasCreateFormulaParameterResolver interface. The DTSContainer will call the createAndRegisterDTSUriResolver method in order to let the class create and register the new URI resolver.

    In case multiple FORMULA_PROCESSOR_PARAMETER_RESOLVER shall be added in a chain by the calling application, the calling application may use an instance of the class MultiFormulaParameterResolverFactory which implements the functionality of creating all of them and registering to the DTSContainer in the proper order. Refer to the documentation of the MultiFormulaParameterResolverFactory for more information.

    See Also:
    MultiFormulaParameterResolverFactory, Constant Field Values

    FORMULA_PROCESSOR_PARALLEL_PROCESSING_EXPERIMENTAL

    public static final java.lang.String FORMULA_PROCESSOR_PARALLEL_PROCESSING_EXPERIMENTAL
    The FORMULA_PROCESSOR_PARALLEL_PROCESSING_EXPERIMENTAL property enables the formula processor to execute formulas in parallel. The idea is to reduce execution time to perform validation by executing, as much as possible, things in parallel.

    The FORMULA_PROCESSOR_PARALLEL_PROCESSING_EXPERIMENTAL property value must be a boolean. The default is 'false'

    See Also:
    Constant Field Values

    FORMULA_PROCESSOR_ENABLE_ASSERTION_MESSAGE_EXTENSIONS

    public static final java.lang.String FORMULA_PROCESSOR_ENABLE_ASSERTION_MESSAGE_EXTENSIONS
    The FORMULA_PROCESSOR_ENABLE_ASSERTION_MESSAGE_EXTENSIONS property indicates if the processor will calculate and return custom messages during the evaluation of assertions. The property value must be a string representing a boolean value. A value of 'true' means the formula processor will try to evaluate the right message in the right language during the evaluation of an assertion. The value of 'false' means the formula processor will ignore the existence of those resources.

    The FORMULA_PROCESSOR_ENABLE_ASSERTION_MESSAGE_EXTENSIONS property value must be a boolean. The default is 'true'

    See Also:
    Constant Field Values

    FORMULA_PROCESSOR_DEFAULT_MESSAGE_ROLE

    public static final java.lang.String FORMULA_PROCESSOR_DEFAULT_MESSAGE_ROLE
    The FORMULA_PROCESSOR_DEFAULT_MESSAGE_ROLE property indicates the default role URI string that will be used for the resolution of the winning message when no role (null) is indicated or when no message is found for the selected role (second opportunity).

    The FORMULA_PROCESSOR_DEFAULT_MESSAGE_ROLE property value must be a string. The default value is 'http://www.xbrl.org/2010/role/message' that is defined in the Generic messages 1.0 specification.

    See Also:
    Constant Field Values

    DEFAULT_DIMENSIONS_APPLICANCY

    public static final java.lang.String DEFAULT_DIMENSIONS_APPLICANCY
    The DEFAULT_DIMENSIONS_APPLICANCY property indicates how the Formula Functions (this does not affects Dimensions Validation) returns the value of a Fact item when the Fact item is NOT reported for a dimension that contains a default value.

    Background: The desired and natural interpretation of this property should be "Defaults-NOT-apply". Defaults should apply only when the dimension exist on hypercubes linked with the primary item and after that test there should be a question about what the dimension value is. The authors of the formula specification and the base specification working group, surprisingly, has implemented the opposite. According to their interpretation of the Dimensions Specification, default values are always returned for a fact regardless the fact does not contains that dimension declared on any hypercube.

    Due to the reason the interpretation made by the formula WG and base WG is not understandable by business users, this processor allows our users to decide if they want to operate in the "natural mode" of not allowing defaults to appear when they are not desired or in the "anti natural mode" where defaults are always returned.

    The possible values for this parameter are:

    See Also:
    Constant Field Values

    DEFAULTS_NOT_APPLY

    public static final java.lang.String DEFAULTS_NOT_APPLY
    Possible value for the DEFAULT_DIMENSIONS_APPLICANCY property

    See Also:
    Constant Field Values

    DEFAULTS_ALWAYS_APPLY

    public static final java.lang.String DEFAULTS_ALWAYS_APPLY
    Possible value for the DEFAULT_DIMENSIONS_APPLICANCY property

    See Also:
    Constant Field Values

    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_NAME

    public static final java.lang.String LOGGER_NAME
    LOGGER_NAME is defined as com.ihr.xbrl and is final

    See Also:
    Constant Field Values

    log

    public org.apache.log4j.Logger log
    All log information goes through 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. This method does not change the configuration of the currently created DTSContainer it just sets or change the value of one of the properties. If another DTSContainer is created from this properties then, the new DTSContainer will be configured according witht he properties set here

    Parameters:
    name - property name
    value - property value as string

    setProperties

    public void setProperties(java.util.Properties newProps)
    Internal method using during class constructors to set the properties of this DTSContainer.

    Parameters:
    newProps - Properties

    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 -
    Since:
    2.6.11

    installFormulaParameterResolver

    public void installFormulaParameterResolver(XBRLFormulaParametersResolver parameterResolver)
    Sets a new resolver to this XBRLFormulaParametersResolver object. The XBRLFormulaParametersResolver will be used to obtain formula parameters during formula evaluation.

    Parameters:
    parameterResolver -
    Since:
    2.7.1

    doCallInstallDTSURIResolver

    public void doCallInstallDTSURIResolver(HasCreateDTSUriResolver instanceClass)
    Executes a call to the method createAndRegisterDTSUriResolver on the class passed in as a parameter.

    Parameters:
    instanceClass - instance of a class implementing the interface HasCreateDTSUriResolver
    Since:
    2.6.11

    doCallInstallFormulaParameterResolver

    public void doCallInstallFormulaParameterResolver(HasCreateFormulaParameterResolver instanceClass)
    Parameters:
    theClassImplementingHasCreateFormulaParameterResolver -

    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

    Parameters:
    props - Properties to configure the processor. null for using default values for all properties. The processor creates a local copy of the properties indicated here so during cleanUp phase of this DTS the properties used on this call will not be reset, but the properties effectively used in the report will.
    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. if no DTS has been loaded or the DTS loading process was interrupted then null is returned 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)
                  throws DTSDiscoveryException
    Stores a document in the cache indexed by document URI The URI is absolutized and normalized before stored being stored

    Parameters:
    documentURI -
    Throws:
    DTSDiscoveryException

    cacheRemove

    public void cacheRemove(java.net.URI documentURI)
    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 other extended links)

    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 other extended links)

    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 XBRLResource getResource(java.net.URI xpointerIdentifier)
    Resolves an XBRLResource from its XPointer identifier.

    The XPointer identifier is unique. This function may not work properly if the resource has been created programatically.

    Parameters:
    xpointerIdentifier -
    Returns:
    XBRLResource
    Since:
    2.7.1

    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 -

    addInconsistencey

    public void addInconsistencey(XBRLInconsistency 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.

    Prior to version 2.7.0 The functions returned true if the user had requested cancellation.

    Starting from version 2.7.0 this function throws an XBRLInterruptedException that is a sub class of XBRLRuntimeException captured during the load method. If the exception is produced. the DTSContainer is cleared and then the load function ends.

    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. This method also tells the XBRLPlugInProcessor to configure itself with the properties of this DTSContainer via a call to the configure method on the processor instance.

    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 and returns the XMLFragment it points to or null if none can be found.

    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. If the document has not been loaded in the cache (it is not in the DTS) and the doc parameter is null, most likely, this function will return null.
    Returns:
    XMLFragment if it can be found or null if it cannot be found
    Throws:
    XBRLValidationException - if the URI cannot be resolved according to the rules in the XBRL 2.1 specification

    validate

    public XBRLValidationReport validate()
                                  throws XBRLInitializationException,
                                         com.rs.lic.LicenseVerificationException
    Executes all registered validators indicated in the PROCESSORS_SEQUENCE property of this DTS and returns the XBRLValidationReport instance with the validation result.

    Returns:
    XBRLValidationReport
    Throws:
    XBRLInitializationException - If the processor under a certain name cannot be created
    com.rs.lic.LicenseVerificationException - If the user has no rights to use the indicated processor

    registerProcessorFactory

    public static void registerProcessorFactory(java.lang.String name,
                                                java.lang.Class<? extends XBRLProcessorFactory> clazz)
    Register a new processor factory for the indicated processor name

    Parameters:
    name -
    clazz -

    getRegisteredProcessorNames

    public static java.lang.String[] getRegisteredProcessorNames()
    Access to all registered processor names

    Returns:
    array of strings
    Since:
    2.7.1

    getProcessorFactory

    public static java.lang.Class<? extends XBRLProcessorFactory> getProcessorFactory(java.lang.String processorName)
    Accesss to the processor factory class for the processor name

    Parameters:
    processorName -
    Returns:
    instance of the processor factory
    Since:
    2.7.1

    isGeneralVariableSchemaAware

    public boolean isGeneralVariableSchemaAware()
    This method returns the value of the property FORMULA_PROCESSOR_GENERAL_VARIABLE_SCHEMA_AWARE
    See FORMULA_PROCESSOR_GENERAL_VARIABLE_SCHEMA_AWARE for more information.

    Returns:
    true or false

    getTempURL

    public java.net.URI getTempURL()
    Returns a URL pointin to a temporary folder in the local drive. This URI should be used when getBaseURI() returns null and a URL must be set to a document prior to generate the document nodes.

    If the updateXML method of the XBRLDocument class is called with this URL, no document will be written in the target directory.

    Returns:
    URI
    Since:
    2.7


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