Commit f1e9b307 authored by Petter Goksøyr Åsen's avatar Petter Goksøyr Åsen
Browse files

only store 'adaptation' field on publication doc, not on work doc

parent 9cca7c02
......@@ -108,7 +108,7 @@ public final class SPARQLQueryBuilder {
+ " UNION { <__WORKURI__> deichman:language ?language }\n"
+ " UNION { <__WORKURI__> deichman:nationality ?country }\n"
+ " UNION { <__WORKURI__> deichman:fictionNonfiction ?fictionNonfiction }\n"
+ " UNION { <__WORKURI__> deichman:hasContentAdaptation ?contentAdaptation }\n"
+ " UNION { <__WORKURI__> deichman:hasContentAdaptation ?- }\n"
+ " UNION { <__WORKURI__> deichman:isPartOfWorkSeries ?workSeriesPart . \n"
+ " ?workSeriesPart a deichman:WorkSeriesPart ;\n"
+ " deichman:workSeries ?workSeries .\n"
......
......@@ -27,6 +27,7 @@ CONSTRUCT {
deich:formatNo ?formatNo ;
deich:formatAdaptation ?formatAdaptNo ;
deich:adaptation ?formatAdaptNo ;
deich:adaptation ?contentAdaptNo ;
deich:ageLimit ?ageLimit ;
deich:series ?seriesTitle ;
deich:nationality ?nationLabel ;
......@@ -120,6 +121,13 @@ WHERE {
BIND(str(?wLangO) AS ?wLang) .
BIND(afn:substr(?wLang, 29) AS ?origLang) }
UNION { <__PUBLICATIONURI__> deich:publicationOf ?work .
?work a deich:Work ;
deich:hasContentAdaptation ?contentAdaptation .
?contentAdaptation rdfs:label ?contentAdaptNoLang .
BIND(str(?contentAdaptNoLang) AS ?contentAdaptNo)
FILTER(lang(?contentAdaptNoLang) = "no") }
# 4. Information from contributions on both publication and work:
UNION {
......
......@@ -41,7 +41,6 @@
"bio": "deichman:bio",
"country": "deichman:country",
"contentAdaptation": "deichman:contentAdaptation",
"adaptation": "deichman:adaptation",
"name": "deichman:name",
"Work": "deichman:Work",
"publicationYear": "deichman:publicationYear",
......
......@@ -30,7 +30,6 @@ CONSTRUCT {
deich:country ?country ;
deich:nationality ?nationLabel ;
deich:contentAdaptation ?contentAdaptationNorwegianName ;
deich:adaptation ?contentAdaptationNorwegianName ;
deich:series ?seriesTitle ;
deich:literaryForm ?litform ;
deich:created ?created ;
......
......@@ -48,7 +48,7 @@ public class PublicationModelToIndexMapperTest {
+ " \"format\": \"E-bok\",\n"
+ " \"created\": \"2016-11-17T07:03:10.239Z\",\n"
+ " \"formatAdaptation\": \"Storskrift\",\n"
+ " \"adaptation\": \"Storskrift\",\n"
+ " \"adaptation\": [\"Lettlest, enkelt språk\", \"Storskrift\"],\n"
+ " \"formats\": [\n"
+ " \"http://data.deichman.no/format#E-Book\"\n"
+ " ],\n"
......@@ -253,7 +253,7 @@ public class PublicationModelToIndexMapperTest {
+ "\n"
+ "<http://data.deichman.no/biography#biographicalContent> rdfs:label \"Biografisk innhold\"@no, \"Biographical content\"@en ."
+ "\n"
+ "<http://data.deichman.no/contentAdaptation#easyLanguage> ns1:code \"ta\" ."
+ "<http://data.deichman.no/contentAdaptation#easyLanguage> rdfs:label \"Lettlest, enkelt språk\"@no ; ns1:code \"ta\" ."
+ "\n"
+ "<http://data.deichman.no/workSeries/s1> a ns2:WorkSeries ; "
+ " ns2:mainTitle \"workSeriesMainTitle\" ; ns2:partTitle \"workSeriesPartTitle\" .";
......
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