Class GDayValue

    • Constructor Detail

      • GDayValue

        public GDayValue​(byte day,
                         int tz)
      • GDayValue

        public GDayValue​(byte day,
                         int tz,
                         AtomicType type)
    • Method Detail

      • makeGDayValue

        public static ConversionResult makeGDayValue​(java.lang.CharSequence value)
      • copyAsSubType

        public AtomicValue copyAsSubType​(AtomicType typeLabel)
        Make a copy of this date, time, or dateTime value
        Specified by:
        copyAsSubType in class AtomicValue
        Parameters:
        typeLabel -
        Returns:
        the copied value
      • getPrimitiveType

        public BuiltInAtomicType getPrimitiveType()
        Determine the primitive type of the value. This delivers the same answer as getItemType().getPrimitiveItemType(). The primitive types are the 19 primitive types of XML Schema, plus xs:integer, xs:dayTimeDuration and xs:yearMonthDuration, and xs:untypedAtomic. For external objects, the result is AnyAtomicType.
        Specified by:
        getPrimitiveType in class AtomicValue
        Returns:
        the primitive type
      • convertPrimitive

        public ConversionResult convertPrimitive​(BuiltInAtomicType requiredType,
                                                 boolean validate,
                                                 XPathContext context)
        Convert to target data type
        Specified by:
        convertPrimitive in class AtomicValue
        Parameters:
        requiredType - an integer identifying the required atomic type
        context -
        validate - true if validation is required. If set to false, the caller guarantees that the value is valid for the target data type, and that further validation is therefore not required. Note that a validation failure may be reported even if validation was not requested.
        Returns:
        an AtomicValue, a value of the required type; or an ErrorValue
      • add

        public CalendarValue add​(DurationValue duration)
                          throws XPathException
        Add a duration to this date/time value
        Specified by:
        add in class CalendarValue
        Parameters:
        duration - the duration to be added (which might be negative)
        Returns:
        a new date/time value representing the result of adding the duration. The original object is not modified.
        Throws:
        XPathException
      • adjustTimezone

        public CalendarValue adjustTimezone​(int tz)
        Return a new date, time, or dateTime with the same normalized value, but in a different timezone
        Specified by:
        adjustTimezone in class CalendarValue
        Parameters:
        tz - the new timezone, in minutes
        Returns:
        the date/time in the new timezone