Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1.7)

E10663-11

oracle.rules.rl.extensions
Class XMLDate

java.lang.Object
  extended by oracle.rules.rl.extensions.XMLDate

public class XMLDate
extends java.lang.Object


Constructor Summary
XMLDate()
           
 
Method Summary
static javax.xml.datatype.XMLGregorianCalendar addDaysTo(javax.xml.datatype.XMLGregorianCalendar date, int days)
          Returns a new XMLGregorianCalendar that is the result of adding the specified number of days to the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar addDurationTo(javax.xml.datatype.XMLGregorianCalendar date, javax.xml.datatype.Duration duration)
          Returns a new XMLGregorianCalendar that is the result of adding the specified duration to the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar addHoursTo(javax.xml.datatype.XMLGregorianCalendar date, long hours)
          Returns a new XMLGregorianCalendar that is the result of adding the specified number of hours to the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar addMillisecondsTo(javax.xml.datatype.XMLGregorianCalendar date, long milliseconds)
          Returns a new XMLGregorianCalendar that is the result of adding the specified number of milliseconds to the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar addMinutesTo(javax.xml.datatype.XMLGregorianCalendar date, long minutes)
          Returns a new XMLGregorianCalendar that is the result of adding the specified number of minutes to the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar addMonthsTo(javax.xml.datatype.XMLGregorianCalendar date, int months)
          Returns a new XMLGregorianCalendar that is the result of adding the specified number of months to the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar addSecondsTo(javax.xml.datatype.XMLGregorianCalendar date, long seconds)
          Returns a new XMLGregorianCalendar that is the result of adding the specified number of seconds to the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar addWeeksTo(javax.xml.datatype.XMLGregorianCalendar date, int weeks)
          Returns a new XMLGregorianCalendar that is the result of adding the specified number of weeks to the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar addYearsTo(javax.xml.datatype.XMLGregorianCalendar date, int years)
          Returns a new XMLGregorianCalendar that is the result of adding the specified number of years to the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar fromString(java.lang.String iso8601String)
          Creates an XMLGregorianCalendar instance from specified ISO 8601 date, datetime or time.
static java.math.BigDecimal getSeconds(javax.xml.datatype.XMLGregorianCalendar dateTime)
          Get the seconds from the date/time as a BigDecimal.
static javax.xml.datatype.Duration getTimezone(javax.xml.datatype.XMLGregorianCalendar dateTime)
          Get the timezone from the dateTime as a duration.
static boolean isDate(javax.xml.datatype.XMLGregorianCalendar date)
          is the date a date?
static boolean isDateTime(javax.xml.datatype.XMLGregorianCalendar date)
          is the date a dateTime?
static boolean isDateTimeStamp(javax.xml.datatype.XMLGregorianCalendar date)
          is the date a dateTimeStamp?
static boolean isTime(javax.xml.datatype.XMLGregorianCalendar date)
          is the date a time?
static javax.xml.datatype.XMLGregorianCalendar subtractDaysFrom(javax.xml.datatype.XMLGregorianCalendar date, int days)
          Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of days from the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar subtractDurationFrom(javax.xml.datatype.XMLGregorianCalendar date, javax.xml.datatype.Duration duration)
          Returns a new XMLGregorianCalendar that is the result of subtracting the specified duration from the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar subtractHoursFrom(javax.xml.datatype.XMLGregorianCalendar date, long hours)
          Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of hours from the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar subtractMillisecondsFrom(javax.xml.datatype.XMLGregorianCalendar date, long milliseconds)
          Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of milliseconds from the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar subtractMinutesFrom(javax.xml.datatype.XMLGregorianCalendar date, long minutes)
          Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of minutes from the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar subtractMonthsFrom(javax.xml.datatype.XMLGregorianCalendar date, int months)
          Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of months from the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar subtractSecondsFrom(javax.xml.datatype.XMLGregorianCalendar date, long seconds)
          Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of seconds from the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar subtractWeeksFrom(javax.xml.datatype.XMLGregorianCalendar date, int weeks)
          Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of weeks from the specified XMLGregorianCalendar.
static javax.xml.datatype.XMLGregorianCalendar subtractYearsFrom(javax.xml.datatype.XMLGregorianCalendar date, int years)
          Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of years from the specified XMLGregorianCalendar.
static java.lang.String toString(javax.xml.datatype.XMLGregorianCalendar date)
          Return the ISO 8601 representation of the specified XMLGregorianCalendar.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDate

public XMLDate()
Method Detail

addYearsTo

public static javax.xml.datatype.XMLGregorianCalendar addYearsTo(javax.xml.datatype.XMLGregorianCalendar date,
                                                                 int years)
