Package org.apache.xerces.xs
Interface XSSimpleTypeDefinition
- All Superinterfaces:
XSObject,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
FieldsModifier and TypeFieldDescriptionstatic final short4.3.5 enumeration.static final short4.3.12 fractionDigits.static final short4.3.1 Lengthstatic final short4.3.9 maxExclusive.static final short4.3.7 maxInclusive.static final short4.3.3 maxLength.static final short4.3.9 minExclusive.static final short4.3.10 minInclusive.static final short4.3.2 minLength.static final shortNo facets defined.static final short4.3.4 pattern.static final short4.3.11 totalDigits .static final short4.3.5 whitespace.static final shortA constant defined for the 'ordered' fundamental facet: not ordered.static final shortA constant defined for the 'ordered' fundamental facet: partially ordered.static final shortA constant defined for the 'ordered' fundamental facet: total ordered.static final shortThe variety is absent for the anySimpleType definition.static final shortAtomictype.static final shortListtype.static final shortUniontype.Fields inherited from interface org.apache.xerces.xs.XSTypeDefinition
COMPLEX_TYPE, SIMPLE_TYPE -
Method Summary
Modifier and TypeMethodDescriptionA sequence of [annotations] or an emptyXSObjectList.booleanFundamental Facet: bounded.shortReturns the closest built-in type category this type represents or derived from.short[facets]: all facets defined on this type.getFacet(int facetType) A constraining facet object.A list of constraining facets if it exists, otherwise an emptyXSObjectList.booleanFundamental Facet: cardinality.short[facets]: all defined facets for this type which are fixed.If variety islistthe item type definition (an atomic or union simple type definition) is available, otherwisenull.A list of enumeration values if it exists, otherwise an emptyStringList.getLexicalFacetValue(short facetName) Convenience method.A list of pattern values if it exists, otherwise an emptyStringList.If variety isunionthe list of member type definitions (a non-empty sequence of simple type definitions) is available, otherwise an emptyXSObjectList.A list of enumeration and pattern constraining facets if it exists, otherwise an emptyXSObjectList.booleanFundamental Facet: numeric.shortFundamental Facet: ordered.If variety isatomicthe primitive type definition (a built-in primitive datatype definition or the simple ur-type definition) is available, otherwisenull.short[variety]: one of {atomic, list, union} or absent.booleanisDefinedFacet(short facetName) Convenience method.booleanisFixedFacet(short facetName) Convenience method.Methods inherited from interface org.apache.xerces.xs.XSObject
getName, getNamespace, getNamespaceItem, getTypeMethods inherited from interface org.apache.xerces.xs.XSTypeDefinition
derivedFrom, derivedFromType, getAnonymous, getBaseType, getFinal, getTypeCategory, isFinal
-
Field Details
-
VARIETY_ABSENT
static final short VARIETY_ABSENTThe variety is absent for the anySimpleType definition.- See Also:
-
VARIETY_ATOMIC
static final short VARIETY_ATOMICAtomictype.- See Also:
-
VARIETY_LIST
static final short VARIETY_LISTListtype.- See Also:
-
VARIETY_UNION
static final short VARIETY_UNIONUniontype.- See Also:
-
FACET_NONE
static final short FACET_NONENo facets defined.- See Also:
-
FACET_LENGTH
static final short FACET_LENGTH4.3.1 Length- See Also:
-
FACET_MINLENGTH
static final short FACET_MINLENGTH4.3.2 minLength.- See Also:
-
FACET_MAXLENGTH
static final short FACET_MAXLENGTH4.3.3 maxLength.- See Also:
-
FACET_PATTERN
static final short FACET_PATTERN4.3.4 pattern.- See Also:
-
FACET_WHITESPACE
static final short FACET_WHITESPACE4.3.5 whitespace.- See Also:
-
FACET_MAXINCLUSIVE
static final short FACET_MAXINCLUSIVE4.3.7 maxInclusive.- See Also:
-
FACET_MAXEXCLUSIVE
static final short FACET_MAXEXCLUSIVE4.3.9 maxExclusive.- See Also:
-
FACET_MINEXCLUSIVE
static final short FACET_MINEXCLUSIVE4.3.9 minExclusive.- See Also:
-
FACET_MININCLUSIVE
static final short FACET_MININCLUSIVE4.3.10 minInclusive.- See Also:
-
FACET_TOTALDIGITS
static final short FACET_TOTALDIGITS4.3.11 totalDigits .- See Also:
-
FACET_FRACTIONDIGITS
static final short FACET_FRACTIONDIGITS4.3.12 fractionDigits.- See Also:
-
FACET_ENUMERATION
static final short FACET_ENUMERATION4.3.5 enumeration.- See Also:
-
ORDERED_FALSE
static final short ORDERED_FALSEA constant defined for the 'ordered' fundamental facet: not ordered.- See Also:
-
ORDERED_PARTIAL
static final short ORDERED_PARTIALA constant defined for the 'ordered' fundamental facet: partially ordered.- See Also:
-
ORDERED_TOTAL
static final short ORDERED_TOTALA constant defined for the 'ordered' fundamental facet: total ordered.- See Also:
-
-
Method Details
-
getVariety
short getVariety()[variety]: one of {atomic, list, union} or absent. -
getPrimitiveType
XSSimpleTypeDefinition getPrimitiveType()If variety isatomicthe primitive type definition (a built-in primitive datatype definition or the simple ur-type definition) is available, otherwisenull. -
getBuiltInKind
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 theINTEGER_DVis returned. -
getItemType
XSSimpleTypeDefinition getItemType()If variety islistthe item type definition (an atomic or union simple type definition) is available, otherwisenull. -
getMemberTypes
XSObjectList getMemberTypes()If variety isunionthe list of member type definitions (a non-empty sequence of simple type definitions) is available, otherwise an emptyXSObjectList. -
getDefinedFacets
short getDefinedFacets()[facets]: all facets defined on this type. The value is a bit combination of FACET_XXX constants of all defined facets. -
isDefinedFacet
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.
-
getFixedFacets
short getFixedFacets()[facets]: all defined facets for this type which are fixed. -
isFixedFacet
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.
-
getLexicalFacetValue
Convenience method. Returns a value of a single constraining facet for this simple type definition. This method must not be used to retrieve values forenumerationandpatternfacets.- Parameters:
facetName- The name of the facet, i.e.FACET_LENGTH, FACET_TOTALDIGITS. To retrieve the value for a pattern or an enumeration, seeenumerationandpattern.- Returns:
- A value of the facet specified in
facetNamefor this simple type definition ornull.
-
getLexicalEnumeration
StringList getLexicalEnumeration()A list of enumeration values if it exists, otherwise an emptyStringList. -
getLexicalPattern
StringList getLexicalPattern()A list of pattern values if it exists, otherwise an emptyStringList. -
getOrdered
short getOrdered()Fundamental Facet: ordered. -
getFinite
boolean getFinite()Fundamental Facet: cardinality. -
getBounded
boolean getBounded()Fundamental Facet: bounded. -
getNumeric
boolean getNumeric()Fundamental Facet: numeric. -
getFacets
XSObjectList getFacets()A list of constraining facets if it exists, otherwise an emptyXSObjectList. Note: This method must not be used to retrieve values forenumerationandpatternfacets. -
getMultiValueFacets
XSObjectList getMultiValueFacets()A list of enumeration and pattern constraining facets if it exists, otherwise an emptyXSObjectList. -
getFacet
A constraining facet object. An instance of XSFacet or XSMultiValueFacet. -
getAnnotations
XSObjectList getAnnotations()A sequence of [annotations] or an emptyXSObjectList.
-