org.apache.xerces.xs

Interface XSSimpleTypeDefinition

All Superinterfaces:
XSObject, XSTypeDefinition

public interface XSSimpleTypeDefinition
extends XSTypeDefinition

This interface represents the Simple Type Definition schema component. This interface provides several query operations for facet components. Users can either retrieve the defined facets as XML Schema components, using the facets and the multiValueFacets attributes; or users can separately query a facet's properties using methods such as getLexicalFacetValue, isFixedFacet, etc.

Field Summary

static short
FACET_ENUMERATION
4.3.5 enumeration.
static short
FACET_FRACTIONDIGITS
4.3.12 fractionDigits.
static short
FACET_LENGTH
4.3.1 Length
static short
FACET_MAXEXCLUSIVE
4.3.9 maxExclusive.
static short
FACET_MAXINCLUSIVE
4.3.7 maxInclusive.
static short
FACET_MAXLENGTH
4.3.3 maxLength.
static short
FACET_MINEXCLUSIVE
4.3.9 minExclusive.
static short
FACET_MININCLUSIVE
4.3.10 minInclusive.
static short
FACET_MINLENGTH
4.3.2 minLength.
static short
FACET_NONE
No facets defined.
static short
FACET_PATTERN
4.3.4 pattern.
static short
FACET_TOTALDIGITS
4.3.11 totalDigits .
static short
FACET_WHITESPACE
4.3.5 whitespace.
static short
ORDERED_FALSE
A constant defined for the 'ordered' fundamental facet: not ordered.
static short
ORDERED_PARTIAL
A constant defined for the 'ordered' fundamental facet: partially ordered.
static short
ORDERED_TOTAL
A constant defined for the 'ordered' fundamental facet: total ordered.
static short
VARIETY_ABSENT
The variety is absent for the anySimpleType definition.
static short
VARIETY_ATOMIC
Atomic type.
static short
VARIETY_LIST
List type.
static short
VARIETY_UNION
Union type.

Fields inherited from interface org.apache.xerces.xs.XSTypeDefinition

COMPLEX_TYPE, SIMPLE_TYPE

Method Summary

XSObjectList
getAnnotations()
A sequence of [annotations] or an empty XSObjectList.
boolean
getBounded()
Fundamental Facet: bounded.
short
getBuiltInKind()
Returns the closest built-in type category this type represents or derived from.
short
getDefinedFacets()
[facets]: all facets defined on this type.
XSObjectList
getFacets()
A list of constraining facets if it exists, otherwise an empty XSObjectList.
boolean
getFinite()
Fundamental Facet: cardinality.
short
getFixedFacets()
[facets]: all defined facets for this type which are fixed.
XSSimpleTypeDefinition
getItemType()
If variety is list the item type definition (an atomic or union simple type definition) is available, otherwise null.
StringList
getLexicalEnumeration()
A list of enumeration values if it exists, otherwise an empty StringList.
String
getLexicalFacetValue(short facetName)
Convenience method.
StringList
getLexicalPattern()
A list of pattern values if it exists, otherwise an empty StringList.
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.
XSObjectList
getMultiValueFacets()
A list of enumeration and pattern constraining facets if it exists, otherwise an empty XSObjectList.
boolean
getNumeric()
Fundamental Facet: numeric.
short
getOrdered()
Fundamental Facet: ordered.
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.
short
getVariety()
[variety]: one of {atomic, list, union} or absent.
boolean
isDefinedFacet(short facetName)
Convenience method.
boolean
isFixedFacet(short facetName)
Convenience method.

Methods inherited from interface org.apache.xerces.xs.XSObject

getName, getNamespace, getNamespaceItem, getType

Methods inherited from interface org.apache.xerces.xs.XSTypeDefinition

derivedFrom, derivedFromType, getAnonymous, getBaseType, getFinal, getTypeCategory, isFinal

Field Details

FACET_ENUMERATION

public static final short FACET_ENUMERATION
4.3.5 enumeration.
Field Value:
2048

FACET_FRACTIONDIGITS

public static final short FACET_FRACTIONDIGITS
4.3.12 fractionDigits.
Field Value:
1024

FACET_LENGTH

public static final short FACET_LENGTH
4.3.1 Length
Field Value:
1

FACET_MAXEXCLUSIVE

public static final short FACET_MAXEXCLUSIVE
4.3.9 maxExclusive.
Field Value:
64

FACET_MAXINCLUSIVE

public static final short FACET_MAXINCLUSIVE
4.3.7 maxInclusive.
Field Value:
32

FACET_MAXLENGTH

