org.apache.xerces.validators.datatype
Class MonthDatatypeValidator
java.lang.Object
|
+--org.apache.xerces.validators.datatype.AbstractDatatypeValidator
|
+--org.apache.xerces.validators.datatype.AbstractNumericFacetValidator
|
+--org.apache.xerces.validators.datatype.DateTimeValidator
|
+--org.apache.xerces.validators.datatype.MonthDatatypeValidator
- public class MonthDatatypeValidator
- extends DateTimeValidator
Validator for datatype (W3C Schema Datatypes)
- Version:
- $Id: MonthDatatypeValidator.java,v 1.5 2001/06/21 20:56:06 elena Exp $
- Author:
- Elena Litani
Fields inherited from class org.apache.xerces.validators.datatype.DateTimeValidator |
CY,
D,
DAY,
EQUAL,
fBuffer,
fDateValue,
fEnd,
fEnumSize,
fStart,
GREATER_THAN,
h,
hh,
LESS_THAN,
m,
M,
message,
mm,
MONTH,
MONTH_SIZE,
ms,
s,
timeZone,
TOTAL_SIZE,
utc,
YEAR |
Method Summary |
protected short |
compareDates(int[] date1,
int[] date2)
Overwrite compare algorithm to optimize month comparison |
protected java.lang.String |
dateToString(int[] date)
Converts month object representation to String |
protected int[] |
parse(java.lang.String str,
int[] date)
Parses, validates and computes normalized version of gMonth object |
Methods inherited from class org.apache.xerces.validators.datatype.DateTimeValidator |
assignAdditionalFacets,
checkContent,
clone,
compare,
compareDates,
compareOrder,
compareValues,
findUTCSign,
fQuotient,
fQuotient,
getDate,
getMaxExclusive,
getMaxInclusive,
getMinExclusive,
getMinInclusive,
getTime,
getTimeZone,
getYearMonth,
indexOf,
initializeValues,
maxDayInMonthFor,
mod,
modulo,
normalize,
parseInt,
parseIntYear,
parseTimeZone,
reportError,
resetBuffer,
resetDateObj,
setEnumeration,
setMaxExclusive,
setMaxInclusive,
setMinExclusive,
setMinInclusive,
validate,
validateDate,
validateDateTime |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
MonthDatatypeValidator
public MonthDatatypeValidator()
throws InvalidDatatypeFacetException
MonthDatatypeValidator
public MonthDatatypeValidator(DatatypeValidator base,
java.util.Hashtable facets,
boolean derivedByList)
throws InvalidDatatypeFacetException
parse
protected int[] parse(java.lang.String str,
int[] date)
throws SchemaDateTimeException
- Parses, validates and computes normalized version of gMonth object
- Overrides:
- parse in class DateTimeValidator
- Parameters:
str
- The lexical representation of gMonth object --MM--
with possible time zone Z or (-),(+)hh:mmdate
- uninitialized date object- Returns:
- normalized date representation
- Throws:
- java.lang.Exception - Invalid lexical representation
compareDates
protected short compareDates(int[] date1,
int[] date2)
- Overwrite compare algorithm to optimize month comparison
- Parameters:
date1
- date2
- - Returns:
-
dateToString
protected java.lang.String dateToString(int[] date)
- Converts month object representation to String
- Overrides:
- dateToString in class DateTimeValidator
- Parameters:
date
- month object- Returns:
- lexical representation of month: --MM-- with an optional time zone sign
Copyright © 1999-2001 Apache XML Project. All Rights Reserved.