Commit 7756ace7 authored by Günter Hipler's avatar Günter Hipler
Browse files

discussion with silvia after meeting with Europeana

parent 911d8d2e
Pipeline #24219 passed with stages
in 7 minutes and 14 seconds
...@@ -108,6 +108,8 @@ class EDM { ...@@ -108,6 +108,8 @@ class EDM {
cho.addDescription(Extractors.descriptiveNote(record)) cho.addDescription(Extractors.descriptiveNote(record))
cho.addCreationDate(Extractors.creationDate(graph)(record.obj)) cho.addCreationDate(Extractors.creationDate(graph)(record.obj))
//todo: nur name c._1 hächst wahrscheinlich weg!!!
//todo: q.f.S. creator and contributor together with role?? //todo: q.f.S. creator and contributor together with role??
Extractors Extractors
.resourceSourceOfRelationCreation(graph)(record.value)("creator") .resourceSourceOfRelationCreation(graph)(record.value)("creator")
......
...@@ -301,6 +301,7 @@ object Extractors { ...@@ -301,6 +301,7 @@ object Extractors {
val resourceGenres val resourceGenres
//todo: nur die Original Werte - keine rico:resultsFrom!
: JArr => mutable.LinkedHashMap[String, JValue] => List[String] = : JArr => mutable.LinkedHashMap[String, JValue] => List[String] =
graph => graph =>
record => record =>
...@@ -354,6 +355,9 @@ object Extractors { ...@@ -354,6 +355,9 @@ object Extractors {
.filter(_.obj.contains("hasCarrierType")) .filter(_.obj.contains("hasCarrierType"))
.flatMap((physicalObject: JValue) => .flatMap((physicalObject: JValue) =>
Extractors.getAllBlankNodeContent(graph)(physicalObject.obj)("hasCarrierType")) Extractors.getAllBlankNodeContent(graph)(physicalObject.obj)("hasCarrierType"))
//todo: nur die angerecherten Werte
// anstelle von name sameAs verwenden, sameAs existiert nur wen nes angereichert ist
// "andere" Variante: existiert rico:resultsFrom
.flatMap(objectWithCarrierType => stringValue(objectWithCarrierType.obj)("name")) .flatMap(objectWithCarrierType => stringValue(objectWithCarrierType.obj)("name"))
.toList .toList
...@@ -414,6 +418,7 @@ object Extractors { ...@@ -414,6 +418,7 @@ object Extractors {
} }
//todo: multiple property - abwarten Silvia macht!!!
val dcTermsSpatial val dcTermsSpatial
: JArr => mutable.LinkedHashMap[String, JValue] => List[String] = : JArr => mutable.LinkedHashMap[String, JValue] => List[String] =
graph => graph =>
......
This diff is collapsed.
...@@ -35,6 +35,8 @@ class AggregationSpec extends AnyFunSuite with Matchers { ...@@ -35,6 +35,8 @@ class AggregationSpec extends AnyFunSuite with Matchers {
private lazy val rawNoFoto = loadFile("src/test/resources/rico.duration.json") private lazy val rawNoFoto = loadFile("src/test/resources/rico.duration.json")
private lazy val rawEdmRights = loadFile("src/test/resources/rico.certainty.json") private lazy val rawEdmRights = loadFile("src/test/resources/rico.certainty.json")
private lazy val rawTestedmObject = loadFile("src/test/resources/apf-001-1280.json")
private def testAggregation = { private def testAggregation = {
...@@ -115,6 +117,8 @@ class AggregationSpec extends AnyFunSuite with Matchers { ...@@ -115,6 +117,8 @@ class AggregationSpec extends AnyFunSuite with Matchers {
test ("aggregation edm:object") { test ("aggregation edm:object") {
//todo: test it with: apf-001-1280
val aggFoto = createAgg(rawCertainty) val aggFoto = createAgg(rawCertainty)
assert(Utils.serializeRDFModel(aggFoto.getModel).contains( assert(Utils.serializeRDFModel(aggFoto.getModel).contains(
s"<edm:object>https://media.memobase.ch/memo/lmz-001--597216-1/master</edm:object>")) s"<edm:object>https://media.memobase.ch/memo/lmz-001--597216-1/master</edm:object>"))
...@@ -123,6 +127,10 @@ class AggregationSpec extends AnyFunSuite with Matchers { ...@@ -123,6 +127,10 @@ class AggregationSpec extends AnyFunSuite with Matchers {
assert(Utils.serializeRDFModel(aggNoFoto.getModel).contains( assert(Utils.serializeRDFModel(aggNoFoto.getModel).contains(
s"<edm:object>https://media.memobase.ch/memo/raf-001-2893-1-poster</edm:object>")) s"<edm:object>https://media.memobase.ch/memo/raf-001-2893-1-poster</edm:object>"))
//warum bekomme ich einen anderen Werz in der API
val errorCase = createAgg(rawTestedmObject)
println(Utils.serializeRDFModel(errorCase.getModel))
} }
test ("edm:rights property for aggregation ") { test ("edm:rights property for aggregation ") {
......
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