Class QueryStringUtil
java.lang.Object
org.eclipse.rdf4j.repository.sparql.query.QueryStringUtil
Utility class to perfom query string manipulations as used in 
SPARQLTupleQuery, SPARQLGraphQuery and
SPARQLBooleanQuery.- Author:
 - Andreas Schwarte
 - See Also:
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuilderappendValueAsString(StringBuilder sb, Value value) Converts a value to its SPARQL string representation and appends it to a StringBuilder.static StringgetBooleanQueryString(String queryString, BindingSet bindings) Retrieve a modified queryString into which all bindings of the given argument are replaced with their value.static StringgetGraphQueryString(String queryString, BindingSet bindings) Retrieve a modified queryString into which all bindings of the given argument are replaced with their value.static StringgetQueryString(String queryString, BindingSet bindings) Deprecated.static StringgetTupleQueryString(String queryString, BindingSet bindings) Retrieve a modified queryString into which all bindings of the given argument are replaced, with the binding names included in the SELECT clause.static StringgetUpdateString(String queryString, BindingSet bindings) Retrieve a modified queryString into which all bindings of the given argument are replaced with their value.static StringvalueToString(Value value) Converts a value to its SPARQL string representation. 
- 
Constructor Details
- 
QueryStringUtil
public QueryStringUtil() 
 - 
 - 
Method Details
- 
getQueryString
@Deprecated(since="2.0") public static String getQueryString(String queryString, BindingSet bindings) Deprecated.Retrieve a modified queryString into which all bindings of the given argument are replaced.- Parameters:
 queryString-bindings-- Returns:
 - the modified queryString
 
 - 
getTupleQueryString
Retrieve a modified queryString into which all bindings of the given argument are replaced, with the binding names included in the SELECT clause.- Parameters:
 queryString-bindings-- Returns:
 - the modified queryString
 
 - 
getUpdateString
Retrieve a modified queryString into which all bindings of the given argument are replaced with their value.- Parameters:
 queryString-bindings-- Returns:
 - the modified queryString
 
 - 
getBooleanQueryString
Retrieve a modified queryString into which all bindings of the given argument are replaced with their value.- Parameters:
 queryString-bindings-- Returns:
 - the modified queryString
 
 - 
getGraphQueryString
Retrieve a modified queryString into which all bindings of the given argument are replaced with their value.- Parameters:
 queryString-bindings-- Returns:
 - the modified queryString
 
 - 
valueToString
 - 
appendValueAsString
Converts a value to its SPARQL string representation and appends it to a StringBuilder.Null will be converted to UNDEF (may be used in VALUES only).
- Parameters:
 sb- StringBuilder to append tovalue- the value to convert- Returns:
 - the provided StringBuilder
 
 
 - 
 
getTupleQueryString(String, BindingSet)