@@ -29,7 +29,7 @@ object RDFGraphMaterializer {
2929 }
3030 }
3131
32- def run (input : File , output : File , profile : ReasoningProfile , writeToSingleFile : Boolean , sortedOutput : Boolean ): Unit = {
32+ def run (input : Seq [ File ] , output : File , profile : ReasoningProfile , writeToSingleFile : Boolean , sortedOutput : Boolean ): Unit = {
3333 val conf = new SparkConf ()
3434 conf.registerKryoClasses(Array (classOf [RDFTriple ]))
3535
@@ -45,7 +45,7 @@ object RDFGraphMaterializer {
4545 .getOrCreate()
4646
4747 // load triples from disk
48- val graph = RDFGraphLoader .loadFromFile (input.getAbsolutePath , session.sparkContext, 4 )
48+ val graph = RDFGraphLoader .loadFromDisk (input, session.sparkContext, 4 )
4949
5050 // create reasoner
5151 val reasoner = profile match {
@@ -65,7 +65,7 @@ object RDFGraphMaterializer {
6565
6666 // the config object
6767 case class Config (
68- in : File = new File ( " . " ),
68+ in : Seq [ File ] = Seq ( ),
6969 out : File = new File (" ." ),
7070 profile : ReasoningProfile = ReasoningProfile .RDFS ,
7171 writeToSingleFile : Boolean = false ,
@@ -79,9 +79,9 @@ object RDFGraphMaterializer {
7979 val parser = new scopt.OptionParser [Config ](" RDFGraphMaterializer" ) {
8080 head(" RDFGraphMaterializer" , " 0.1.0" )
8181
82- opt[File ]('i' , " input" ).required().valueName(" <file> " ).
82+ opt[Seq [ File ]] ('i' , " input" ).required().valueName(" <path1>,<path2>,... " ).
8383 action((x, c) => c.copy(in = x)).
84- text(" the input file in N-Triple format" )
84+ text(" path to file or directory that contains the input files ( in N-Triple format) " )
8585
8686 opt[File ]('o' , " out" ).required().valueName(" <directory>" ).
8787 action((x, c) => c.copy(out = x)).
@@ -91,7 +91,7 @@ object RDFGraphMaterializer {
9191 c.copy(writeToSingleFile = true )).text(" write the output to a single file in the output directory" )
9292
9393 opt[Unit ](" sorted" ).optional().action( (_, c) =>
94- c.copy(sortedOutput = true )).text(" sorted output of the triples per file" )
94+ c.copy(sortedOutput = true )).text(" sorted output of the triples ( per file) " )
9595
9696 opt[ReasoningProfile ]('p' , " profile" ).required().valueName(" {rdfs | owl-horst | owl-el | owl-rl}" ).
9797 action((x, c) => c.copy(profile = x)).
0 commit comments