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

Places: remove related manuscripts from facet results

parent 8da28925
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,8 @@ import { ...@@ -21,7 +21,8 @@ import {
placesActorsQuery, placesActorsQuery,
} from './SparqlQueriesActors'; } from './SparqlQueriesActors';
import { import {
placeProperties, placePropertiesInstancePage,
placePropertiesFacetResults,
placePropertiesInfoWindow, placePropertiesInfoWindow,
manuscriptsProducedAt, manuscriptsProducedAt,
actorsAt, actorsAt,
...@@ -189,7 +190,7 @@ const getPaginatedData = ({ ...@@ -189,7 +190,7 @@ const getPaginatedData = ({
resultSetProperties = eventProperties; resultSetProperties = eventProperties;
break; break;
case 'places': case 'places':
resultSetProperties = placeProperties; resultSetProperties = placePropertiesFacetResults;
break; break;
case 'actors': case 'actors':
resultSetProperties = actorProperties; resultSetProperties = actorProperties;
...@@ -243,7 +244,7 @@ export const getByURI = ({ ...@@ -243,7 +244,7 @@ export const getByURI = ({
break; break;
case 'places': case 'places':
q = instanceQuery; q = instanceQuery;
q = q.replace('<PROPERTIES>', placeProperties); q = q.replace('<PROPERTIES>', placePropertiesInstancePage);
q = q.replace('<RELATED_INSTANCES>', ''); q = q.replace('<RELATED_INSTANCES>', '');
break; break;
case 'placesAll': case 'placesAll':
......
export const placeProperties = ` export const placePropertiesInstancePage = `
{ {
?id skos:prefLabel ?prefLabel__id . ?id skos:prefLabel ?prefLabel__id .
BIND(?prefLabel__id AS ?prefLabel__prefLabel) BIND(?prefLabel__id AS ?prefLabel__prefLabel)
...@@ -38,6 +38,30 @@ export const placeProperties = ` ...@@ -38,6 +38,30 @@ export const placeProperties = `
} }
`; `;
export const placePropertiesFacetResults = `
{
?id skos:prefLabel ?prefLabel__id .
BIND(?prefLabel__id AS ?prefLabel__prefLabel)
BIND(CONCAT("/places/page/", REPLACE(STR(?id), "^.*\\\\/(.+)", "$1")) AS ?prefLabel__dataProviderUrl)
}
UNION
{
?id owl:sameAs
|mmm-schema:data_provider_url
|mmm-schema:geonames_uri
?source__id .
OPTIONAL { ?source__id skos:prefLabel ?source__prefLabel_}
BIND(?source__id AS ?source__dataProviderUrl)
BIND(COALESCE(?source__prefLabel_, ?source__id) AS ?source__prefLabel)
}
UNION { ?id gvp:placeTypePreferred ?placeType }
UNION {
?id gvp:broaderPreferred ?area__id .
?area__id skos:prefLabel ?area__prefLabel .
BIND(CONCAT("/places/page/", REPLACE(STR(?area__id), "^.*\\\\/(.+)", "$1")) AS ?area__dataProviderUrl)
}
`;
export const placePropertiesInfoWindow = ` export const placePropertiesInfoWindow = `
?id skos:prefLabel ?prefLabel__id . ?id skos:prefLabel ?prefLabel__id .
BIND(?prefLabel__id AS ?prefLabel__prefLabel) BIND(?prefLabel__id AS ?prefLabel__prefLabel)
......
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