use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSDateTime in project webtools.sourceediting by eclipse.
the class FnMonthFromDateTime method month_from_date_time.
/**
* Month-from-DateTime operation.
*
* @param args
* Result from the expressions evaluation.
* @throws DynamicError
* Dynamic error.
* @return Result of fn:month-from-dateTime operation.
*/
public static ResultSequence month_from_date_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;
}
XSDateTime dt = (XSDateTime) arg1.first();
int res = dt.month();
return new XSInteger(BigInteger.valueOf(res));
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSDateTime in project webtools.sourceediting by eclipse.
the class FnAdjustDateTimeToTimeZone method expectedArgs.
/**
* Obtain a list of expected arguments.
*
* @return Result of operation.
*/
public static synchronized Collection expectedArgs() {
if (_expected_args == null) {
_expected_args = new ArrayList();
_expected_args.add(new SeqType(new XSDateTime(), SeqType.OCC_QMARK));
_expected_args.add(new SeqType(new XSDayTimeDuration(), SeqType.OCC_QMARK));
}
return _expected_args;
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSDateTime in project webtools.sourceediting by eclipse.
the class FnHoursFromDateTime 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 XSDateTime(), SeqType.OCC_QMARK));
}
return _expected_args;
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSDateTime in project webtools.sourceediting by eclipse.
the class FnHoursFromDateTime method hours_from_date_time.
/**
* Hours-from-DateTime operation.
*
* @param args
* Result from the expressions evaluation.
* @throws DynamicError
* Dynamic error.
* @return Result of fn:hours-from-dateTime operation.
*/
public static ResultSequence hours_from_date_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;
}
XSDateTime dt = (XSDateTime) arg1.first();
int res = dt.hour();
return new XSInteger(BigInteger.valueOf(res));
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSDateTime in project webtools.sourceediting by eclipse.
the class FnYearFromDateTime 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 XSDateTime(), SeqType.OCC_QMARK));
}
return _expected_args;
}
Aggregations