diff --git a/src/sparql/search.ts b/src/sparql/search.ts index c0807945a651c0c22d7bdc034e03acf77d71f2ca..a189450b6344b56eb388d0ea704957ce8e2535f2 100644 --- a/src/sparql/search.ts +++ b/src/sparql/search.ts @@ -153,29 +153,32 @@ export const getSearchResults = async (resourceUriList: string[], auth?: Credent } WHERE { VALUES ?s { ${formattedUris} } - VALUES ?p { - rdf:type - dct:title - dct:description - dcat:version - dcat:catalog - dcat:dataset - dcat:distribution + GRAPH ?g { + ?s dct:identifier ?identifier. + + VALUES ?p { + rdf:type + dct:title + dct:description + dcat:version + dcat:catalog + dcat:dataset + dcat:distribution + } + ?s ?p ?o. } - ?s ?p ?o. OPTIONAL { ?s dct:creator ?creator. VALUES ?p2 { foaf:name foaf:givenName foaf:familyName foaf:firstName } ?creator ?p2 ?o2. } OPTIONAL { - ?parentCatalog dcat:dataset|dcat:catalog ?s. + VALUES ?parentLink { dcat:dataset dcat:catalog } + ?parentCatalog a dcat:Catalog; + ?parentLink ?s. VALUES ?pparentCatalog { dct:identifier dct:title } ?parentCatalog ?pparentCatalog ?oparentCatalog. } - GRAPH ?g { - ?s dct:identifier ?identifier. - } } `, {