1 2 3 59 60 package org.enhydra.apache.xerces.validators.datatype; 61 62 import java.util.Hashtable ; 63 64 70 71 public class YearMonthDatatypeValidator extends DateTimeValidator { 72 73 public YearMonthDatatypeValidator() throws InvalidDatatypeFacetException{ 74 super(); 75 } 76 77 78 public YearMonthDatatypeValidator ( DatatypeValidator base, Hashtable facets, 79 boolean derivedByList ) throws InvalidDatatypeFacetException { 80 super (base, facets, derivedByList); 81 } 82 83 92 protected int[] parse(String str, int[] date) throws SchemaDateTimeException{ 93 resetBuffer(str); 94 95 if ( date == null ) { 97 date = new int[TOTAL_SIZE]; 98 } 99 resetDateObj(date); 100 101 getYearMonth(fStart, fEnd, date); 103 parseTimeZone (fEnd, date); 104 105 date[D]=DAY; 107 108 validateDateTime(date); 111 112 if ( date[utc]!=0 && date[utc]!='Z' ) { 113 normalize(date); 114 } 115 return date; 116 } 117 118 119 } 120 121 122 | Popular Tags |