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

last changes before good to go message for Europeana is sent

parent 53f2ff32
Pipeline #24723 passed with stages
in 7 minutes and 7 seconds
......@@ -263,7 +263,7 @@ class EDM {
aggregation.addIsShownAt(recordIdShort)
aggregation.addAggregatedCHO(recordIdShort)
aggregation.addAggregatedCHO(Extractors.recordId(record))
//todo: ich denke, die Implementierung als Ganzes ist noch nicht konsistent
// haben wir immer ein digitales Objekt
......
......@@ -157,7 +157,7 @@ class Aggregation(private val id: String) {
skospreflabel.map(t => model.add(iri(id),SKOS.PREF_LABEL,factory.createLiteral(t)))
def addAggregatedCHO(edmAggregatedCHO: Option[String]): Unit = {
edmAggregatedCHO.map(a => model.add(iri(id),EDMVocab.AGGREGATED_CHO,factory.createLiteral(a)))
edmAggregatedCHO.map(a => model.add(iri(id),EDMVocab.AGGREGATED_CHO,factory.createIRI(a)))
}
def addIsShownAt(edmIsShownAt: Option[String]): Unit = {
......@@ -166,8 +166,9 @@ class Aggregation(private val id: String) {
model.add(iri(id),EDMVocab.IS_SHOWN_AT,factory.createIRI(a))
} else {
model.add(iri(id),EDMVocab.IS_SHOWN_AT,factory.createIRI(
s"https://memobase.ch/object/${a}"))
//s"https://memobase.ch/object/${a}"))
s"https://memobase-customer-live.outermedia.net/object/${a}"))
}
})
}
......
......@@ -22,6 +22,7 @@ package ch.memobase.rico2edm.edm
import ch.memobase.Utils
import ch.memobase.Utils.loadFile
import ch.memobase.rico2edm.edm
import ch.memobase.rico2edm.edm.subjects.Aggregation
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should.Matchers
......@@ -116,6 +117,24 @@ class AggregationSpec extends AnyFunSuite with Matchers {
}
ignore ("last test for silvia") {
//val source = loadFile("src/test/resources/apf-001-1284.edm.object.json")
val source = loadFile("src/test/resources/apf-001-1284.edm.object.json")
val g = Extractors.jsonGraph(source).get.arr
val dO = Extractors.digitalObject(g)
val rec = Extractors.record(g).get
val edm = new EDM
val agg = edm.createAggregation(g,rec,dO.get).get.obj
val cho = edm.createChoObject(g,rec,dO.get).obj
cho.getModel.addAll(agg.getModel)
println(Utils.serializeRDFModel(cho.getModel))
}
//actually we can't run this test until we can use memobase.ch object links
ignore ("aggregation edm:object") {
......
Markdown is supported
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