Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
postprocessing
Media Converter
Commits
b2406864
Unverified
Commit
b2406864
authored
Jan 04, 2021
by
Sebastian Schüpbach
Browse files
use uri as id for reports
parent
f6c41952
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/scala/ch/memobase/App.scala
View file @
b2406864
...
@@ -66,7 +66,8 @@ object App extends scala.App with Logging with RecordUtils {
...
@@ -66,7 +66,8 @@ object App extends scala.App with Logging with RecordUtils {
val
headers
=
record
.
headers
()
val
headers
=
record
.
headers
()
val
recordSetId
=
Try
(
headers
.
lastHeader
(
"recordSetId"
).
value
()).
getOrElse
(
Array
())
val
recordSetId
=
Try
(
headers
.
lastHeader
(
"recordSetId"
).
value
()).
getOrElse
(
Array
())
val
institutionId
=
Try
(
headers
.
lastHeader
(
"institutionId"
).
value
()).
getOrElse
(
Array
())
val
institutionId
=
Try
(
headers
.
lastHeader
(
"institutionId"
).
value
()).
getOrElse
(
Array
())
val
reportingObject
=
recordProcessor
.
process
(
record
).
foldLeft
(
ReportingObject
(
record
.
key
()))((
reportingObject
,
outcome
)
=>
outcome
match
{
val
reportingObject
=
recordProcessor
.
process
(
record
).
foldLeft
(
ReportingObject
(
s
"https://memobase.ch/record/${record.key()}"
))((
reportingObject
,
outcome
)
=>
outcome
match
{
case
ProcessSuccess
(
id
,
resource
,
msg
)
=>
case
ProcessSuccess
(
id
,
resource
,
msg
)
=>
logger
.
info
(
s
"$id: $msg"
)
logger
.
info
(
s
"$id: $msg"
)
ReportingObject
.
addResourceOutcome
(
reportingObject
,
(
resource
,
msg
),
ProcessingSuccess
)
ReportingObject
.
addResourceOutcome
(
reportingObject
,
(
resource
,
msg
),
ProcessingSuccess
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment