com.ihr.xbrl.om

## Class ZipCascadeURIResolver

- java.lang.Object
- - com.ihr.xbrl.om.ZipCascadeURIResolver

- All Implemented Interfaces:
    DTSCascadeSchemaURIResolver, DTSCascadeURIResolver, java.io.Serializable, javax.xml.transform.URIResolver, net.sf.saxon.lib.SchemaURIResolver, org.xml.sax.EntityResolver

      public class ZipCascadeURIResolver
      extends java.lang.Object
      implements DTSCascadeSchemaURIResolver, org.xml.sax.EntityResolver

  The Class ZipCascadeURIResolver.
  Author:
    Ignacio
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ZipCascadeURIResolver.ZipPackage` Handles extraction of Source from a document inside the ZIP file.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static net.sf.saxon.s9api.QName` | `caseAt` The Constant caseAt.
    `static java.lang.String` | `catalogsFileName` The Constant catalogsFileName.
    `static net.sf.saxon.s9api.QName` | `dir` The Constant dir.
    `static net.sf.saxon.s9api.QName` | `fileUri` The Constant fileUri.
    `static net.sf.saxon.s9api.QName` | `id` The Constant id.
    `static net.sf.saxon.s9api.QName` | `name` The Constant name.
    `static java.lang.String` | `ns` The Constant ns.
    `static net.sf.saxon.s9api.QName` | `rootNode` The Constant rootNode.
    `static java.lang.String` | `typicalDirectoryOfPackages` This is the recommended directory name for packages of taxonomies.
    `static net.sf.saxon.s9api.QName` | `uriStartString` The Constant uriStartString.
    `static net.sf.saxon.s9api.QName` | `zipPath` The Constant zipPath.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZipCascadeURIResolver(net.sf.saxon.lib.SchemaURIResolver nextResolver)` Instantiates a new zip cascade uri resolver.
    `ZipCascadeURIResolver(javax.xml.transform.URIResolver nextResolver)` Instantiates a new zip cascade uri resolver.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.xml.transform.URIResolver` | `getNextResolver()` The next resolved in the cascade. null means this is the last resolver
    `net.sf.saxon.lib.SchemaURIResolver` | `getNextSchemaResolver()` Return the next SchemaURIResolver.
    `static int` | `getVersion(java.lang.String packageID)` Returns the version of a package already installed in the local catalog.
    `static java.util.Vector<java.lang.String>` | `installedPackages()` Access to all packages installed in the ZIP catalog.
    `static java.util.HashSet<java.lang.String>` | `installedPackagesIDs()` Returns a HashSet with the content of the id attribute in the xbrlCacheInfo.properties of all loaded packages.
    `static void` | `removePackage(java.lang.String packageID)` Removes the package.
    `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)`
    `org.xml.sax.InputSource` | `resolveEntity(java.lang.String publicId, java.lang.String systemId)`
    `void` | `setConfiguration(net.sf.saxon.Configuration config)`
    `void` | `setNextResolver(net.sf.saxon.lib.SchemaURIResolver newNextResolver)` Establish the next SchemaURIResolver.
    `void` | `setNextResolver(javax.xml.transform.URIResolver newNextResolver)` Sets the next resolver to the resolver specified in the parameter.

    - ### 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

      The Constant catalogsFileName.
      See Also:
        Constant Field Values

    - #### typicalDirectoryOfPackages

          public static final java.lang.String typicalDirectoryOfPackages

      This is the recommended directory name for packages of taxonomies. It is relative to the location of the RSZIPCatalog.xml file. It's use is not required. It is used by the class RSRemoveCatalogResolver when new packages shall be installed.
      See Also:
        Constant Field Values

    - #### uriStartString

          public static final net.sf.saxon.s9api.QName uriStartString

      The Constant uriStartString.

    - #### dir

          public static final net.sf.saxon.s9api.QName dir

      The Constant dir.

    - #### fileUri

          public static final net.sf.saxon.s9api.QName fileUri

      The Constant fileUri.

    - #### ns

          public static final java.lang.String ns

      The Constant ns.
      See Also:
        Constant Field Values

    - #### rootNode

          public static final net.sf.saxon.s9api.QName rootNode

      The Constant rootNode.

    - #### zipPath

          public static final net.sf.saxon.s9api.QName zipPath

      The Constant zipPath.

    - #### caseAt

          public static final net.sf.saxon.s9api.QName caseAt

      The Constant caseAt.

    - #### name

          public static final net.sf.saxon.s9api.QName name

      The Constant name.

    - #### id

          public static final net.sf.saxon.s9api.QName id

      The Constant id.

  - ### Constructor Detail

    - #### ZipCascadeURIResolver

          public ZipCascadeURIResolver(javax.xml.transform.URIResolver nextResolver)

      Instantiates a new zip cascade uri resolver.
      Parameters:
        `nextResolver` - the next resolver

    - #### ZipCascadeURIResolver

          public ZipCascadeURIResolver(net.sf.saxon.lib.SchemaURIResolver nextResolver)

      Instantiates a new zip cascade uri resolver.
      Parameters:
        `nextResolver` - the next resolver

  - ### Method Detail

    - #### removePackage

          public static void removePackage(java.lang.String packageID)
                                    throws java.io.IOException

      Removes the package.
      Parameters:
        `packageID` - the package id
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### 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`

    - #### installedPackages

          public static java.util.Vector<java.lang.String> installedPackages()

      Access to all packages installed in the ZIP catalog. The vector contains the ID of all packages
      Returns:
        Vector of String

    - #### 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.lib.SchemaURIResolver getNextSchemaResolver()

      Description copied from interface: `DTSCascadeSchemaURIResolver`
      Return the next SchemaURIResolver.
      Specified by:
        `getNextSchemaResolver` in interface `DTSCascadeSchemaURIResolver`
      Returns:
        the next schema resolver

    - #### setNextResolver

          public void setNextResolver(javax.xml.transform.URIResolver newNextResolver)

      Description copied from interface: `DTSCascadeURIResolver`
      Sets the next resolver to the resolver specified in the parameter.
      Specified by:
        `setNextResolver` in interface `DTSCascadeURIResolver`
      Parameters:
        `newNextResolver` - the new next resolver

    - #### setNextResolver

          public void setNextResolver(net.sf.saxon.lib.SchemaURIResolver newNextResolver)

      Description copied from interface: `DTSCascadeSchemaURIResolver`
      Establish the next SchemaURIResolver. It is recommended the new class implements also URIResolver
      Specified by:
        `setNextResolver` in interface `DTSCascadeSchemaURIResolver`
      Parameters:
        `newNextResolver` - the new next resolver

    - #### getVersion

          public static int getVersion(java.lang.String packageID)

      Returns the version of a package already installed in the local catalog. Requires the package ID.
      Parameters:
        `packageID` - the ID of the package to obtain the version
      Returns:
        integer with version value. Default value is 1 if it does not exists. returns 0 if the package is not installed

    - #### resolveEntity

          public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                              java.lang.String systemId)
                                                throws org.xml.sax.SAXException,
                                                       java.io.IOException

      Specified by:
        `resolveEntity` in interface `org.xml.sax.EntityResolver`
      Throws:
        `org.xml.sax.SAXException`
        `java.io.IOException`

    - #### setConfiguration

          public void setConfiguration(net.sf.saxon.Configuration config)

      Specified by:
        `setConfiguration` in interface `net.sf.saxon.lib.SchemaURIResolver`

    - #### 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.lib.SchemaURIResolver`
      Throws:
        `net.sf.saxon.trans.XPathException`

    - #### installedPackagesIDs

          public static java.util.HashSet<java.lang.String> installedPackagesIDs()

      Returns a HashSet with the content of the id attribute in the xbrlCacheInfo.properties of all loaded packages.
      Returns:
        HashSet of Strings
      Since:
        2.8.1