|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.sf.saxon.value.Value
|
+--net.sf.saxon.value.AtomicValue
|
+--net.sf.saxon.value.DurationValue
|
+--net.sf.saxon.value.SecondsDurationValue
A value of type xsd:dayTimeDuration
| Field Summary |
| Fields inherited from class net.sf.saxon.value.DurationValue |
days, hours, milliseconds, minutes, months, negative, seconds, years |
| Fields inherited from interface net.sf.saxon.expr.Expression |
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD |
| Constructor Summary | |
SecondsDurationValue(java.lang.CharSequence s)
Constructor: create a duration value from a supplied string, in ISO 8601 format [+|-]PnDTnHnMnS |
|
| Method Summary | |
DurationValue |
add(DurationValue other,
XPathContext context)
Add two dayTimeDurations |
java.lang.Object |
convertToJava(java.lang.Class target,
Configuration config,
XPathContext context)
Convert to Java object (for passing to external functions) |
DoubleValue |
divide(DurationValue other,
XPathContext context)
Find the ratio between two durations |
static SecondsDurationValue |
fromMilliseconds(long milliseconds)
Construct a duration value as a number of milliseconds. |
static SecondsDurationValue |
fromSeconds(double seconds)
Construct a duration value as a number of seconds. |
ItemType |
getItemType()
Determine the data type of the exprssion |
long |
getLengthInMilliseconds()
Get length of duration in milliseconds, as a long |
double |
getLengthInSeconds()
Get length of duration in seconds |
java.lang.String |
getStringValue()
Convert to string |
DurationValue |
multiply(double n,
XPathContext context)
Multiply duration by a number |
void |
normalize()
Normalize the value, for example 90M becomes 1H30M |
DurationValue |
subtract(DurationValue other,
XPathContext context)
Subtract two dayTime-durations |
| Methods inherited from class net.sf.saxon.value.DurationValue |
badDuration, compareTo, convert, equals, getComponent, hashCode |
| Methods inherited from class net.sf.saxon.value.AtomicValue |
convert, display, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getImplementationMethod, getPrimitiveValue, getTypedValue, iterate, process, toString |
| Methods inherited from class net.sf.saxon.value.Value |
analyze, asItem, asValue, collapseWhitespace, convertJavaObjectToXPath, getDependencies, getParentExpression, getSpecialProperties, inverse, iterateSubExpressions, normalizeWhitespace, promote, simplify, stringToNumber, trimWhitespace |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SecondsDurationValue(java.lang.CharSequence s)
throws XPathException
| Method Detail |
public java.lang.String getStringValue()
getStringValue in interface ItemgetStringValue in class DurationValue
public void normalize()
throws DynamicError
DynamicErrorpublic double getLengthInSeconds()
getLengthInSeconds in class DurationValuepublic long getLengthInMilliseconds()
public static SecondsDurationValue fromSeconds(double seconds)
throws XPathException
XPathException
public static SecondsDurationValue fromMilliseconds(long milliseconds)
throws XPathException
XPathException
public DurationValue multiply(double n,
XPathContext context)
throws XPathException
multiply in class DurationValueXPathException
public DoubleValue divide(DurationValue other,
XPathContext context)
throws XPathException
divide in class DurationValueother - the dividend
XPathException
public DurationValue add(DurationValue other,
XPathContext context)
throws XPathException
add in class DurationValueXPathException
public DurationValue subtract(DurationValue other,
XPathContext context)
throws XPathException
subtract in class DurationValueXPathExceptionpublic ItemType getItemType()
getItemType in interface ExpressiongetItemType in class DurationValue
public java.lang.Object convertToJava(java.lang.Class target,
Configuration config,
XPathContext context)
throws XPathException
convertToJava in class DurationValuetarget - The class required by the external functionconfig - The configuration (needed for access to schema information)
XPathException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||