public static final short FACET_MAXLENGTH
4.3.3 maxLength.
Field Value:
4

FACET_MINEXCLUSIVE

public static final short FACET_MINEXCLUSIVE
4.3.9 minExclusive.
Field Value:
128

FACET_MININCLUSIVE

public static final short FACET_MININCLUSIVE
4.3.10 minInclusive.
Field Value:
256

FACET_MINLENGTH

public static final short FACET_MINLENGTH
4.3.2 minLength.
Field Value:
2

FACET_NONE

public static final short FACET_NONE
No facets defined.
Field Value:
0

FACET_PATTERN

public static final short FACET_PATTERN
4.3.4 pattern.
Field Value:
8

FACET_TOTALDIGITS

public static final short FACET_TOTALDIGITS
4.3.11 totalDigits .
Field Value:
512

FACET_WHITESPACE

public static final short FACET_WHITESPACE
4.3.5 whitespace.
Field Value:
16

ORDERED_FALSE

public static final short ORDERED_FALSE
A constant defined for the 'ordered' fundamental facet: not ordered.
Field Value:
0

ORDERED_PARTIAL

public static final short ORDERED_PARTIAL
A constant defined for the 'ordered' fundamental facet: partially ordered.
Field Value:
1

ORDERED_TOTAL

public static final short ORDERED_TOTAL
A constant defined for the 'ordered' fundamental facet: total ordered.
Field Value:
2

VARIETY_ABSENT

public static final short VARIETY_ABSENT
The variety is absent for the anySimpleType definition.
Field Value:
0

VARIETY_ATOMIC

public static final short VARIETY_ATOMIC
Atomic type.
Field Value:
1

VARIETY_LIST

public static final short VARIETY_LIST
List type.
Field Value:
2

VARIETY_UNION

public static final short VARIETY_UNION
Union type.
Field Value:
3

Method Details

getAnnotations

public XSObjectList getAnnotations()
A sequence of [annotations] or an empty XSObjectList.

getBounded

public boolean getBounded()
Fundamental Facet: bounded.

getBuiltInKind

public short getBuiltInKind()
Returns the closest built-in type category this type represents or derived from. For example, if this simple type is a built-in derived type integer the INTEGER_DV is returned.

getDefinedFacets

public short getDefinedFacets()
[facets]: all facets defined on this type. The value is a bit combination of FACET_XXX constants of all defined facets.

getFacets

public XSObjectList getFacets()
A list of constraining facets if it exists, otherwise an empty XSObjectList. Note: This method must not be used to retrieve values for enumeration and pattern facets.

getFinite

public boolean getFinite()
Fundamental Facet: cardinality.

getFixedFacets

public short getFixedFacets()
[facets]: all defined facets for this type which are fixed.

getItemType

public XSSimpleTypeDefinition getItemType()
If variety is list the item type definition (an atomic or union simple type definition) is available, otherwise null.

getLexicalEnumeration

public StringList getLexicalEnumeration()
A list of enumeration values if it exists, otherwise an empty StringList.

getLexicalFacetValue

public String getLexicalFacetValue(short facetName)
Convenience method. Returns a value of a single constraining facet for this simple type definition. This method must not be used to retrieve values for enumeration and pattern facets.
Parameters:
facetName - The name of the facet, i.e. FACET_LENGTH, FACET_TOTALDIGITS. To retrieve the value for a pattern or an enumeration, see enumeration and pattern.
Returns:
A value of the facet specified in facetName for this simple type definition or null.

getLexicalPattern

public StringList getLexicalPattern()
A list of pattern values if it exists, otherwise an empty StringList.

getMemberTypes

public 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.

getMultiValueFacets

public XSObjectList getMultiValueFacets()
A list of enumeration and pattern constraining facets if it exists, otherwise an empty XSObjectList.

getNumeric

public boolean getNumeric()
Fundamental Facet: numeric.

getOrdered

public short getOrdered()
Fundamental Facet: ordered.

getPrimitiveType

public 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.

getVariety

public short getVariety()
[variety]: one of {atomic, list, union} or absent.

isDefinedFacet

public boolean isDefinedFacet(short facetName)
Convenience method. [Facets]: check whether a facet is defined on this type.
Parameters:
facetName - The name of the facet.
Returns:
True if the facet is defined, false otherwise.

isFixedFacet

public boolean isFixedFacet(short facetName)
Convenience method. [Facets]: check whether a facet is defined and fixed on this type.
Parameters:
facetName - The name of the facet.
Returns:
True if the facet is fixed, false otherwise.

Copyright B) 1999-2007 The Apache Software Foundation. All Rights Reserved.