Commit 613603d0 authored by Thibault Ehrhart's avatar Thibault Ehrhart

Update SPARQL queries based on new data model

- rnews:NewsItem is now rnews:Article
- rnews:description is now rnews:ArticleBody
parent 22c8d55d
......@@ -63,7 +63,7 @@ export class NewsService {
SELECT DISTINCT ?country
FROM <http://asrael.eurecom.fr/agencefrancepresse/news>
WHERE {
?s a rnews:NewsItem .
?s a rnews:Article .
?s schema:contentLocation ?location .
?location schema:address ?address .
?address schema:addressCountry ?country .
......@@ -82,7 +82,7 @@ export class NewsService {
WHERE {
{
SELECT DISTINCT ?subject WHERE {
GRAPH <http://asrael.eurecom.fr/agencefrancepresse/news> { ?s a rnews:NewsItem . }
GRAPH <http://asrael.eurecom.fr/agencefrancepresse/news> { ?s a rnews:Article . }
?s dc:subject ?subject .
}
}
......@@ -105,7 +105,7 @@ export class NewsService {
${this.getPrefixes()}
SELECT DISTINCT ?lang
WHERE {
GRAPH <http://asrael.eurecom.fr/agencefrancepresse/news> { ?s a rnews:NewsItem . }
GRAPH <http://asrael.eurecom.fr/agencefrancepresse/news> { ?s a rnews:Article . }
?s rnews:inLanguage ?lang .
}
GROUP BY ?lang
......@@ -134,13 +134,13 @@ export class NewsService {
SELECT DISTINCT ?s ?dateCreated ?dateModified ?datePublished ?description ?genre ?genreLabel (GROUP_CONCAT(?subject; separator="|") AS ?subjects) (GROUP_CONCAT(?subjectLabel; separator="|") AS ?subjectsLabels) ?dateline ?headline ?identifier ?language ?slug (GROUP_CONCAT(?associatedMedia; separator="|") AS ?associatedMedias) ?country ?locality ?context
FROM <http://asrael.eurecom.fr/agencefrancepresse/news>
WHERE {
?s a rnews:NewsItem .
?s a rnews:Article .
VALUES ?s { <${uri}> }
OPTIONAL { ?s rnews:dateCreated ?dateCreated . }
OPTIONAL { ?s rnews:dateModified ?dateModified . }
OPTIONAL { ?s rnews:datePublished ?datePublished . }
OPTIONAL {
?s rnews:description ?description .
?s rnews:articleBody ?description .
}
OPTIONAL {
?s rnews:genre ?genre .
......@@ -289,9 +289,9 @@ export class NewsService {
SELECT DISTINCT *
FROM <http://asrael.eurecom.fr/agencefrancepresse/news>
WHERE {
?s a rnews:NewsItem .
?s a rnews:Article .
OPTIONAL { ?s rnews:dateCreated ?dateCreated . }
OPTIONAL { ?s rnews:description ?description . }
OPTIONAL { ?s rnews:articleBody ?description . }
OPTIONAL { ?s rnews:headline ?headline . }
OPTIONAL { ?s asrael:context ?context . }
OPTIONAL { ?s schema:contentLocation/schema:address/schema:addressCountry ?country . }
......
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