Class StatementMatcher.StableRandomVariableProvider
java.lang.Object
org.eclipse.rdf4j.sail.shacl.ast.StatementMatcher.StableRandomVariableProvider
- Enclosing class:
StatementMatcher
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncurrent()next()static Stringnormalize(String inputQuery, List<? extends StatementMatcher.Variable> protectedVars, List<StatementMatcher> union) Normalize the use of random variables in a SPARQL query so that the numbering of queries starts at 0 in increments of one.private static StringnormalizeRange(String inputQuery, int lowest, int highest, String joinedProtectedVars, List<StatementMatcher> union) private static voidreplaceInStatementMatcher(List<StatementMatcher> statementMatchers, String original, String replacement)
-
Field Details
-
BASE
-
max
private static volatile int max -
prefix
-
counter
private int counter
-
-
Constructor Details
-
StableRandomVariableProvider
public StableRandomVariableProvider() -
StableRandomVariableProvider
-
-
Method Details
-
normalize
public static String normalize(String inputQuery, List<? extends StatementMatcher.Variable> protectedVars, List<StatementMatcher> union) Normalize the use of random variables in a SPARQL query so that the numbering of queries starts at 0 in increments of one.- Parameters:
inputQuery- the query string that should be normalizedunion-- Returns:
- a normalized query string
-
normalizeRange
private static String normalizeRange(String inputQuery, int lowest, int highest, String joinedProtectedVars, List<StatementMatcher> union) -
replaceInStatementMatcher
private static void replaceInStatementMatcher(List<StatementMatcher> statementMatchers, String original, String replacement) -
next
-
current
-