java.lang.Object
org.apache.jena.sparql.expr.nodevalue.XSDFuncOp
Implementation of XQuery/XPath functions and operators.
http://www.w3.org/TR/xpath-functions/
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic NodeValue
static NodeValue
adjustToTimezone
(NodeValue nv1, NodeValue nv2) Adjust xsd:dateTime/xsd:date/xsd:time to a timezone.static boolean
F&O fn:booleanstatic NodeValue
F&O fn:booleanstatic String
canonicalDecimalStr
(BigDecimal decimal) Deprecated, for removal: This API element is subject to removal in a future version.static String
Deprecated, for removal: This API element is subject to removal in a future version.static NodeValue
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
compareDateTimeFO
(NodeValue nv1, NodeValue nv2) Strict F&O handling of compare date(times).static int
compareDateTimeXSD
(NodeValue nv1, NodeValue nv2) Compare two date/times by XSD rules (dateTimes, one with and one without timezone can be indeterminate)static int
compareDuration
(NodeValue nv1, NodeValue nv2) static int
compareNumeric
(NodeValue nv1, NodeValue nv2) static int
compareString
(NodeValue nv1, NodeValue nv2) static int
compareXSDDateTime
(NodeValue nv1, NodeValue nv2) Compare date times, including "indeterminate" rather than applying locale timezonestatic NodeValue
dateTimeCast
(NodeValue nv, org.apache.jena.datatypes.xsd.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 NodeValue
dtDateTime
(NodeValue nv1, NodeValue nv2) Create an xsd:dateTime from an xsd:date and an xsd:time.static NodeValue
static NodeValue
dtGetHours
(NodeValue nv) static NodeValue
static NodeValue
dtGetMonth
(NodeValue nv) static NodeValue
static NodeValue
static NodeValue
static NodeValue
static NodeValue
durGetDays
(NodeValue nv) static NodeValue
durGetHours
(NodeValue nv) static NodeValue
static NodeValue
static NodeValue
static NodeValue
durGetSign
(NodeValue nv) static NodeValue
durGetYears
(NodeValue nv) static NodeValue
static NodeValue
F&O fn:concat (implicit cast to strings).static NodeValue
formatNumber
(NodeValue nv, NodeValue picture, NodeValue nvLocale) fn:format-number The 3rd argument, if present, called decimal-format-name, is here a IETF BCP 47 language tag string.static NodeValue
static NodeValue
static NodeValue
getMinutes
(NodeValue nv) static NodeValue
static NodeValue
getSeconds
(NodeValue nv) static NodeValue
static NodeValue
Implciit Timezone // https://www.w3.org/TR/xpath-functions-3/#comp.datetimestatic boolean
isBinaryDatatype
(org.apache.jena.datatypes.xsd.XSDDatatype datatype) static boolean
static boolean
isDecimalDatatype
(org.apache.jena.datatypes.xsd.XSDDatatype xsdDatatype) static boolean
isDurationDatatype
(org.apache.jena.datatypes.xsd.XSDDatatype datatype) static boolean
isIntegerDatatype
(org.apache.jena.datatypes.xsd.XSDDatatype xsdDatatype) static boolean
isNumeric
(org.apache.jena.graph.Node node) static boolean
isNumericDatatype
(org.apache.jena.datatypes.xsd.XSDDatatype xsdDatatype) static boolean
isTemporalDatatype
(org.apache.jena.datatypes.xsd.XSDDatatype datatype) static boolean
isYearMonth
(Duration dur) static NodeValue
javaSprintf
(NodeValue nvFormat, List<NodeValue> valuesToPrint) static NodeValue
javaSubstring
(NodeValue v1, NodeValue v2) static NodeValue
javaSubstring
(NodeValue nvString, NodeValue nvStart, NodeValue nvFinish) static NodeValue
Local timezone of the query engine: afn:system-timezonestatic NodeValue
static NodeValue
static NodeValue
F&O fn:notstatic NodeValue
static NodeValue
static NodeValue
numericMod
(NodeValue nv1, NodeValue nv2) static NodeValue
numIntegerDivide
(NodeValue nv1, NodeValue nv2) Integer dividestatic NodeValue
numMultiply
(NodeValue nv1, NodeValue nv2) static NodeValue
numSubtract
(NodeValue nv1, NodeValue nv2) static NodeValue
static NodeValue
roundXpath3
(NodeValue v, NodeValue precision, boolean isHalfEven) static NodeValue
static NodeValue
static NodeValue
static NodeValue
SPARQL CONCAT (no implicit casts to strings)static NodeValue
strContains
(NodeValue string, NodeValue match) static NodeValue
static NodeValue
strEndsWith
(NodeValue string, NodeValue match) static NodeValue
static NodeValue
strLowerCase
(NodeValue string) static NodeValue
fn:normalizeSpacestatic NodeValue
strNormalizeUnicode
(NodeValue v1, NodeValue v2) static NodeValue
strReplace
(NodeValue nvStr, Pattern pattern, NodeValue nvReplacement) static NodeValue
strReplace
(NodeValue nvStr, NodeValue nvPattern, NodeValue nvReplacement) static NodeValue
strReplace
(NodeValue nvStr, NodeValue nvPattern, NodeValue nvReplacement, NodeValue nvFlags) static NodeValue
strStartsWith
(NodeValue string, NodeValue match) static NodeValue
strUpperCase
(NodeValue string) static NodeValue
static NodeValue
static NodeValue
unaryMinus
(NodeValue nv) static NodeValue
-
Field Details
-
zeroDuration
-
implicitTimezoneStr
- See Also:
-
-
Method Details
-
numAdd
-
numSubtract
-
numMultiply
-
numDivide
-
numIntegerDivide
Integer divide -
numericMod
-
canonicalDecimalStrNoIntegerDot
Deprecated, for removal: This API element is subject to removal in a future version.Decimal format, cast-to-string.Decimal canonical form where integer values has no ".0" (as in XSD 1.1).
In XSD 1.0, canonical integer-valued decimal has a trailing ".0". In XSD 1.1 and F&O v 3.1, xs:string cast of a decimal which is integer valued, does not have the trailing ".0".
-
canonicalDecimalStr
Deprecated, for removal: This API element is subject to removal in a future version.UseXSDNumUtils.stringFormatXSD10(BigDecimal)
insteadCanonical decimal according to XML Schema Datatype 2 v1.0. Integer-valued decimals have a trailing ".0". (In XML Schema Datatype 1.1 they did not have a ".0".) -
max
-
min
-
not
F&O fn:not -
booleanEffectiveValueAsNodeValue
F&O fn:boolean -
booleanEffectiveValue
F&O fn:boolean -
unaryMinus
-
unaryPlus
-
abs
-
ceiling
-
floor
-
round
-
roundXpath3
-
sqrt
-
javaSubstring
-
javaSubstring
-
javaSprintf
-
strlen
-
strReplace
-
strReplace
-
strReplace
-
substring
-
substring
-
strContains
-
strStartsWith
-
strEndsWith
-
strBefore
-
strAfter
-
strLowerCase
-
strUpperCase
-
strEncodeForURI
-
fnConcat
F&O fn:concat (implicit cast to strings). -
strConcat
SPARQL CONCAT (no implicit casts to strings) -
strNormalizeSpace
fn:normalizeSpace -
strNormalizeUnicode
-
classifyNumeric
-
classifyNumeric
-
isNumericDatatype
public static boolean isNumericDatatype(org.apache.jena.datatypes.xsd.XSDDatatype xsdDatatype) -
isNumeric
public static boolean isNumeric(org.apache.jena.graph.Node node) -
isDecimalDatatype
public static boolean isDecimalDatatype(org.apache.jena.datatypes.xsd.XSDDatatype xsdDatatype) -
isIntegerDatatype
public static boolean isIntegerDatatype(org.apache.jena.datatypes.xsd.XSDDatatype xsdDatatype) -
isTemporalDatatype
public static boolean isTemporalDatatype(org.apache.jena.datatypes.xsd.XSDDatatype datatype) -
isDurationDatatype
public static boolean isDurationDatatype(org.apache.jena.datatypes.xsd.XSDDatatype datatype) -
isBinaryDatatype
public static boolean isBinaryDatatype(org.apache.jena.datatypes.xsd.XSDDatatype datatype) -
compareNumeric
-
compareString
-
compareDateTime
-
compareDateTimeXSD
Compare two date/times by XSD rules (dateTimes, one with and one without timezone can be indeterminate) -
compareDateTimeFO
Strict F&O handling of compare date(times). But that means applying the "local" timezone if there is no TZ. The data may have come from different timezones to the query. We use a fixed locale timezone of UTC/00:00. -
compareXSDDateTime
Compare date times, including "indeterminate" rather than applying locale timezone -
compareBoolean
-
dateTimeCast
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
-
getMonth
-
getDay
-
getHours
-
getMinutes
-
getSeconds
-
dtDateTime
Create an xsd:dateTime from an xsd:date and an xsd:time. -
dtGetYear
-
dtGetMonth
-
dtGetDay
-
dtGetHours
-
dtGetMinutes
-
dtGetSeconds
-
dtGetTZ
-
dtGetTimezone
-
isYearMonth
-
isDayTime
-
durGetYears
-
durGetMonths
-
durGetDays
-
durGetHours
-
durGetMinutes
-
durGetSeconds
-
durGetSign
-
compareDuration
-
implicitTimezone
Implciit Timezone // https://www.w3.org/TR/xpath-functions-3/#comp.datetime -
localSystemTimezone
Local timezone of the query engine: afn:system-timezone -
adjustToTimezone
Adjust xsd:dateTime/xsd:date/xsd:time to a timezone. This covers fn:adjust-dateTime-to-timezone, fn:adjust-date-to-timezone and fn:adjust-time-to-timezone. viaADJUST
(E_AdjustToTimezone
). If the second argument is null, use implicit timezone. In Jena, the implicit timezone is fixed to UTC. -
formatNumber
fn:format-number The 3rd argument, if present, called decimal-format-name, is here a IETF BCP 47 language tag string.
-
XSDNumUtils.stringFormatXSD10(BigDecimal)
instead