Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove unused trait IOValueV2 #3212

Merged
merged 2 commits into from
Apr 24, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -241,18 +241,13 @@ object ChangeFileRequest {
valueIri: String,
className: Option[String] = None,
ontologyName: String = "knora-api",
): ChangeFileRequest = {
val classNameWithDefaults = className match {
case Some(v) => v
case None => FileModelUtil.getDefaultClassName(fileType)
}
): ChangeFileRequest =
new ChangeFileRequest(
fileType = fileType,
internalFilename = internalFilename,
resourceIRI = resourceIri,
valueIRI = valueIri,
className = classNameWithDefaults,
className = className.getOrElse(FileModelUtil.getDefaultClassName(fileType)),
ontologyName = ontologyName,
) {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,6 @@ sealed trait ResourceV2 {
* The resource's `rdfs:label`.
*/
def label: String

/**
* A map of property IRIs to [[IOValueV2]] objects.
*/
def values: Map[SmartIri, Seq[IOValueV2]]
}

/**
Expand Down Expand Up @@ -599,7 +594,7 @@ case class CreateValueInNewResourceV2(
customValueUUID: Option[UUID] = None,
customValueCreationDate: Option[Instant] = None,
permissions: Option[String] = None,
) extends IOValueV2
)

/**
* Represents a Knora resource to be created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ case class GenerateSparqlForValueInNewResourceV2(
customValueUUID: Option[UUID],
customValueCreationDate: Option[Instant],
permissions: String,
) extends IOValueV2
)

/**
* Represents a response to a [[GenerateSparqlToCreateMultipleValuesRequestV2]], providing a string that can be
Expand All @@ -283,14 +283,6 @@ case class GenerateSparqlToCreateMultipleValuesResponseV2(
hasStandoffLink: Boolean,
)

/**
* The value of a Knora property in the context of some particular input or output operation.
* Any implementation of `IOValueV2` is an API operation-specific wrapper of a `ValueContentV2`.
*/
trait IOValueV2 {
def valueContent: ValueContentV2
}

/**
* Provides information about the deletion of a resource or value.
*
Expand Down Expand Up @@ -322,7 +314,7 @@ case class DeletionInfo(deleteDate: Instant, maybeDeleteComment: Option[String])
/**
* Represents a Knora value as read from the triplestore.
*/
sealed trait ReadValueV2 extends IOValueV2 {
sealed trait ReadValueV2 {

/**
* The IRI of the value.
Expand Down Expand Up @@ -611,7 +603,7 @@ case class CreateValueV2(
valueCreationDate: Option[Instant] = None,
permissions: Option[String] = None,
ingestState: AssetIngestState = AssetInTemp,
) extends IOValueV2
)

/**
* Constructs [[CreateValueV2]] instances based on JSON-LD input.
Expand Down Expand Up @@ -935,8 +927,7 @@ case class UpdateValueContentV2(
permissions: Option[String] = None,
valueCreationDate: Option[Instant] = None,
newValueVersionIri: Option[SmartIri] = None,
) extends IOValueV2
with UpdateValueV2
) extends UpdateValueV2

/**
* New permissions for a value.
Expand Down
Loading