Package org.eclipse.rdf4j.sail.shacl.ast
Class StatementMatcher.StableRandomVariableProvider
- java.lang.Object
-
- org.eclipse.rdf4j.sail.shacl.ast.StatementMatcher.StableRandomVariableProvider
-
- Enclosing class:
- StatementMatcher
public static class StatementMatcher.StableRandomVariableProvider extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description StableRandomVariableProvider()StableRandomVariableProvider(java.lang.String prefix)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StatementMatcher.Variable<Value>current()StatementMatcher.Variable<Value>next()static java.lang.Stringnormalize(java.lang.String inputQuery, java.util.List<? extends StatementMatcher.Variable> protectedVars, java.util.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 java.lang.StringnormalizeRange(java.lang.String inputQuery, int lowest, int highest, java.lang.String joinedProtectedVars, java.util.List<StatementMatcher> union)private static voidreplaceInStatementMatcher(java.util.List<StatementMatcher> statementMatchers, java.lang.String original, java.lang.String replacement)
-
-
-
Method Detail
-
normalize
public static java.lang.String normalize(java.lang.String inputQuery, java.util.List<? extends StatementMatcher.Variable> protectedVars, java.util.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 java.lang.String normalizeRange(java.lang.String inputQuery, int lowest, int highest, java.lang.String joinedProtectedVars, java.util.List<StatementMatcher> union)
-
replaceInStatementMatcher
private static void replaceInStatementMatcher(java.util.List<StatementMatcher> statementMatchers, java.lang.String original, java.lang.String replacement)
-
next
public StatementMatcher.Variable<Value> next()
-
current
public StatementMatcher.Variable<Value> current()
-
-