Package org.eclipse.rdf4j.federated.util
Class FilterUtils
java.lang.Object
org.eclipse.rdf4j.federated.util.FilterUtils
Various utility functions to handle filter expressions.
NOTE: currently only implemented for
Compare
, other filter expressions need to be added. If an unexpected
filter expression occurs, the filter evaluation is done locally.- Author:
- Andreas Schwarte
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static void
append
(Compare cmp, StringBuilder sb) protected static void
append
(ValueConstant vc, StringBuilder sb) protected static void
append
(ValueExpr expr, StringBuilder sb) protected static void
append
(Var var, StringBuilder sb) protected static StringBuilder
appendLiteral
(StringBuilder sb, Literal lit) protected static StringBuilder
appendURI
(StringBuilder sb, IRI uri) protected static StringBuilder
appendValue
(StringBuilder sb, Value value) static ValueExpr
toFilter
(ConjunctiveFilterExpr filterExpr) static ValueExpr
toFilter
(FilterExpr filterExpr) static ValueExpr
toFilter
(FilterValueExpr filterExpr) static String
toSparqlString
(ConjunctiveFilterExpr filterExpr) static String
toSparqlString
(FilterExpr filterExpr) static String
toSparqlString
(FilterValueExpr filterExpr) Returns a SPARQL representation of the provided expression, e.g Compare(?v, "invalid input: '<'", 3) is converted to "?v invalid input: '<' '3'"
-
Constructor Details
-
FilterUtils
public FilterUtils()
-
-
Method Details
-
toSparqlString
Returns a SPARQL representation of the provided expression, e.g Compare(?v, "invalid input: '<'", 3) is converted to "?v invalid input: '<' '3'"- Parameters:
filterExpr
-- Returns:
- the SPARQL string
- Throws:
FilterConversionException
-
toSparqlString
- Throws:
FilterConversionException
-
toSparqlString
public static String toSparqlString(ConjunctiveFilterExpr filterExpr) throws FilterConversionException - Throws:
FilterConversionException
-
toFilter
- Throws:
FilterConversionException
-
toFilter
- Throws:
FilterConversionException
-
toFilter
- Throws:
FilterConversionException
-
append
- Throws:
FilterConversionException
-
append
- Throws:
FilterConversionException
-
append
-
append
-
appendValue
-
appendURI
-
appendLiteral
-