Unknown body atom type: Auxillary_Class_Assertion

Hello

I am still developing my server to translate data into semantic and store them in StardDog, i have no more problem to populate and transfer, but when i want to query (SPARQL) i receive an error : “Unknown body atom type: AUXILIARY_CLASS_ASSERTION”

The error is received only with SPARQL query contains one (or more) Optional

The code used is :
SelectQuery aQuery = starDogConnection.select(sparql1);
aQuery.limit(10);
String explain = aQuery.explain();
System.out.println("explain : ");
System.out.println(explain);
System.out.println("execute : ");
TupleQueryResult aResult = aQuery.execute();
starDogConnection.close();

Thanks for your help

Hi,

Could you send us (either here or privately) the ontology you’re using, as well as the sparql1 query that you’re passing in to the select method?

The request :

SELECT DISTINCT ?dataset ?model ?manufacturer ?kvpvalue ?kvpunitlabel ?tubecurrentvalue ?tubecurrentunitlabel ?exptimevalue ?exptimeunitlabel ?useofxraymodvalue
WHERE {
?dataset rdf:type ontomedirad:CT_image_dataset .
?dataset ontomedirad:is_specified_output_of ?ctacq .
?ctacq rdf:type ontomedirad:CT_acquisition .
?scanner rdf:type ontomedirad:CT_scanner .
?acqrole rdf:type ontomedirad:image_acquisition_role .
?acqrole purl:BFO_0000052 ?scanner.
?acqrole purl:BFO_0000054 ?ctacq .
OPTIONAL {?ctacq ontomedirad:has_setting ?tubecurrent .
?tubecurrent rdf:type dcm:113734 .
?tubecurrent purl:IAO_0000004 ?tubecurrentvalue .
OPTIONAL {?tubecurrent purl:IAO_0000039 ?tubecurrentunit .
?tubecurrentunit rdfs:label ?tubecurrentunitlabel }}.
OPTIONAL {?ctacq ontomedirad:has_setting ?xraymodsetting .
?xraymodsetting rdf:type ?xraymodclass .
?xraymodclass rdfs:subClassOf* dcm:113842 .
?xraymodsetting purl:IAO_0000004 ?useofxraymodvalue } .
OPTIONAL {?ctacq ontomedirad:has_setting ?kvpsetting .
?kvpsetting rdf:type dcm:113733 .
?kvpsetting purl:IAO_0000004 ?kvpvalue .
OPTIONAL {?kvpsetting purl:IAO_0000039 ?kvpunit .
?kvpunit rdfs:label ?kvpunitlabel }}.
OPTIONAL {?ctacq ontomedirad:has_setting ?exptime .
?exptime rdf:type dcm:113824 .
?exptime purl:IAO_0000004 ?exptimevalue .
OPTIONAL {?exptime purl:IAO_0000039 ?exptimeunit .
?exptimeunit rdfs:label ?exptimeunitlabel }}.
?scanner ontomedirad:has_manufacturer_name ?manufacturer .
?scanner ontomedirad:has_model_name ?model .
}

The same request directly on stardog in a web browser is functioning

I see that you’re printing out the query plan (aQuery.explain()). Is that something you would be able to share here?

Would you also be able to share your ontology?

These are the files for help you

The Ontology : https://drive.google.com/open?id=15eePjQtchnf5QFMsBsmI0uMHoagAQ9uk
The RDF Files from populated Graph : RDFpopulated.zip - Google Drive
Ontology and Populated Graphs are on the Stardog
The explanation : QuerryExplain.txt - Google Drive

Thanks for your help

Thanks for the files. I am able to reproduce this issue in Stardog 5.3.1, and we’ll take a deeper look into it.

1 Like

Hi
Did you find something help-full ?

Thanks

I am seeing this error, but only when I enable reasoning. When you see results in the Stardog web console, is the Reasoning toggle above the query set to "on?" When I set it to "on" I get an error even in the web console.

It looks as if you have many axioms in your ontology that are incompatible with our (default and preferred) SL reasoning level. Additionally, it appears that you have some conflicts with some of your classes and rdfs:domain / rdfs:range. Ex:

ASSERTED ontomedirad:CT_image_dataset_489d7a89-032e-41d6-97c1-c9c1f08da13c ontomedirad:has_IRDBB_WADO_handle "/pacs/studies/1.3.12.2.1107.5.1.4.50256.30000007112806125459300000013/series/1.3.12.2.1107.5.1.4.50256.30000007112806161356200001248"
   ASSERTED ontomedirad:has_IRDBB_WADO_handle rdfs:range xsd:anyURI
   ASSERTED ontomedirad:has_id rdfs:range xsd:string
   ASSERTED ontomedirad:has_IRDBB_WADO_handle rdfs:subPropertyOf ontomedirad:has_id

If I remove the range/domain triples from the ontology, I can at least get the query to run. It runs for quite a while, but this error isn't present.

We checked and you’re right. Thank you for your help

We will disable the reasoning for now and correct all troubles during the summer.
Thank You

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