PRIMITIVE_ANYURI
public static final short PRIMITIVE_ANYURI
"anyURI" type
- 17
PRIMITIVE_BASE64BINARY
public static final short PRIMITIVE_BASE64BINARY
"base64Binary" type
- 16
PRIMITIVE_BOOLEAN
public static final short PRIMITIVE_BOOLEAN
"boolean" type
- 2
PRIMITIVE_DATE
public static final short PRIMITIVE_DATE
"date" type
- 9
PRIMITIVE_DATETIME
public static final short PRIMITIVE_DATETIME
"dataTime" type
- 7
PRIMITIVE_DECIMAL
public static final short PRIMITIVE_DECIMAL
"decimal" type
- 3
PRIMITIVE_DOUBLE
public static final short PRIMITIVE_DOUBLE
"double" type
- 5
PRIMITIVE_DURATION
public static final short PRIMITIVE_DURATION
"duration" type
- 6
PRIMITIVE_FLOAT
public static final short PRIMITIVE_FLOAT
"float" type
- 4
PRIMITIVE_GDAY
public static final short PRIMITIVE_GDAY
"gDay" type
- 13
PRIMITIVE_GMONTH
public static final short PRIMITIVE_GMONTH
"gMonth" type
- 14
PRIMITIVE_GMONTHDAY
public static final short PRIMITIVE_GMONTHDAY
"gMonthDay" type
- 12
PRIMITIVE_GYEAR
public static final short PRIMITIVE_GYEAR
"gYear" type
- 11
PRIMITIVE_GYEARMONTH
public static final short PRIMITIVE_GYEARMONTH
"gYearMonth" type
- 10
PRIMITIVE_HEXBINARY
public static final short PRIMITIVE_HEXBINARY
"hexBinary" type
- 15
PRIMITIVE_NOTATION
public static final short PRIMITIVE_NOTATION
"NOTATION" type
- 19
PRIMITIVE_QNAME
public static final short PRIMITIVE_QNAME
"QName" type
- 18
PRIMITIVE_STRING
public static final short PRIMITIVE_STRING
"string" type
- 1
PRIMITIVE_TIME
public static final short PRIMITIVE_TIME
"time" type
- 8
WS_COLLAPSE
public static final short WS_COLLAPSE
collapse the white spaces
- 2
WS_PRESERVE
public static final short WS_PRESERVE
preserve the white spaces
- 0
WS_REPLACE
public static final short WS_REPLACE
replace the white spaces
- 1
getPrimitiveKind
public short getPrimitiveKind()
return an ID representing the built-in primitive base type.
REVISIT: This method is (currently) for internal use only.
the constants returned from this method are not finalized yet.
the names and values might change in the further.
- an ID representing the built-in primitive base type
getWhitespace
public short getWhitespace()
throws DatatypeException
Return the whitespace corresponding to this datatype.
- valid values are WS_PRESERVE, WS_REPLACE, WS_COLLAPSE.
DatatypeException
- union datatypes don't have whitespace facet associated with them
isEqual
public boolean isEqual(Object value1,
Object value2)
Check whether two actual values are equal.
value1
- the first valuevalue2
- the second value
- true if the two value are equal
isIDType
public boolean isIDType()
Check whether this type is or is derived from ID.
REVISIT: this method makes ID special, which is not a good design.
but since ID is not a primitive, there doesn't seem to be a
clean way of doing it except to define special method like this.
- whether this simple type is or is derived from ID.
validate
public Object validate(Object content,
ValidationContext context,
ValidatedInfo validatedInfo)
throws InvalidDatatypeValueException
validate a given string value, represented by content.toString().
note that if content is a StringBuffer, for performance reasons,
it's possible that the content of the string buffer is modified.
content
- the string value that needs to be validatedcontext
- the validation contextvalidatedInfo
- used to store validation result
- the actual value (QName, Boolean) of the string value
validate
public Object validate(String content,
ValidationContext context,
ValidatedInfo validatedInfo)
throws InvalidDatatypeValueException
validate a given string against this simple type.
content
- the string value that needs to be validatedcontext
- the validation contextvalidatedInfo
- used to store validation result
- the actual value (QName, Boolean) of the string value