Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
corpus-web-services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lange, Dr. Herbert
corpus-web-services
Commits
83c19e1e
Commit
83c19e1e
authored
2 years ago
by
Lange, Dr. Herbert
Browse files
Options
Downloads
Patches
Plain Diff
include token in temp report name
parent
bd9850c0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/de/uni_hamburg/corpora/server/CorpusChecker.java
+7
-3
7 additions, 3 deletions
...ain/java/de/uni_hamburg/corpora/server/CorpusChecker.java
src/main/java/de/uni_hamburg/corpora/server/Report.java
+4
-2
4 additions, 2 deletions
src/main/java/de/uni_hamburg/corpora/server/Report.java
with
11 additions
and
5 deletions
src/main/java/de/uni_hamburg/corpora/server/CorpusChecker.java
+
7
−
3
View file @
83c19e1e
...
@@ -61,8 +61,13 @@ class CorpusThread extends Thread {
...
@@ -61,8 +61,13 @@ class CorpusThread extends Thread {
this
.
inFile
=
infile
;
this
.
inFile
=
infile
;
this
.
functionNames
=
functions
;
this
.
functionNames
=
functions
;
this
.
props
=
properties
;
this
.
props
=
properties
;
if
(
outfile
.
equals
(
"tmp"
))
if
(
outfile
.
equals
(
"tmp"
))
{
this
.
outFile
=
this
.
inFile
+
"/report.html"
;
File
tmpDir
=
new
File
(
System
.
getProperty
(
"java.io.tmpdir"
)
+
"/"
+
token
);
// Create parent directory if it is missing
if
(!
tmpDir
.
exists
())
tmpDir
.
mkdirs
();
this
.
outFile
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
"/"
+
token
+
"/report.html"
;
}
else
else
this
.
outFile
=
outfile
;
this
.
outFile
=
outfile
;
this
.
token
=
token
;
this
.
token
=
token
;
...
@@ -77,7 +82,6 @@ class CorpusThread extends Thread {
...
@@ -77,7 +82,6 @@ class CorpusThread extends Thread {
CorpusIO
cio
=
new
CorpusIO
();
CorpusIO
cio
=
new
CorpusIO
();
report
.
addNote
(
"CorpusWebServices"
,
"Starting run at "
+
report
.
addNote
(
"CorpusWebServices"
,
"Starting run at "
+
DateTimeFormatter
.
ofPattern
(
"yyyy/MM/dd HH:mm:ss"
).
format
(
LocalDateTime
.
now
()));
DateTimeFormatter
.
ofPattern
(
"yyyy/MM/dd HH:mm:ss"
).
format
(
LocalDateTime
.
now
()));
try
{
try
{
// Create corpus from given input file/folder
// Create corpus from given input file/folder
Corpus
corpus
;
Corpus
corpus
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/de/uni_hamburg/corpora/server/Report.java
+
4
−
2
View file @
83c19e1e
...
@@ -2,6 +2,7 @@ package de.uni_hamburg.corpora.server;
...
@@ -2,6 +2,7 @@ package de.uni_hamburg.corpora.server;
import
jakarta.ws.rs.GET
;
import
jakarta.ws.rs.GET
;
import
jakarta.ws.rs.Path
;
import
jakarta.ws.rs.Path
;
import
jakarta.ws.rs.QueryParam
;
import
jakarta.ws.rs.core.Response
;
import
jakarta.ws.rs.core.Response
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -27,8 +28,9 @@ public class Report {
...
@@ -27,8 +28,9 @@ public class Report {
* @return Response containing the file or an error code
* @return Response containing the file or an error code
*/
*/
@GET
@GET
public
Response
getReport
()
{
public
Response
getReport
(
@QueryParam
(
"token"
)
String
token
)
{
String
reportFileName
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
"/corpus-files/report.html"
;
// TODO place report somewhere else because files should be deleted after check
String
reportFileName
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
"/"
+
token
+
"/report.html"
;
logger
.
info
(
"Loading report file "
+
reportFileName
);
logger
.
info
(
"Loading report file "
+
reportFileName
);
File
reportFile
=
new
File
(
reportFileName
);
File
reportFile
=
new
File
(
reportFileName
);
if
(!
reportFile
.
exists
())
{
if
(!
reportFile
.
exists
())
{
...
...
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