Skip to content

Commit

Permalink
Merge branch 'main' into update/patches
Browse files Browse the repository at this point in the history
  • Loading branch information
seakayone authored Nov 3, 2023
2 parents 7579a45 + d81a88e commit 690f574
Show file tree
Hide file tree
Showing 13 changed files with 396 additions and 475 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ object ITTestDataFactory {
.make(name)
.getOrElse(throw new IllegalArgumentException(s"Invalid Name $name."))

def projectDescription(description: Seq[V2.StringLiteralV2]): ProjectDescription =
ProjectDescription
def projectDescription(description: Seq[V2.StringLiteralV2]): Description =
Description
.make(description)
.getOrElse(throw new IllegalArgumentException(s"Invalid ProjectDescription $description."))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ package org.knora.webapi.messages.util.search.gravsearch.prequery

import zio._

import scala.collection.mutable.ArrayBuffer

import dsp.errors.AssertionException
import org.knora.webapi.CoreSpec
import org.knora.webapi.core.MessageRelay
Expand Down Expand Up @@ -102,7 +100,7 @@ class GravsearchToCountPrequeryTransformerSpec extends CoreSpec {
groupBy = Nil,
orderBy = Nil,
whereClause = WhereClause(
patterns = ArrayBuffer(
patterns = Vector(
StatementPattern(
subj = QueryVariable(variableName = "thing"),
pred = IriRef(
Expand Down Expand Up @@ -201,7 +199,7 @@ class GravsearchToCountPrequeryTransformerSpec extends CoreSpec {
val transformedQueryWithDecimalOptionalSortCriterionAndFilterComplex: SelectQuery =
SelectQuery(
fromClause = None,
variables = Vector(
variables = List(
Count(
outputVariableName = "count",
distinct = true,
Expand Down Expand Up @@ -237,14 +235,6 @@ class GravsearchToCountPrequeryTransformerSpec extends CoreSpec {
),
OptionalPattern(
patterns = Vector(
StatementPattern(
subj = QueryVariable(variableName = "decimal"),
pred = IriRef(
iri = "http://www.knora.org/ontology/knora-base#valueHasDecimal".toSmartIri,
propertyPathOperator = None
),
obj = QueryVariable(variableName = "decimalVal")
),
StatementPattern(
subj = QueryVariable(variableName = "thing"),
pred = IriRef(
Expand All @@ -264,6 +254,14 @@ class GravsearchToCountPrequeryTransformerSpec extends CoreSpec {
datatype = "http://www.w3.org/2001/XMLSchema#boolean".toSmartIri
)
),
StatementPattern(
subj = QueryVariable(variableName = "decimal"),
pred = IriRef(
iri = "http://www.knora.org/ontology/knora-base#valueHasDecimal".toSmartIri,
propertyPathOperator = None
),
obj = QueryVariable(variableName = "decimalVal")
),
FilterPattern(expression =
CompareExpression(
leftArg = QueryVariable(variableName = "decimalVal"),
Expand Down
Loading

0 comments on commit 690f574

Please sign in to comment.