com.ihr.xbrl.om

## Class RSRemoteCatalogResolver

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

- All Implemented Interfaces:
    DTSCascadeURIResolver, javax.xml.transform.URIResolver

      public class RSRemoteCatalogResolver
      extends java.lang.Object
      implements DTSCascadeURIResolver

  This new resolver is inserted to allow for dynamic installation of taxonomy catalogs. The idea is that if a file is not in the ZIP Catalog and not in the XML Catalog this resolver will try to obtain a reference of the target file. The file is not locally installed so it will be required to go throw the Internet or open a file connection. In case of using the Internet, this class can capture the request and do further work: 1. Can inform Reporting Standard about the existence of a new taxonomy and we can add it to the local (zip) catalog (optional feature) 2. Can investigate the content of the dynamic catalog and let the user install the taxonomy to work "offline" if the taxonomy already exist there 3. Can request Reporting Standard to install the taxonomy and made it available through the dynamic catalog in a future edition The dynamic catalog content must be a static file located at a fixed URL.
  Author:
    Ignacio

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RSRemoteCatalogResolver.CatalogFormat` The Enum CatalogFormat.
    `static class` | `RSRemoteCatalogResolver.StaticCatalogEntry` This is the object model representation of an entry in the static catalog.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `IGNOREALLREQUESTS` If this property is set to "true" this catalog will be disabled and no requests about the StaticCatalog file will be ever sent.
    `static java.lang.String` | `SYNCHRONIZEREMOTECATALOG` The synchronizeremotecatalog.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RSRemoteCatalogResolver(RSRemoteCatalogGUI theGUI, javax.xml.transform.URIResolver nextResolver)` Creates an instance of this resolver and sets the resolver passed in as the next resolver to be used Also, sets the instance of the class that will implement all dialogs with the end user in order to interact and ask questions and obtain feedback.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.Collection<RSRemoteCatalogResolver.StaticCatalogEntry>` | `getEntries()` Gets the entries.
    `static RSRemoteCatalogResolver.StaticCatalogEntry` | `getEntry(java.lang.String id)` Gets the entry.
    `static java.util.Date` | `getFileLastTimeUpdated()` Gets the file last time updated.
    `javax.xml.transform.URIResolver` | `getNextResolver()` The next resolved in the cascade. null means this is the last resolver
    `static boolean` | `getSynchronizeRemoteCatalog()` Gets the synchronize remote catalog.
    `static java.lang.Object` | `getVersion(java.lang.String packageID)` Access to the version number of a package in the remote catalog returns the version number or 0 if it does not exists.
    `static void` | `installEntry(java.lang.String id, InstallCallBack gui)` Install entry.
    `static void` | `processNewFile(InstallCallBack installCallback)` Process new file.
    `static void` | `removeIgnoreMessages()` Removes the ignore messages.
    `javax.xml.transform.Source` | `resolve(java.lang.String href, java.lang.String base)`
    `void` | `setNextResolver(javax.xml.transform.URIResolver newNextResolver)` Sets the next resolver to the resolver specified in the parameter.
    `static boolean` | `setSynchronizeRemoteCatalog(boolean newValue)` Sets the synchronize remote catalog.
    `static void` | `updateRemoteCatalog()` Update remote catalog.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### IGNOREALLREQUESTS

          public static java.lang.String IGNOREALLREQUESTS

      If this property is set to "true" this catalog will be disabled and no requests about the StaticCatalog file will be ever sent. The default value for this property is "false"

    - #### SYNCHRONIZEREMOTECATALOG

          public static java.lang.String SYNCHRONIZEREMOTECATALOG

      The synchronizeremotecatalog.

  - ### Constructor Detail

    - #### RSRemoteCatalogResolver

          public RSRemoteCatalogResolver(RSRemoteCatalogGUI theGUI,
                                 javax.xml.transform.URIResolver nextResolver)

      Creates an instance of this resolver and sets the resolver passed in as the next resolver to be used

      Also, sets the instance of the class that will implement all dialogs with the end user in order to interact and ask questions and obtain feedback.

      Parameters:
        `theGUI` - the the gui
        `nextResolver` - the next resolver

  - ### Method Detail

    - #### getVersion

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

      Access to the version number of a package in the remote catalog returns the version number or 0 if it does not exists.
      Parameters:
        `packageID` - the package id
      Returns:
        version number as integer

    - #### installEntry

          public static void installEntry(java.lang.String id,
                          InstallCallBack gui)

      Install entry.
      Parameters:
        `id` - the id
        `gui` - the gui

    - #### getEntries

          public static java.util.Collection<RSRemoteCatalogResolver.StaticCatalogEntry> getEntries()

      Gets the entries.
      Returns:
        the entries

    - #### getFileLastTimeUpdated

          public static java.util.Date getFileLastTimeUpdated()

      Gets the file last time updated.
      Returns:
        the file last time updated

    - #### removeIgnoreMessages

          public static void removeIgnoreMessages()

      Removes the ignore messages.

    - #### getSynchronizeRemoteCatalog

          public static boolean getSynchronizeRemoteCatalog()

      Gets the synchronize remote catalog.
      Returns:
        the synchronize remote catalog

    - #### setSynchronizeRemoteCatalog

          public static boolean setSynchronizeRemoteCatalog(boolean newValue)

      Sets the synchronize remote catalog.
      Parameters:
        `newValue` - the new value
      Returns:
        true, if successful

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

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

    - #### updateRemoteCatalog

          public static void updateRemoteCatalog()
                                          throws java.io.IOException

      Update remote catalog.
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### processNewFile

          public static void processNewFile(InstallCallBack installCallback)

      Process new file.
      Parameters:
        `installCallback` - the install callback

    - #### getEntry

          public static RSRemoteCatalogResolver.StaticCatalogEntry getEntry(java.lang.String id)

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