FileDocCategorySizeDatePackage
XSSimpleType.javaAPI DocJava SE 6 API8196Tue Jun 10 00:22:40 BST 2008com.sun.org.apache.xerces.internal.impl.dv

XSSimpleType

public interface XSSimpleType implements 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,v 1.2.6.1 2005/09/12 10:59:48 neerajbj Exp $

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(com.sun.org.apache.xerces.internal.impl.dv.XSFacets facets, short presentFacet, short fixedFacet, com.sun.org.apache.xerces.internal.impl.dv.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, com.sun.org.apache.xerces.internal.impl.dv.ValidationContext context, com.sun.org.apache.xerces.internal.impl.dv.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, com.sun.org.apache.xerces.internal.impl.dv.ValidationContext context, com.sun.org.apache.xerces.internal.impl.dv.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(com.sun.org.apache.xerces.internal.impl.dv.ValidationContext context, com.sun.org.apache.xerces.internal.impl.dv.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.