Skip to content

Commit

Permalink
fix(gravsearch): fix list value restriction (DEV-486) (#682)
Browse files Browse the repository at this point in the history
* fix(gravsearch): add missing period to end of list value restriction

* test(gravsearch): fix tests
  • Loading branch information
mdelez committed Mar 16, 2022
1 parent a0f34ce commit 1eccfc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -417,7 +417,7 @@ CONSTRUCT {
?propVal0 <http://api.knora.org/ontology/knora-api/v2#listValueAsListNode> <http://rdfh.ch/lists/0001/treeList>
?propVal0 <http://api.knora.org/ontology/knora-api/v2#listValueAsListNode> <http://rdfh.ch/lists/0001/treeList> .
Expand Down Expand Up @@ -462,7 +462,7 @@ CONSTRUCT {
FILTER NOT EXISTS {
?propVal0 <http://api.knora.org/ontology/knora-api/v2#listValueAsListNode> <http://rdfh.ch/lists/0001/treeList01>
?propVal0 <http://api.knora.org/ontology/knora-api/v2#listValueAsListNode> <http://rdfh.ch/lists/0001/treeList01> .
}
Expand Down
Expand Up @@ -210,7 +210,7 @@ ${statement}
restriction = `FILTER(knora-api:toSimpleDate(${object}) ${propWithVal.valueLiteral.comparisonOperator.type} ${dateValue})`;
} else if (propWithVal.property.objectType === Constants.ListValue) {
// handle list node
restriction = `${object} <${this.complexTypeToProp[propWithVal.property.objectType]}> ${propWithVal.valueLiteral.value.toSparql()}` + '\n';
restriction = `${object} <${this.complexTypeToProp[propWithVal.property.objectType]}> ${propWithVal.valueLiteral.value.toSparql()}` + ' .\n';
// check for comparison operator "not equals"
if (propWithVal.valueLiteral.comparisonOperator.getClassName() === 'NotEquals') {
restriction = `FILTER NOT EXISTS {
Expand Down

0 comments on commit 1eccfc0

Please sign in to comment.