Skip to content
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
@@ -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"

Expand Down
Original file line number Diff line number Diff line change
@@ -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 }
Expand Down