首页 > 解决方案 > SPARQL: Retrieving resources linked by multiple properties

问题描述

I am having a bit of trouble while trying to retrieve all the IRI linked to a resources using a list of property.

In my case, I have a list of resources from the BNF and I would like to find, for each of them, all the resources associated with them using one of the subproperties of <http://purl.org/dc/elements/1.1/contributor> .

If i search for all the subPropertyOf of <http://purl.org/dc/elements/1.1/contributor> I retrieve the 525 properties I am considering:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?p WHERE {
  

  ?p rdfs:subPropertyOf <http://purl.org/dc/elements/1.1/contributor> .
}

However, if I try to find resources associated with them with the following query:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?p ?contributor WHERE {
  
   ?p rdfs:subPropertyOf <http://purl.org/dc/elements/1.1/contributor> .
  <http://data.bnf.fr/ark:/12148/cb322025612#Expression> ?p ?contributor 
}

I do not have any results...What I am doing wrong?

Endpoint is here: https://data.bnf.fr/sparql if someone else wants to try

标签: sparqlrdf

解决方案


推荐阅读