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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidappend(Compare cmp, StringBuilder sb) protected static voidappend(ValueConstant vc, StringBuilder sb) protected static voidappend(ValueExpr expr, StringBuilder sb) protected static voidappend(Var var, StringBuilder sb) protected static StringBuilderappendLiteral(StringBuilder sb, Literal lit) protected static StringBuilderappendURI(StringBuilder sb, IRI uri) protected static StringBuilderappendValue(StringBuilder sb, Value value) static ValueExprtoFilter(ConjunctiveFilterExpr filterExpr) static ValueExprtoFilter(FilterExpr filterExpr) static ValueExprtoFilter(FilterValueExpr filterExpr) static StringtoSparqlString(ConjunctiveFilterExpr filterExpr) static StringtoSparqlString(FilterExpr filterExpr) static StringtoSparqlString(FilterValueExpr filterExpr) Returns a SPARQL representation of the provided expression, e.g Compare(?v, "<", 3) is converted to "?v < '3'"
-
Constructor Details
-
FilterUtils
public FilterUtils()
-
-
Method Details
-
toSparqlString
Returns a SPARQL representation of the provided expression, e.g Compare(?v, "<", 3) is converted to "?v < '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
-