public class DurationDV extends AbstractDateTimeDV
| Modifier and Type | Field and Description |
|---|---|
static int |
DAYTIMEDURATION_TYPE |
static int |
DURATION_TYPE |
static int |
YEARMONTHDURATION_TYPE |
datatypeFactory, DAY, MONTH, YEAREQUAL, GREATER_THAN, INDETERMINATE, LESS_THAN| Constructor and Description |
|---|
DurationDV() |
| Modifier and Type | Method and Description |
|---|---|
protected short |
compareDates(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date1,
org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date2,
boolean strict)
Compares 2 given durations.
|
protected java.lang.String |
dateToString(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date) |
java.lang.Object |
getActualValue(java.lang.String content,
ValidationContext context) |
protected javax.xml.datatype.Duration |
getDuration(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date) |
protected org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData |
parse(java.lang.String str,
int durationType)
Parses, validates and computes normalized version of duration object
|
protected double |
parseSecond(java.lang.String buffer,
int start,
int end) |
append, append, append2, compare, compareOrder, findUTCSign, fQuotient, fQuotient, getAllowedFacets, getDate, getFractionalSecondsAsBigDecimal, getTime, getTimeZone, getXMLGregorianCalendar, getYearMonth, indexOf, isIdentical, isNextCharUTCSign, maxDayInMonthFor, mod, modulo, normalize, parseInt, parseIntYear, parseTimeZone, resetDateObj, saveUnnormalized, validateDateTimecheckExtraRules, getDataLength, getDigit, getFractionDigits, getTotalDigits, isDigitpublic static final int DURATION_TYPE
public static final int YEARMONTHDURATION_TYPE
public static final int DAYTIMEDURATION_TYPE
public java.lang.Object getActualValue(java.lang.String content,
ValidationContext context)
throws InvalidDatatypeValueException
getActualValue in class TypeValidatorInvalidDatatypeValueExceptionprotected org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData parse(java.lang.String str,
int durationType)
throws SchemaDateTimeException
str - The lexical representation of duration object PnYn MnDTnH nMnSdurationType - SchemaDateTimeException - Invalid lexical representationprotected short compareDates(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date1,
org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date2,
boolean strict)
compareDates in class AbstractDateTimeDVdate1 - Unnormalized durationdate2 - Unnormalized durationstrict - (min/max)Exclusive strict == true ( LESS_THAN ) or ( GREATER_THAN )
(min/max)Inclusive strict == false (LESS_EQUAL) or (GREATER_EQUAL)protected double parseSecond(java.lang.String buffer,
int start,
int end)
throws java.lang.NumberFormatException
parseSecond in class AbstractDateTimeDVjava.lang.NumberFormatExceptionprotected java.lang.String dateToString(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date)
dateToString in class AbstractDateTimeDVprotected javax.xml.datatype.Duration getDuration(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date)
getDuration in class AbstractDateTimeDVCopyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.