@@ -43,17 +43,17 @@ object Sparqlify {
4343 val lang = Lang .NTRIPLES
4444 val graphRdd = spark.rdf(lang)(input)
4545
46- val checkendpoint = endpoint match {
47- case j if ( endpoint) =>
46+ endpoint match {
47+ case j if endpoint =>
4848 val partitions = RdfPartitionUtilsSpark .partitionGraph(graphRdd)
4949 val rewriter = SparqlifyUtils3 .createSparqlSqlRewriter(spark, partitions)
5050
5151 val port = 7531
5252
5353 val qef = new QueryExecutionFactorySparqlifySpark (spark, rewriter)
5454 val server = FactoryBeanSparqlServer .newInstance.setSparqlServiceFactory(qef).setPort(port).create()
55- if (Desktop .isDesktopSupported() ) {
56- Desktop .getDesktop() .browse(new URI (" http://localhost:" + port + " /sparql" ));
55+ if (Desktop .isDesktopSupported) {
56+ Desktop .getDesktop.browse(URI .create (" http://localhost:" + port + " /sparql" ))
5757 }
5858 server.join()
5959 case _ =>
@@ -77,11 +77,11 @@ object Sparqlify {
7777 action((x, c) => c.copy(in = x)).
7878 text(" path to file that contains the data (in N-Triples format)" )
7979
80- opt[String ]('q' , " sparql" ).optional().valueName(" query" ).
80+ opt[String ]('q' , " sparql" ).optional().valueName(" < query> " ).
8181 action((x, c) => c.copy(sparql = x)).
8282 text(" a SPARQL query" )
8383
84- opt[Boolean ]('e' , " endpoint" ).optional().valueName(" SPARQL endoint enabled" ).
84+ opt[Boolean ]('e' , " endpoint" ).optional().valueName(" SPARQL endpoint enabled" ).
8585 action((x, c) => c.copy(endpoint = x)).
8686 text(" enable SPARQL endpoint , default:'enabled'" )
8787
@@ -90,11 +90,11 @@ object Sparqlify {
9090 text(" port that SPARQL endpoint will be exposed, default:'7531'" )
9191
9292 checkConfig(c =>
93- if (c.endpoint == false && c.sparql.isEmpty) failure(" Option --sparql must not be empty if endpoint is disabled" )
93+ if (! c.endpoint && c.sparql.isEmpty) failure(" Option --sparql must not be empty if endpoint is disabled" )
9494 else success)
9595
9696 checkConfig(c =>
97- if (c.endpoint == true && c.port.isEmpty) failure(" Option --port ust not be empty if endpoint is enabled" )
97+ if (c.endpoint && c.port.isEmpty) failure(" Option --port ust not be empty if endpoint is enabled" )
9898 else success)
9999
100100 help(" help" ).text(" prints this usage text" )
0 commit comments