Skip to content

Commit

Permalink
pom cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzBuehmann committed Mar 12, 2021
1 parent cc06ae3 commit babc2fd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 42 deletions.
6 changes: 0 additions & 6 deletions sansa-query/sansa-query-spark/pom.xml
Expand Up @@ -39,19 +39,16 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.10.1</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.5.1</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.10.1</version>
</dependency>

<dependency>
Expand All @@ -78,7 +75,6 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>27.0.1-jre</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -294,7 +290,6 @@
<dependency>
<groupId>com.twitter</groupId>
<artifactId>chill_${scala.binary.version}</artifactId>
<version>0.9.3</version>
</dependency>

<dependency>
Expand All @@ -306,7 +301,6 @@
<dependency>
<groupId>com.github.scopt</groupId>
<artifactId>scopt_${scala.binary.version}</artifactId>
<version>4.0.0</version>
</dependency>

<dependency>
Expand Down
@@ -1,7 +1,6 @@
package net.sansa_stack.query.spark.ontop

import java.net.URI

import net.sansa_stack.rdf.spark.io._
import org.apache.jena.graph.{Node, NodeFactory, Triple}
import org.apache.jena.shared.impl.PrefixMappingImpl
Expand Down Expand Up @@ -48,40 +47,34 @@ object PropertyTablePartitioner {
overwrite: Boolean = false
)

import scopt.OParser
val builder = OParser.builder[Config]
val parser = {
import builder._
OParser.sequence(
programName("ppt-partitioner"),
head("property table partitioner", "0.1"),
opt[URI]('i', "input")
.required()
.action((x, c) => c.copy(inputPath = x))
.text("path to input data"),
opt[URI]('o', "output")
.required()
.action((x, c) => c.copy(outputPath = x))
.text("path to output directory"),
opt[URI]('s', "schema")
.optional()
.action((x, c) => c.copy(schemaPath = x))
.text("an optional file containing the OWL schema to process only object and data properties"),
opt[String]('t', "tableName")
.optional()
.action((x, c) => c.copy(tableName = x))
.text("the table name"),
opt[Boolean]('s', "stats")
.action((x, c) => c.copy(computeStatistics = x))
.text("compute statistics"),
opt[Unit]( "overwrite")
.action((_, c) => c.copy(overwrite = true))
.text("overwrite table if exists")
)
val parser = new scopt.OptionParser[Config]("PropertyTablePartitioner") {
head("property table partitioner", "0.1")
opt[URI]('i', "input")
.required()
.action((x, c) => c.copy(inputPath = x))
.text("path to input data")
opt[URI]('o', "output")
.required()
.action((x, c) => c.copy(outputPath = x))
.text("path to output directory")
opt[URI]('s', "schema")
.optional()
.action((x, c) => c.copy(schemaPath = x))
.text("an optional file containing the OWL schema to process only object and data properties")
opt[String]('t', "tableName")
.optional()
.action((x, c) => c.copy(tableName = x))
.text("the table name")
opt[Boolean]('s', "stats")
.action((x, c) => c.copy(computeStatistics = x))
.text("compute statistics")
opt[Unit]("overwrite")
.action((_, c) => c.copy(overwrite = true))
.text("overwrite table if exists")
}

def main(args: Array[String]): Unit = {
OParser.parse(parser, args, Config()) match {
parser.parse(args, Config()) match {
case Some(config) =>
run(config)
case _ =>
Expand Down
Expand Up @@ -52,8 +52,7 @@ object VerticalPartitioner {
partitioningThreshold: Int = 100,
mode: String = "partitioner")

import scopt.OParser
val parser = new scopt.OptionParser[Config]("SPARQLEngineExample") {
val parser = new scopt.OptionParser[Config]("VerticalPartitioner") {
head("vertical partitioner", "0.1")
opt[URI]('i', "input")
.required()
Expand Down Expand Up @@ -114,8 +113,6 @@ object VerticalPartitioner {
}

def main(args: Array[String]): Unit = {
JenaSystem.init()

parser.parse(args, Config()) match {
case Some(config) =>
if (config.mode == "partitioner") {
Expand Down

0 comments on commit babc2fd

Please sign in to comment.