java.lang.Object
org.apache.jena.sparql.expr.nodevalue.XSDDuration
Functions relating to XSD durations (F&O 3.1), using
javax.xml.datatype.Duration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
durationCompare
(Duration duration1, Duration duration2) Compare durations.static boolean
durationIsZero
(Duration duration) Test whether a duration is zero
-
Constructor Details
-
XSDDuration
public XSDDuration()
-
-
Method Details
-
durationCompare
Compare durations.There are two value spaces: year-month and day-time.
Value spaces are determined dynamically, not from the datatype. Comparison across these two spaces is not possible except in the case of zero duration. This function returnsExpr.CMP_UNEQUAL
for durations in different value spaces which are not both zero. If the comparison using the JDK throws "UnsupportedOperationException", this function returnsExpr.CMP_INDETERMINATE
. (this occurs if field values are too large - larger thanInteger.MAX_VALUE
. Comparison operators on durations "With the exception of the zero-length duration, no instance of xs:dayTimeDuration can ever be equal to an instance of xs:yearMonthDuration." -
durationIsZero
Test whether a duration is zero
-