|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl
Fields inherited from interface org.apache.xerces.impl.dv.XSSimpleType |
PRIMITIVE_ANYURI, PRIMITIVE_BASE64BINARY, PRIMITIVE_BOOLEAN, PRIMITIVE_DATE, PRIMITIVE_DATETIME, PRIMITIVE_DECIMAL, PRIMITIVE_DOUBLE, PRIMITIVE_DURATION, PRIMITIVE_FLOAT, PRIMITIVE_GDAY, PRIMITIVE_GMONTH, PRIMITIVE_GMONTHDAY, PRIMITIVE_GYEAR, PRIMITIVE_GYEARMONTH, PRIMITIVE_HEXBINARY, PRIMITIVE_NOTATION, PRIMITIVE_QNAME, PRIMITIVE_STRING, PRIMITIVE_TIME, WS_COLLAPSE, WS_PRESERVE, WS_REPLACE |
Fields inherited from interface org.apache.xerces.impl.xs.psvi.XSSimpleTypeDefinition |
FACET_ENUMERATION, FACET_FRACTIONDIGITS, FACET_LENGTH, FACET_MAXEXCLUSIVE, FACET_MAXINCLUSIVE, FACET_MAXLENGTH, FACET_MINEXCLUSIVE, FACET_MININCLUSIVE, FACET_MINLENGTH, FACET_NONE, FACET_PATTERN, FACET_TOTALDIGITS, FACET_WHITESPACE, ORDERED_FALSE, ORDERED_PARTIAL, ORDERED_TOTAL, VARIETY_ABSENT, VARIETY_ATOMIC, VARIETY_LIST, VARIETY_UNION |
Fields inherited from interface org.apache.xerces.impl.xs.psvi.XSTypeDefinition |
COMPLEX_TYPE, SIMPLE_TYPE |
Constructor Summary | |
|
XSSimpleTypeDecl()
|
protected |
XSSimpleTypeDecl(java.lang.String name,
java.lang.String uri,
short finalSet,
XSSimpleTypeDecl[] memberTypes,
XSObjectList annotations)
|
protected |
XSSimpleTypeDecl(java.lang.String name,
java.lang.String uri,
short finalSet,
XSSimpleTypeDecl itemType,
boolean isImmutable,
XSObjectList annotations)
|
protected |
XSSimpleTypeDecl(XSSimpleTypeDecl base,
java.lang.String name,
short validateDV,
short ordered,
boolean bounded,
boolean finite,
boolean numeric,
boolean isImmutable)
|
protected |
XSSimpleTypeDecl(XSSimpleTypeDecl base,
java.lang.String name,
java.lang.String uri,
short finalSet,
boolean isImmutable,
XSObjectList annotations)
|
Method Summary | |
void |
applyFacets(XSFacets facets,
short presentFacet,
short fixedFacet,
ValidationContext context)
If |
boolean |
derivedFrom(java.lang.String ancestorNS,
java.lang.String ancestorName,
short derivation)
Convenience method: check if this type is derived from the given ancestor type. |
boolean |
derivedFromType(XSTypeDefinition ancestor,
short derivation)
Convenience method: check if this type is derived from the given ancestorType . |
XSObjectList |
getAnnotations()
Optional. |
boolean |
getAnonymous()
Convenience. |
XSTypeDefinition |
getBaseType()
{base type definition}: either a simple type definition or a complex type definition. |
boolean |
getBounded()
Fundamental Facet: bounded. |
short |
getDefinedFacets()
[facets]: get all facets defined on this type. |
XSObjectList |
getFacets()
|
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 . |
boolean |
getFinite()
Fundamental Facet: cardinality. |
short |
getFixedFacets()
[facets]: get all facets defined and fixed on this type. |
XSSimpleTypeDefinition |
getItemType()
If variety is list the item type definition (an atomic or
union simple type definition) is available, otherwise
null . |
StringList |
getLexicalEnumeration()
Returns a list of enumeration values. |
java.lang.String |
getLexicalFacetValue(short facetName)
Convenience method. |
StringList |
getLexicalPattern()
Returns a list of pattern values. |
XSObjectList |
getMemberTypes()
If variety is union the list of member type definitions (a
non-empty sequence of simple type definitions) is available,
otherwise null . |
XSObjectList |
getMultiValueFacets()
|
java.lang.String |
getName()
The name of type NCName of this declaration as defined in
XML Namespaces. |
java.lang.String |
getNamespace()
The [target namespace] of this object, or null if it is
unspecified. |
XSNamespaceItem |
getNamespaceItem()
A namespace schema information itemcorresponding to the target namespace of the component, if it's globally declared; or null otherwise. |
boolean |
getNumeric()
Fundamental Facet: numeric. |
short |
getOrdered()
Fundamental Facet: ordered |
short |
getPrimitiveKind()
return an ID representing the built-in primitive base type. |
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 |
getType()
The type of this object, i.e. |
short |
getTypeCategory()
Return whether this type definition is a simple type or complex type. |
short |
getVariety()
[variety]: one of {atomic, list, union} or absent |
short |
getWhitespace()
Return the whitespace corresponding to this datatype. |
boolean |
isDefinedFacet(short facetName)
Convenience method. |
boolean |
isEqual(java.lang.Object value1,
java.lang.Object value2)
Check whether two actual values are equal. |
boolean |
isFinal(short derivation)
{final}. |
boolean |
isFixedFacet(short facetName)
Convenience method. |
boolean |
isIDType()
Check whether this type is or is derived from ID. |
protected java.lang.String |
normalize(java.lang.Object content,
short ws)
|
static java.lang.String |
normalize(java.lang.String content,
short ws)
|
void |
reset()
|
protected XSSimpleTypeDecl |
setListValues(java.lang.String name,
java.lang.String uri,
short finalSet,
XSSimpleTypeDecl itemType,
XSObjectList annotations)
|
protected XSSimpleTypeDecl |
setRestrictionValues(XSSimpleTypeDecl base,
java.lang.String name,
java.lang.String uri,
short finalSet,
XSObjectList annotations)
|
protected XSSimpleTypeDecl |
setUnionValues(java.lang.String name,
java.lang.String uri,
short finalSet,
XSSimpleTypeDecl[] memberTypes,
XSObjectList annotations)
|
java.lang.String |
toString()
|
java.lang.Object |
validate(java.lang.Object content,
ValidationContext context,
ValidatedInfo validatedInfo)
validate a value, and return the compiled form |
java.lang.Object |
validate(java.lang.String content,
ValidationContext context,
ValidatedInfo validatedInfo)
validate a value, and return the compiled form |
void |
validate(ValidationContext context,
ValidatedInfo validatedInfo)
validate an actual value against this DV |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public XSAnnotation lengthAnnotation
public XSAnnotation minLengthAnnotation
public XSAnnotation maxLengthAnnotation
public XSAnnotation whiteSpaceAnnotation
public XSAnnotation totalDigitsAnnotation
public XSAnnotation fractionDigitsAnnotation
public XSObjectListImpl patternAnnotations
public XSObjectList enumerationAnnotations
public XSAnnotation maxInclusiveAnnotation
public XSAnnotation maxExclusiveAnnotation
public XSAnnotation minInclusiveAnnotation
public XSAnnotation minExclusiveAnnotation
Constructor Detail |
public XSSimpleTypeDecl()
protected XSSimpleTypeDecl(XSSimpleTypeDecl base, java.lang.String name, short validateDV, short ordered, boolean bounded, boolean finite, boolean numeric, boolean isImmutable)
protected XSSimpleTypeDecl(XSSimpleTypeDecl base, java.lang.String name, java.lang.String uri, short finalSet, boolean isImmutable, XSObjectList annotations)
protected XSSimpleTypeDecl(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl itemType, boolean isImmutable, XSObjectList annotations)
protected XSSimpleTypeDecl(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl[] memberTypes, XSObjectList annotations)
Method Detail |
protected XSSimpleTypeDecl setRestrictionValues(XSSimpleTypeDecl base, java.lang.String name, java.lang.String uri, short finalSet, XSObjectList annotations)
protected XSSimpleTypeDecl setListValues(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl itemType, XSObjectList annotations)
protected XSSimpleTypeDecl setUnionValues(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl[] memberTypes, XSObjectList annotations)
public short getType()
XSObject
type
of this object, i.e.
ELEMENT_DECLARATION
.getType
in interface XSObject
public short getTypeCategory()
XSTypeDefinition
getTypeCategory
in interface XSTypeDefinition
public java.lang.String getName()
XSObject
NCName
of this declaration as defined in
XML Namespaces.getName
in interface XSObject
public java.lang.String getNamespace()
XSObject
null
if it is
unspecified.getNamespace
in interface XSObject
public short getFinal()
XSTypeDefinition
DERIVATION_EXTENSION, DERIVATION_RESTRICTION
}
corresponding to final
set of this type or
DERIVATION_NONE
. For simple types the returned value is
a bit combination of the subset of {
DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST
} corresponding to final
set of this type or
DERIVATION_NONE
.getFinal
in interface XSTypeDefinition
public boolean isFinal(short derivation)
XSTypeDefinition
isFinal
in interface XSTypeDefinition
org.apache.xerces.impl.xs.psvi.XSTypeDefinition
restriction
- Extension, restriction, list, union constants
(defined in XSConstants
).public XSTypeDefinition getBaseType()
XSTypeDefinition
getBaseType
in interface XSTypeDefinition
public boolean getAnonymous()
XSTypeDefinition
getAnonymous
in interface XSTypeDefinition
public short getVariety()
XSSimpleTypeDefinition
getVariety
in interface XSSimpleTypeDefinition
public boolean isIDType()
XSSimpleType
isIDType
in interface XSSimpleType
org.apache.xerces.impl.dv.XSSimpleType
public short getWhitespace() throws DatatypeException
XSSimpleType
getWhitespace
in interface XSSimpleType
org.apache.xerces.impl.dv.XSSimpleType
DatatypeException
- union datatypes don't have whitespace facet associated with thempublic short getPrimitiveKind()
XSSimpleType
getPrimitiveKind
in interface XSSimpleType
org.apache.xerces.impl.dv.XSSimpleType
public XSSimpleTypeDefinition getPrimitiveType()
XSSimpleTypeDefinition
atomic
the primitive type definition (a
built-in primitive datatype definition or the simple ur-type
definition) is available, otherwise null
.getPrimitiveType
in interface XSSimpleTypeDefinition
public XSSimpleTypeDefinition getItemType()
XSSimpleTypeDefinition
list
the item type definition (an atomic or
union simple type definition) is available, otherwise
null
.getItemType
in interface XSSimpleTypeDefinition
public XSObjectList getMemberTypes()
XSSimpleTypeDefinition
union
the list of member type definitions (a
non-empty sequence of simple type definitions) is available,
otherwise null
.getMemberTypes
in interface XSSimpleTypeDefinition
public void applyFacets(XSFacets facets, short presentFacet, short fixedFacet, ValidationContext context) throws InvalidDatatypeFacetException
applyFacets
in interface XSSimpleType
org.apache.xerces.impl.dv.XSSimpleType
facets
- the value of all the facetspresentFacets
- bit combination value of the costraining facet
constants which are present.fixedFacets
- bit combination value of the costraining facet
constants which are fixed.ValidationContext
- the validation contextInvalidDatatypeFacetException
- exception for invalid facet values.public java.lang.Object validate(java.lang.String content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException
validate
in interface XSSimpleType
org.apache.xerces.impl.dv.XSSimpleType
content
- the string value that needs to be validatedcontext
- the validation contextvalidatedInfo
- used to store validation resultpublic java.lang.Object validate(java.lang.Object content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException
validate
in interface XSSimpleType
org.apache.xerces.impl.dv.XSSimpleType
content
- the string value that needs to be validatedcontext
- the validation contextvalidatedInfo
- used to store validation resultpublic void validate(ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException
validate
in interface XSSimpleType
value
- the actual value that needs to be validatedcontext
- the validation contextvalidatedInfo
- used to provide the actual value and member typespublic boolean isEqual(java.lang.Object value1, java.lang.Object value2)
XSSimpleType
isEqual
in interface XSSimpleType
org.apache.xerces.impl.dv.XSSimpleType
value1
- the first valuevalue2
- the second valuepublic static java.lang.String normalize(java.lang.String content, short ws)
protected java.lang.String normalize(java.lang.Object content, short ws)
public short getOrdered()
XSSimpleTypeDefinition
getOrdered
in interface XSSimpleTypeDefinition
public boolean getBounded()
XSSimpleTypeDefinition
getBounded
in interface XSSimpleTypeDefinition
public boolean getFinite()
XSSimpleTypeDefinition
getFinite
in interface XSSimpleTypeDefinition
public boolean getNumeric()
XSSimpleTypeDefinition
getNumeric
in interface XSSimpleTypeDefinition
public boolean isDefinedFacet(short facetName)
XSSimpleTypeDefinition
isDefinedFacet
in interface XSSimpleTypeDefinition
org.apache.xerces.impl.xs.psvi.XSSimpleTypeDefinition
facetName
- The name of the facet.public short getDefinedFacets()
XSSimpleTypeDefinition
getDefinedFacets
in interface XSSimpleTypeDefinition
public boolean isFixedFacet(short facetName)
XSSimpleTypeDefinition
isFixedFacet
in interface XSSimpleTypeDefinition
org.apache.xerces.impl.xs.psvi.XSSimpleTypeDefinition
facetName
- The name of the facet.public short getFixedFacets()
XSSimpleTypeDefinition
getFixedFacets
in interface XSSimpleTypeDefinition
public java.lang.String getLexicalFacetValue(short facetName)
XSSimpleTypeDefinition
enumeration
and pattern
facets.getLexicalFacetValue
in interface XSSimpleTypeDefinition
org.apache.xerces.impl.xs.psvi.XSSimpleTypeDefinition
facetName
- The name of the facet, i.e.
FACET_LENGTH, FACET_TOTALDIGITS
(see
XSConstants
).To retrieve value for pattern or
enumeration, see enumeration
and pattern
.facetName
for
this simple type definition or null
.public StringList getLexicalEnumeration()
XSSimpleTypeDefinition
getLexicalEnumeration
in interface XSSimpleTypeDefinition
public StringList getLexicalPattern()
XSSimpleTypeDefinition
getLexicalPattern
in interface XSSimpleTypeDefinition
public XSObjectList getAnnotations()
XSSimpleTypeDefinition
getAnnotations
in interface XSSimpleTypeDefinition
public boolean derivedFromType(XSTypeDefinition ancestor, short derivation)
XSTypeDefinition
ancestorType
.derivedFromType
in interface XSTypeDefinition
org.apache.xerces.impl.xs.psvi.XSTypeDefinition
ancestorType
- An ancestor type definition.derivationMethod
- A bit combination representing a subset of {
DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST
}.ancestorType
using only derivation methods from the
derivationMethod
. Return true if this type is derived
from ancestorType
.public boolean derivedFrom(java.lang.String ancestorNS, java.lang.String ancestorName, short derivation)
XSTypeDefinition
derivedFrom
in interface XSTypeDefinition
org.apache.xerces.impl.xs.psvi.XSTypeDefinition
namespace
- An ancestor type namespace.name
- An ancestor type name.derivationMethod
- A bit combination representing a subset of {
DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST
}.ancestorType
using only derivation methods from the
derivationMethod
. Return true if this type is derived
from ancestorType
.public void reset()
public XSNamespaceItem getNamespaceItem()
XSObject
getNamespaceItem
in interface XSObject
XSObject.getNamespaceItem()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public XSObjectList getFacets()
getFacets
in interface XSSimpleTypeDefinition
org.apache.xerces.impl.xs.psvi.XSSimpleTypeDefinition
enumeration
and pattern
facets.public XSObjectList getMultiValueFacets()
getMultiValueFacets
in interface XSSimpleTypeDefinition
org.apache.xerces.impl.xs.psvi.XSSimpleTypeDefinition
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |