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, YEAR
EQUAL, 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 String |
dateToString(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date) |
Object |
getActualValue(String content,
ValidationContext context) |
protected Duration |
getDuration(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date) |
protected org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData |
parse(String str,
int durationType)
Parses, validates and computes normalized version of duration object
|
protected double |
parseSecond(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, validateDateTime
checkExtraRules, getDataLength, getDigit, getFractionDigits, getTotalDigits, isDigit
public static final int DURATION_TYPE
public static final int YEARMONTHDURATION_TYPE
public static final int DAYTIMEDURATION_TYPE
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException
getActualValue
in class TypeValidator
InvalidDatatypeValueException
protected org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData parse(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 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)protected double parseSecond(String buffer, int start, int end) throws NumberFormatException
parseSecond
in class AbstractDateTimeDV
NumberFormatException
protected String dateToString(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date)
dateToString
in class AbstractDateTimeDV
protected Duration getDuration(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date)
getDuration
in class AbstractDateTimeDV
Copyright © 2017 JBoss by Red Hat. All rights reserved.