package org.aksw.jena_sparql_api.data_client; import java.io.File; import java.util.Arrays; import joptsimple.OptionParser; import joptsimple.OptionSpec; public class MainLodClient { public static final OptionParser parser = new OptionParser(); public static void main(String args[]) { OptionSpec<File> inputOs = parser .acceptsAll(Arrays.asList("f", "file"), "File containing input data") .withRequiredArg() .ofType(File.class) ; OptionSpec<File> outputOs = parser .acceptsAll(Arrays.asList("o", "output"), "File where to store the output data.") .withRequiredArg() .ofType(File.class) ; OptionSpec<String> rdfizerOs = parser .acceptsAll(Arrays.asList("r", "rdfizer"), "RDFizer selection: Any combination of the letters (e)xecution, (l)og and (q)uery") .withOptionalArg() .defaultsTo("elq") ; OptionSpec<String> endpointUrlOs = parser .acceptsAll(Arrays.asList("e", "endpoint"), "Local SPARQL service (endpoint) URL on which to execute queries") .withRequiredArg() .defaultsTo("http://localhost:8890/sparql") ; OptionSpec<String> graphUriOs = parser .acceptsAll(Arrays.asList("g", "graph"), "Local graph(s) from which to retrieve the data") .availableIf(endpointUrlOs) .withRequiredArg() ; OptionSpec<String> datasetLabelOs = parser .acceptsAll(Arrays.asList("l", "label"), "Label of the dataset, such as 'dbpedia' or 'lgd'. Will be used in URI generation") .withRequiredArg() .defaultsTo("mydata") ; OptionSpec<Long> headOs = parser .acceptsAll(Arrays.asList("h", "head"), "Only process n entries starting from the top") .withRequiredArg() .ofType(Long.class) ; OptionSpec<Long> timeoutInMsOs = parser .acceptsAll(Arrays.asList("t", "timeout"), "Timeout in milliseconds") .withRequiredArg() .ofType(Long.class) //.defaultsTo(60000l) //.defaultsTo(null) ; OptionSpec<String> logEndpointUriOs = parser .acceptsAll(Arrays.asList("p", "public"), "Public endpoint URL - e.g. http://example.org/sparql") .withRequiredArg() //.defaultsTo("http://example.org/sparql") //.defaultsTo(LSQ.defaultLsqrNs + "default-environment"); ; OptionSpec<String> expBaseUriOs = parser .acceptsAll(Arrays.asList("x", "experiment"), "URI of the experiment environment") .withRequiredArg() //.defaultsTo(LSQ.defaultLsqrNs) ; } }