Returns a new XMLGregorianCalendar that is the result of adding the specified number of years to the specified XMLGregorianCalendar.

Parameters:
date -
years -
Returns:
a new XMLGregorianCalendar that is the result of adding the specified number of years to the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addDurationTo

public static javax.xml.datatype.XMLGregorianCalendar addDurationTo(javax.xml.datatype.XMLGregorianCalendar date,
                                                                    javax.xml.datatype.Duration duration)
Returns a new XMLGregorianCalendar that is the result of adding the specified duration to the specified XMLGregorianCalendar.

Parameters:
date -
duration -
Returns:
a new XMLGregorianCalendar that is the result of adding the specified duration to the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if either parameter is null.

addMonthsTo

public static javax.xml.datatype.XMLGregorianCalendar addMonthsTo(javax.xml.datatype.XMLGregorianCalendar date,
                                                                  int months)
Returns a new XMLGregorianCalendar that is the result of adding the specified number of months to the specified XMLGregorianCalendar.

Parameters:
date -
months -
Returns:
a new XMLGregorianCalendar that is the result of adding the specified number of months to the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addWeeksTo

public static javax.xml.datatype.XMLGregorianCalendar addWeeksTo(javax.xml.datatype.XMLGregorianCalendar date,
                                                                 int weeks)
Returns a new XMLGregorianCalendar that is the result of adding the specified number of weeks to the specified XMLGregorianCalendar.

Parameters:
date -
weeks -
Returns:
a new XMLGregorianCalendar that is the result of adding the specified number of weeks to the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addDaysTo

public static javax.xml.datatype.XMLGregorianCalendar addDaysTo(javax.xml.datatype.XMLGregorianCalendar date,
                                                                int days)
Returns a new XMLGregorianCalendar that is the result of adding the specified number of days to the specified XMLGregorianCalendar.

Parameters:
date -
days -
Returns:
a new XMLGregorianCalendar that is the result of adding the specified number of days to the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addHoursTo

public static javax.xml.datatype.XMLGregorianCalendar addHoursTo(javax.xml.datatype.XMLGregorianCalendar date,
                                                                 long hours)
Returns a new XMLGregorianCalendar that is the result of adding the specified number of hours to the specified XMLGregorianCalendar.

Parameters:
date -
hours -
Returns:
a new XMLGregorianCalendar that is the result of adding the specified number of hours to the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addMinutesTo

public static javax.xml.datatype.XMLGregorianCalendar addMinutesTo(javax.xml.datatype.XMLGregorianCalendar date,
                                                                   long minutes)
Returns a new XMLGregorianCalendar that is the result of adding the specified number of minutes to the specified XMLGregorianCalendar.

Parameters:
date -
minutes -
Returns:
a new XMLGregorianCalendar that is the result of adding the specified number of minutes to the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addSecondsTo

public static javax.xml.datatype.XMLGregorianCalendar addSecondsTo(javax.xml.datatype.XMLGregorianCalendar date,
                                                                   long seconds)
Returns a new XMLGregorianCalendar that is the result of adding the specified number of seconds to the specified XMLGregorianCalendar.

Parameters:
date -
seconds -
Returns:
a new XMLGregorianCalendar that is the result of adding the specified number of seconds to the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addMillisecondsTo

public static javax.xml.datatype.XMLGregorianCalendar addMillisecondsTo(javax.xml.datatype.XMLGregorianCalendar date,
                                                                        long milliseconds)
Returns a new XMLGregorianCalendar that is the result of adding the specified number of milliseconds to the specified XMLGregorianCalendar.

Parameters:
date -
milliseconds -
Returns:
a new XMLGregorianCalendar that is the result of adding the specified number of milliseconds to the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractYearsFrom

public static javax.xml.datatype.XMLGregorianCalendar subtractYearsFrom(javax.xml.datatype.XMLGregorianCalendar date,
                                                                        int years)
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of years from the specified XMLGregorianCalendar.

Parameters:
date -
years -
Returns:
a new XMLGregorianCalendar that is the result of subtracting the specified number of years from the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractDurationFrom

public static javax.xml.datatype.XMLGregorianCalendar subtractDurationFrom(javax.xml.datatype.XMLGregorianCalendar date,
                                                                           javax.xml.datatype.Duration duration)
Returns a new XMLGregorianCalendar that is the result of subtracting the specified duration from the specified XMLGregorianCalendar.

Parameters:
date -
duration -
Returns:
a new XMLGregorianCalendar that is the result of subtracting the specified duration from the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if either parameter is null.

subtractMonthsFrom

