FileDocCategorySizeDatePackage
XSSimpleType.javaAPI DocApache Xerces 3.0.18532Fri Sep 14 20:33:54 BST 2007org.apache.xerces.impl.dv

XSSimpleType

public interface XSSimpleType implements org.apache.xerces.xs.XSSimpleTypeDefinition
This interface XSSimpleType represents the simple type definition of schema component and defines methods to query the information contained. Any simple type (atomic, list or union) will implement this interface. It inherits from XSTypeDecl.
xerces.internal
author
Sandy Gao, IBM
version
$Id: XSSimpleType.java 446751 2006-09-15 21:54:06Z mrglavas $

Fields Summary
public static final short
WS_PRESERVE
preserve the white spaces
public static final short
WS_REPLACE
replace the white spaces
public static final short
WS_COLLAPSE
collapse the white spaces
public static final short
PRIMITIVE_STRING
"string" type
public static final short
PRIMITIVE_BOOLEAN
"boolean" type
public static final short
PRIMITIVE_DECIMAL
"decimal" type
public static final short
PRIMITIVE_FLOAT
"float" type
public static final short
PRIMITIVE_DOUBLE
"double" type
public static final short
PRIMITIVE_DURATION
"duration" type
public static final short
PRIMITIVE_DATETIME
"dataTime" type
public static final short
PRIMITIVE_TIME
"time" type
public static final short
PRIMITIVE_DATE
"date" type
public static final short
PRIMITIVE_GYEARMONTH
"gYearMonth" type
public static final short
PRIMITIVE_GYEAR
"gYear" type
public static final short
PRIMITIVE_GMONTHDAY
"gMonthDay" type
public static final short
PRIMITIVE_GDAY
"gDay" type
public static final short
PRIMITIVE_GMONTH
"gMonth" type
public static final short
PRIMITIVE_HEXBINARY
"hexBinary" type
public static final short
PRIMITIVE_BASE64BINARY
"base64Binary" type
public static final short
PRIMITIVE_ANYURI
"anyURI" type
public static final short
PRIMITIVE_QNAME
"QName" type
public static final short
PRIMITIVE_PRECISIONDECIMAL
"precisionDecimal" type
public static final short
PRIMITIVE_NOTATION
"NOTATION" type
Constructors Summary
Methods Summary
public voidapplyFacets(XSFacets facets, short presentFacet, short fixedFacet, ValidationContext context)
If this type is created from restriction, then some facets can be applied to the simple type. XSFacets is used to pass the value of different facets.

param
facets the value of all the facets
param
presentFacet bit combination value of the costraining facet constants which are present.
param
fixedFacet bit combination value of the costraining facet constants which are fixed.
param
context the validation context
exception
InvalidDatatypeFacetException exception for invalid facet values.

public shortgetPrimitiveKind()
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.

return
an ID representing the built-in primitive base type

public shortgetWhitespace()
Return the whitespace corresponding to this datatype.

return
valid values are WS_PRESERVE, WS_REPLACE, WS_COLLAPSE.
exception
DatatypeException union datatypes don't have whitespace facet associated with them

public booleanisEqual(java.lang.Object value1, java.lang.Object value2)
Check whether two actual values are equal.

param
value1 the first value
param
value2 the second value
return
true if the two value are equal

public booleanisIDType()
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.

return
whether this simple type is or is derived from ID.

public java.lang.Objectvalidate(java.lang.String content, ValidationContext context, ValidatedInfo validatedInfo)
validate a given string against this simple type.

param
content the string value that needs to be validated
param
context the validation context
param
validatedInfo used to store validation result
return
the actual value (QName, Boolean) of the string value

public java.lang.Objectvalidate(java.lang.Object content, ValidationContext context, ValidatedInfo validatedInfo)
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.

param
content the string value that needs to be validated
param
context the validation context
param
validatedInfo used to store validation result
return
the actual value (QName, Boolean) of the string value

public voidvalidate(ValidationContext context, ValidatedInfo validatedInfo)
Validate an actual value against this simple type.

param
context the validation context
param
validatedInfo used to provide the actual value and member types
exception
InvalidDatatypeValueException exception for invalid values.