org.apache.xerces.impl.dv.XSSimpleType |
Known Indirect Subclasses
|
Class Overview
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
.
Summary
Public Methods |
abstract
void
|
applyFacets(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.
|
abstract
short
|
getPrimitiveKind()
return an ID representing the built-in primitive base type.
|
abstract
short
|
getWhitespace()
Return the whitespace corresponding to this datatype.
|
abstract
boolean
|
isEqual(Object value1, Object value2)
Check whether two actual values are equal.
|
abstract
boolean
|
isIDType()
Check whether this type is or is derived from ID.
|
abstract
Object
|
validate(Object content, ValidationContext context, ValidatedInfo validatedInfo)
validate a given string value, represented by content.toString().
|
abstract
Object
|
validate(String content, ValidationContext context, ValidatedInfo validatedInfo)
validate a given string against this simple type.
|
abstract
void
|
validate(ValidationContext context, ValidatedInfo validatedInfo)
Validate an actual value against this simple type.
|
[Expand]
Inherited Methods |
From interface
org.apache.xerces.xs.XSObject
abstract
String
|
getName()
The name of type NCName , as defined in XML Namespaces, of
this declaration specified in the {name} property of the
component or null if the definition of this component
does not have a {name} property.
|
abstract
String
|
getNamespace()
The [target namespace] of this object, or null if it is
unspecified.
|
abstract
XSNamespaceItem
|
getNamespaceItem()
A namespace schema information item corresponding to the target
namespace of the component, if it is globally declared; or
null otherwise.
|
abstract
short
|
getType()
The type of this object, i.e.
|
|
From interface
org.apache.xerces.xs.XSSimpleTypeDefinition
abstract
XSObjectList
|
getAnnotations()
A sequence of [annotations] or an empty XSObjectList .
|
abstract
boolean
|
getBounded()
Fundamental Facet: bounded.
|
abstract
short
|
getBuiltInKind()
Returns the closest built-in type category this type represents or
derived from.
|
abstract
short
|
getDefinedFacets()
[facets]: all facets defined on this type.
|
abstract
XSObjectList
|
getFacets()
A list of constraining facets if it exists, otherwise an empty
XSObjectList .
|
abstract
boolean
|
getFinite()
Fundamental Facet: cardinality.
|
abstract
short
|
getFixedFacets()
[facets]: all defined facets for this type which are fixed.
|
abstract
XSSimpleTypeDefinition
|
getItemType()
If variety is list the item type definition (an atomic or
union simple type definition) is available, otherwise
null .
|
abstract
StringList
|
getLexicalEnumeration()
A list of enumeration values if it exists, otherwise an empty
StringList .
|
abstract
String
|
getLexicalFacetValue(short facetName)
Convenience method.
|
abstract
StringList
|
getLexicalPattern()
A list of pattern values if it exists, otherwise an empty
StringList .
|
abstract
XSObjectList
|
getMemberTypes()
If variety is union the list of member type definitions (a
non-empty sequence of simple type definitions) is available,
otherwise an empty XSObjectList .
|
abstract
XSObjectList
|
getMultiValueFacets()
A list of enumeration and pattern constraining facets if it exists,
otherwise an empty XSObjectList .
|
abstract
boolean
|
getNumeric()
Fundamental Facet: numeric.
|
abstract
short
|
getOrdered()
Fundamental Facet: ordered.
|
abstract
XSSimpleTypeDefinition
|
getPrimitiveType()
If variety is atomic the primitive type definition (a
built-in primitive datatype definition or the simple ur-type
definition) is available, otherwise null .
|
abstract
short
|
getVariety()
[variety]: one of {atomic, list, union} or absent.
|
abstract
boolean
|
isDefinedFacet(short facetName)
Convenience method.
|
abstract
boolean
|
isFixedFacet(short facetName)
Convenience method.
|
|
From interface
org.apache.xerces.xs.XSTypeDefinition
abstract
boolean
|
derivedFrom(String namespace, String name, short derivationMethod)
Convenience method which checks if this type is derived from the given
ancestor type.
|
abstract
boolean
|
derivedFromType(XSTypeDefinition ancestorType, short derivationMethod)
Convenience method which checks if this type is derived from the given
ancestorType .
|
abstract
boolean
|
getAnonymous()
Convenience attribute.
|
abstract
XSTypeDefinition
|
getBaseType()
{base type definition}: either a simple type definition or a complex
type definition.
|
abstract
short
|
getFinal()
For complex types the returned value is a bit combination of the subset
of {DERIVATION_EXTENSION, DERIVATION_RESTRICTION }
corresponding to final set of this type or
DERIVATION_NONE .
|
abstract
short
|
getTypeCategory()
Return whether this type definition is a simple type or complex type.
|
abstract
boolean
|
isFinal(short restriction)
{final}.
|
|
Constants
public
static
final
short
PRIMITIVE_ANYURI
Constant Value:
17
(0x00000011)
public
static
final
short
PRIMITIVE_BASE64BINARY
Constant Value:
16
(0x00000010)
public
static
final
short
PRIMITIVE_BOOLEAN
Constant Value:
2
(0x00000002)
public
static
final
short
PRIMITIVE_DATE
Constant Value:
9
(0x00000009)
public
static
final
short
PRIMITIVE_DATETIME
Constant Value:
7
(0x00000007)
public
static
final
short
PRIMITIVE_DECIMAL
Constant Value:
3
(0x00000003)
public
static
final
short
PRIMITIVE_DOUBLE
Constant Value:
5
(0x00000005)
public
static
final
short
PRIMITIVE_DURATION
Constant Value:
6
(0x00000006)
public
static
final
short
PRIMITIVE_FLOAT
Constant Value:
4
(0x00000004)
public
static
final
short
PRIMITIVE_GDAY
Constant Value:
13
(0x0000000d)
public
static
final
short
PRIMITIVE_GMONTH
Constant Value:
14
(0x0000000e)
public
static
final
short
PRIMITIVE_GMONTHDAY
Constant Value:
12
(0x0000000c)
public
static
final
short
PRIMITIVE_GYEAR
Constant Value:
11
(0x0000000b)
public
static
final
short
PRIMITIVE_GYEARMONTH
Constant Value:
10
(0x0000000a)
public
static
final
short
PRIMITIVE_HEXBINARY
Constant Value:
15
(0x0000000f)
public
static
final
short
PRIMITIVE_NOTATION
Constant Value:
20
(0x00000014)
public
static
final
short
PRIMITIVE_PRECISIONDECIMAL
Constant Value:
19
(0x00000013)
public
static
final
short
PRIMITIVE_QNAME
Constant Value:
18
(0x00000012)
public
static
final
short
PRIMITIVE_STRING
Constant Value:
1
(0x00000001)
public
static
final
short
PRIMITIVE_TIME
Constant Value:
8
(0x00000008)
public
static
final
short
WS_COLLAPSE
collapse the white spaces
Constant Value:
2
(0x00000002)
public
static
final
short
WS_PRESERVE
preserve the white spaces
Constant Value:
0
(0x00000000)
public
static
final
short
WS_REPLACE
Constant Value:
1
(0x00000001)
Public Methods
public
abstract
void
applyFacets
(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.
Parameters
facets
| the value of all the facets |
presentFacet
| bit combination value of the costraining facet
constants which are present. |
fixedFacet
| bit combination value of the costraining facet
constants which are fixed. |
context
| the validation context |
public
abstract
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
- an ID representing the built-in primitive base type
public
abstract
short
getWhitespace
()
Return the whitespace corresponding to this datatype.
Returns
- valid values are WS_PRESERVE, WS_REPLACE, WS_COLLAPSE.
public
abstract
boolean
isEqual
(Object value1, Object value2)
Check whether two actual values are equal.
Parameters
value1
| the first value |
value2
| the second value |
Returns
- true if the two value are equal
public
abstract
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
- whether this simple type is or is derived from ID.
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
| the string value that needs to be validated |
context
| the validation context |
validatedInfo
| used to store validation result |
Returns
- the actual value (QName, Boolean) of the string value
validate a given string against this simple type.
Parameters
content
| the string value that needs to be validated |
context
| the validation context |
validatedInfo
| used to store validation result |
Returns
- the actual value (QName, Boolean) of the string value
Validate an actual value against this simple type.
Parameters
context
| the validation context |
validatedInfo
| used to provide the actual value and member types |