Class SparqlScriptProcessor

java.lang.Object
org.aksw.jena_sparql_api.rx.script.SparqlScriptProcessor

public class SparqlScriptProcessor extends Object
Convenient SPARQL statement loader. Probes arguments whether they are inline SPARQL statements or refer to files. Referred files may contain RDF or sequences of SPARQL statements. RDF files are loaded fully into memory as UpdateModify statements. Usually the SparqlQueryParserWrapperSelectShortForm should be active which allows omitting the SELECT keyword making querying even less verbose Prefixes from an input source carry over to the next. Hence, if an RDF file is loaded, its prefixes can be used in subsequent SPARQL statements without need for declaration. For example assuming that mydata defines a foo prefix ad-hoc querying becomes possible simply using the arguments ["people.ttl", "?s { ?s a foaf:Person }"] Arguments that start with cwd=/some/path sets the current working directory on which SPARQL queries operate. Effectively it sets the base URL of the following SPARQL queries. Relative paths are resolved against the current working directory as reported by the JVM. Use "cwd=" (with an empty string) to reset the CWD to that of the JVM Graphs can be pinned for all subsequent arguments using "graph=your://graph.name". Use "graph=" (nothing after the =) to use the default graph.
Author:
Claus Stadler