com.ihr.xbrl.dataloader
Class LoaderEngine

java.lang.Object
  extended by com.ihr.xbrl.dataloader.LoaderEngine

public class LoaderEngine
extends java.lang.Object

Author:
Ignacio

Field Summary
static java.lang.String loaderSchemaURI
           
 
Constructor Summary
LoaderEngine(java.net.URI configFile)
          Creates a loader engine and loads the configuration file for this engine
 
Method Summary
 java.util.Iterator<DTSContainer> getDTSs()
          Returns an iterator over all DTSs loaded in this engine
 Loader getLoader(DTSContainer dts)
          Returns a loader from the engine.
 Loader getMasterLoader(DTSContainer dts)
          Access to the master loader.
 java.lang.Object[] load(javax.xml.transform.Source xmlSource)
          Executes the mapping defined in the configuration file.
 java.lang.Object[] load(XBRLInstance instance, DTSContainer dts)
          Executes the mapping defined in the configuration file.
 void migrateConfigFile(XBRLInstance versioningReport, java.net.URI outputReportUri, java.net.URI newConfigFileUri)
          Migrates a configuration file from using a DTS to using a new DTS with information from an XBRL versioning report.
 void releaseLoader(Loader l, DTSContainer dts)
          Liberates a loader so it can be used by other threads.
 void setURI(java.net.URI newURI)
          Changes or sets this URI new config file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loaderSchemaURI

public static java.lang.String loaderSchemaURI
Constructor Detail

LoaderEngine

public LoaderEngine(java.net.URI configFile)
             throws TransformConfigurationFileException,
                    com.rs.lic.LicenseVerificationException
Creates a loader engine and loads the configuration file for this engine

Parameters:
configFile -
Throws:
TransformConfigurationFileException
com.rs.lic.LicenseVerificationException
Method Detail

getDTSs

public java.util.Iterator<DTSContainer> getDTSs()
Returns an iterator over all DTSs loaded in this engine

Returns:
Iterator

getLoader

public Loader getLoader(DTSContainer dts)
                 throws LoaderException
Returns a loader from the engine. Loaders are thread safe (one loader per thread) and can be reused. Normal applications should use load(Source) method A call to releaseLoader MUST be done before the loader is liberated

Parameters:
dts -
Returns:
Loader
Throws:
LoaderException

getMasterLoader

public Loader getMasterLoader(DTSContainer dts)
                       throws LoaderException
Access to the master loader. A master loader is a loader used by GUIs so properties of the loader can be set and tested.

Parameters:
dts -
Returns:
Loader
Throws:
LoaderException

releaseLoader

public void releaseLoader(Loader l,
                          DTSContainer dts)
                   throws LoaderException
Liberates a loader so it can be used by other threads. The loader remains initialized. Normal applications should use load(Source) method

Parameters:
dts -
Throws:
LoaderException

setURI

public void setURI(java.net.URI newURI)
Changes or sets this URI new config file

Parameters:
newURI - URI

load

public java.lang.Object[] load(XBRLInstance instance,
                               DTSContainer dts)
                        throws LoaderException
Executes the mapping defined in the configuration file. In this case the XBRLDataTarget(s) involved will receive the input parameters before start.

Parameters:
instance - document input to be sent. No DTS Checking is performed
dts - is the DTS of this loader that is compatible with the instance DTS container.
Returns:
Object[]
Throws:
LoaderException

load

public java.lang.Object[] load(javax.xml.transform.Source xmlSource)
                        throws LoaderException
Executes the mapping defined in the configuration file. In this case the XBRLDataTarget(s) involved will receive the input parameters before start.

Parameters:
xmlSource - input source of the instance document
Returns:
Object[]
Throws:
LoaderException

migrateConfigFile

public void migrateConfigFile(XBRLInstance versioningReport,
                              java.net.URI outputReportUri,
                              java.net.URI newConfigFileUri)
                       throws LoaderException
Migrates a configuration file from using a DTS to using a new DTS with information from an XBRL versioning report.

Parameters:
versioningReport - XBRLInstance the versioning report describing the changes between the two DTSs
outputReportUri - where the report about the migration process will be serailized
newConfigFileUri - the URI for the new configuration file
Throws:
MapException - if there is something wrong.
LoaderException


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