Skip to content

Commit

Permalink
adapt query for main classes that do not have any sub_classes, e.g. a…
Browse files Browse the repository at this point in the history
…ge at diagnosis
  • Loading branch information
JHogenboom committed Sep 30, 2024
1 parent b810c28 commit 531916f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions triplestore-collaboration-descriptives/retrieve_classes.rq
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ WHERE {
?patient rdf:type ?main_class.
?patient dbo:has_cell ?variable_cell.
?variable_cell dbo:has_value ?value.
?variable_cell rdf:type ?sub_class.

OPTIONAL {
?variable_cell rdf:type ?sub_class.
FILTER(isURI(?sub_class) && STRSTARTS(STR(?sub_class), "http://") && !STRSTARTS(STR(?sub_class), "http://www.w3.org/") && !STRSTARTS(STR(?sub_class), "http://um-cds/") && !STRSTARTS(STR(?sub_class), "http://www.data.local/"))
}
FILTER(isURI(?main_class) && STRSTARTS(STR(?main_class), "http://") && !STRSTARTS(STR(?main_class), "http://www.w3.org/") && !STRSTARTS(STR(?main_class), "http://um-cds/") && !STRSTARTS(STR(?main_class), "http://www.data.local/"))
FILTER(isURI(?sub_class) && STRSTARTS(STR(?sub_class), "http://") && !STRSTARTS(STR(?sub_class), "http://www.w3.org/") && !STRSTARTS(STR(?sub_class), "http://um-cds/") && !STRSTARTS(STR(?sub_class), "http://www.data.local/"))

}
GROUP BY ?main_class ?sub_class

0 comments on commit 531916f

Please sign in to comment.