On 19/03/2020 15:12, Adam Davies wrote:
Thanks for the reply!

In terms of what I’m trying to get back, I was hoping to list in one row a list 
of names, and in another a list of locations (which you’ve helped me solve).

The dataset I am working with contains information about published articles and 
presentations. What I was hoping to do was to isolate all of the presentations, 
and then list where they took place and list whoever created the presentation 
to get a list of all of the creators and the locations they have visited. 
However, since the human-readable data of names is behind a reference that is 
unreadable, I was lead to the idea that nesting my queries would allow me to 
achieve this - as shown.

I’m still having trouble getting jena fuseki to list the creator’s names beside 
their respective locations. Using the code you provided, I tried to make a 
separate query (which would be the second half of the first) to do the same 
with creator names. While this seems to run, it outputs nothing:
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?creatorName ?creatorCountry
WHERE
{
      ?creatorName ?predicate ?creatorCountry .
      ?creatorInfo foaf:name ?creatorName .
      ?publication <http://purl.org/dc/terms/creator> ?creatorInfo .
      ?publication bibo:presentedAt ?place .  ##1
}
LIMIT 500


All the parts of the pattern must match.

    ?creatorName ?predicate ?creatorCountry .

matches anything if there are any triples.

You can remove the line marked ##1. If does nothing much for finding ?creatorName ?creatorCountry but it must match something.

      ?publication bibo:presentedAt ?place .  ##1

then if you still have nothing, one or both of

      ?creatorInfo foaf:name ?creatorName .
      ?publication <http://purl.org/dc/terms/creator> ?creatorInfo .

does not match.

Remove one line of the query and try that. When you find the one line that makes a difference, that may explain what's going on.

And check the URIs are right.

    Andy

Reply via email to