Skip to content

Commit

Permalink
fix: handle properties
Browse files Browse the repository at this point in the history
  • Loading branch information
recalcitrantsupplant committed Dec 5, 2024
1 parent 8073539 commit 191ec8e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions prez/services/query_generation/cql.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,16 +349,16 @@ def _handle_in(self, args, existing_ggps=None):
yield ggps

def _handle_shacl_defined_prop(self, prop):
tssp_list, object = self.queryable_id_to_tssp(self.queryable_props[prop])
tss_triple = (
Var(value="focus_node"),
IRI(value=SHACL_FILTER_NAMESPACE[prop]),
object,
)
self.tss_list.append(TriplesSameSubject.from_spo(*tss_triple))
tssp_list, obj = self.queryable_id_to_tssp(self.queryable_props[prop])
# tss_triple = (
# Var(value="focus_node"),
# IRI(value=SHACL_FILTER_NAMESPACE[prop]),
# object,
# )
# self.tss_list.append(TriplesSameSubject.from_spo(*tss_triple))
self.tssp_list.extend(tssp_list)
self.inner_select_vars.append(object)
return object
self.inner_select_vars.append(obj)
return obj

def _extract_spatial_info(self, coordinates_list, args):
coordinates = []
Expand Down Expand Up @@ -407,7 +407,8 @@ def _handle_temporal(self, comp_func, args, existing_ggps=None):
prop = arg.get("property")
if prop:
if prop in self.queryable_props:
object = self._handle_shacl_defined_prop(prop)
obj = self._handle_shacl_defined_prop(prop)
operands[f"t{i}_{label}"] = obj
else:
self._triple_for_time_prop(ggps, i, label, prop, operands)
continue
Expand Down

0 comments on commit 191ec8e

Please sign in to comment.