com.ihr.xbrl.om

## Class TaxonomyPackageURIResolver

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

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

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

  This URI Resolver implements the Taxonomy Package 1.0 - Public Working Draft 15 January 2014
  Author:
    Ignacio
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TaxonomyPackageURIResolver.EntryPointHRefs` The Class EntryPointHRefs.
    `static class` | `TaxonomyPackageURIResolver.EntryPointLangInfo` Represents an entry point in a taxonomy package.
    `static class` | `TaxonomyPackageURIResolver.EntryPointLangInfoKey` The Class EntryPointLangInfoKey.
    `static class` | `TaxonomyPackageURIResolver.PackageByLangInfo` Holds all elements that may contain different values by language.
    `static class` | `TaxonomyPackageURIResolver.TaxonomyPackage` Represents a package (zip file) that contains a set of entry points and mapping rules as indicated in the Taxonomy Packages Specification(s) .

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `mandatoryFileName` The Constant mandatoryFileName.
    `static java.lang.String` | `namespace` from the multiple namespaces recognized, this will point to the last one implemented.
    `static java.lang.String` | `schemaURL` from the multiple schema versions recognized, this will point to the last one implemented.
    `static javax.xml.namespace.QName` | `taxonomyPackage` This is the taxonomyPackage element declaration using the last implemented namespace.
    `static java.lang.String` | `tpNamespace_Corefiling` The Constant tpNamespace_Corefiling.
    `static java.lang.String` | `tpNamespace_PWD_20140115` The Constant tpNamespace_PWD_20140115.
    `static java.lang.String` | `tpNamespace_PWD_20150114` The Constant tpNamespace_PWD_20150114.
    `static java.lang.String` | `tpURL_PWD_20140115` The Constant tpURL_PWD_20140115.
    `static java.lang.String` | `typicalDirectoryOfPackages` The Constant typicalDirectoryOfPackages.

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `checkInstalled(RSRemoteCatalogResolver.StaticCatalogEntry sce)` Check installed.
    `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 TaxonomyPackageURIResolver.TaxonomyPackage` | `getPackage(java.io.File zipFile)` Gets the package.
    `static java.util.Collection<TaxonomyPackageURIResolver.TaxonomyPackage>` | `getPackages(java.io.File fDirectory)` Read all packages in a directory.
    `static RSRemoteCatalogResolver.StaticCatalogEntry` | `getStaticCatalogEntry(TaxonomyPackageURIResolver.TaxonomyPackage tp)` Gets the static catalog entry.
    `static java.lang.String` | `getVersion(java.lang.String id)` Gets the version.
    `static java.util.HashSet<java.lang.String>` | `installedPackagesIDs()` Installed packages i ds.
    `static void` | `removePackage(java.lang.String id)` 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

    - #### typicalDirectoryOfPackages

          public static final java.lang.String typicalDirectoryOfPackages

      The Constant typicalDirectoryOfPackages.
      See Also:
        Constant Field Values

    - #### tpNamespace_Corefiling

          public static final java.lang.String tpNamespace_Corefiling

      The Constant tpNamespace_Corefiling.
      See Also:
        Constant Field Values

    - #### tpNamespace_PWD_20140115

          public static final java.lang.String tpNamespace_PWD_20140115

      The Constant tpNamespace_PWD_20140115.
      See Also:
        Constant Field Values

    - #### tpNamespace_PWD_20150114

          public static final java.lang.String tpNamespace_PWD_20150114

      The Constant tpNamespace_PWD_20150114.
      See Also:
        Constant Field Values

    - #### tpURL_PWD_20140115

          public static final java.lang.String tpURL_PWD_20140115

      The Constant tpURL_PWD_20140115.
      See Also:
        Constant Field Values

    - #### namespace

          public static final java.lang.String namespace

      from the multiple namespaces recognized, this will point to the last one implemented.
      See Also:
        Constant Field Values

    - #### schemaURL

          public static final java.lang.String schemaURL

      from the multiple schema versions recognized, this will point to the last one implemented.
      See Also:
        Constant Field Values

    - #### taxonomyPackage

          public static final javax.xml.namespace.QName taxonomyPackage

      This is the taxonomyPackage element declaration using the last implemented namespace. It is used to serialize new files

    - #### mandatoryFileName

          public static final java.lang.String mandatoryFileName

      The Constant mandatoryFileName.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TaxonomyPackageURIResolver

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

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

    - #### TaxonomyPackageURIResolver

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

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

  - ### Method Detail

    - #### getPackages

          public static java.util.Collection<TaxonomyPackageURIResolver.TaxonomyPackage> getPackages(java.io.File fDirectory)

      Read all packages in a directory. New packages will be added to the catalog. Removed packages are not removed from the loaded packages.
      Parameters:
        `fDirectory` - the f directory
      Returns:
        Collection of TaxonomyPackage instances

    - #### getPackage

          public static TaxonomyPackageURIResolver.TaxonomyPackage getPackage(java.io.File zipFile)

      Gets the package.
      Parameters:
        `zipFile` - the zip file
      Returns:
        the package

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

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

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

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

    - #### installedPackagesIDs

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

      Installed packages i ds.
      Returns:
        the hash set

    - #### checkInstalled

          public static void checkInstalled(RSRemoteCatalogResolver.StaticCatalogEntry sce)

      Check installed.
      Parameters:
        `sce` - the sce

    - #### getStaticCatalogEntry

          public static RSRemoteCatalogResolver.StaticCatalogEntry getStaticCatalogEntry(TaxonomyPackageURIResolver.TaxonomyPackage tp)

      Gets the static catalog entry.
      Parameters:
        `tp` - the tp
      Returns:
        the static catalog entry

    - #### getVersion

          public static java.lang.String getVersion(java.lang.String id)

      Gets the version.
      Parameters:
        `id` - the id
      Returns:
        the version

    - #### removePackage

          public static void removePackage(java.lang.String id)

      Removes the package.
      Parameters:
        `id` - the id

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

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

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