From f2173b8422183ac725273c8e73248b815c35bc3f Mon Sep 17 00:00:00 2001 From: Luigi Asprino Date: Thu, 5 Dec 2024 06:49:08 +0100 Subject: [PATCH] #513 Update CLI information in README.md --- README.md | 35 ++++++++++++------- .../sparqlanything/cli/SPARQLAnything.java | 5 --- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index f096b0bf..95800d48 100644 --- a/README.md +++ b/README.md @@ -551,9 +551,9 @@ An executable JAR can be obtained from the [Releases](https://github.com/spice-h The jar can be executed as follows: ``` -usage: java -jar sparql.anything- -q query [-f ] [-v - ... ] [-c option=value] [-l path] [-o - filepath] +usage: java -jar sparql.anything- -q query [-f ] + [-v ... ] [-c option=value] [-l + filepath] [-o filepath] [-j filepath] -q,--query The path or the URL to the file storing the query to execute or the query itself. @@ -577,9 +577,10 @@ usage: java -jar sparql.anything- -q query [-f ] [-v -f,--format OPTIONAL - Format of the output file. Supported values: JSON, XML, CSV, TEXT, TTL, NT, NQ. - [Default: CSV (for SELECT queries) - or TEXT (for ASK queries) or TTL - (for CONSTRUCT queries)] + [Default: CSV (for SELECT + queries) or TEXT (for ASK + queries) or TTL (for CONSTRUCT + queries)] -s,--strategy OPTIONAL - Strategy for query evaluation. Possible values: '1' - triple filtering (default), '0' @@ -621,6 +622,11 @@ usage: java -jar sparql.anything- -q query [-f ] [-v The argument can be passed multiple times (one for each option to be set). + -j,--load-jar OPTIONAL - Filepath to an + executable JAR to be dynamically + included. The argument can be + passed multiple times (one for + each JAR file to be included). ``` Logging can be configured adding the following option (SLF4J). @@ -645,13 +651,18 @@ the [Releases](https://github.com/spice-h2020/sparql.anything/releases) page. The jar can be executed as follows: ``` -usage: java -jar sparql-anything-server-.jar [-p port] [-e +usage: java -jar sparql-anything-fuseki-.jar [-p port] [-e sparql-endpoint-path] [-g endpoint-gui-path] - -e,--path The path where the server will be running on (Default - /sparql.anything). - -g,--gui The path of the SPARQL endpoint GUI (Default /sparql). - -p,--port The port where the server will be running on (Default - 3000 ). + -e,--path The path where the server will be running on + (Default /sparql.anything). + -g,--gui The path of the SPARQL endpoint GUI (Default + /sparql). + -j,--load-jar OPTIONAL - Filepath to an executable JAR to be + dynamically included. The argument can be + passed multiple times (one for each JAR file + to be included). + -p,--port The port where the server will be running on + (Default 3000 ). ``` Also, a docker image can be used by following the instructions [here](BROWSER.md). diff --git a/sparql-anything-cli/src/main/java/io/github/sparqlanything/cli/SPARQLAnything.java b/sparql-anything-cli/src/main/java/io/github/sparqlanything/cli/SPARQLAnything.java index ed79da57..a0d5e64e 100644 --- a/sparql-anything-cli/src/main/java/io/github/sparqlanything/cli/SPARQLAnything.java +++ b/sparql-anything-cli/src/main/java/io/github/sparqlanything/cli/SPARQLAnything.java @@ -20,7 +20,6 @@ import io.github.sparqlanything.engine.FXSymbol; import io.github.sparqlanything.engine.FacadeX; import io.github.sparqlanything.engine.FacadeXOpExecutor; -import io.github.sparqlanything.model.PluginInitializer; import io.github.sparqlanything.model.SPARQLAnythingConstants; import io.github.sparqlanything.model.Utils; import org.apache.commons.cli.ParseException; @@ -48,18 +47,14 @@ import org.slf4j.LoggerFactory; import java.io.*; -import java.lang.reflect.InvocationTargetException; import java.net.MalformedURLException; import java.net.URISyntaxException; import java.net.URL; -import java.net.URLClassLoader; import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; import java.util.function.BiConsumer; import java.util.function.Consumer; -import java.util.jar.JarEntry; -import java.util.jar.JarInputStream; import java.util.regex.Pattern; public class SPARQLAnything {