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
Expand Up @@ -38,7 +38,7 @@ case class RdfValidateOptions(
compareToRdfFile: Option[String] = None,
@HelpMessage(
"Format of the RDF file to compare the input stream to. If not specified, the format is " +
"inferred from the file name.",
"inferred from the file name. " + RdfValidatePrint.validFormatsString,
)
compareToFormat: Option[String] = None,
@HelpMessage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ trait RdfCommandPrintUtil[F <: RdfFormat](using tt: TypeTest[RdfFormat, F]):
/** Prints the available RDF formats to the user.
*/
lazy val validFormatsString: String =
validFormats.map(RdfFormat.optionString).mkString(", ")
validFormats.map(RdfFormat.optionString).mkString("; ")

lazy val helpMsg: String =
f"Possible values: ${validFormatsString}. Default format: ${defaultFormat.fullName}"
f"Possible values: ${validFormatsString}. Default: ${defaultFormat.fullName}"
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ object RdfFormat:
// We do not ever want to write or read from Jelly to Jelly
// So better not have it as Writeable or Readable, just mark that it's integrated into Jena
case object JellyBinary extends RdfFormat.Jena:
override val fullName: String = "Jelly binary format"
override val fullName: String = "Jelly binary"
override val cliOptions: List[String] = List("jelly")
override val jenaLang: Lang = JellyLanguage.JELLY

case object JellyText extends RdfFormat, RdfFormat.Writeable, RdfFormat.Readable:
override val fullName: String = "Jelly text format"
override val fullName: String = "Jelly text"
override val cliOptions: List[String] = List("jelly-text")
val extension = ".jelly.txt"

Expand All @@ -79,7 +79,7 @@ object RdfFormat:
/** Returns a string representation of the option for the user.
*/
def optionString(option: RdfFormat): String =
f"${option.cliOptions.map(s => f"\"${s}\"").mkString(", ")} for ${option.fullName}"
f"${option.fullName}: ${option.cliOptions.map(s => f"$s").mkString(", ")}"

/** Finds the appropriate RdfFormat based on supplied option string.
*/
Expand Down