RDFBones / RDFBones-O

An RDF ontology for research data from physical anthropology and related fields of expertise.
4 stars 1 forks source link

[all ontologies] Sorting directives and restrictions inconsistent #162

Open zarquon42b opened 2 years ago

zarquon42b commented 2 years ago

In order to achieve a consistent sorting throughout the system, we need all value-labels need to be sorted according to the same pattern. This means

That way, we can query those by finding the connections from the measurement datum => VS => Labels => Sortingdirectives => restrict to the one directive that points to VS .

zarquon42b commented 2 years ago

@cuboideum and me decided to postpone any sorting issues to the final stage of the project.

zarquon42b commented 2 years ago
PREFIX obo: <http://purl.obolibrary.org/obo/>
                    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
                    PREFIX standards-si: <http://w3id.org/rdfbones/ext/standards-si/>
                    PREFIX owl: <http://www.w3.org/2002/07/owl#>
                    SELECT DISTINCT  ?r4svs  WHERE {
                      ?MDClass rdfs:subClassOf ?myRS3. 
                      ?myRS3 a owl:Restriction ; 
                            owl:onProperty <http://purl.obolibrary.org/obo/OBI_0001938> ;
                            owl:allValuesFrom  ?r4svs.
                      ?r4svs rdfs:subClassOf ?myRS4 .
                    OPTIONAL {
                        ?myRS4 a owl:Restriction ;
                            owl:onProperty ?ConnectValue ;
                            owl:allValuesFrom  ?l4.
                            ?value a ?l4.
                          optional {?index obo:IAO_0000136 ?value .
                                ?index a ?sortingclass .
                          optional {?sortingclass rdfs:subClassOf ?sortRes .
                                ?sortRes a owl:Restriction ;
                                        owl:onClass  ?r4svs.}}
                        }
                       OPTIONAL {
                       ?myRS4 a owl:Restriction ;
                           owl:onProperty ?connect;
                           owl:onClass|owl:someValuesFrom   ?l4.
                           ?l4   owl:oneOf/rdf:rest*/rdf:first ?value .
                            optional {?index obo:IAO_0000136 ?value .
                           ?index a ?sortingclass .
                               optional { ?sortingclass rdfs:subClassOf ?sortRes .
                                ?sortRes a owl:Restriction ;
                                        owl:onClass  ?r4svs.}}
    }
        FILTER(! bound(?index))

                    } ORDER BY ?index