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

Commit 110f7fa

Browse files
committed
simplified server init
1 parent 66143b5 commit 110f7fa

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

sansa-query-spark-parent/sansa-query-spark-server/src/main/scala/net/sansa_stack/query/spark/server/MainSansaSparqlServer.scala

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import org.apache.spark.sql.catalyst.ScalaReflection
3939
import net.sansa_stack.rdf.partition.sparqlify.SparqlifyUtils2
4040
import java.io.File
4141
import java.nio.file.Files
42+
import org.aksw.jena_sparql_api.server.utils.FactoryBeanSparqlServer
4243

4344

4445
object MainSansaSparqlServer
@@ -91,15 +92,7 @@ object MainSansaSparqlServer
9192

9293
val qef = new QueryExecutionFactorySparqlifySpark(sparkSession, rewriter)
9394

94-
val sparqlStmtParser = SparqlStmtParserImpl.create(Syntax.syntaxARQ, true);
95-
96-
val ssf = new SparqlServiceFactory() {
97-
def createSparqlService(serviceUri: String, datasetDescription: DatasetDescription, httpClient: HttpClient) = {
98-
new SparqlServiceImpl(qef, null);
99-
}
100-
};
101-
102-
val server = SparqlServerUtils.startSparqlEndpoint(ssf, sparqlStmtParser, 7531)
95+
val server = FactoryBeanSparqlServer.newInstance.setSparqlServiceFactory(qef).create
10396
server.join()
10497
//
10598
// val q = QueryFactory.create("Select * { ?s <http://xmlns.com/foaf/0.1/givenName> ?o ; <http://dbpedia.org/ontology/deathPlace> ?d }")

0 commit comments

Comments
 (0)