Skip to content
This repository was archived by the owner on Oct 8, 2020. It is now read-only.

Commit 92a60ef

Browse files
CLI adapted to older Scopt version.
1 parent 50cf3b4 commit 92a60ef

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

sansa-inference-flink/src/main/scala/net/sansa_stack/inference/flink/RDFGraphMaterializer.scala

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ object RDFGraphMaterializer {
2626
}
2727
}
2828

29-
def run(args: Array[String], input: Seq[File], output: File, profile: ReasoningProfile, writeToSingleFile: Boolean, sortedOutput: Boolean): Unit = {
29+
def run(args: Array[String], input: File, output: File, profile: ReasoningProfile, writeToSingleFile: Boolean, sortedOutput: Boolean): Unit = {
3030
// get params
3131
val params: ParameterTool = ParameterTool.fromArgs(args)
3232

@@ -38,7 +38,7 @@ object RDFGraphMaterializer {
3838
env.getConfig.setGlobalJobParameters(params)
3939

4040
// load triples from disk
41-
val graph = RDFGraphLoader.loadFromDisk(input(0), env)
41+
val graph = RDFGraphLoader.loadFromDisk(input, env)
4242
println(s"|G| = ${graph.size()}")
4343

4444
// create reasoner
@@ -62,7 +62,7 @@ object RDFGraphMaterializer {
6262

6363
// the config object
6464
case class Config(
65-
in: Seq[File] = Seq(),
65+
in: File = new File("."),
6666
out: File = new File("."),
6767
profile: ReasoningProfile = ReasoningProfile.RDFS,
6868
writeToSingleFile: Boolean = false,
@@ -76,7 +76,10 @@ object RDFGraphMaterializer {
7676
val parser = new scopt.OptionParser[Config]("RDFGraphMaterializer") {
7777
head("RDFGraphMaterializer", "0.1.0")
7878

79-
opt[Seq[File]]('i', "input").required().valueName("<path1>,<path2>,...").
79+
// opt[Seq[File]]('i', "input").required().valueName("<path1>,<path2>,...").
80+
// action((x, c) => c.copy(in = x)).
81+
// text("path to file or directory that contains the input files (in N-Triple format)")
82+
opt[File]('i', "input").required().valueName("<path>").
8083
action((x, c) => c.copy(in = x)).
8184
text("path to file or directory that contains the input files (in N-Triple format)")
8285

0 commit comments

Comments
 (0)