Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Import Process
Drupal Sync Service
Commits
179876d7
Commit
179876d7
authored
Jul 14, 2020
by
Jonas Waeber
Browse files
Change address type and relation property.
parent
872db9c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/kotlin/Transform.kt
View file @
179876d7
...
...
@@ -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
)
...
...
src/main/kotlin/rdf/RICO.kt
View file @
179876d7
...
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment