Class Sparql
- java.lang.Object
-
- org.eclipse.rdf4j.console.command.ConsoleCommand
-
- org.eclipse.rdf4j.console.command.QueryEvaluator
-
- org.eclipse.rdf4j.console.command.Sparql
-
public class Sparql extends QueryEvaluator
SPARQL query command- Author:
- Bart Hanssens
-
-
Field Summary
-
Fields inherited from class org.eclipse.rdf4j.console.command.ConsoleCommand
LOGGER
-
-
Constructor Summary
Constructors Constructor Description Sparql(TupleAndGraphQueryEvaluator evaluator)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddQueryPrefixes(StringBuffer result, Collection<Namespace> namespaces)Add namespace prefixes to queryStringgetHelpLong()Get long descriptionStringgetHelpShort()Get short description, small enough to fit on one console rowStringgetName()Get the name of the commandprotected booleanhasQueryPrefixes(String qry)Check if query string already contains query prefixes-
Methods inherited from class org.eclipse.rdf4j.console.command.QueryEvaluator
executeQuery, usesSettings
-
Methods inherited from class org.eclipse.rdf4j.console.command.ConsoleCommand
askProceed, execute, getConsoleIO, getConsoleSettings, getConsoleState, write, writeError, writeError, writeInfo, writeln, writeUnopenedError
-
-
-
-
Constructor Detail
-
Sparql
public Sparql(TupleAndGraphQueryEvaluator evaluator)
Constructor- Parameters:
evaluator-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:HelpGet the name of the command- Returns:
- string
-
getHelpShort
public String getHelpShort()
Description copied from class:ConsoleCommandGet short description, small enough to fit on one console row- Specified by:
getHelpShortin interfaceHelp- Overrides:
getHelpShortin classConsoleCommand- Returns:
- help string
-
getHelpLong
public String getHelpLong()
Description copied from class:ConsoleCommandGet long description- Specified by:
getHelpLongin interfaceHelp- Overrides:
getHelpLongin classConsoleCommand- Returns:
- string, can be multiple lines
-
hasQueryPrefixes
protected boolean hasQueryPrefixes(String qry)
Description copied from class:QueryEvaluatorCheck if query string already contains query prefixes- Specified by:
hasQueryPrefixesin classQueryEvaluator- Parameters:
qry- query string- Returns:
- true if namespaces are already used
-
addQueryPrefixes
protected void addQueryPrefixes(StringBuffer result, Collection<Namespace> namespaces)
Description copied from class:QueryEvaluatorAdd namespace prefixes to query- Specified by:
addQueryPrefixesin classQueryEvaluatornamespaces- collection of known namespaces
-
-