Class QueryEvaluator
java.lang.Object
org.eclipse.rdf4j.console.command.ConsoleCommand
org.eclipse.rdf4j.console.command.QueryEvaluator
- Direct Known Subclasses:
Sparql
Abstract query evaluator command
- Author:
- Dale Visser, Bart Hanssens
-
Field Summary
Fields inherited from class ConsoleCommand
LOGGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddQueryPrefixes(StringBuffer result, Collection<Namespace> namespaces) Add namespace prefixes to queryvoidexecuteQuery(String command, String operation) Execute a SPARQL queryprotected abstract booleanhasQueryPrefixes(String query) Check if query string already contains query prefixesString[]Return the names of the settings used.Methods inherited from class ConsoleCommand
askProceed, execute, getConsoleIO, getConsoleSettings, getConsoleState, getHelpLong, getHelpShort, write, writeError, writeError, writeInfo, writeln, writeUnopenedErrorModifier and TypeMethodDescriptionprotected booleanaskProceed(String str, boolean defVal) Ask user to proceedvoidExecute the given parameters.Get console IOGet console settings mapGet console stateGet long descriptionGet short description, small enough to fit on one console rowprotected voidWrite a string to the consoleprotected voidwriteError(String str) Write a string + newline to the console and to the log as an errorprotected voidwriteError(String str, Exception e) Write a string + message of exception + newline to the console and to the log as an errorprotected voidWrite a string + newline to the console and to the log at level INFOprotected voidWrite a string + newline to the consoleprotected voidWrite repository not opened error
-
Constructor Details
-
QueryEvaluator
-
-
Method Details
-
hasQueryPrefixes
Check if query string already contains query prefixes- Parameters:
query- query string- Returns:
- true if namespaces are already used
-
addQueryPrefixes
Add namespace prefixes to query- Parameters:
result-namespaces- collection of known namespaces
-
usesSettings
Description copied from interface:CommandReturn the names of the settings used.- Specified by:
usesSettingsin interfaceCommand- Overrides:
usesSettingsin classConsoleCommand- Returns:
- string array of settings
-
executeQuery
-