Commit b3eba230 authored by Silvia Witzig's avatar Silvia Witzig
Browse files

integrate person and corporate body subjects

parent 23ba1b86
......@@ -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
......
......@@ -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>"))
}
......
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