public class QueryEvaluationUtil extends Object
Constructor and Description |
---|
QueryEvaluationUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
compare(Value leftVal,
Value rightVal,
Compare.CompareOp operator) |
static boolean |
compare(Value leftVal,
Value rightVal,
Compare.CompareOp operator,
boolean strict) |
static boolean |
compareLiterals(Literal leftLit,
Literal rightLit,
Compare.CompareOp operator)
Compares the supplied
Literal arguments using the supplied operator, using strict (minimally-conforming)
SPARQL 1.1 operator behavior. |
static boolean |
compareLiterals(Literal leftLit,
Literal rightLit,
Compare.CompareOp operator,
boolean strict)
Compares the supplied
Literal arguments using the supplied operator. |
static boolean |
compatibleArguments(Literal arg1,
Literal arg2)
Checks whether the supplied two literal arguments are 'argument compatible' according to the SPARQL definition.
|
static boolean |
getEffectiveBooleanValue(Value value)
Determines the effective boolean value (EBV) of the supplied value as defined in the
SPARQL specification:
The EBV of any literal whose type is xsd:boolean or numeric is false if the lexical form is not valid for
that datatype (e.g.
|
static boolean |
isPlainLiteral(Literal l) |
static boolean |
isPlainLiteral(Value v)
Checks whether the supplied value is a "plain literal".
|
static boolean |
isSimpleLiteral(Literal l)
Checks whether the supplied literal is a "simple literal".
|
static boolean |
isSimpleLiteral(Value v)
Checks whether the supplied value is a "simple literal".
|
static boolean |
isStringLiteral(Literal l)
Checks whether the supplied literal is a "string literal".
|
static boolean |
isStringLiteral(Value v)
Checks whether the supplied literal is a "string literal".
|
public static boolean getEffectiveBooleanValue(Value value) throws ValueExprEvaluationException
value
- Some value.ValueExprEvaluationException
- In case the application of the EBV algorithm results in a type error.public static boolean compare(Value leftVal, Value rightVal, Compare.CompareOp operator) throws ValueExprEvaluationException
ValueExprEvaluationException
public static boolean compare(Value leftVal, Value rightVal, Compare.CompareOp operator, boolean strict) throws ValueExprEvaluationException
ValueExprEvaluationException
public static boolean compareLiterals(Literal leftLit, Literal rightLit, Compare.CompareOp operator) throws ValueExprEvaluationException
Literal
arguments using the supplied operator, using strict (minimally-conforming)
SPARQL 1.1 operator behavior.leftLit
- the left literal argument of the comparison.rightLit
- the right literal argument of the comparison.operator
- the comparison operator to use.true
if execution of the supplied operator on the supplied arguments succeeds, false
otherwise.ValueExprEvaluationException
- if a type error occurred.public static boolean compareLiterals(Literal leftLit, Literal rightLit, Compare.CompareOp operator, boolean strict) throws ValueExprEvaluationException
Literal
arguments using the supplied operator.leftLit
- the left literal argument of the comparison.rightLit
- the right literal argument of the comparison.operator
- the comparison operator to use.strict
- boolean indicating whether comparison should use strict (minimally-conforming) SPARQL 1.1
operator behavior, or extended behavior.true
if execution of the supplied operator on the supplied arguments succeeds, false
otherwise.ValueExprEvaluationException
- if a type error occurred.public static boolean isPlainLiteral(Value v)
public static boolean isPlainLiteral(Literal l)
public static boolean isSimpleLiteral(Value v)
public static boolean isSimpleLiteral(Literal l)
XSD.STRING
.public static boolean isStringLiteral(Value v)
public static boolean compatibleArguments(Literal arg1, Literal arg2)
arg1
- the first argumentarg2
- the second argumentpublic static boolean isStringLiteral(Literal l)
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.