org.apache.xerces.impl.dv.xs
Class DurationDV
Validator for datatype (W3C Schema Datatypes)
Version:
- Elena Litani
- Gopal Sharma, SUN Microsystem Inc.
CY, D, DAY, M, MONTH, TOTAL_SIZE, YEAR, h, hh, m, mm, ms, s, utc |
protected short | compareDates(int[] date1, int[] date2, boolean strict)- Compares 2 given durations.
|
protected String | dateToString(int[] date)
|
Object | getActualValue(String content, ValidationContext context)
|
protected int[] | parse(String str)- Parses, validates and computes normalized version of duration object
|
append, compare, compareDates, compareOrder, dateToString, fQuotient, fQuotient, findUTCSign, getAllowedFacets, getDate, getTime, getTimeZone, getYearMonth, indexOf, maxDayInMonthFor, mod, modulo, normalize, parseInt, parseIntYear, parseTimeZone, resetDateObj, validateDateTime |
compareDates
protected short compareDates(int[] date1,
int[] date2,
boolean strict) Compares 2 given durations. (refer to W3C Schema Datatypes "3.2.6 duration")
- compareDates in interface AbstractDateTimeDV
date1 - Unnormalized durationdate2 - Unnormalized durationstrict - (min/max)Exclusive strict == true ( LESS_THAN ) or ( GREATER_THAN )
(min/max)Inclusive strict == false (LESS_EQUAL) or (GREATER_EQUAL)
- INDETERMINATE if the order relationship between date1 and date2 is indeterminate.
EQUAL if the order relation between date1 and date2 is EQUAL.
If the strict parameter is true, return LESS_THAN if date1 is less than date2 and
return GREATER_THAN if date1 is greater than date2.
If the strict parameter is false, return LESS_THAN if date1 is less than OR equal to date2 and
return GREATER_THAN if date1 is greater than OR equal to date2
dateToString
protected String dateToString(int[] date)
- dateToString in interface AbstractDateTimeDV
parse
protected int[] parse(String str)
throws SchemaDateTimeException Parses, validates and computes normalized version of duration object
str - The lexical representation of duration object PnYn MnDTnH nMnS
- normalized date representation
SchemaDateTimeException - Invalid lexical representation
Copyright B) 1999-2004 Apache XML Project. All Rights Reserved.