use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSTime in project webtools.sourceediting by eclipse.
the class FnSecondsFromTime method seconds_from_time.
/**
* Base-Uri operation.
*
* @param args
* Result from the expressions evaluation.
* @throws DynamicError
* Dynamic error.
* @return Result of fn:base-uri operation.
*/
public static ResultSequence seconds_from_time(Collection args) throws DynamicError {
Collection cargs = Function.convert_arguments(args, expected_args());
ResultSequence arg1 = (ResultSequence) cargs.iterator().next();
if (arg1.empty()) {
return ResultBuffer.EMPTY;
}
XSTime dt = (XSTime) arg1.first();
double res = dt.second();
return new XSDecimal(new BigDecimal(res));
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSTime in project webtools.sourceediting by eclipse.
the class FnMinutesFromTime method minutes_from_time.
/**
* Minutes-from-Time operation.
*
* @param args
* Result from the expressions evaluation.
* @throws DynamicError
* Dynamic error.
* @return Result of fn:minutes-from-time operation.
*/
public static ResultSequence minutes_from_time(Collection args) throws DynamicError {
Collection cargs = Function.convert_arguments(args, expected_args());
ResultSequence arg1 = (ResultSequence) cargs.iterator().next();
if (arg1.empty()) {
return ResultBuffer.EMPTY;
}
XSTime dt = (XSTime) arg1.first();
int res = dt.minute();
return new XSInteger(BigInteger.valueOf(res));
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSTime in project webtools.sourceediting by eclipse.
the class FnMinutesFromTime method expected_args.
/**
* Obtain a list of expected arguments.
*
* @return Result of operation.
*/
public static synchronized Collection expected_args() {
if (_expected_args == null) {
_expected_args = new ArrayList();
_expected_args.add(new SeqType(new XSTime(), SeqType.OCC_QMARK));
}
return _expected_args;
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSTime in project webtools.sourceediting by eclipse.
the class FnHoursFromTime method hours_from_time.
/**
* Hours-from-Time operation.
*
* @param args
* Result from the expressions evaluation.
* @throws DynamicError
* Dynamic error.
* @return Result of fn:hours-from-time operation.
*/
public static ResultSequence hours_from_time(Collection args) throws DynamicError {
Collection cargs = Function.convert_arguments(args, expected_args());
ResultSequence arg1 = (ResultSequence) cargs.iterator().next();
if (arg1.empty()) {
return ResultBuffer.EMPTY;
}
XSTime dt = (XSTime) arg1.first();
int res = dt.hour();
return new XSInteger(BigInteger.valueOf(res));
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSTime in project webtools.sourceediting by eclipse.
the class FnTimezoneFromTime method timezone_from_time.
/**
* Timezone-from-Time operation.
*
* @param args
* Result from the expressions evaluation.
* @throws DynamicError
* Dynamic error.
* @return Result of fn:timezone-from-time operation.
*/
public static ResultSequence timezone_from_time(Collection args) throws DynamicError {
Collection cargs = Function.convert_arguments(args, expected_args());
ResultSequence arg1 = (ResultSequence) cargs.iterator().next();
if (arg1.empty()) {
return ResultBuffer.EMPTY;
}
XSTime dt = (XSTime) arg1.first();
if (dt.timezoned()) {
return dt.tz();
}
return ResultBuffer.EMPTY;
}
Aggregations