APIdia Launch Partner
Top Description Fields Methods
com.sun.org.apache.xerces.internal.impl.dv

public Interface XSSimpleType

extends XSSimpleTypeDefinition
Known Direct Implementers
com.sun.org.apache.xerces.internal.impl.dv.xs.XSSimpleTypeDecl, com.sun.org.apache.xerces.internal.impl.dv.xs.XSSimpleTypeDelegate
Imports
com.sun.org.apache.xerces.internal.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.
Author
Sandy Gao, IBM

Field Summary

Modifier and TypeField and Description
public static final short
PRIMITIVE_ANYURI

"anyURI" type

public static final short
PRIMITIVE_BASE64BINARY

"base64Binary" type

public static final short
PRIMITIVE_BOOLEAN

"boolean" type

public static final short
PRIMITIVE_DATE

"date" type

public static final short
PRIMITIVE_DATETIME

"dataTime" type

public static final short
PRIMITIVE_DECIMAL

"decimal" type

public static final short
PRIMITIVE_DOUBLE

"double" type

public static final short
PRIMITIVE_DURATION

"duration" type

public static final short
PRIMITIVE_FLOAT

"float" type

public static final short
PRIMITIVE_GDAY

"gDay" type

public static final short
PRIMITIVE_GMONTH

"gMonth" type

public static final short
PRIMITIVE_GMONTHDAY

"gMonthDay" type

public static final short
PRIMITIVE_GYEAR

"gYear" type

public static final short
PRIMITIVE_GYEARMONTH

"gYearMonth" type

public static final short
PRIMITIVE_HEXBINARY

"hexBinary" type

public static final short
PRIMITIVE_NOTATION

"NOTATION" type

public static final short
PRIMITIVE_PRECISIONDECIMAL

"precisionDecimal" type

public static final short
PRIMITIVE_QNAME

"QName" type

public static final short
PRIMITIVE_STRING

"string" type

public static final short
PRIMITIVE_TIME

"time" type

public static final short
WS_COLLAPSE

collapse the white spaces

public static final short
WS_PRESERVE

preserve the white spaces

public static final short
WS_REPLACE

replace the white spaces

Inherited from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition:
FACET_ENUMERATIONFACET_FRACTIONDIGITSFACET_LENGTHFACET_MAXEXCLUSIVEFACET_MAXINCLUSIVEFACET_MAXLENGTHFACET_MINEXCLUSIVEFACET_MININCLUSIVEFACET_MINLENGTHFACET_NONEFACET_PATTERNFACET_TOTALDIGITSFACET_WHITESPACEORDERED_FALSEORDERED_PARTIALORDERED_TOTALVARIETY_ABSENTVARIETY_ATOMICVARIETY_LISTVARIETY_UNION

Method Summary

Modifier and TypeMethod and Description
public void
applyFacets(XSFacets
the value of all the facets
facets
,
short
bit combination value of the costraining facet constants which are present.
presentFacet
,
short
bit combination value of the costraining facet constants which are fixed.
fixedFacet
,
ValidationContext
the validation context
context
)

If this type is created from restriction, then some facets can be applied to the simple type.

public short

Returns:

an ID representing the built-in primitive base type
getPrimitiveKind
()

return an ID representing the built-in primitive base type.

public short

Returns:

valid values are WS_PRESERVE, WS_REPLACE, WS_COLLAPSE.
getWhitespace
()

Return the whitespace corresponding to this datatype.

public boolean

Returns:

true if the two value are equal
isEqual
(Object
the first value
value1
,
Object
the second value
value2
)

Check whether two actual values are equal.

public boolean

Returns:

whether this simple type is or is derived from ID.
isIDType
()

Check whether this type is or is derived from ID.

Revisit

this method makes ID special, which is not a good design.

public Object

Returns:

the actual value (QName, Boolean) of the string value
validate
(String
the string value that needs to be validated
content
,
ValidationContext
the validation context
context
,
ValidatedInfo
used to store validation result
validatedInfo
)

validate a given string against this simple type.

public Object

Returns:

the actual value (QName, Boolean) of the string value
validate
(Object
the string value that needs to be validated
content
,
ValidationContext
the validation context
context
,
ValidatedInfo
used to store validation result
validatedInfo
)

validate a given string value, represented by content.toString().

public void
validate(ValidationContext
the validation context
context
,
ValidatedInfo
used to provide the actual value and member types
validatedInfo
)

Validate an actual value against this simple type.

Inherited from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition:
getAnnotationsgetBoundedgetBuiltInKindgetDefinedFacetsgetFacetgetFacetsgetFinitegetFixedFacetsgetItemTypegetLexicalEnumerationgetLexicalFacetValuegetLexicalPatterngetMemberTypesgetMultiValueFacetsgetNumericgetOrderedgetPrimitiveTypegetVarietyisDefinedFacetisFixedFacet

