Class TupleAndGraphQueryEvaluator
java.lang.Object
org.eclipse.rdf4j.console.command.TupleAndGraphQueryEvaluator
Evaluator tuple and graph queries
- Author:
- dale
-
Constructor Summary
ConstructorDescriptionTupleAndGraphQueryEvaluator
(ConsoleIO consoleIO, ConsoleState state, Map<String, ConsoleSetting> settings) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
evaluateBooleanQuery
(QueryLanguage queryLn, String queryString, QueryResultWriter writer) Evaluate a boolean SPARQL queryprotected void
evaluateGraphQuery
(QueryLanguage queryLn, String queryString, RDFWriter writer, Collection<Namespace> namespaces) Evaluate SPARQL graph queryprotected void
evaluateTupleQuery
(QueryLanguage queryLn, String queryString, QueryResultWriter writer) Evaluate SPARQL tuple query and send the output to a writer.protected void
executeUpdate
(QueryLanguage queryLn, String queryString) Execute a SPARQL updateprotected ConsoleIO
Get console IOprotected Map
<String, ConsoleSetting> Get console settingsprotected ConsoleState
Get console State
-
Constructor Details
-
TupleAndGraphQueryEvaluator
public TupleAndGraphQueryEvaluator(ConsoleIO consoleIO, ConsoleState state, Map<String, ConsoleSetting> settings) Constructor- Parameters:
consoleIO
-state
-settings
-
-
-
Method Details
-
getConsoleIO
Get console IO- Returns:
- console IO
-
getConsoleState
Get console State- Returns:
- console state
-
getConsoleSettings
Get console settings- Returns:
- console settings
-
evaluateTupleQuery
protected void evaluateTupleQuery(QueryLanguage queryLn, String queryString, QueryResultWriter writer) throws UnsupportedQueryLanguageException, MalformedQueryException, QueryEvaluationException, RepositoryException Evaluate SPARQL tuple query and send the output to a writer. If writer is null, the console will be used for output.- Parameters:
queryLn
- query languagequeryString
- query stringwriter
- result writer or null- Throws:
UnsupportedQueryLanguageException
MalformedQueryException
QueryEvaluationException
RepositoryException
-
evaluateGraphQuery
protected void evaluateGraphQuery(QueryLanguage queryLn, String queryString, RDFWriter writer, Collection<Namespace> namespaces) throws UnsupportedQueryLanguageException, MalformedQueryException, QueryEvaluationException, RepositoryException Evaluate SPARQL graph query- Parameters:
queryLn
- query languagequeryString
- query stringwriter
- RDFWriter to write the results tonamespaces
- namespaces to write to the RDFWriter- Throws:
UnsupportedQueryLanguageException
MalformedQueryException
QueryEvaluationException
RepositoryException
-
evaluateBooleanQuery
protected void evaluateBooleanQuery(QueryLanguage queryLn, String queryString, QueryResultWriter writer) throws UnsupportedQueryLanguageException, MalformedQueryException, QueryEvaluationException, RepositoryException Evaluate a boolean SPARQL query- Parameters:
queryLn
- query languagequeryString
- query stringwriter
-- Throws:
UnsupportedQueryLanguageException
MalformedQueryException
QueryEvaluationException
RepositoryException
-
executeUpdate
protected void executeUpdate(QueryLanguage queryLn, String queryString) throws RepositoryException, UpdateExecutionException, MalformedQueryException Execute a SPARQL update- Parameters:
queryLn
- query languagequeryString
- query string- Throws:
RepositoryException
UpdateExecutionException
MalformedQueryException
-