Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DARIAH-DE Aggregator Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DARIAH-DE
DARIAH-DE Aggregator Services
Commits
bad9d34a
Commit
bad9d34a
authored
7 years ago
by
Thorsten Vitt
Browse files
Options
Downloads
Patches
Plain Diff
ZIP: Streaming mode is default
parent
0a84ca9e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/info/textgrid/services/aggregator/REST.java
+2
-3
2 additions, 3 deletions
src/main/java/info/textgrid/services/aggregator/REST.java
src/main/java/info/textgrid/services/aggregator/zip/ZipResult.java
+2
-2
2 additions, 2 deletions
...java/info/textgrid/services/aggregator/zip/ZipResult.java
with
4 additions
and
5 deletions
src/main/java/info/textgrid/services/aggregator/REST.java
+
2
−
3
View file @
bad9d34a
...
...
@@ -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
(
"
fals
e"
)
boolean
stream
,
@QueryParam
(
"stream"
)
@Description
(
"if true, favor fast results over ideal rewriting"
)
@DefaultValue
(
"
tru
e"
)
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
();
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/info/textgrid/services/aggregator/zip/ZipResult.java
+
2
−
2
View file @
bad9d34a
...
...
@@ -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
=
fals
e
;
private
boolean
streamingMode
=
tru
e
;
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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment