com.hp.hpl.jena.sparql.expr.nodevalue
Class XSDFuncOp

java.lang.Object
  extended by com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp

public class XSDFuncOp
extends Object

Implementation of XQuery/XPath functions and operators. http://www.w3.org/TR/xpath-functions/


Field Summary
static String defaultTimezone
           
 
Method Summary
static NodeValue abs(NodeValue nv)
           
static boolean booleanEffectiveValue(NodeValue nv)
          F&O fn:boolean
static NodeValue booleanEffectiveValueAsNodeValue(NodeValue nv)
          F&O fn:boolean
static NodeValue ceiling(NodeValue v)
           
static NumericType classifyNumeric(String fName, NodeValue nv)
           
static NumericType classifyNumeric(String fName, NodeValue nv1, NodeValue nv2)
           
static int compareBoolean(NodeValue nv1, NodeValue nv2)
           
static int compareDateTime(NodeValue nv1, NodeValue nv2)
           
static int compareDuration(NodeValue nv1, NodeValue nv2)
           
static int compareNumeric(NodeValue nv1, NodeValue nv2)
           
static int compareString(NodeValue nv1, NodeValue nv2)
           
static NodeValue dateTimeCast(NodeValue nv, RDFDatatype rdfDatatype)
          Cast a NodeValue to a date/time type (xsd dateTime, date, time, g*) according to F&O 17.1.5 Casting to date and time types Throws an exception on incorrect case.
static NodeValue dateTimeCast(NodeValue nv, String typeURI)
          Cast a NodeValue to a date/time type (xsd dateTime, date, time, g*) according to F&O 17.1.5 Casting to date and time types Throws an exception on incorrect case.
static NodeValue dateTimeCast(NodeValue nv, XSDDatatype xsd)
          Cast a NodeValue to a date/time type (xsd dateTime, date, time, g*) according to F&O 17.1.5 Casting to date and time types Throws an exception on incorrect case.
static boolean dateTimeCastCompatible(NodeValue nv, XSDDatatype xsd)
           
static NodeValue dtGetDay(NodeValue nv)
           
static NodeValue dtGetHours(NodeValue nv)
           
static NodeValue dtGetMinutes(NodeValue nv)
           
static NodeValue dtGetMonth(NodeValue nv)
           
static NodeValue dtGetSeconds(NodeValue nv)
           
static NodeValue dtGetTimezone(NodeValue nv)
           
static NodeValue dtGetTZ(NodeValue nv)
           
static NodeValue dtGetYear(NodeValue nv)
           
static NodeValue durGetDays(NodeValue nv)
           
static NodeValue durGetHours(NodeValue nv)
           
static NodeValue durGetMinutes(NodeValue nv)
           
static NodeValue durGetMonths(NodeValue nv)
           
static NodeValue durGetSeconds(NodeValue nv)
           
static NodeValue durGetSign(NodeValue nv)
           
static NodeValue durGetYears(NodeValue nv)
           
static NodeValue floor(NodeValue v)
           
static NodeValue fnConcat(List<NodeValue> args)
          F&O fn:concat (implicit cast to strings).
static NodeValue getDay(NodeValue nv)
           
static NodeValue getHours(NodeValue nv)
           
static NodeValue getMinutes(NodeValue nv)
           
static NodeValue getMonth(NodeValue nv)
           
static NodeValue getSeconds(NodeValue nv)
           
static NodeValue getYear(NodeValue nv)
           
static boolean isDayTime(Duration dur)
           
static boolean isDecimalType(XSDDatatype xsdDatatype)
           
static boolean isIntegerType(XSDDatatype xsdDatatype)
           
static boolean isNumericType(XSDDatatype xsdDatatype)
           
static boolean isYearMonth(Duration dur)
           
static NodeValue javaSubstring(NodeValue v1, NodeValue v2)
           
static NodeValue javaSubstring(NodeValue nvString, NodeValue nvStart, NodeValue nvFinish)
           
static NodeValue max(NodeValue nv1, NodeValue nv2)
           
static NodeValue min(NodeValue nv1, NodeValue nv2)
           
static NodeValue not(NodeValue nv)
          F&O fn:not
static NodeValue numAdd(NodeValue nv1, NodeValue nv2)
           
static NodeValue numDivide(NodeValue nv1, NodeValue nv2)
           
static NodeValue numMultiply(NodeValue nv1, NodeValue nv2)
           
static NodeValue numSubtract(NodeValue nv1, NodeValue nv2)
           
static NodeValue round(NodeValue v)
           
static NodeValue sqrt(NodeValue v)
           
static NodeValue strAfter(NodeValue string, NodeValue match)
           
static NodeValue strBefore(NodeValue string, NodeValue match)
           
static NodeValue strConcat(List<NodeValue> args)
          SPARQL CONCAT (no implicit casts to strings)
static NodeValue strContains(NodeValue string, NodeValue match)
           
static NodeValue strEncodeForURI(NodeValue v)
           
static NodeValue strEndsWith(NodeValue string, NodeValue match)
           
static NodeValue strlen(NodeValue nvString)
           
static NodeValue strLowerCase(NodeValue string)
           
static NodeValue strReplace(NodeValue nvStr, NodeValue nvPattern, NodeValue nvReplacement)
           
static NodeValue strReplace(NodeValue nvStr, NodeValue nvPattern, NodeValue nvReplacement, NodeValue nvFlags)
           
static NodeValue strReplace(NodeValue nvStr, Pattern pattern, NodeValue nvReplacement)
           
static NodeValue strStartsWith(NodeValue string, NodeValue match)
           
static NodeValue strUpperCase(NodeValue string)
           
static NodeValue substring(NodeValue v1, NodeValue v2)
           
static NodeValue substring(NodeValue nvString, NodeValue nvStart, NodeValue nvLength)
           
static NodeValue unaryMinus(NodeValue nv)
           
static NodeValue unaryPlus(NodeValue nv)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultTimezone

public static final String defaultTimezone
See Also:
Constant Field Values
Method Detail

numAdd

public static NodeValue numAdd(NodeValue nv1,
                               NodeValue nv2)

numSubtract

public static NodeValue numSubtract(NodeValue nv1,
                                    NodeValue nv2)

numMultiply

public static NodeValue numMultiply(NodeValue nv1,
                                    NodeValue nv2)

numDivide

public static NodeValue numDivide(NodeValue nv1,
                                  NodeValue nv2)

max

public static NodeValue max(NodeValue nv1,
                            NodeValue nv2)

min

public static NodeValue min(NodeValue nv1,
                            NodeValue nv2)

not

public static NodeValue not(NodeValue nv)
F&O fn:not


booleanEffectiveValueAsNodeValue

public static NodeValue booleanEffectiveValueAsNodeValue(NodeValue nv)
F&O fn:boolean


booleanEffectiveValue

public static boolean booleanEffectiveValue(NodeValue nv)
F&O fn:boolean


unaryMinus

public static NodeValue unaryMinus(NodeValue nv)

unaryPlus

public static NodeValue unaryPlus(NodeValue nv)

abs

public static NodeValue abs(NodeValue nv)

ceiling

public static NodeValue ceiling(NodeValue v)

floor

public static NodeValue floor(NodeValue v)

round

public static NodeValue round(NodeValue v)

sqrt

public static NodeValue sqrt(NodeValue v)

javaSubstring

public static NodeValue javaSubstring(NodeValue v1,
                                      NodeValue v2)

javaSubstring

public static NodeValue javaSubstring(NodeValue nvString,
                                      NodeValue nvStart,
                                      NodeValue nvFinish)

strlen

public static NodeValue strlen(NodeValue nvString)

strReplace

public static NodeValue strReplace(NodeValue nvStr,
                                   NodeValue nvPattern,
                                   NodeValue nvReplacement,
                                   NodeValue nvFlags)

strReplace

public static NodeValue strReplace(NodeValue nvStr,
                                   Pattern pattern,
                                   NodeValue nvReplacement)

strReplace

public static NodeValue strReplace(NodeValue nvStr,
                                   NodeValue nvPattern,
                                   NodeValue nvReplacement)

substring

public static NodeValue substring(NodeValue v1,
                                  NodeValue v2)

substring

public static NodeValue substring(NodeValue nvString,
                                  NodeValue nvStart,
                                  NodeValue nvLength)

strContains

public static NodeValue strContains(NodeValue string,
                                    NodeValue match)

strStartsWith

public static NodeValue strStartsWith(NodeValue string,
                                      NodeValue match)

strEndsWith

public static NodeValue strEndsWith(NodeValue string,
                                    NodeValue match)

strBefore

public static NodeValue strBefore(NodeValue string,
                                  NodeValue match)

strAfter

public static NodeValue strAfter(NodeValue string,
                                 NodeValue match)

strLowerCase

public static NodeValue strLowerCase(NodeValue string)

strUpperCase

public static NodeValue strUpperCase(NodeValue string)

strEncodeForURI

public static NodeValue strEncodeForURI(NodeValue v)

fnConcat

public static NodeValue fnConcat(List<NodeValue> args)
F&O fn:concat (implicit cast to strings).


strConcat

public static NodeValue strConcat(List<NodeValue> args)
SPARQL CONCAT (no implicit casts to strings)


classifyNumeric

public static NumericType classifyNumeric(String fName,
                                          NodeValue nv1,
                                          NodeValue nv2)

classifyNumeric

public static NumericType classifyNumeric(String fName,
                                          NodeValue nv)

isNumericType

public static boolean isNumericType(XSDDatatype xsdDatatype)

isDecimalType

public static boolean isDecimalType(XSDDatatype xsdDatatype)

isIntegerType

public static boolean isIntegerType(XSDDatatype xsdDatatype)

compareNumeric

public static int compareNumeric(NodeValue nv1,
                                 NodeValue nv2)

compareString

public static int compareString(NodeValue nv1,
                                NodeValue nv2)

compareDateTime

public static int compareDateTime(NodeValue nv1,
                                  NodeValue nv2)

compareDuration

public static int compareDuration(NodeValue nv1,
                                  NodeValue nv2)

compareBoolean

public static int compareBoolean(NodeValue nv1,
                                 NodeValue nv2)

dateTimeCastCompatible

public static boolean dateTimeCastCompatible(NodeValue nv,
                                             XSDDatatype xsd)

dateTimeCast

public static NodeValue dateTimeCast(NodeValue nv,
                                     String typeURI)
Cast a NodeValue to a date/time type (xsd dateTime, date, time, g*) according to F&O 17.1.5 Casting to date and time types Throws an exception on incorrect case.

Throws:
ExprEvalTypeException

dateTimeCast

public static NodeValue dateTimeCast(NodeValue nv,
                                     RDFDatatype rdfDatatype)
Cast a NodeValue to a date/time type (xsd dateTime, date, time, g*) according to F&O 17.1.5 Casting to date and time types Throws an exception on incorrect case.

Throws:
ExprEvalTypeException

dateTimeCast

public static NodeValue dateTimeCast(NodeValue nv,
                                     XSDDatatype xsd)
Cast a NodeValue to a date/time type (xsd dateTime, date, time, g*) according to F&O 17.1.5 Casting to date and time types Throws an exception on incorrect case.

Throws:
ExprEvalTypeException

getYear

public static NodeValue getYear(NodeValue nv)

getMonth

public static NodeValue getMonth(NodeValue nv)

getDay

public static NodeValue getDay(NodeValue nv)

getHours

public static NodeValue getHours(NodeValue nv)

getMinutes

public static NodeValue getMinutes(NodeValue nv)

getSeconds

public static NodeValue getSeconds(NodeValue nv)

dtGetYear

public static NodeValue dtGetYear(NodeValue nv)

dtGetMonth

public static NodeValue dtGetMonth(NodeValue nv)

dtGetDay

public static NodeValue dtGetDay(NodeValue nv)

dtGetHours

public static NodeValue dtGetHours(NodeValue nv)

dtGetMinutes

public static NodeValue dtGetMinutes(NodeValue nv)

dtGetSeconds

public static NodeValue dtGetSeconds(NodeValue nv)

dtGetTZ

public static NodeValue dtGetTZ(NodeValue nv)

dtGetTimezone

public static NodeValue dtGetTimezone(NodeValue nv)

isYearMonth

public static boolean isYearMonth(Duration dur)

isDayTime

public static boolean isDayTime(Duration dur)

durGetYears

public static NodeValue durGetYears(NodeValue nv)

durGetMonths

public static NodeValue durGetMonths(NodeValue nv)

durGetDays

public static NodeValue durGetDays(NodeValue nv)

durGetHours

public static NodeValue durGetHours(NodeValue nv)

durGetMinutes

public static NodeValue durGetMinutes(NodeValue nv)

durGetSeconds

public static NodeValue durGetSeconds(NodeValue nv)

durGetSign

public static NodeValue durGetSign(NodeValue nv)


Licenced under the Apache License, Version 2.0