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