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 {
placesActorsQuery,
} from './SparqlQueriesActors';
import {
placeProperties,
placePropertiesInstancePage,
placePropertiesFacetResults,
placePropertiesInfoWindow,
manuscriptsProducedAt,
actorsAt,
......@@ -189,7 +190,7 @@ const getPaginatedData = ({
resultSetProperties = eventProperties;
break;
case 'places':
resultSetProperties = placeProperties;
resultSetProperties = placePropertiesFacetResults;
break;
case 'actors':
resultSetProperties = actorProperties;
......@@ -243,7 +244,7 @@ export const getByURI = ({
break;
case 'places':
q = instanceQuery;
q = q.replace('<PROPERTIES>', placeProperties);
q = q.replace('<PROPERTIES>', placePropertiesInstancePage);
q = q.replace('<RELATED_INSTANCES>', '');
break;
case 'placesAll':
......
export const placeProperties = `
export const placePropertiesInstancePage = `
{
?id skos:prefLabel ?prefLabel__id .
BIND(?prefLabel__id AS ?prefLabel__prefLabel)
......@@ -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 = `
?id skos:prefLabel ?prefLabel__id .
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