Commit 179876d7 authored by Jonas Waeber's avatar Jonas Waeber

Change address type and relation property.

parent 872db9c4
......@@ -92,7 +92,7 @@ class Transform(private val municipalities: Map<String, Municipality>) {
log.error("Invalid postal code: $postalCode")
null
}
location.addProperty(RDF.type, WD.location)
location.addProperty(RDF.type, RICO.Place)
location.addProperty(WD.postalCode, literal(postalCode))
// does not enrich city, canton or cantons, if the postal code is not in the list.
if (municipality != null) {
......@@ -107,7 +107,7 @@ class Transform(private val municipalities: Map<String, Municipality>) {
}
// country is currently hard coded to switzerland!
location.addProperty(WD.country, WD.switzerland)
resource.addProperty(WD.streetAddress, location)
resource.addProperty(RICO.hasLocation, location)
}
private fun langLiteral(text: String, language: String): Literal = model.createLiteral(text.trim(), language)
......
......@@ -76,6 +76,7 @@ object RICO {
val heldBy: Property = prop( "heldBy")
val isPartOf: Property = prop( "isPartOf")
val hasProvenance: Property = prop("hasProvenance")
val hasLocation: Property = prop("hasLocation")
val instantiates: Property = prop("instantiates")
val hasInstantiation: Property = prop("hasInstantiation")
......
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