Skip to content
Snippets Groups Projects
Commit a84eb223 authored by esikkala's avatar esikkala
Browse files

Update mmm endoint, fix order by

parent 63e52dae
No related branches found
No related tags found
No related merge requests found
...@@ -9,15 +9,13 @@ ...@@ -9,15 +9,13 @@
// # mmm-schema:entry ?ownerEntry . // # mmm-schema:entry ?ownerEntry .
// # BIND(CONCAT(STR(?ownerLabel), ";", STR(?ownerId), ";", STR(?ownerOrder), ";", STR(?ownerEntry)) AS ?owner_) // # BIND(CONCAT(STR(?ownerLabel), ";", STR(?ownerId), ";", STR(?ownerOrder), ";", STR(?ownerEntry)) AS ?owner_)
// # } // # }
module.exports = { module.exports = {
'mmm': { 'mmm': {
'title': 'MMM', 'title': 'MMM',
'shortTitle': 'MMM', 'shortTitle': 'MMM',
'timePeriod': '', 'timePeriod': '',
//'endpoint': 'http://ldf.fi/mmm-sdbm-cidoc/sparql', 'endpoint': 'http://ldf.fi/mmm-cidoc/sparql',
'endpoint': 'http://localhost:3034/ds/sparql', //'endpoint': 'http://localhost:3034/ds/sparql',
'allQuery': ` 'allQuery': `
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
...@@ -33,7 +31,6 @@ module.exports = { ...@@ -33,7 +31,6 @@ module.exports = {
SELECT SELECT
?id ?manuscriptRecord ?id ?manuscriptRecord
(GROUP_CONCAT(DISTINCT ?prefLabel_; SEPARATOR=" | ") AS ?prefLabel) (GROUP_CONCAT(DISTINCT ?prefLabel_; SEPARATOR=" | ") AS ?prefLabel)
(GROUP_CONCAT(DISTINCT ?author_; SEPARATOR="|") AS ?author) (GROUP_CONCAT(DISTINCT ?author_; SEPARATOR="|") AS ?author)
(GROUP_CONCAT(DISTINCT ?timespan_; SEPARATOR="|") AS ?timespan) (GROUP_CONCAT(DISTINCT ?timespan_; SEPARATOR="|") AS ?timespan)
(GROUP_CONCAT(DISTINCT ?creationPlace_; SEPARATOR="|") AS ?creationPlace) (GROUP_CONCAT(DISTINCT ?creationPlace_; SEPARATOR="|") AS ?creationPlace)
...@@ -42,7 +39,6 @@ module.exports = { ...@@ -42,7 +39,6 @@ module.exports = {
WHERE { WHERE {
?id a frbroo:F4_Manifestation_Singleton . ?id a frbroo:F4_Manifestation_Singleton .
?id skos:prefLabel ?prefLabel_ . ?id skos:prefLabel ?prefLabel_ .
OPTIONAL { ?id crm:P45_consists_of ?material_ . } OPTIONAL { ?id crm:P45_consists_of ?material_ . }
?expression_creation frbroo:R18_created ?id . ?expression_creation frbroo:R18_created ?id .
OPTIONAL { OPTIONAL {
...@@ -66,8 +62,7 @@ module.exports = { ...@@ -66,8 +62,7 @@ module.exports = {
OPTIONAL { ?id mmm-schema:manuscript_record ?manuscriptRecord . } OPTIONAL { ?id mmm-schema:manuscript_record ?manuscriptRecord . }
} }
GROUP BY ?id ?manuscriptRecord GROUP BY ?id ?manuscriptRecord
ORDER BY DESC(?creationPlace) ORDER BY (!BOUND(?creationPlace)) ?creationPlace
LIMIT 100
`, `,
'placeQuery': ` 'placeQuery': `
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment