However, it does not give me anything unless I get rid of rdfs:label ?label. What I want to do is to query instances of the reports:CollisionInvestigationReport which is a defined class, so reasoning is necessary. Is there any advice on how to get labels queried at the same time?
If you don't get anything with rdfs:label back, then there are no instances of class reports:CollisionInvestigationReport that have a label - that's all. It doesn't matter whether you use reasoning or not.
Everyone seems to be assuming that you don’t actually have any labels in there. If you do then there might be a problem. Do you have labels that you would expect to be returned?
I'm assuming you have the reasoning level set to DL as there is a known issue with annotation properties in queries in the DL mode. If you set the reasoning level to SL this query should work as expected.
One of the results would be:reports_resource:report_3504933049910045030.
This particular instance has rdfs:label "Collision, Lydney Town level crossing" if look into it.
The label can be queried properly without the reasoning. However, becasue reports:CollisionInvestigationReport is a defined class, I have to use the reasoning to infer what instance(report) can be classified as reports:CollisionInvestigationReport.
Is there any way to query rdfs:label alongside rdf:type in this case? Thanks!
Yes! I indeed set the reasoning level to DL. I tried to set to SL but the reasoning did not work. According to the log file, there are a few invalid axioms for SL.