Skip to content

Commit

Permalink
Use shortcut in 'distant_from' query
Browse files Browse the repository at this point in the history
  • Loading branch information
mboudet committed Aug 11, 2023
1 parent 855f286 commit d708e8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions askomics/libaskomics/SparqlQuery.py
Expand Up @@ -1539,6 +1539,9 @@ def build_query_from_json(self, preview=False, for_editor=False):
subject = self.format_sparql_variable("{}{}_uri".format(attribute["entityLabel"], attribute["nodeId"]))
if attribute["faldo"]:
predicate = "faldo:location/faldo:{}/faldo:position".format("begin" if attribute["faldo"].endswith("faldoStart") else "end")
# Use faldo shortcut for faldo queries
if attribute["id"] in start_end or attribute["id"] in linked_attributes:
predicate = "askomics:{}".format("faldoBegin" if attribute["faldo"].endswith("faldoStart") else "faldoEnd")
else:
predicate = "<{}>".format(attribute["uri"])
obj = self.format_sparql_variable("{}{}_{}".format(attribute["entityLabel"], attribute["nodeId"], attribute["label"]))
Expand Down

0 comments on commit d708e8f

Please sign in to comment.