Field Detail

PRIMITIVE_ANYURIback to summary
public static final short PRIMITIVE_ANYURI

"anyURI" type

PRIMITIVE_BASE64BINARYback to summary
public static final short PRIMITIVE_BASE64BINARY

"base64Binary" type

PRIMITIVE_BOOLEANback to summary
public static final short PRIMITIVE_BOOLEAN

"boolean" type

PRIMITIVE_DATEback to summary
public static final short PRIMITIVE_DATE

"date" type

PRIMITIVE_DATETIMEback to summary
public static final short PRIMITIVE_DATETIME

"dataTime" type

PRIMITIVE_DECIMALback to summary
public static final short PRIMITIVE_DECIMAL

"decimal" type

PRIMITIVE_DOUBLEback to summary
public static final short PRIMITIVE_DOUBLE

"double" type

PRIMITIVE_DURATIONback to summary
public static final short PRIMITIVE_DURATION

"duration" type

PRIMITIVE_FLOATback to summary
public static final short PRIMITIVE_FLOAT

"float" type

PRIMITIVE_GDAYback to summary
public static final short PRIMITIVE_GDAY

"gDay" type

PRIMITIVE_GMONTHback to summary
public static final short PRIMITIVE_GMONTH

"gMonth" type

PRIMITIVE_GMONTHDAYback to summary
public static final short PRIMITIVE_GMONTHDAY

"gMonthDay" type

PRIMITIVE_GYEARback to summary
public static final short PRIMITIVE_GYEAR

"gYear" type

PRIMITIVE_GYEARMONTHback to summary
public static final short PRIMITIVE_GYEARMONTH

"gYearMonth" type

PRIMITIVE_HEXBINARYback to summary
public static final short PRIMITIVE_HEXBINARY

"hexBinary" type

PRIMITIVE_NOTATIONback to summary
public static final short PRIMITIVE_NOTATION

"NOTATION" type

PRIMITIVE_PRECISIONDECIMALback to summary
public static final short PRIMITIVE_PRECISIONDECIMAL

"precisionDecimal" type

PRIMITIVE_QNAMEback to summary
public static final short PRIMITIVE_QNAME

"QName" type

PRIMITIVE_STRINGback to summary
public static final short PRIMITIVE_STRING

"string" type

PRIMITIVE_TIMEback to summary
public static final short PRIMITIVE_TIME

"time" type

WS_COLLAPSEback to summary
public static final short WS_COLLAPSE

collapse the white spaces

WS_PRESERVEback to summary
public static final short WS_PRESERVE

preserve the white spaces

WS_REPLACEback to summary
public static final short WS_REPLACE

replace the white spaces

Method Detail

applyFacetsback to summary
public void applyFacets(XSFacets facets, short presentFacet, short fixedFacet, ValidationContext context) throws InvalidDatatypeFacetException

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.

Parameters
facets:XSFacets

the value of all the facets

presentFacet:short

bit combination value of the costraining facet constants which are present.

fixedFacet:short

bit combination value of the costraining facet constants which are fixed.

context:ValidationContext

the validation context

Exceptions
InvalidDatatypeFacetException:
exception for invalid facet values.
getPrimitiveKindback to summary
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.

Returns:short

an ID representing the built-in primitive base type

getWhitespaceback to summary
public short getWhitespace() throws DatatypeException

Return the whitespace corresponding to this datatype.

Returns:short

valid values are WS_PRESERVE, WS_REPLACE, WS_COLLAPSE.

Exceptions
DatatypeException:
union datatypes don't have whitespace facet associated with them
isEqualback to summary
public boolean isEqual(Object value1, Object value2)

Check whether two actual values are equal.

Parameters
value1:Object

the first value

value2:Object

the second value

Returns:boolean

true if the two value are equal

isIDTypeback to summary
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.

Returns:boolean

whether this simple type is or is derived from ID.

validateback to summary
public Object validate(String content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException

validate a given string against this simple type.

Parameters
content:String

the string value that needs to be validated

context:ValidationContext

the validation context

validatedInfo:ValidatedInfo

used to store validation result

Returns:Object

the actual value (QName, Boolean) of the string value

validateback to summary
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.

Parameters
content:Object

the string value that needs to be validated

context:ValidationContext

the validation context

validatedInfo:ValidatedInfo

used to store validation result

Returns:Object

the actual value (QName, Boolean) of the string value

validateback to summary
public void validate(ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException

Validate an actual value against this simple type.

Parameters
context:ValidationContext

the validation context

validatedInfo:ValidatedInfo

used to provide the actual value and member types

Exceptions
InvalidDatatypeValueException:
exception for invalid values.