Class DateTimeRecordFn

All Implemented Interfaces:
Callable, IFunctionWithRetainedParameterNames, FunctionItem, GroundedValue, Item, Sequence

public class DateTimeRecordFn extends SystemFunction
Implements the implicit constructor for the built-in named record type fn:dateTime-record. This record type is returned by fn:parts-of-dateTime and accepted as the sole input into fn:build-dateTime. Initially proposed by XPath 4.0.
  • Field Details

    • FIELD_NAMES

      public static final List<String> FIELD_NAMES
    • FIELD_TYPES

      public static final List<SequenceType> FIELD_TYPES
    • DATE_TIME_RECORD_ITEM_TYPE

      public static final RecordType DATE_TIME_RECORD_ITEM_TYPE
      Define the fn:dateTime-record item type.
    • DATE_TIME_RECORD_SHAPE

      public static final Shape DATE_TIME_RECORD_SHAPE
      Prepare a shape for creating new instances of fn:dateTime-record
  • Constructor Details

    • DateTimeRecordFn

      public DateTimeRecordFn()
  • Method Details

    • call

      public Sequence call(XPathContext context, Sequence[] arguments) throws XPathException
      Call this function with seven arguments
      Parameters:
      context - the dynamic evaluation context
      arguments - seven arguments (year, month, day, hours, minutes, seconds, timezone)
      Returns:
      the result of the function call
      Throws:
      XPathException - if the call fails with a dynamic error
    • makeDateTimeRecord

      public static MapItem makeDateTimeRecord(IntegerValue year, IntegerValue month, IntegerValue day, IntegerValue hours, IntegerValue minutes, DecimalValue seconds, DayTimeDurationValue timezone)
      Create an fn:dateTime-record from its component parts. No validation checks are applied on creation or modification of a fn:dateTime-record. Null fields supplied as arguments result in an absent entry in the returned record.
      Parameters:
      year - - year number (maybe null)
      month - - month number (maybe null)
      day - - day number (maybe null)
      hours - - hour number (maybe null)
      minutes - - minute number (maybe null)
      seconds - - fractional second number (maybe null)
      timezone - - timezone string (maybe null)
      Returns:
      an instance of fn:dateTime-record