Querying for reified data

I noticed that a SPARQL query to retrieve reified data is not doing what I expected.

I loaded the following into a new database:

    [ ] a rdf:statement ;
       rdf:subject :john ;
       rdf:predicate :loves ;
       rdf:object :mary .

and ran the following query I Stardog Studio:

select * where { ?s ?p ?o }

which produced the following four results (in csv format):

  _:bnode_eba0b0c7_ba08_44ce_ad37_7aebea77b069_143,rdf:type,rdf:statement
    :john,rdf:typeowl:Thing
    :loves,rdf:typeowl:Thing
    :mary,rdf:typeowl:Thing

Why didn't it produce the reified rdf:subject, rdf:predicate and rdf:object relations?

If I export the database, it does export them.

Tim

Did you run the query with reasoning?

Ah, yes. Turning that off gives me what was mimssing. Does having reasoning turned on result in only producing the inferred results?

Reasoning results all results, not only inferred results. Let me check with the others on this one. It might be the case that Statement being a subclass of Resource has something to do with not getting results for the reification predicates. You specified "statement" (with a lowercase "s"), but in RDF spec it looks like the domain of subject/predicate/object properties would infer the resource to be a Statement.

thanks for catching that. If I use Statement and have reasoning on, I get just the three inferred type statements.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.