Package org.apache.xerces.impl.dv.xs
Class YearDV
java.lang.Object
org.apache.xerces.impl.dv.xs.TypeValidator
org.apache.xerces.impl.dv.xs.AbstractDateTimeDV
org.apache.xerces.impl.dv.xs.YearDV
Validator for <gYear> datatype (W3C Schema Datatypes)
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: YearDV.java 937741 2010-04-25 04:25:46Z mrglavas $
- Author:
- Elena Litani, Gopal Sharma, SUN Microsystem Inc.
-
Field Summary
Fields inherited from class org.apache.xerces.impl.dv.xs.AbstractDateTimeDV
datatypeFactory, DAY, MONTH, YEAR
Fields inherited from class org.apache.xerces.impl.dv.xs.TypeValidator
EQUAL, GREATER_THAN, INDETERMINATE, LESS_THAN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
dateToString
(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date) Converts year object representation to StringgetActualValue
(String content, ValidationContext context) Convert a string to a compiled formprotected XMLGregorianCalendar
getXMLGregorianCalendar
(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date) protected org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData
Parses, validates and computes normalized version of gYear objectMethods inherited from class org.apache.xerces.impl.dv.xs.AbstractDateTimeDV
append, append, append2, compare, compareDates, compareOrder, findUTCSign, fQuotient, fQuotient, getAllowedFacets, getDate, getDuration, getFractionalSecondsAsBigDecimal, getTime, getTimeZone, getYearMonth, indexOf, isIdentical, isNextCharUTCSign, maxDayInMonthFor, mod, modulo, normalize, parseInt, parseIntYear, parseSecond, parseTimeZone, resetDateObj, saveUnnormalized, validateDateTime
Methods inherited from class org.apache.xerces.impl.dv.xs.TypeValidator
checkExtraRules, getDataLength, getDigit, getFractionDigits, getTotalDigits, isDigit
-
Constructor Details
-
YearDV
public YearDV()
-
-
Method Details
-
getActualValue
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException Convert a string to a compiled form- Specified by:
getActualValue
in classTypeValidator
- Parameters:
content
- The lexical representation of time- Returns:
- a valid and normalized time object
- Throws:
InvalidDatatypeValueException
-
parse
protected org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData parse(String str) throws SchemaDateTimeException Parses, validates and computes normalized version of gYear object- Parameters:
str
- The lexical representation of year object CCYY with possible time zone Z or (-),(+)hh:mm- Returns:
- normalized date representation
- Throws:
SchemaDateTimeException
- Invalid lexical representation
-
dateToString
Converts year object representation to String- Overrides:
dateToString
in classAbstractDateTimeDV
- Parameters:
date
- year object- Returns:
- lexical representation of month: CCYY with optional time zone sign
-
getXMLGregorianCalendar
protected XMLGregorianCalendar getXMLGregorianCalendar(org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date) - Overrides:
getXMLGregorianCalendar
in classAbstractDateTimeDV
-