I want to create a subgraph consisting of only "Disorder sub-hierarchy" of SNOMED. I am trying to create this subgraph from the complete SNOMED-OWL graph using a SPARQL CONSTRUCT query. However the property consisting of owl:equivalentCLass/ owl:intersectionOf / owl:Restriction shows an empty [] in the created subgraph. The same query displays correct result in the ontology editor window. I am new to SPARQL and OWL. Can someone please help me with traversing the complex owl axioms in attribute relationships so that the subgraph is created correctly. I have used the SPARQL query tab provided in the free edition of TopBraid ontology editor Version 6.0.1 (tbcfe-6.0.1). This is the query the I tried. I had provided screenshots in my question earlier but they are not clearly visible I guess.


    #select disorder concepts containing "and" and lenght <=4 words
    CONSTRUCT {?s ?p ?o}
    WHERE
    {
      ?s rdfs:label ?fsn
      bind(replace(?fsn, "\\S", "") as ?space)
      bind(strlen(?space) as ?spacecount)
     FILTER(REGEX(?fsn," and ") && REGEX(?fsn,"(disorder)")) 
    FILTER(?spacecount<=3).
    ?s ?p ?o
    }
    ORDER BY ?spacecount

This query displays the correct output in TopBraid editor retrieved results but when I export them to a .ttl file, I get a blank [] wherever there are complex owl axioms like owl:intersectionOf, owl:EquivalentClass, owl:restriction, etc.

**Concept in original file**
<http://snomed.info/id/188487008> rdf:type owl:Class ;
                                  rdfs:subClassOf [ owl:intersectionOf ( <http://snomed.info/id/64572001>
                                                                         [ rdf:type owl:Restriction ;
                                                                           owl:onProperty <http://snomed.info/id/609096000> ;
                                                                           owl:someValuesFrom [ rdf:type owl:Restriction ;
                                                                                                owl:onProperty <http://snomed.info/id/116676008> ;
                                                                                                owl:someValuesFrom <http://snomed.info/id/128929007>
                                                                                              ]
                                                                         ]
                                                                       ) ;
                                                    rdf:type owl:Class
                                                  ] ;
                                  rdfs:label "Lymphosarcoma and reticulosarcoma (disorder)"@en ;
                                  skos:prefLabel "Lymphosarcoma and reticulosarcoma"@en .

**Concept created/exported in Subgraph**
:188487008  a            owl:Class ;
        rdfs:label       "Lymphosarcoma and reticulosarcoma (disorder)"@en ;
        rdfs:subClassOf  owl:Thing ;
        rdfs:subClassOf  []  ;
        skos:prefLabel   "Lymphosarcoma and reticulosarcoma"@en .

I have referred this solution but it doesn't seem to work for me and gives an empty resultset- (SPARQL: how to transfer owl:equivalentClass to rdfs:subClassOf (owl:Restriction) properties?) Screenshots Ontology editor displays the ?o correctly Generated subgraph file has a blank [] for ?o

0

There are 0 answers