Commit e3ce090e authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Fix & update institution transformation.

parent 448c7a31
Pipeline #16539 passed with stages
in 6 minutes and 10 seconds
......@@ -30,7 +30,7 @@ import org.memobase.settings.SettingsLoader
import java.io.StringReader
class KafkaTopology(private val settings: SettingsLoader) {
private val log = LogManager.getLogger("StreamsProcessing")
private val log = LogManager.getLogger("DrupalSyncProcessor")
private val transformer = Transform()
fun build(): Topology {
......@@ -47,11 +47,11 @@ class KafkaTopology(private val settings: SettingsLoader) {
private fun parseJson(data: String): List<Input> {
return try {
val int = Klaxon().parse<Input>(StringReader(data))
val int = Klaxon().parse<Institution>(StringReader(data))
return if (int == null) emptyList()
else listOf(int)
} catch (ex: KlaxonException) {
log.error("Failed to parse source: $data.")
log.error(ex.localizedMessage)
emptyList()
}
}
......
......@@ -18,21 +18,24 @@
package org.memobase
import org.apache.jena.rdf.model.*
import java.io.StringWriter
import org.apache.jena.rdf.model.Literal
import org.apache.jena.rdf.model.Model
import org.apache.jena.rdf.model.ModelFactory
import org.apache.jena.rdf.model.Resource
import org.apache.jena.rdf.model.ResourceFactory
import org.apache.jena.riot.RDFDataMgr
import org.apache.jena.riot.RDFFormat
import org.apache.kafka.streams.KeyValue
import org.apache.logging.log4j.LogManager
import org.memobase.model.Municipality
import org.memobase.rdf.NS
import org.memobase.rdf.RDF
import org.memobase.rdf.RICO
import rdf.WD
import java.io.StringWriter
import org.memobase.model.Address
import org.memobase.model.Institution
import org.memobase.model.RecordSet
import org.memobase.rdf.NS
import org.memobase.rdf.RDF
import org.memobase.rdf.RICO
import org.memobase.rdf.SCHEMA
import rdf.WD
class Transform {
private val log = LogManager.getLogger("InstitutionTransform")
......@@ -55,7 +58,7 @@ class Transform {
oldIdentifier.addProperty(RDF.type, RICO.Identifier)
oldIdentifier.addProperty(RICO.type, literal("oldMemobase"))
oldIdentifier.addProperty(RICO.identifier, literal(input.field_old_memobase_id))
resource.addProperty(RICO.identifiedBy, identifier)
resource.addProperty(RICO.identifiedBy, oldIdentifier)
resource.addProperty(RICO.name, langLiteral(input.title, "de"))
resource.addProperty(RICO.name, langLiteral(input.title_fr, "fr"))
......@@ -65,10 +68,9 @@ class Transform {
resource.addProperty(RICO.descriptiveNote, langLiteral(input.field_text_it.value, "it"))
input.field_address.forEach {address ->
val location = generateLocationResource(address)
val location = generateLocationResource(model, address)
resource.addProperty(RICO.hasLocation, location)
}
input.field_isil.let {
if (it != null)
resource.addProperty(WD.isil, literal(it))
......@@ -78,7 +80,6 @@ class Transform {
resource.addProperty(WD.emailAddress, literal(it))
}
}
input.field_website.let {
if (it != null)
resource.addProperty(WD.website, literal(it.uri))
......@@ -97,8 +98,8 @@ class Transform {
return Pair("", ModelFactory.createDefaultModel())
}
private fun generateLocationResource(address: Address): Resource {
val location = ResourceFactory.createResource()
private fun generateLocationResource(model: Model, address: Address): Resource {
val location = model.createResource()
val streetAddress = address.address_line1
val secondAddressLine = address.address_line2
......@@ -120,9 +121,8 @@ class Transform {
location.addProperty(WD.postalCode, literal(postalCode))
location.addProperty(WD.coordinates, literal(address.coordinates))
// does not enrich city, canton or cantons, if the postal code is not in the list.
val canton = ResourceFactory.createResource()
val canton = model.createResource()
canton.addProperty(RDF.type, RICO.Place)
location.addProperty(WD.adminUnit, canton)
cantons[address.administrative_area].let {
......@@ -136,9 +136,10 @@ class Transform {
// this shouldn't happen!
canton.addProperty(RICO.name, literal("Unknown"))
}
canton.addProperty(RICO.type, literal("canton"))
}
val municipality = ResourceFactory.createResource()
val municipality = model.createResource()
municipality.addProperty(RDF.type, RICO.Place)
location.addProperty(WD.adminUnit, municipality)
municipalities[postalCode].let {
......@@ -150,6 +151,7 @@ class Transform {
} else {
municipality.addProperty(RICO.name, literal(address.locality))
}
municipality.addProperty(RICO.type, "municipality")
}
// country is currently hard coded to switzerland!
location.addProperty(WD.country, WD.switzerland)
......@@ -163,6 +165,8 @@ class Transform {
}
}
private fun langLiteral(text: String, language: String): Literal = ResourceFactory.createLangLiteral(text.trim(), language)
private fun literal(text: String): Literal = ResourceFactory.createPlainLiteral(text.trim())
}
\ No newline at end of file
......@@ -39,5 +39,5 @@ data class Institution(
val field_text_it: RichText,
val field_institution_types: List<String>,
val field_wikidata_id: Link
val field_wikidata_id: String
) : Input("Institution")
\ No newline at end of file
......@@ -17,6 +17,13 @@
*/
package org.memobase
import java.io.File
import java.io.FileOutputStream
import java.nio.charset.Charset
import org.apache.jena.rdf.model.ModelFactory
import org.apache.jena.riot.Lang
import org.apache.jena.riot.RDFDataMgr
import org.apache.jena.riot.RDFFormat
import org.apache.kafka.common.serialization.StringDeserializer
import org.apache.kafka.common.serialization.StringSerializer
import org.apache.kafka.streams.TopologyTestDriver
......@@ -25,13 +32,28 @@ import org.apache.logging.log4j.LogManager
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import java.io.File
import java.nio.charset.Charset
import org.junit.jupiter.api.assertAll
import org.memobase.rdf.NS
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class Test {
private val log = LogManager.getLogger("TestLogger")
private val regex = Regex("(_:B[A-Za-z0-9]+)")
private val regexTime = Regex("\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}")
private fun sort(source: List<String>): String {
return source.map {
var replacedString = it
for (matchResult in regex.findAll(it)) {
replacedString = replacedString.replace(matchResult.groups[0]?.value.orEmpty(), "_:B")
}
for (matchResult in regexTime.findAll(it)) {
replacedString = replacedString.replace(matchResult.groups[0]?.value.orEmpty(), "2020-10-10T09:10:22")
}
replacedString
}.sorted().reduce { acc, s -> acc + "\n" + s }.trim()
}
private val resourcePath = "src/test/resources/data"
private fun readFile(fileName: String): String {
......@@ -61,7 +83,7 @@ class Test {
)
testDriver.pipeInput(
factory.create(
service.settings.inputTopic, "", readFile("1/input.json")
service.settings.inputTopic, null, readFile("institution/input.json")
)
)
......@@ -71,18 +93,27 @@ class Test {
StringDeserializer()
)
val sortedResult = record.value().lines().map {
var replacedString = it
for (matchResult in regex.findAll(it)) {
replacedString = replacedString.replace(matchResult.groups[0]?.value.orEmpty(), "_:B")
val key = record.key()
val value = record.value()
val model = ModelFactory.createDefaultModel()
NS.prefixMapping.map {
model.setNsPrefix(it.key, it.value)
}
RDFDataMgr.read(model, record.value().byteInputStream(), Lang.NTRIPLES)
RDFDataMgr.write(
FileOutputStream("$resourcePath/institution/turtle-output.ttl"),
model,
RDFFormat.TURTLE_PRETTY
)
assertAll("",
{
assertThat(sort(value.lines()))
.isEqualTo(sort(readFile("institution/output.nt").lines()))
},
{
assertThat(key)
.isEqualTo("https://memobase.ch/institution/RadioX")
}
replacedString
}.sorted().reduce { acc, s -> acc + "\n" + s }
assertThat(sortedResult)
.isEqualTo(readFile("1/output.nt"))
assertThat(record.key())
.isEqualTo("https://memobase.ch/institution/test")
)
}
}
<https://memobase.ch/institution/test> <http://www.wikidata.org/prop/direct/P2699> "http://www.plansfixes.ch/indexation/" .
<https://memobase.ch/institution/test> <http://www.wikidata.org/prop/direct/P791> "12345" .
<https://memobase.ch/institution/test> <http://www.wikidata.org/prop/direct/P856> "http://www.plansfixes.ch/" .
<https://memobase.ch/institution/test> <http://www.wikidata.org/prop/direct/P968> "info@plans-fixess.ch" .
<https://memobase.ch/institution/test> <https://www.ica.org/standards/RiC/ontology#descriptiveNote> "<p>Association Films Plans-Fixes</p>"@de .
<https://memobase.ch/institution/test> <https://www.ica.org/standards/RiC/ontology#descriptiveNote> "<p>Association Films Plans-Fixes</p>"@fr .
<https://memobase.ch/institution/test> <https://www.ica.org/standards/RiC/ontology#descriptiveNote> "<p>Association Films Plans-Fixes</p>"@it .
<https://memobase.ch/institution/test> <https://www.ica.org/standards/RiC/ontology#hasLocation> _:B .
<https://memobase.ch/institution/test> <https://www.ica.org/standards/RiC/ontology#hasLocation> _:B .
<https://memobase.ch/institution/test> <https://www.ica.org/standards/RiC/ontology#identifiedBy> _:B .
<https://memobase.ch/institution/test> <https://www.ica.org/standards/RiC/ontology#name> "Association Films Plans-Fixes"@de .
<https://memobase.ch/institution/test> <https://www.ica.org/standards/RiC/ontology#name> "Association Films Plans-Fixes"@fr .
<https://memobase.ch/institution/test> <https://www.ica.org/standards/RiC/ontology#name> "Association Films Plans-Fixes"@it .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Identifier> .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Place> .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Place> .
_:B <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q1034> .
_:B <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q1034> .
_:B <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q11911> .
_:B <http://www.wikidata.org/prop/direct/P131> <http://www.wikidata.org/entity/Q11911> .
_:B <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q39> .
_:B <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q39> .
_:B <http://www.wikidata.org/prop/direct/P281> "2502" .
_:B <http://www.wikidata.org/prop/direct/P281> "2502" .
_:B <http://www.wikidata.org/prop/direct/P625> "Point(7.247222222 47.137222222)" .
_:B <http://www.wikidata.org/prop/direct/P625> "Point(7.247222222 47.137222222)" .
_:B <http://www.wikidata.org/prop/direct/P6375> "Ostseestraße 107"@de .
_:B <http://www.wikidata.org/prop/direct/P6375> "Ostseestraße 107"@fr .
_:B <http://www.wikidata.org/prop/direct/P6375> "Ostseestraße 107"@it .
_:B <http://www.wikidata.org/prop/direct/P6375> "Straßenname 12\nZusätzliche Adressinformationen"@de .
_:B <http://www.wikidata.org/prop/direct/P6375> "Straßenname 12\nZusätzliche Adressinformationen"@fr .
_:B <http://www.wikidata.org/prop/direct/P6375> "Straßenname 12\nZusätzliche Adressinformationen"@it .
_:B <http://www.wikidata.org/prop/direct/P669> "Ostseestraße"@de .
_:B <http://www.wikidata.org/prop/direct/P669> "Ostseestraße"@fr .
_:B <http://www.wikidata.org/prop/direct/P669> "Ostseestraße"@it .
_:B <http://www.wikidata.org/prop/direct/P669> "Straßenname"@de .
_:B <http://www.wikidata.org/prop/direct/P669> "Straßenname"@fr .
_:B <http://www.wikidata.org/prop/direct/P669> "Straßenname"@it .
_:B <http://www.wikidata.org/prop/direct/P670> "107" .
_:B <http://www.wikidata.org/prop/direct/P670> "12" .
_:B <https://www.ica.org/standards/RiC/ontology#identifier> "test" .
_:B <https://www.ica.org/standards/RiC/ontology#type> "main" .
\ No newline at end of file
{
"field_memobase_id": "test"
}
\ No newline at end of file
{
"type": "node--institution",
"status": true,
"title": "Test institution Oana",
"title": "RadioX",
"title_fr": "Test institution Oana (FR)",
"title_it": "Test institution Oana (IT)",
"field_address": [
......@@ -9,22 +9,17 @@
"langcode": "de",
"country_code": "CH",
"administrative_area": "BS",
"locality": "Basel",
"locality": "Münchenstein",
"dependent_locality": null,
"postal_code": "4051",
"postal_code": "4142",
"sorting_code": null,
"address_line1": "Petersplatz 1",
"address_line1": " Oslo-Strasse 8",
"address_line2": "",
"organization": "Universität Basel",
"organization": "Radio X",
"given_name": null,
"additional_name": null,
"family_name": null
},
{
"lat": 47.5602571,
"lng": 7.5804113,
"data": [],
"value": "47.5602571, 7.5804113"
"family_name": null,
"coordinates": "47.5602571, 7.5804113"
},
{
"langcode": "de",
......@@ -39,44 +34,39 @@
"organization": "Bernisches Historisches Museum ",
"given_name": null,
"additional_name": null,
"family_name": null
},
{
"lat": 46.9531243,
"lng": 7.434256,
"data": [],
"value": "46.9531243, 7.434256"
"family_name": null,
"coordinates": "46.9531243, 7.434256"
}
],
"field_isil": "isil_test",
"field_isil": null,
"field_memobase_id": "RadioX",
"field_old_memobase_id": "test_old_memobase_id",
"field_email": "email@test.test",
"field_old_memobase_id": "test_radio_x",
"field_email": "radiox@test.com",
"field_website": {
"uri": "http://institution-website.website",
"title": "Institution Website",
"uri": "https://radiox.ch/",
"title": "",
"options": []
},
"field_wikidata_id": "http://test.test",
"field_link_archive_catalog": {
"uri": "http://online-archiv-catalog.website",
"title": "Online-Archivkatalog",
"uri": "http://online-archiv-radiox.com",
"title": "",
"options": []
},
"field_text": {
"value": "<p>test_description</p>\r\n",
"value": "<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>\r\n",
"format": "editorial",
"processed": "test_description"
"processed": "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem."
},
"field_text_fr": {
"value": "<p>test_description&nbsp;(FR)</p>\r\n",
"format": "editorial",
"processed": "test_description (FR)"
"processed": "test_description (FR)"
},
"field_text_it": {
"value": "<p>test_description&nbsp;&nbsp;(IT)</p>\r\n",
"format": "editorial",
"processed": "test_description  (IT)"
"processed": "test_description (IT)"
},
"field_institution_types": [
"http://www.wikidata.org/wiki/Q166118",
......
<https://memobase.ch/institution/RadioX> <http://www.wikidata.org/prop/direct/P2699> "http://online-archiv-radiox.com" .
<https://memobase.ch/institution/RadioX> <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q166118> .
<https://memobase.ch/institution/RadioX> <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q327333> .
<https://memobase.ch/institution/RadioX> <http://www.wikidata.org/prop/direct/P856> "https://radiox.ch/" .
<https://memobase.ch/institution/RadioX> <http://www.wikidata.org/prop/direct/P968> "radiox@test.com" .
<https://memobase.ch/institution/RadioX> <https://www.ica.org/standards/RiC/ontology#descriptiveNote> "<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>"@de .
<https://memobase.ch/institution/RadioX> <https://www.ica.org/standards/RiC/ontology#descriptiveNote> "<p>test_description&nbsp;&nbsp;(IT)</p>"@it .
<https://memobase.ch/institution/RadioX> <https://www.ica.org/standards/RiC/ontology#descriptiveNote> "<p>test_description&nbsp;(FR)</p>"@fr .
<https://memobase.ch/institution/RadioX> <https://www.ica.org/standards/RiC/ontology#hasLocation> _:B .
<https://memobase.ch/institution/RadioX> <https://www.ica.org/standards/RiC/ontology#hasLocation> _:B .
<https://memobase.ch/institution/RadioX> <https://www.ica.org/standards/RiC/ontology#identifiedBy> _:B .
<https://memobase.ch/institution/RadioX> <https://www.ica.org/standards/RiC/ontology#identifiedBy> _:B .
<https://memobase.ch/institution/RadioX> <https://www.ica.org/standards/RiC/ontology#name> "RadioX"@de .
<https://memobase.ch/institution/RadioX> <https://www.ica.org/standards/RiC/ontology#name> "Test institution Oana (FR)"@fr .
<https://memobase.ch/institution/RadioX> <https://www.ica.org/standards/RiC/ontology#name> "Test institution Oana (IT)"@it .
_:B <http://schema.org/sameAs> "http://www.wikidata.org/entity/Q11911" .
_:B <http://schema.org/sameAs> "http://www.wikidata.org/entity/Q12172" .
_:B <http://schema.org/sameAs> "http://www.wikidata.org/entity/Q69030" .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Identifier> .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Identifier> .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Place> .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Place> .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Place> .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Place> .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Place> .
_:B <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.ica.org/standards/RiC/ontology#Place> .
_:B <http://www.wikidata.org/prop/direct/P131> _:B .
_:B <http://www.wikidata.org/prop/direct/P131> _:B .
_:B <http://www.wikidata.org/prop/direct/P131> _:B .
_:B <http://www.wikidata.org/prop/direct/P131> _:B .
_:B <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q39> .
_:B <http://www.wikidata.org/prop/direct/P17> <http://www.wikidata.org/entity/Q39> .
_:B <http://www.wikidata.org/prop/direct/P281> "3005" .
_:B <http://www.wikidata.org/prop/direct/P281> "4142" .
_:B <http://www.wikidata.org/prop/direct/P625> "46.9531243, 7.434256" .
_:B <http://www.wikidata.org/prop/direct/P625> "47.5602571, 7.5804113" .
_:B <http://www.wikidata.org/prop/direct/P6375> "Helvetiapl. 5" .
_:B <http://www.wikidata.org/prop/direct/P6375> "Oslo-Strasse 8" .
_:B <http://www.wikidata.org/prop/direct/P669> "Helvetiapl." .
_:B <http://www.wikidata.org/prop/direct/P669> "Oslo-Strasse" .
_:B <http://www.wikidata.org/prop/direct/P670> "5" .
_:B <http://www.wikidata.org/prop/direct/P670> "8" .
_:B <https://www.ica.org/standards/RiC/ontology#identifier> "RadioX" .
_:B <https://www.ica.org/standards/RiC/ontology#identifier> "test_radio_x" .
_:B <https://www.ica.org/standards/RiC/ontology#name> "Basel-Stadt"@de .
_:B <https://www.ica.org/standards/RiC/ontology#name> "Basilea Città"@it .
_:B <https://www.ica.org/standards/RiC/ontology#name> "Bern" .
_:B <https://www.ica.org/standards/RiC/ontology#name> "Bern"@de .
_:B <https://www.ica.org/standards/RiC/ontology#name> "Berna"@it .
_:B <https://www.ica.org/standards/RiC/ontology#name> "Berne"@fr .
_:B <https://www.ica.org/standards/RiC/ontology#name> "Bâle-Ville"@fr .
_:B <https://www.ica.org/standards/RiC/ontology#name> "Münchenstein"@de .
_:B <https://www.ica.org/standards/RiC/ontology#name> "Münchenstein"@fr .
_:B <https://www.ica.org/standards/RiC/ontology#name> "Münchenstein"@it .
_:B <https://www.ica.org/standards/RiC/ontology#type> "canton" .
_:B <https://www.ica.org/standards/RiC/ontology#type> "canton" .
_:B <https://www.ica.org/standards/RiC/ontology#type> "main" .
_:B <https://www.ica.org/standards/RiC/ontology#type> "municipality" .
_:B <https://www.ica.org/standards/RiC/ontology#type> "municipality" .
_:B <https://www.ica.org/standards/RiC/ontology#type> "oldMemobase" .
\ No newline at end of file
@prefix schema: <http://schema.org/> .
@prefix internal: <http://memobase.ch/internal/> .
@prefix mbrs: <https://memobase.ch/recordSet/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix wdt: <http://www.wikidata.org/prop/direct/> .
@prefix mbpo: <https://memobase.ch/physical/> .
@prefix mbcb: <https://memobase.ch/institution/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix wd: <http://www.wikidata.org/entity/> .
@prefix wdtn: <http://www.wikidata.org/prop/direct-normalized/> .
@prefix mbdo: <https://memobase.ch/digital/> .
@prefix rdau: <http://rdaregistry.info/Elements/u/> .
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rico: <https://www.ica.org/standards/RiC/ontology#> .
@prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix mbr: <https://memobase.ch/record/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
mbcb:RadioX wdt:P2699 "http://online-archiv-radiox.com" ;
wdt:P31 wd:Q327333 , wd:Q166118 ;
wdt:P856 "https://radiox.ch/" ;
wdt:P968 "radiox@test.com" ;
rico:descriptiveNote "<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>"@de , "<p>test_description&nbsp;&nbsp;(IT)</p>"@it , "<p>test_description&nbsp;(FR)</p>"@fr ;
rico:hasLocation [ a rico:Place ;
wdt:P131 [ a rico:Place ;
schema:sameAs "http://www.wikidata.org/entity/Q12172" ;
rico:name "Basel-Stadt"@de , "Bâle-Ville"@fr , "Basilea Città"@it ;
rico:type "canton"
] ;
wdt:P131 [ a rico:Place ;
schema:sameAs "http://www.wikidata.org/entity/Q69030" ;
rico:name "Münchenstein"@de , "Münchenstein"@fr , "Münchenstein"@it ;
rico:type "municipality"
] ;
wdt:P17 wd:Q39 ;
wdt:P281 "4142" ;
wdt:P625 "47.5602571, 7.5804113" ;
wdt:P6375 "Oslo-Strasse 8" ;
wdt:P669 "Oslo-Strasse" ;
wdt:P670 "8"
] ;
rico:hasLocation [ a rico:Place ;
wdt:P131 [ a rico:Place ;
schema:sameAs "http://www.wikidata.org/entity/Q11911" ;
rico:name "Bern"@de , "Berne"@fr , "Berna"@it ;
rico:type "canton"
] ;
wdt:P131 [ a rico:Place ;
rico:name "Bern" ;
rico:type "municipality"
] ;
wdt:P17 wd:Q39 ;
wdt:P281 "3005" ;
wdt:P625 "46.9531243, 7.434256" ;
wdt:P6375 "Helvetiapl. 5" ;
wdt:P669 "Helvetiapl." ;
wdt:P670 "5"
] ;
rico:identifiedBy [ a rico:Identifier ;
rico:identifier "RadioX" ;
rico:type "main"
] ;
rico:identifiedBy [ a rico:Identifier ;
rico:identifier "test_radio_x" ;
rico:type "oldMemobase"
] ;
rico:name "RadioX"@de , "Test institution Oana (FR)"@fr , "Test institution Oana (IT)"@it .
{
"type": "node--record_set",
"status": true,
"title": "Test",
"title_fr": "Test",
"title_it": "Test",
"field_memobase_id": "test",
"field_text": {
"value": "Test",
"format": "plain_text",
"processed": "<p>Test</p>\n"
},
"field_text_fr": {
"value": "Test",
"format": "plain_text",
"processed": "<p>Test</p>\n"
},
"field_text_it": {
"value": "Test",
"format": "plain_text",
"processed": "<p>Test</p>\n"
},
"field_institution": {
"data": [
{
"type": "node--institution",
"id": "49c9eb3a-67e8-4454-bd62-f6ea2319075b"
}
],
"links": {
"related": {
"href": "https://mb-wf1.memobase.unibas.ch/jsonapi/node/record_set/2192fbb9-b2aa-40b8-8776-7b7910a9bee4/field_institution?resourceVersion=id%3A124"
},
"self": {
"href": "https://mb-wf1.memobase.unibas.ch/jsonapi/node/record_set/2192fbb9-b2aa-40b8-8776-7b7910a9bee4/relationships/field_institution?resourceVersion=id%3A124"
}
}
}
}
\ No newline at end of file
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