diff --git a/integration/src/test/scala/org/knora/webapi/e2e/v2/ValuesRouteV2E2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/v2/ValuesRouteV2E2ESpec.scala index 8caac18595..5094536d9a 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/v2/ValuesRouteV2E2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/v2/ValuesRouteV2E2ESpec.scala @@ -686,6 +686,7 @@ class ValuesRouteV2E2ESpec extends E2ESpec { private val customValueIri: IRI = s"http://rdfh.ch/0001/a-thing/values/$customValueUUID" "The values v2 endpoint" should { + "get the latest versions of values, given their UUIDs" in { // The UUIDs of values in TestDing. val testDingValues: Map[String, String] = Map( diff --git a/integration/src/test/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala b/integration/src/test/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala index 8e7d9a7d3b..555c976c28 100644 --- a/integration/src/test/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala +++ b/integration/src/test/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala @@ -407,6 +407,7 @@ class ValuesResponderV2Spec extends CoreSpec with ImplicitSender { } "The values responder" should { + "create an integer value" in { // Add the value. diff --git a/webapi/src/main/scala/org/knora/webapi/messages/v2/responder/valuemessages/ValueMessagesV2.scala b/webapi/src/main/scala/org/knora/webapi/messages/v2/responder/valuemessages/ValueMessagesV2.scala index 3d17a1c001..0cdb205ee9 100644 --- a/webapi/src/main/scala/org/knora/webapi/messages/v2/responder/valuemessages/ValueMessagesV2.scala +++ b/webapi/src/main/scala/org/knora/webapi/messages/v2/responder/valuemessages/ValueMessagesV2.scala @@ -14,6 +14,7 @@ import java.time.Instant import java.util.UUID import scala.language.implicitConversions import scala.util.Try + import dsp.errors.AssertionException import dsp.errors.BadRequestException import dsp.errors.NotFoundException diff --git a/webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala b/webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala index e2895a263b..2911e3955f 100644 --- a/webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala +++ b/webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala @@ -404,7 +404,7 @@ final case class ValuesResponderV2( /** * Creates an ordinary value (i.e. not a link), using an existing transaction, assuming that pre-update checks have already been done. * - * @param resourceInfo information about the the resource in which to create the value. + * @param resourceInfo information about the resource in which to create the value. * @param propertyIri the property that should point to the value. * @param value an [[ValueContentV2]] describing the value. * @param maybeValueIri the optional custom IRI supplied for the value. diff --git a/webapi/src/main/scala/org/knora/webapi/slice/resources/repo/model/ResourceCreateModels.scala b/webapi/src/main/scala/org/knora/webapi/slice/resources/repo/model/ResourceCreateModels.scala index 9da6ff2bf3..cbaddca6e5 100644 --- a/webapi/src/main/scala/org/knora/webapi/slice/resources/repo/model/ResourceCreateModels.scala +++ b/webapi/src/main/scala/org/knora/webapi/slice/resources/repo/model/ResourceCreateModels.scala @@ -7,6 +7,7 @@ package org.knora.webapi.slice.resources.repo.model import java.time.Instant import java.util.UUID + import org.knora.webapi.messages.util.CalendarNameV2 import org.knora.webapi.messages.util.DatePrecisionV2 import org.knora.webapi.slice.admin.domain.model.KnoraProject.CopyrightAttribution diff --git a/webapi/src/main/scala/org/knora/webapi/slice/resources/repo/service/ResourcesRepoLive.scala b/webapi/src/main/scala/org/knora/webapi/slice/resources/repo/service/ResourcesRepoLive.scala index c6a4c230d5..7a0dc88f14 100644 --- a/webapi/src/main/scala/org/knora/webapi/slice/resources/repo/service/ResourcesRepoLive.scala +++ b/webapi/src/main/scala/org/knora/webapi/slice/resources/repo/service/ResourcesRepoLive.scala @@ -23,6 +23,7 @@ import org.eclipse.rdf4j.sparqlbuilder.rdf.RdfPredicateObjectList import zio.* import java.time.Instant + import dsp.valueobjects.UuidUtil import org.knora.webapi.slice.common.repo.rdf.Vocabulary.KnoraBase as KB import org.knora.webapi.slice.resourceinfo.domain.InternalIri diff --git a/webapi/src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/v2/addValueVersion.scala.txt b/webapi/src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/v2/addValueVersion.scala.txt index 89ccdb0a92..b1ccfef3f9 100644 --- a/webapi/src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/v2/addValueVersion.scala.txt +++ b/webapi/src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/v2/addValueVersion.scala.txt @@ -234,6 +234,20 @@ DELETE { case None => {} } + @fileValueContentV2.fileValue.copyrightAttribution match { + case Some(copyrightAttribution) => { + <@newValueIri> knora-base:hasCopyrightAttribution """@copyrightAttribution.value""" . + } + case None => {} + } + + @fileValueContentV2.fileValue.license match { + case Some(license) => { + <@newValueIri> knora-base:hasLicense """@license.value""" . + } + case None => {} + } + @fileValueContentV2 match { case stillImageFileValue: StillImageFileValueContentV2 => { <@newValueIri> knora-base:dimX @stillImageFileValue.dimX ; diff --git a/webapi/src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/v2/createValue.scala.txt b/webapi/src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/v2/createValue.scala.txt index d0de49dcac..fa8a7b9486 100644 --- a/webapi/src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/v2/createValue.scala.txt +++ b/webapi/src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/v2/createValue.scala.txt @@ -228,6 +228,20 @@ DELETE { case None => {} } + @fileValueContentV2.fileValue.copyrightAttribution match { + case Some(copyrightAttribution) => { + <@newValueIri> knora-base:hasCopyrightAttribution """@copyrightAttribution.value""" . + } + case None => {} + } + + @fileValueContentV2.fileValue.license match { + case Some(license) => { + <@newValueIri> knora-base:hasLicense """@license.value""" . + } + case None => {} + } + @fileValueContentV2 match { case stillImageFileValue: StillImageFileValueContentV2 => { <@newValueIri> knora-base:dimX @stillImageFileValue.dimX ;