Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion case_utils/case_sparql_select/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def query_text_to_variables(select_query_text: str) -> typing.List[str]:
select_query_text_lines = select_query_text.split("\n")
select_line = [
line for line in select_query_text_lines if line.startswith("SELECT ")
][0]
][0].strip()
variables = select_line.replace(" DISTINCT", "").replace("SELECT ", "").split(" ")
return variables

Expand Down
4 changes: 3 additions & 1 deletion tests/case_utils/case_sparql_select/subclass.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
PREFIX uco-observable: <https://ontology.unifiedcyberontology.org/uco/observable/>
SELECT ?nFile
# NOTE: There is intentionally a trailing whitespace in the SELECT clause.
# NOTE: This query is expected to have one output column.
SELECT ?nFile
WHERE {
?nFile a/rdfs:subClassOf* uco-observable:ObservableObject .
}