value="The Aggregator is a service to export and convert TextGrid documents. It is able to recursively process collections, editions, and other TextGrid aggregations.")
@@ -63,18 +66,20 @@ public REST(final ITextGridRep repository) {
@Path("/teicorpus/{uris}")
@Produces("application/tei+xml")
@Descriptions({
@Description(target=DocTarget.METHOD,value="Creates a TEI corpus of all the TEI documents (recursively) aggregated by the given aggregation"),
@Description(target=DocTarget.RETURN,value="TEI corpus document")
})
publicResponsegetCorpus(@Description("TextGrid URIs of the root objects, separated by commas")@PathParam("uris")finalStringuriList,
@Description(target=DocTarget.METHOD,value="Creates a TEI corpus of all the TEI documents (recursively) aggregated by the given aggregation"),
@Description(target=DocTarget.RETURN,value="TEI corpus document")})
publicResponsegetCorpus(
@Description("TextGrid URIs of the root objects, separated by commas")@PathParam("uris")finalStringuriList,
@Description("Whether to generate a Content-Disposition: attachment header")@QueryParam("attach")@DefaultValue("true")finalbooleanattach,
@Description("If true, no intermediate TEI corpus documents will be generated for intermediate aggregations, hierarchical structure will be lost")@QueryParam("flat")@DefaultValue("false")finalbooleanflat,
@Description("Title for the container if multiple root objects are given")@QueryParam("title")finalStringtitleArgument,
@Description("Session id for accessing restricted resources")@QueryParam("sid")finalStringsid,
@@ -82,22 +87,22 @@ public Response getCorpus(@Description("TextGrid URIs of the root objects, separ
returnexporter.createResponse().build();
}
@GET
@Path(value="/epub/{object}")
@Produces(value="application/epub+zip")
@Description("Converts the given TEI object or the aggregation of TEI objects to an E-Book in EPUB format")
publicResponsegetEPUB(
@Description("The TextGrid URI(s) of the object(s) to convert, separated by commas. Should be either TEI objects or aggregations of TEI (and maybe other) objects")
@PathParam("object")finalStringuriList,
@Description("The TextGrid URI(s) of the object(s) to convert, separated by commas. Should be either TEI objects or aggregations of TEI (and maybe other) objects")@PathParam("object")finalStringuriList,
@Description("URL of an alternative stylesheet to use. Must be compatible.")@QueryParam("stylesheet")finalURIxsluri,
@Description("Title if multiple root objects given")@QueryParam("title")finalStringtitleParam,
@Description("Session ID for accessing protected objects")@QueryParam("sid")finalStringsid,
@Description(target=DocTarget.METHOD,value="Generates HTML output. This is typically fast, and it is also used at textgridrep.de.",title="HTML generator"),
@Description(target=DocTarget.RETURN,value="Either an XHTML document (expect HTML5 elements), or a XHTML fragment containing only the body, if the embedded parameter is true.")
})
publicResponsegetHTML(
@Description("The TextGrid URIs of the TEI document(s) or aggregation(s) to transform, separated by commas")@PathParam("object")finalStringuriList,
@Description("If given, an alternative XSLT stylesheet to use")@QueryParam("stylesheet")finalURIxsluri,
@Description("If true, check for an <?xsl-stylesheet?> processing instruction in the document to render")@QueryParam("pi")finalbooleanpi,
@Description("If given, an alternative XSLT stylesheet to use. Must be a textgrid URI.")@QueryParam("stylesheet")finalURIxsluri,
@Description("If true, check for an <?xsl-stylesheet?> processing instruction in the document to render. Only textgrid: URIs will be resolved.")@QueryParam("pi")finalbooleanpi,
@Description("If true and a stylesheet has been given, force reloading the stylesheet, do not cache")@QueryParam("refreshStylesheet")finalbooleanrefreshStylesheet,
@Description("Session ID to access protected resources")@QueryParam("sid")finalStringsid,
@Description("If true, pass the information the stylesheet that its result will be embedded into some website")@QueryParam("embedded")finalbooleanembedded,
@Description("If true, an HTML fragment consisting of a <div class='body'> element containing the contents of the HTML <body> will be returned, ready to be embedded in an existing HTML page")@QueryParam("embedded")finalbooleanembedded,
@Description("URL of the CSS that should be referenced in the HTML that is created")@QueryParam("css")finalURIcss,
@Description("The requested content type. E.g., text/html or text/xml")@QueryParam("mediatype")finalStringmediaType,
@Description("An XML ID. If given, only this element will be transformed.")@QueryParam("id")finalStringid,
@Description("If true, a full webpage that looks similar to textgridrep.de's browse view will be returned")@QueryParam("simulate")@DefaultValue("false")finalbooleansimulate,
@Description(target=DocTarget.METHOD,value="Creates a ZIP containing the specified objects and everything that has been aggregated by them, "
+"optionally transformed and filtered. Links within supported XML documents will be rewritten to relative URLs if the target document "
+"is also packed into this ZIP. This method may take quite a while depending on the number of objects, and it will not start "
+"returning something until the metadata for everything that will be exported has been collected, so increase your timeouts ..."),
@Description(target=DocTarget.RETURN,value="The ZIP file returned will usually contain a content document plus a sidecar .meta file for each "
+"exported object. The .meta file contains the raw metadata according to the TextGrid metadata schema. For aggregations (editions, "
+"collections), we will typically create both a directory and an ORE content file containing the list of items. "
+"Additionally, a file called /.INDEX.imex will be included in the archive. This file contains the list of exported objects "
+"together with the local filename, the name of the local .meta file, the link rewriting method used, and the original TextGrid URI. "
+"You can use this file to re-import the whole set of files using the TextGridLab. See the Link Rewriter Library's documentation "
+"for an XML schema and description of the format. \n\nThe ZIP file may contain ZIP comments refering to warning or informational "
+"messages during export.")
})
publicResponsegetZIP(
@Description("The TextGridURIs of the TEI documents or aggregations to zip, separated by commas (,)")
@PathParam("objects")finalStringuriList,
@Description("Session ID to access protected resources")
@QueryParam("sid")finalStringsid,
@Description("(optional) title for the exported data, currently only used for generating the filename. If none is given, the first title of the first object will be used.")
@Description("Pattern for the generated filenames in the ZIP files.")final
Stringfilenames,
@QueryParam("metanames")
@DefaultValue("{filename}.meta")
@Description("Pattern for the filenames for the metadata files in the ZIP files.")final
Stringmetanames,
@QueryParam("dirnames")
@DefaultValue("{parent|/}{title}*")
@Description("Pattern for the directory names generated for aggregations etc. This pattern applied to the parent aggregation is available as {parent} in filenames and metanames.")final
Stringdirnames,
@QueryParam("only")
@Description("Restrict export to objects with the given MIME types")
finalList<String>only,
@QueryParam("meta")
@Description("Export metadata and aggregation files")
@Description("The TextGridURIs of the TEI documents or aggregations to zip, separated by commas (,)")@PathParam("objects")finalStringuriList,
@Description("Session ID to access protected resources")@QueryParam("sid")finalStringsid,
@Description("(optional) title for the exported data, currently only used for generating the filename. If none is given, the first title of the first object will be used.")@QueryParam("title")finalStringtitle,
@QueryParam("filenames")@DefaultValue("{parent|/}{author}-{title}*.{ext}")@Description("Pattern for the generated filenames in the ZIP files.")finalStringfilenames,
@QueryParam("metanames")@DefaultValue("{filename}.meta")@Description("Pattern for the filenames for the metadata files in the ZIP files.")finalStringmetanames,
@QueryParam("dirnames")@DefaultValue("{parent|/}{title}*")@Description("Pattern for the directory names generated for aggregations etc. This pattern applied to the parent aggregation is available as {parent} in filenames and metanames.")finalStringdirnames,
@QueryParam("only")@Description("If at least one only parameter is given, restrict export to objects with the given MIME types")finalList<String>only,
@QueryParam("meta")@Description("Include metadata and aggregation files in the ZIP file.")@DefaultValue("true")finalbooleanmeta,
@QueryParam("transform")@Description("(EXPERIMENTAL) Transform each XML document before zipping. Values currently available are text, html, or the textgrid: URI of an XSLT stylesheet.")finalStringtransform,