Skip to content
Snippets Groups Projects
Commit bad9d34a authored by Thorsten Vitt's avatar Thorsten Vitt
Browse files

ZIP: Streaming mode is default

parent 0a84ca9e
No related branches found
No related tags found
No related merge requests found
......@@ -185,7 +185,7 @@ public Response getZIP(
@QueryParam("target") @Description("if query is used, the query target (metadata, fulltext or both)") @DefaultValue("both") final String target,
@QueryParam("start") @Description("for query: start at result no.") @DefaultValue("0") int start,
@QueryParam("stop") @Description("for query: max. number of results") @DefaultValue("65535") int stop,
@QueryParam("stream") @Description("if true, favor fast results over ideal rewriting") @DefaultValue("false") boolean stream,
@QueryParam("stream") @Description("if true, favor fast results over ideal rewriting") @DefaultValue("true") boolean stream,
@Description("Also access sandboxed data") @QueryParam("sandbox") final boolean sandbox,
@Context final Request request) throws MetadataParseFault,
ObjectNotFoundFault, IoFault, AuthFault,
......@@ -201,8 +201,7 @@ public Response getZIP(
zipResult.sid(sid);
if (query != null)
zipResult.initFromSearch(query, target, start, stop, filter);
if (stream)
zipResult.streaming(stream);
zipResult.streaming(stream);
return zipResult.createResponse().build();
}
......
......@@ -116,7 +116,7 @@ protected void walkAggregation(ObjectType aggregation, boolean again) {
private boolean includeMeta;
private StylesheetManager stylesheetManager;
private Optional<Transformation> transformation = Optional.absent();
private boolean streamingMode = false;
private boolean streamingMode = true;
public ZipResult streaming(final boolean streamingMode) {
this.streamingMode = streamingMode;
......@@ -206,7 +206,7 @@ public void write(final OutputStream output) throws IOException,
try {
final Iterable<ObjectType> rootObjects = getRootObjects();
logger.log(Level.INFO, MessageFormat.format(
"Starting ZIP export after {0}", stopwatch));
"Starting {1} ZIP export after {0}", stopwatch, streamingMode? "streaming" : "fully link rewriting"));
zip.setComment("# Exported from TextGrid -- www.textgrid.de");
mapping = new ImportMapping();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment