Class CollectionArchiveResource

java.lang.Object
io.goobi.viewer.api.rest.v1.collections.CollectionArchiveResource

@Path("/collections/{field}/{collection}/archive") public class CollectionArchiveResource extends Object
REST resource exposing the pre-generated per-collection BagIt archive for download. Both endpoints are restricted to logged-in users (or a valid bearer token) via UserLoggedInBinding. The bag's payload is filtered at generation time against anonymous access rights — per file for images/ALTO/plaintext and per whole record for the METS/LIDO source and TEI — so restricted pages and works are excluded from the archive (see CollectionArchiveService). Access is not, and cannot be, re-checked per downloading user at this endpoint, which is why only anonymously-accessible content is ever packed.
  • Constructor Details

  • Method Details

    • getArchiveInfo

      @GET @Produces("application/json") public Map<String,Object> getArchiveInfo() throws IOException
      Returns:
      metadata about the collection's archive (whether one exists, its size, record count and download URL)
      Throws:
      IOException - on filesystem error
    • downloadArchive

      @GET @Path("/download") public Response downloadArchive() throws IOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException
      Streams the collection's pre-generated BagIt archive as a ZIP download.
      Returns:
      a streaming ZIP response
      Throws:
      IOException - on filesystem error
      de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException - if no archive exists for the collection