|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.glitter.expression.FunctionBase
public abstract class FunctionBase
Base class for SPARQL functions. Provides a standard configuration for operatesOnValues() (true)
and for operatesOnTypeErrors() (false). Also provides a set of utility methods to perform
-1/0/1 comparison functions on RDFTerms for booleans, numerics, datetimes, and strings.
| Constructor Summary | |
|---|---|
FunctionBase()
|
|
| Method Summary | |
|---|---|
static int |
compareBooleans(RDFTerm arg1,
RDFTerm arg2)
Compares two boolean RDF terms |
static int |
compareBooleans(RDFTerm arg1,
RDFTerm arg2,
boolean convert)
Compares two boolean RDF terms |
static int |
compareDateTimes(RDFTerm arg1,
RDFTerm arg2)
Compares two datetime RDF terms. |
static int |
compareNumerics(RDFTerm arg1,
RDFTerm arg2)
Compares two numeric RDF terms |
static int |
compareStringLiterals(RDFTerm arg1,
RDFTerm arg2)
Compares two string RDF terms |
boolean |
operatesOnTypeErrors()
|
boolean |
operatesOnValues()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openanzo.glitter.expression.Function |
|---|
getIdentifier |
| Constructor Detail |
|---|
public FunctionBase()
| Method Detail |
|---|
public boolean operatesOnValues()
operatesOnValues in interface Functionpublic boolean operatesOnTypeErrors()
operatesOnTypeErrors in interface Function
public static int compareNumerics(RDFTerm arg1,
RDFTerm arg2)
throws ExpressionEvaluationException
arg1 - First termarg2 - Second term
ExpressionEvaluationException - If either argument is not numeric
public static int compareBooleans(RDFTerm arg1,
RDFTerm arg2)
throws ExpressionEvaluationException
arg1 - First termarg2 - Second term
ExpressionEvaluationException - if either arguments is not a boolean
public static int compareBooleans(RDFTerm arg1,
RDFTerm arg2,
boolean convert)
throws ExpressionEvaluationException
arg1 - First termarg2 - Second termconvert - Should the effective boolean value rules be applied to derive boolean values from non-boolean arguments?
ExpressionEvaluationException - if either arguments is not a boolean and either convert is
false or there are no rules for finding the EBV of an argument
public static int compareDateTimes(RDFTerm arg1,
RDFTerm arg2)
throws ExpressionEvaluationException
Calendar.compareTo(Calendar) for the comparison, which may or may not agree with
http://www.w3.org/TR/xpath-functions/#xmlschema-2, the required functionality.
arg1 - First termarg2 - Second term
ExpressionEvaluationException - if either arguments is not a xsd:dateTime
public static int compareStringLiterals(RDFTerm arg1,
RDFTerm arg2)
throws ExpressionEvaluationException
arg1 - First termarg2 - Second term
ExpressionEvaluationException - if either argument is not an xsd:string or a plain literal
with no language tag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||