public static javax.xml.datatype.XMLGregorianCalendar subtractMonthsFrom(javax.xml.datatype.XMLGregorianCalendar date,
                                                                         int months)
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of months from the specified XMLGregorianCalendar.

Parameters:
date -
months -
Returns:
a new XMLGregorianCalendar that is the result of subtracting the specified number of months from the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractWeeksFrom

public static javax.xml.datatype.XMLGregorianCalendar subtractWeeksFrom(javax.xml.datatype.XMLGregorianCalendar date,
                                                                        int weeks)
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of weeks from the specified XMLGregorianCalendar.

Parameters:
date -
weeks -
Returns:
a new XMLGregorianCalendar that is the result of subtracting the specified number of weeks from the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractDaysFrom

public static javax.xml.datatype.XMLGregorianCalendar subtractDaysFrom(javax.xml.datatype.XMLGregorianCalendar date,
                                                                       int days)
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of days from the specified XMLGregorianCalendar.

Parameters:
date -
days -
Returns:
a new XMLGregorianCalendar that is the result of subtracting the specified number of days from the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractHoursFrom

public static javax.xml.datatype.XMLGregorianCalendar subtractHoursFrom(javax.xml.datatype.XMLGregorianCalendar date,
                                                                        long hours)
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of hours from the specified XMLGregorianCalendar.

Parameters:
date -
hours -
Returns:
a new XMLGregorianCalendar that is the result of subtracting the specified number of hours from the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractMinutesFrom

public static javax.xml.datatype.XMLGregorianCalendar subtractMinutesFrom(javax.xml.datatype.XMLGregorianCalendar date,
                                                                          long minutes)
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of minutes from the specified XMLGregorianCalendar.

Parameters:
date -
minutes -
Returns:
a new XMLGregorianCalendar that is the result of subtracting the specified number of minutes from the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractSecondsFrom

public static javax.xml.datatype.XMLGregorianCalendar subtractSecondsFrom(javax.xml.datatype.XMLGregorianCalendar date,
                                                                          long seconds)
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of seconds from the specified XMLGregorianCalendar.

Parameters:
date -
seconds -
Returns:
a new XMLGregorianCalendar that is the result of subtracting the specified number of seconds from the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractMillisecondsFrom

public static javax.xml.datatype.XMLGregorianCalendar subtractMillisecondsFrom(javax.xml.datatype.XMLGregorianCalendar date,
                                                                               long milliseconds)
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of milliseconds from the specified XMLGregorianCalendar.

Parameters:
date -
milliseconds -
Returns:
a new XMLGregorianCalendar that is the result of subtracting the specified number of milliseconds from the specified XMLGregorianCalendar.
Throws:
java.lang.NullPointerException - if the date parameter is null.

fromString

public static javax.xml.datatype.XMLGregorianCalendar fromString(java.lang.String iso8601String)
                                                          throws java.lang.IllegalArgumentException
Creates an XMLGregorianCalendar instance from specified ISO 8601 date, datetime or time.

Parameters:
iso8601String - the ISO 8601 representation
Returns:
a XMLGregorianCalendar instance
Throws:
java.lang.IllegalArgumentException - if an error occurs parsing the date string.

toString

public static java.lang.String toString(javax.xml.datatype.XMLGregorianCalendar date)
Return the ISO 8601 representation of the specified XMLGregorianCalendar.

Parameters:
date - the date to format.
Returns:
the ISO 8601 representation

isDateTime

public static boolean isDateTime(javax.xml.datatype.XMLGregorianCalendar date)
is the date a dateTime?

Parameters:
date -
Returns:
boolean

isDate

public static boolean isDate(javax.xml.datatype.XMLGregorianCalendar date)
is the date a date? (no time)

Parameters:
date -
Returns:
boolean

isTime

public static boolean isTime(javax.xml.datatype.XMLGregorianCalendar date)
is the date a time? (no day/month/year)

Parameters:
date -
Returns:
boolean

isDateTimeStamp

public static boolean isDateTimeStamp(javax.xml.datatype.XMLGregorianCalendar date)
is the date a dateTimeStamp? (timezone is mandatory)

Parameters:
date -
Returns:
boolean

getTimezone

public static javax.xml.datatype.Duration getTimezone(javax.xml.datatype.XMLGregorianCalendar dateTime)
Get the timezone from the dateTime as a duration.

Parameters:
dateTime -
Returns:
timezone offset as a duration

getSeconds

public static java.math.BigDecimal getSeconds(javax.xml.datatype.XMLGregorianCalendar dateTime)
Get the seconds from the date/time as a BigDecimal.

Parameters:
dateTime -
Returns:
seconds, including fractional part

Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1.7)

E10663-11

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.