1 3 9 10 package javax.xml.datatype; 11 12 import javax.xml.XMLConstants ; 13 import javax.xml.namespace.QName ; 14 15 22 23 public final class DatatypeConstants { 24 25 28 private DatatypeConstants() { 29 } 30 31 34 public static final int JANUARY = 1; 35 36 39 public static final int FEBRUARY = 2; 40 41 44 public static final int MARCH = 3; 45 46 49 public static final int APRIL = 4; 50 51 54 public static final int MAY = 5; 55 56 59 public static final int JUNE = 6; 60 61 64 public static final int JULY = 7; 65 66 69 public static final int AUGUST = 8; 70 71 74 public static final int SEPTEMBER = 9; 75 76 79 public static final int OCTOBER = 10; 80 81 84 public static final int NOVEMBER = 11; 85 86 89 public static final int DECEMBER = 12; 90 91 94 public static final int LESSER = -1; 95 96 99 public static final int EQUAL = 0; 100 101 104 public static final int GREATER = 1; 105 106 109 public static final int INDETERMINATE = 2; 110 111 114 public static final int FIELD_UNDEFINED = Integer.MIN_VALUE; 115 116 119 public static final Field YEARS = new Field("YEARS", 0); 120 121 124 public static final Field MONTHS = new Field("MONTHS", 1); 125 126 129 public static final Field DAYS = new Field("DAYS", 2); 130 131 134 public static final Field HOURS = new Field("HOURS", 3); 135 136 139 public static final Field MINUTES = new Field("MINUTES", 4); 140 141 144 public static final Field SECONDS = new Field("SECONDS", 5); 145 146 150 public static final class Field { 151 152 155 private final String str; 156 162 private final int id; 163 164 169 private Field(final String str, final int id) { 170 this.str = str; 171 this.id = id; 172 } 173 181 public String toString() { return str; } 182 183 188 public int getId() { 189 return id; 190 } 191 } 192 193 196 public static final QName DATETIME = new QName (XMLConstants.W3C_XML_SCHEMA_NS_URI, "dateTime"); 197 198 201 public static final QName TIME = new QName (XMLConstants.W3C_XML_SCHEMA_NS_URI, "time"); 202 203 206 public static final QName DATE = new QName (XMLConstants.W3C_XML_SCHEMA_NS_URI, "date"); 207 208 211 public static final QName GYEARMONTH = new QName (XMLConstants.W3C_XML_SCHEMA_NS_URI, "gYearMonth"); 212 213 216 public static final QName GMONTHDAY = new QName (XMLConstants.W3C_XML_SCHEMA_NS_URI, "gMonthDay"); 217 218 221 public static final QName GYEAR = new QName (XMLConstants.W3C_XML_SCHEMA_NS_URI, "gYear"); 222 223 226 public static final QName GMONTH = new QName (XMLConstants.W3C_XML_SCHEMA_NS_URI, "gMonth"); 227 228 231 public static final QName GDAY = new QName (XMLConstants.W3C_XML_SCHEMA_NS_URI, "gDay"); 232 233 236 public static final QName DURATION = new QName (XMLConstants.W3C_XML_SCHEMA_NS_URI, "duration"); 237 238 241 public static final QName DURATION_DAYTIME = new QName (XMLConstants.W3C_XPATH_DATATYPE_NS_URI, "dayTimeDuration"); 242 243 246 public static final QName DURATION_YEARMONTH = new QName (XMLConstants.W3C_XPATH_DATATYPE_NS_URI, "yearMonthDuration"); 247 248 251 public static final int MAX_TIMEZONE_OFFSET = -14 * 60; 252 253 256 public static final int MIN_TIMEZONE_OFFSET = 14 * 60; 257 258 } 259 | Popular Tags |