diff --git a/src/main/scala/eu/neverblink/jelly/cli/command/rdf/RdfSerDesCommand.scala b/src/main/scala/eu/neverblink/jelly/cli/command/rdf/RdfSerDesCommand.scala index e14589c..b16072d 100644 --- a/src/main/scala/eu/neverblink/jelly/cli/command/rdf/RdfSerDesCommand.scala +++ b/src/main/scala/eu/neverblink/jelly/cli/command/rdf/RdfSerDesCommand.scala @@ -1,21 +1,21 @@ package eu.neverblink.jelly.cli.command.rdf +import caseapp.* import com.google.protobuf.InvalidProtocolBufferException -import org.apache.jena.riot.RiotException import eu.neverblink.jelly.cli.* -import caseapp.* import eu.neverblink.jelly.cli.command.rdf.util.{RdfCommandPrintUtil, RdfFormat} - -import scala.reflect.TypeTest import eu.neverblink.jelly.core.{RdfProtoDeserializationError, RdfProtoSerializationError} +import org.apache.jena.riot.RiotException import java.io.{InputStream, OutputStream} +import scala.reflect.Typeable /** This abstract class is responsible for the common logic in both RDF parsing commands */ -abstract class RdfSerDesCommand[T <: HasJellyCommandOptions: {Parser, Help}, F <: RdfFormat](using - tt: TypeTest[RdfFormat, F], -) extends JellyCommand[T]: +abstract class RdfSerDesCommand[ + T <: HasJellyCommandOptions: {Parser, Help}, + F <: RdfFormat: Typeable, +] extends JellyCommand[T]: override final def group = "rdf" diff --git a/src/main/scala/eu/neverblink/jelly/cli/command/rdf/util/RdfCommandPrintUtil.scala b/src/main/scala/eu/neverblink/jelly/cli/command/rdf/util/RdfCommandPrintUtil.scala index 90fd85d..4368a7a 100644 --- a/src/main/scala/eu/neverblink/jelly/cli/command/rdf/util/RdfCommandPrintUtil.scala +++ b/src/main/scala/eu/neverblink/jelly/cli/command/rdf/util/RdfCommandPrintUtil.scala @@ -1,8 +1,8 @@ package eu.neverblink.jelly.cli.command.rdf.util -import scala.reflect.TypeTest +import scala.reflect.Typeable -trait RdfCommandPrintUtil[F <: RdfFormat](using tt: TypeTest[RdfFormat, F]): +trait RdfCommandPrintUtil[F <: RdfFormat: Typeable]: val defaultFormat: RdfFormat lazy val validFormats: List[RdfFormat] = RdfFormat.all.collect { case x: F => x }