ZIP and JAR files as collections

If the collection URI identifies a ZIP or JAR file then it is processed in exactly the same way as a directory. URI query parameters can be used in the same way, and have much the same effect.

A URI is recognized as a ZIP or JAR file URI if any of the following conditions applies:

  • The standard collection finder is used and either (a) the URI uses the (non-standard) "jar" URI scheme, or (b) the collection URI ends with .zip, .jar, or .docx;
  • A custom collection finder is used and the method isJarfileURI(collectionURI) returns true;
  • A regular expression is supplied as the value of the configuration property ZIP_URI_PATTERN, and the collection URI matches this regular expression.

The value of the recurse option is ignored in this case, and recurse=yes is assumed.

The option metadata=yes is available for ZIP-based collections as well as for directory-based collections. The set of properties returned in the resulting map is slightly different, for example it includes any comment field associated with the ZIP file entry. Note that no items are returned in respect of directory nodes within the ZIP file; only leaf nodes are represented.