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
postprocessing
rico-edm-transformer
Commits
b3eba230
Commit
b3eba230
authored
Apr 12, 2021
by
Silvia Witzig
Browse files
integrate person and corporate body subjects
parent
23ba1b86
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/scala/ch/memobase/rico2edm/edm/Extractors.scala
View file @
b3eba230
...
...
@@ -321,7 +321,25 @@ object Extractors {
case
Some
(
s
)
=>
Some
(
s
)
case
None
=>
None
}
).
toList
).
toList
:::
getAllBlankNodeContent
(
graph
)(
record
)(
"hasSubject"
)
.
filter
(
obj
=>
obj
(
"@type"
).
str
==
"""https://www.ica.org/standards/RiC/ontology#Person"""
)
.
flatMap
(
v
=>
stringValue
(
v
)(
"name"
)
match
{
case
Some
(
s
)
=>
Some
(
s
)
case
None
=>
None
}
).
toList
:::
getAllBlankNodeContent
(
graph
)(
record
)(
"hasSubject"
)
.
filter
(
obj
=>
obj
(
"@type"
).
str
==
"""https://www.ica.org/standards/RiC/ontology#CorporateBody"""
)
.
flatMap
(
v
=>
stringValue
(
v
)(
"name"
)
match
{
case
Some
(
s
)
=>
Some
(
s
)
case
None
=>
None
}
).
toList
val
resourceGenres
...
...
src/test/scala/ch/memobase/rico2edm/edm/CHOSpec.scala
View file @
b3eba230
...
...
@@ -318,6 +318,7 @@ class CHOSpec extends AnyFunSuite with Matchers{
val
cho
=
Utils
.
serializeRDFModel
(
edm
.
createChoObject
(
graph
,
record
,
digObj
).
obj
.
getModel
)
assert
(
cho
.
contains
(
"<dc:type>entretien</dc:type>"
))
assert
(
cho
.
contains
(
"<dcterms:medium>http://www.wikidata.org/entity/Q875215</dcterms:medium>"
))
assert
(
cho
.
contains
(
"<dc:subject>Benno Besson</dc:subject>"
))
}
...
...
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