com.ihr.xbrl.om
Class MultiDTSValidationService

java.lang.Object
  extended by com.ihr.xbrl.om.MultiDTSValidationService

public class MultiDTSValidationService
extends java.lang.Object

This class supports hyper fast XBRL validation by using a configuration file where multiple DTS are pre-defined. A new instance document will be compared against the already loaded DTSs and validated against the DTS it matches. Validation is hyper fast because the DTS is already loaded in memory and reused multiple times.

Since:
2.7.5
Author:
Ignacio

Constructor Summary
MultiDTSValidationService()
           
 
Method Summary
 java.lang.String getCalculatedFileName()
          Access to the file name of this file after substitution of all variables.
 void init(java.net.URI absURI, java.net.URI baseURI)
          Initializes the service using the configuracion file received in the absURI parameter.
 void setVariable(java.lang.String variableName, java.lang.String variableValue)
          Variables can be used to change the document URL dynamically.
 boolean validate(MultiDTSValidationFile item, MultiDTSValidationHandler multiDTSValidationHandler)
          Validates the XBRL Report that can be created reading the inputStream and passes validation report to the instance of the multiDTSValidationHandler that can operate in consequence.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiDTSValidationService

public MultiDTSValidationService()
Method Detail

init

public void init(java.net.URI absURI,
                 java.net.URI baseURI)
          throws XBRLInitializationException
Initializes the service using the configuracion file received in the absURI parameter.

Parameters:
absURI - the configuration file URI
baseURI - this is the baseURI used for the resolution of the configuration file. it is used to resolve taxonomies that are indicated without official URL
Throws:
XBRLInitializationException

validate

public boolean validate(MultiDTSValidationFile item,
                        MultiDTSValidationHandler multiDTSValidationHandler)
                 throws java.io.IOException
Validates the XBRL Report that can be created reading the inputStream and passes validation report to the instance of the multiDTSValidationHandler that can operate in consequence.

Parameters:
inputStream - as InputStream
multiDTSValidationHandler - as MultiDTSValidationHandler
Returns:
boolean value, true if the instance has been processed by one of the DTSs loaded. false if none of the loaded DTSs matches the DTS on the instance document
Throws:
java.io.IOException

getCalculatedFileName

public java.lang.String getCalculatedFileName()
Access to the file name of this file after substitution of all variables. This file name can be used as first parameter to store the instance document into the database

Returns:

setVariable

public void setVariable(java.lang.String variableName,
                        java.lang.String variableValue)
Variables can be used to change the document URL dynamically.

Variables are replaced in the document URL as indicated in the following example: a variable URL may contain $(variable_name) then the entire string $(variable_name) is replaced by the variable value. for example:

http://www.exaple.com/repository/xbrl/$(PERIOD)/$(COMPANY_CODE)/$(INSTANCE_FILENAME) contains 3 variable definitions that will be replaced by the variable values at the time the validate method is called.

Well know variable names:

Parameters:
variableName -
variableValue -


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