Package org.eclipse.rdf4j.workbench.util
Class QueryStringBuilder
java.lang.Object
org.eclipse.rdf4j.workbench.util.QueryStringBuilder
Helper class for substituting in variables to query templates for the purpose of saving and retrieving user queries
to a repository local to the workbench.
- Author:
- Dale Visser
-
Constructor Summary
ConstructorDescriptionQueryStringBuilder
(String template) Creates a new builder from the given template. -
Method Summary
Modifier and TypeMethodDescriptionprotected static String
protected void
Replace instances of the old text with a copy of the new text.protected void
replaceQuote
(String paramText, String newText) protected void
replaceURI
(String paramText, Object uri) Replace the repository variable with the current repository URL.toString()
Returns the internal string being constructed.protected static String
Place double quotes around the given string and append an XSD data type.
-
Constructor Details
-
QueryStringBuilder
Creates a new builder from the given template.- Parameters:
template
-
-
-
Method Details
-
toString
Returns the internal string being constructed. -
replaceURI
Replace the repository variable with the current repository URL.- Parameters:
paramText
- the $invalid input: '<'...> formatted parameter nameuri
- any object who's toString() returns a valid URI
-
replace
Replace instances of the old text with a copy of the new text.- Parameters:
paramText
- parameter in the form "$" newText
- the new text
-
replaceQuote
-
xsdQuote
Place double quotes around the given string and append an XSD data type.- Parameters:
value
- the value to quotetype
- the XSD data type name- Returns:
- a copy of the given string quoted with XSD data type appended
-
quote
-