com.ihr.xbrl.om
Class DTSCatalogURIResolver

java.lang.Object
  extended by com.ihr.xbrl.om.DTSCatalogURIResolver
All Implemented Interfaces:
DTSCascadeURIResolver, java.io.Serializable, javax.xml.transform.URIResolver, net.sf.saxon.type.SchemaURIResolver

public class DTSCatalogURIResolver
extends java.lang.Object
implements javax.xml.transform.URIResolver, DTSCascadeURIResolver, net.sf.saxon.type.SchemaURIResolver

This is a wrapper class to a CatalogResolver. Resolvers are nested in a chain so the constructor allows a parameter of the next catalog in sequence. If this resolver is unable to resolve it continues with the next resolver.

Author:
Ignacio
See Also:
Serialized Form

Field Summary
static java.lang.String catalogsFileName
           
static java.lang.String taxonomyMetadataPropertiesFileName
           
static java.lang.String taxonomyWizardFileName
           
static java.lang.String userDefaultTaxonomyDirectory
           
 
Constructor Summary
DTSCatalogURIResolver(net.sf.saxon.type.SchemaURIResolver nextResolver)
          Creates a CatalogResolver it is responsibility of the parent method to install the resolver in the chain.
DTSCatalogURIResolver(javax.xml.transform.URIResolver nextResolver)
          Creates a CatalogResolver it is responsibility of the parent method to install the resolver in the chain.
 
Method Summary
static java.lang.String getCatalogPath()
          Calculates all possible path locations where the XBRLCatalogFile may be located
static java.lang.String getEnvCatalogPath()
          If there is a value set for the XBRLCATALOGPATH variable, this method returns the path indicated by the user in a system variable called XBRLCATALOGPATH concatenated with the name of the XBRL catalog file.
 javax.xml.transform.URIResolver getNextResolver()
          The next resolved in the cascade. null means this is the last resolver
 net.sf.saxon.type.SchemaURIResolver getNextSchemaResolver()
           
static java.lang.String getUserDefaultTaxonomyPath()
          The processor has a property called XBRL_BASE. that property can be set by the user during initialization of the processor.
 javax.xml.transform.Source resolve(java.lang.String href, java.lang.String base)
           
 javax.xml.transform.Source[] resolve(java.lang.String targetNamespace, java.lang.String baseURI, java.lang.String[] locations)
           
 void setConfiguration(net.sf.saxon.Configuration config)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

catalogsFileName

public static final java.lang.String catalogsFileName
See Also:
Constant Field Values

taxonomyMetadataPropertiesFileName

public static final java.lang.String taxonomyMetadataPropertiesFileName
See Also:
Constant Field Values

taxonomyWizardFileName

public static final java.lang.String taxonomyWizardFileName
See Also:
Constant Field Values

userDefaultTaxonomyDirectory

public static final java.lang.String userDefaultTaxonomyDirectory
See Also:
Constant Field Values
Constructor Detail

DTSCatalogURIResolver

public DTSCatalogURIResolver(javax.xml.transform.URIResolver nextResolver)
Creates a CatalogResolver it is responsibility of the parent method to install the resolver in the chain.

Parameters:
nextResolver -

DTSCatalogURIResolver

public DTSCatalogURIResolver(net.sf.saxon.type.SchemaURIResolver nextResolver)
Creates a CatalogResolver it is responsibility of the parent method to install the resolver in the chain.

Parameters:
nextResolver -
Method Detail

getCatalogPath

public static java.lang.String getCatalogPath()
Calculates all possible path locations where the XBRLCatalogFile may be located

Returns:
String

getEnvCatalogPath

public static java.lang.String getEnvCatalogPath()
If there is a value set for the XBRLCATALOGPATH variable, this method returns the path indicated by the user in a system variable called XBRLCATALOGPATH concatenated with the name of the XBRL catalog file. Otherwise, the method returns the empty string.

Returns:
path to the XBRLCatalog.xml file

getUserDefaultTaxonomyPath

public static java.lang.String getUserDefaultTaxonomyPath()
The processor has a property called XBRL_BASE. that property can be set by the user during initialization of the processor. If that property is not set. A default value is provided. The default value depends on the existence of a value for the XBRLCATALOGPATH environment variable.

If exist, the returned value is ${XBRLCATALOGPATH}/Other

If it does not exist, the returned value is the path where the executable is running (user.dir)

Returns:
path to the XBRLCatalog.xml file

resolve

public javax.xml.transform.Source resolve(java.lang.String href,
                                          java.lang.String base)
                                   throws javax.xml.transform.TransformerException
Specified by:
resolve in interface javax.xml.transform.URIResolver
Throws:
javax.xml.transform.TransformerException

getNextResolver

public javax.xml.transform.URIResolver getNextResolver()
Description copied from interface: DTSCascadeURIResolver
The next resolved in the cascade. null means this is the last resolver

Specified by:
getNextResolver in interface DTSCascadeURIResolver
Returns:
URIResolver

getNextSchemaResolver

public net.sf.saxon.type.SchemaURIResolver getNextSchemaResolver()

resolve

public javax.xml.transform.Source[] resolve(java.lang.String targetNamespace,
                                            java.lang.String baseURI,
                                            java.lang.String[] locations)
                                     throws net.sf.saxon.trans.XPathException
Specified by:
resolve in interface net.sf.saxon.type.SchemaURIResolver
Throws:
net.sf.saxon.trans.XPathException

setConfiguration

public void setConfiguration(net.sf.saxon.Configuration config)
Specified by:
setConfiguration in interface net.sf.saxon.type.SchemaURIResolver


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