com.ihr.xbrl.om

## Class ZipCascadeURIResolver.ZipPackage

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

- Enclosing class:
    ZipCascadeURIResolver

      public static class ZipCascadeURIResolver.ZipPackage
      extends java.lang.Object

  Handles extraction of Source from a document inside the ZIP file.
  Author:
    Ignacio

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ZipCascadeURIResolver.ZipPackage.CaseType` The Enum CaseType.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZipCascadeURIResolver.ZipPackage(java.io.File soureConfFile, java.lang.String nameInNode, java.lang.String idInNode, java.net.URI basePath, java.io.File zFile, java.lang.String path, java.lang.String caseType, boolean bInNode)` Instantiates a new zip package.
    `ZipCascadeURIResolver.ZipPackage(java.io.File soureConfFile, java.lang.String nameInNode, java.lang.String idInNode, java.net.URI basePath, java.util.zip.ZipFile zFile, java.lang.String path, java.lang.String caseType, boolean bInNode)` Instantiates a new zip package.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `java.net.URI` | `getBase()` Gets the base.
    `java.lang.String` | `getCase()` Gets the case.
    `java.lang.String` | `getId()` Gets the id.
    `java.lang.String` | `getName()` Gets the name.
    `ZipCascadeURIResolver.ZipPackage` | `getNext()` Unused feature.
    `java.lang.String` | `getPath()` Gets the path.
    `java.util.Properties` | `getProperties()` Reads the content of the xbrlCacheInfo.properties file and returns the properties inside
    `java.io.File` | `getSourceConfFile()` Gets the source conf file.
    `int` | `getVersion()` Obtains the version numbre of this package.
    `java.lang.String` | `getZipFile()` Gets the zip file.
    `int` | `hashCode()`
    `boolean` | `isBaseExplicit()` Checks if is base explicit.
    `boolean` | `isEnabled()` Unused feature.
    `boolean` | `isHidden()` Unused feature.
    `boolean` | `isIdExplicit()` Checks if is id explicit.
    `boolean` | `isInNode()` Checks if is in node.
    `boolean` | `isNameExplicit()` Checks if is name explicit.
    `javax.xml.transform.Source` | `resolve(java.lang.String fileName)` Resolve.
    `void` | `setBasePath(java.net.URI basePath)` Sets the uriStartString of this ZipPackage.
    `void` | `setCaseType(ZipCascadeURIResolver.ZipPackage.CaseType caseType)` Sets the case type.
    `boolean` | `wasSimplified()` Was simplified.

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

      `getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ZipCascadeURIResolver.ZipPackage

          public ZipCascadeURIResolver.ZipPackage(java.io.File soureConfFile,
                                          java.lang.String nameInNode,
                                          java.lang.String idInNode,
                                          java.net.URI basePath,
                                          java.io.File zFile,
                                          java.lang.String path,
                                          java.lang.String caseType,
                                          boolean bInNode)
                                           throws java.util.zip.ZipException,
                                                  java.io.IOException,
                                                  java.net.URISyntaxException

      Instantiates a new zip package.
      Parameters:
        `soureConfFile` - the soure conf file
        `nameInNode` - the name in node
        `idInNode` - the id in node
        `basePath` - the base path
        `zFile` - the z file
        `path` - the path
        `caseType` - the case type
        `bInNode` - the b in node
      Throws:
        `java.util.zip.ZipException` - the zip exception
        `java.io.IOException` - Signals that an I/O exception has occurred.
        `java.net.URISyntaxException` - the URI syntax exception

    - #### ZipCascadeURIResolver.ZipPackage

          public ZipCascadeURIResolver.ZipPackage(java.io.File soureConfFile,
                                          java.lang.String nameInNode,
                                          java.lang.String idInNode,
                                          java.net.URI basePath,
                                          java.util.zip.ZipFile zFile,
                                          java.lang.String path,
                                          java.lang.String caseType,
                                          boolean bInNode)
                                           throws java.util.zip.ZipException,
                                                  java.io.IOException,
                                                  java.net.URISyntaxException

      Instantiates a new zip package.
      Parameters:
        `soureConfFile` - the soure conf file
        `nameInNode` - the name in node
        `idInNode` - the id in node
        `basePath` - the base path
        `zFile` - the z file
        `path` - the path
        `caseType` - the case type
        `bInNode` - the b in node
      Throws:
        `java.util.zip.ZipException` - the zip exception
        `java.io.IOException` - Signals that an I/O exception has occurred.
        `java.net.URISyntaxException` - the URI syntax exception

  - ### Method Detail

    - #### getSourceConfFile

          public java.io.File getSourceConfFile()

      Gets the source conf file.
      Returns:
        the sourceConfFile

    - #### getId

          public java.lang.String getId()

      Gets the id.
      Returns:
        the id

    - #### getName

          public java.lang.String getName()

      Gets the name.
      Returns:
        the name

    - #### getVersion

          public int getVersion()

      Obtains the version numbre of this package. Versions are 1 by default
      Returns:
        the version

    - #### setBasePath

          public void setBasePath(java.net.URI basePath)

      Sets the uriStartString of this ZipPackage. This must be set in order to allow the ZipPackage to be used.
      Parameters:
        `basePath` - the basePath to set

    - #### setCaseType

          public void setCaseType(ZipCascadeURIResolver.ZipPackage.CaseType caseType)

      Sets the case type.
      Parameters:
        `caseType` - the caseType to set

    - #### getZipFile

          public java.lang.String getZipFile()

      Gets the zip file.
      Returns:
        the zip file

    - #### getBase

          public java.net.URI getBase()

      Gets the base.
      Returns:
        the base

    - #### isBaseExplicit

          public boolean isBaseExplicit()

      Checks if is base explicit.
      Returns:
        true, if is base explicit

    - #### isNameExplicit

          public boolean isNameExplicit()

      Checks if is name explicit.
      Returns:
        the bNameExplicit

    - #### getCase

          public java.lang.String getCase()

      Gets the case.
      Returns:
        the case

    - #### getPath

          public java.lang.String getPath()

      Gets the path.
      Returns:
        the path

    - #### resolve

          public javax.xml.transform.Source resolve(java.lang.String fileName)

      Resolve.
      Parameters:
        `fileName` - the file name
      Returns:
        the source

    - #### getProperties

          public java.util.Properties getProperties()

      Reads the content of the xbrlCacheInfo.properties file and returns the properties inside
      Returns:
        Properties instance from file

    - #### getNext

          public ZipCascadeURIResolver.ZipPackage getNext()
                                                   throws java.util.zip.ZipException,
                                                          java.io.IOException,
                                                          java.net.URISyntaxException

      Unused feature. In case the properties file points to another file, this method creates the next entry otherwise it returns null. TODO: The GUI part of this does not represents entries that are not in the file. This shall be changed in order to allow the GUI to use the information from the resolvers instead. More information may be needed in this structure in order to properly serialize back the same information and avoid duplicate information between the entries in the ZIP files as nested properties files pointed from the root properties file and the entries in the XML files. Note, an entry in the XML file overrides the same entry in the properties file. It shall be required to detect when a node in the XML file is already referenced from (and is a substitute of) an existing node in the zip file... this requires more thinking... and the feature is not so important because current implementation works fine. In conclusion, don't use the next feature!
      Returns:
        next ZipPackage or null
      Throws:
        `java.util.zip.ZipException` - the zip exception
        `java.io.IOException` - Signals that an I/O exception has occurred.
        `java.net.URISyntaxException` - the URI syntax exception

    - #### isHidden

          public boolean isHidden()

      Unused feature. Hidden entries shall not be displayed in the GUI but they shall be used by the processor to locate files in the DTS. Can be set using a property called "hidden" in the properties file.
      Returns:
        boolean true or false. Default value is false.

    - #### isEnabled

          public boolean isEnabled()

      Unused feature. Enabled entries will be used by the processor. Disabled entries will not be used by the XBRL processor to locate files in the DTS. Can be set using a property called "enabled" in the properties file.
      Returns:
        boolean true or false. Default valie is true.

    - #### isInNode

          public boolean isInNode()

      Checks if is in node.
      Returns:
        true, if is in node

    - #### isIdExplicit

          public boolean isIdExplicit()

      Checks if is id explicit.
      Returns:
        true, if is id explicit

    - #### wasSimplified

          public boolean wasSimplified()

      Was simplified.
      Returns:
        true, if successful

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`