| java.lang.Object org.openrdf.query.algebra.evaluation.util.QueryEvaluationUtil
QueryEvaluationUtil | public class QueryEvaluationUtil (Code) | | author: Arjohn Kampman |
Method Summary | |
public static boolean | compare(Value leftVal, Value rightVal, CompareOp operator) | public static boolean | compareLiterals(Literal leftLit, Literal rightLit, CompareOp operator) | public 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.
"abc"^^xsd:integer).
- If the argument is a typed literal with a datatype of xsd:boolean,
the EBV is the value of that argument.
- If the argument is a plain literal or a typed literal with a datatype
of xsd:string, the EBV is false if the operand value has zero length;
otherwise the EBV is true.
- If the argument is a numeric type or a typed literal with a datatype
derived from a numeric type, the EBV is false if the operand value is NaN
or is numerically equal to zero; otherwise the EBV is true.
- All other arguments, including unbound arguments, produce a type
error.
Parameters: value - Some value. | public static boolean | isSimpleLiteral(Value v) Checks whether the supplied value is a "simple literal" as defined in the
SPARQL spec. | public static boolean | isSimpleLiteral(Literal l) Checks whether the supplied literal is a "simple literal" as defined in
the SPARQL spec. | public static boolean | isStringLiteral(Literal l) Checks whether the supplied literal is a "string literal". |
getEffectiveBooleanValue | public static boolean getEffectiveBooleanValue(Value value) throws ValueExprEvaluationException(Code) | | 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.
"abc"^^xsd:integer).
- If the argument is a typed literal with a datatype of xsd:boolean,
the EBV is the value of that argument.
- If the argument is a plain literal or a typed literal with a datatype
of xsd:string, the EBV is false if the operand value has zero length;
otherwise the EBV is true.
- If the argument is a numeric type or a typed literal with a datatype
derived from a numeric type, the EBV is false if the operand value is NaN
or is numerically equal to zero; otherwise the EBV is true.
- All other arguments, including unbound arguments, produce a type
error.
Parameters: value - Some value. The EBV of value. throws: ValueExprEvaluationException - In case the application of the EBV algorithm results in a typeerror. |
isSimpleLiteral | public static boolean isSimpleLiteral(Value v)(Code) | | Checks whether the supplied value is a "simple literal" as defined in the
SPARQL spec. A "simple literal" is a literal without a language tag or a
datatype.
|
isSimpleLiteral | public static boolean isSimpleLiteral(Literal l)(Code) | | Checks whether the supplied literal is a "simple literal" as defined in
the SPARQL spec. A "simple literal" is a literal without a language tag or
a datatype.
|
|
|