org.openrdf.query.algebra.evaluation.util
Class QueryEvaluationUtil

java.lang.Object
  extended by org.openrdf.query.algebra.evaluation.util.QueryEvaluationUtil

public class QueryEvaluationUtil
extends Object

Author:
Arjohn Kampman

Constructor Summary
QueryEvaluationUtil()
           
 
Method Summary
static boolean compare(Value leftVal, Value rightVal, Compare.CompareOp operator)
           
static boolean compareLiterals(Literal leftLit, Literal rightLit, Compare.CompareOp operator)
           
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(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".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryEvaluationUtil

public QueryEvaluationUtil()
Method Detail

getEffectiveBooleanValue

public static boolean getEffectiveBooleanValue(Value value)
                                        throws ValueExprEvaluationException
Determines the effective boolean value (EBV) of the supplied value as defined in the SPARQL specification:

Parameters:
value - Some value.
Returns:
The EBV of value.
Throws:
ValueExprEvaluationException - In case the application of the EBV algorithm results in a type error.

compare

public static boolean compare(Value leftVal,
                              Value rightVal,
                              Compare.CompareOp operator)
                       throws ValueExprEvaluationException
Throws:
ValueExprEvaluationException

compareLiterals

public static boolean compareLiterals(Literal leftLit,
                                      Literal rightLit,
                                      Compare.CompareOp operator)
                               throws ValueExprEvaluationException
Throws:
ValueExprEvaluationException

isPlainLiteral

public static boolean isPlainLiteral(Value v)
Checks whether the supplied value is a "plain literal". A "plain literal" is a literal with no datatype and optionally a language tag.

See Also:
http://www.w3.org/TR/REC-rdf-concepts/#dfn-plain-literal

isSimpleLiteral

public static boolean isSimpleLiteral(Value v)
Checks whether the supplied value is a "simple literal". A "simple literal" is a literal with no language tag nor datatype.

See Also:
http://www.w3.org/TR/sparql11-query/#simple_literal

isSimpleLiteral

public static boolean isSimpleLiteral(Literal l)
Checks whether the supplied literal is a "simple literal". A "simple literal" is a literal with no language tag nor datatype.

See Also:
http://www.w3.org/TR/sparql11-query/#simple_literal

isStringLiteral

public static boolean isStringLiteral(Value v)
Checks whether the supplied literal is a "string literal". A "string literal" is either a simple literal, a plain literal with language tag, or a literal with datatype xsd:string.

See Also:
http://www.w3.org/TR/sparql11-query/#func-string

isStringLiteral

public static boolean isStringLiteral(Literal l)
Checks whether the supplied literal is a "string literal". A "string literal" is either a simple literal, a plain literal with language tag, or a literal with datatype xsd:string.

See Also:
http://www.w3.org/TR/sparql11-query/#func-string


Copyright © 2001-2012 Aduna. All Rights Reserved.