Skip to content

Commit

Permalink
chore: Remove unused code (#3496)
Browse files Browse the repository at this point in the history
  • Loading branch information
seakayone authored Feb 5, 2025
1 parent 3ed58b6 commit 2d22b98
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 98 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
*/

package org.knora.webapi.messages.v2.responder.ontologymessages
import com.typesafe.scalalogging.Logger
import org.apache.commons.lang3.builder.HashCodeBuilder
import org.apache.pekko
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.util.Timeout
import org.eclipse.rdf4j.model.IRI as Rdf4jIRI
import org.eclipse.rdf4j.model.vocabulary.OWL
import org.eclipse.rdf4j.model.vocabulary.RDF
Expand All @@ -19,8 +15,6 @@ import zio.prelude.Validation

import java.time.Instant
import java.util.UUID
import scala.concurrent.ExecutionContext
import scala.concurrent.Future

import dsp.constants.SalsahGui
import dsp.errors.AssertionException
Expand Down Expand Up @@ -672,36 +666,6 @@ case class ChangePropertyGuiElementRequest(
requestingUser: User,
) extends OntologiesResponderRequestV2

/**
* Constructs instances of [[ChangePropertyGuiElementRequest]] based on JSON-LD input.
*/
object ChangePropertyGuiElementRequest extends KnoraJsonLDRequestReaderV2[ChangePropertyGuiElementRequest] {

/**
* Converts a JSON-LD request to a [[ChangePropertyGuiElementRequest]].
*
* @param jsonLDDocument the JSON-LD input.
* @param apiRequestID the UUID of the API request.
* @param requestingUser the user making the request.
* @param appActor a reference to the application actor.
* @param log a logging adapter.
* @return a [[ChangePropertyLabelsOrCommentsRequestV2]] representing the input.
*/
@deprecated
override def fromJsonLD(
jsonLDDocument: JsonLDDocument,
apiRequestID: UUID,
requestingUser: User,
appActor: ActorRef,
log: Logger,
)(implicit timeout: Timeout, executionContext: ExecutionContext): Future[ChangePropertyGuiElementRequest] =
Future {
throw BadRequestException(
"Deprecated method fromJsonLD() for ChangePropertyGuiElementRequest. Please report this as a bug.",
)
}
}

/**
* Requests that a property's labels or comments are changed. A successful response will be a [[ReadOntologyV2]].
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@

package org.knora.webapi.messages.v2.responder.standoffmessages

import com.typesafe.scalalogging.Logger
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.util.Timeout

import java.time.Instant
import java.util.UUID
import scala.collection.immutable.SortedSet
import scala.concurrent.ExecutionContext
import scala.concurrent.Future

import dsp.errors.AssertionException
import dsp.valueobjects.Iri
Expand All @@ -28,7 +22,6 @@ import org.knora.webapi.messages.SmartIri
import org.knora.webapi.messages.StringFormatter
import org.knora.webapi.messages.util.rdf.*
import org.knora.webapi.messages.v2.responder.KnoraContentV2
import org.knora.webapi.messages.v2.responder.KnoraJsonLDRequestReaderV2
import org.knora.webapi.messages.v2.responder.KnoraJsonLDResponseV2
import org.knora.webapi.messages.v2.responder.ontologymessages.StandoffEntityInfoGetResponseV2
import org.knora.webapi.slice.admin.domain.model.User
Expand Down Expand Up @@ -64,18 +57,7 @@ case class CreateMappingRequestV2(
case class CreateMappingRequestMetadataV2(label: String, projectIri: SmartIri, mappingName: String)
extends StandoffResponderRequestV2

object CreateMappingRequestMetadataV2 extends KnoraJsonLDRequestReaderV2[CreateMappingRequestMetadataV2] {

override def fromJsonLD(
jsonLDDocument: JsonLDDocument,
apiRequestID: UUID,
requestingUser: User,
appActor: ActorRef,
log: Logger,
)(implicit timeout: Timeout, executionContext: ExecutionContext): Future[CreateMappingRequestMetadataV2] =
Future {
fromJsonLDSync(jsonLDDocument = jsonLDDocument)
}
object CreateMappingRequestMetadataV2 {

def fromJsonLDSync(jsonLDDocument: JsonLDDocument): CreateMappingRequestMetadataV2 = {

Expand Down

0 comments on commit 2d22b98

Please sign in to comment.