Unverified Commit 77e678cd authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

remove memobase prefix from reports' id


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent d4e87eb1
Pipeline #20948 passed with stages
in 5 minutes and 35 seconds
......@@ -94,9 +94,9 @@ class KafkaTopology extends Logging {
stream
.map((k, v) =>
(
uri(k),
k,
ReportingObject(
uri(k),
k,
ProcessingWarning,
v.get.warnings.mkString("\n")
).toString
......@@ -111,9 +111,9 @@ class KafkaTopology extends Logging {
stream
.map((k, _) =>
(
uri(k),
k,
ReportingObject(
uri(k),
k,
ProcessingSuccess,
"IIIF manifest successfully created"
).toString
......@@ -128,9 +128,9 @@ class KafkaTopology extends Logging {
stream
.map((k, v) =>
(
uri(k),
k,
ReportingObject(
uri(k),
k,
ProcessingFatal,
s"Error creating manifest: ${v.failed.get.getMessage}"
).toString
......@@ -146,9 +146,9 @@ class KafkaTopology extends Logging {
stream
.map((k, _) =>
(
uri(k),
k,
ReportingObject(
uri(k),
k,
ProcessingIgnore,
message
).toString
......@@ -156,5 +156,4 @@ class KafkaTopology extends Logging {
)
.to(topicReport)
private val uri: String => String = id => s"https://memobase.ch/record/$id"
}
......@@ -20,17 +20,8 @@ package ch.memobase
import de.digitalcollections.iiif.model.enums.ViewingHint
import de.digitalcollections.iiif.model.jackson.IiifObjectMapper
import de.digitalcollections.iiif.model.sharedcanvas.{
Canvas => IIIFCanvas,
Manifest => IIIFManifest,
Sequence => IIIFSequence
}
import de.digitalcollections.iiif.model.{
MetadataEntry,
OtherContent,
PropertyValue,
ImageContent => IIIFImageContent
}
import de.digitalcollections.iiif.model.sharedcanvas.{Canvas => IIIFCanvas, Manifest => IIIFManifest, Sequence => IIIFSequence}
import de.digitalcollections.iiif.model.{MetadataEntry, OtherContent, PropertyValue, ImageContent => IIIFImageContent}
import ujson.{Arr => JArr, Obj => JObj}
import java.time.format.DateTimeFormatter
......@@ -219,8 +210,8 @@ class Manifest {
private lazy val untilYear = "^(\\?/\\d{4})$".r
private lazy val fromYear = "^(\\d{4}/\\?)$".r
private def parseTimestamp(date: => LocalDate): DateExtractionResult = {
Try(date) match {
private def parseTimestamp(parseDate: => LocalDate): DateExtractionResult = {
Try(parseDate) match {
case Success(v) => DateExtractionResult(Some(v))
case Failure(ex) =>
DateExtractionResult(None, warnings = Some(ex.getMessage))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment