|  | # Cheshire3 Objects: Document Group (OBSELETE)

## Description

DocumentGroups are now obselete, having been replaced by DocumentFactories. The documentation is maintained for posterity (and possibly for those who still use it under the "if it ain't broke, don't fix it!" idiom)

One or more Documents may be present in a DocumentGroup. This allows for users to upload a zip file of several documents and the system can process everything from there. Equally, a DocumentGroup might just be a single flat text file, an SQL database dump, or a search on a remote system.

## Implementations

- documentGroup.StringDocumentGroup
  Given a string, find XML documents in it.
- documentGroup.DirectoryDocumentGroup
  Given the path to a directory, crawl it looking for files which contain documents of a known type.
- documentGroup.FileDocumentGroup
  Given the path to a file, find XML documents in it and read them into memory.
- documentGroup.BigFileDocumentGroup
  Given the path to a file, find XML documents in it, but only retrieve them on request.
- documentGroup.TarDocumentGroup
  Given the data which makes up a tar file, extract the files from it as Documents.
- documentGroup.TarFileDocumentGroup
  Given a path to a tar file, extract the files from it as Documents.
- documentGroup.ZipDocumentGroup
  Given the data which makes up a zip file, extract the files from it as Documents.
- documentGroup.ZipFileDocumentGroup
  Given a path to a zip file, extract the files from it as Documents.
- documentGroup.ClusterFileDocumentGroup
  Given the path to a raw cluster data file, merge and create documents.
- documentGroup.MarcFileDocumentGroup
  Given the path to a file containing MARC records, extract them.
- documentGroup.BigMarcFileDocumentGroup
  Given the path to a file containing MARC records, locate them, but only read into memory as requested.
- documentGroup.Z3950SearchDocumentGroup
  Given a tuple of (Zoom Connection, Zoom Query), perform the search and then map the results to Documents.
- documentGroup.SRWSearchDocumentGroup
  Given a tuple of (URL, {args}) turn the arguments (ala SRU) into an SRW request, perform it, and map the results to Documents.
- documentGroup.OAIHarvestDocumentGroup
  Given a tuple of (URL, {args}) turn the arguments into the parameters for OAI, and harvest the records from the URL, mapping them to Documents.
- documentGroup.GoogleSearchDocumentGroup
  Given a Google query, use the Google SOAP interface to search, fetch the actual files matched and map them to documents.

## API

Function | Parameters | Returns | Description
--- | --- | --- | ---
__init__ | data |  | The constructer takes the data which should be used to construct the documentGroup from. This is implementation dependant.
get_document | session, index | Document | Return the index'th document in the group
get_length | session | integer | Return the number of documents in the group