|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.xerces.impl.dv.xs.XSSimpleTypeDelegate
public class XSSimpleTypeDelegate
Base class for XSSimpleType wrapper implementations.
| Field Summary | |
|---|---|
protected XSSimpleType |
type
|
| 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_PRECISIONDECIMAL, PRIMITIVE_QNAME, PRIMITIVE_STRING, PRIMITIVE_TIME, WS_COLLAPSE, WS_PRESERVE, WS_REPLACE |
| Fields inherited from interface org.apache.xerces.xs.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.xs.XSTypeDefinition |
|---|
COMPLEX_TYPE, SIMPLE_TYPE |
| Constructor Summary | |
|---|---|
XSSimpleTypeDelegate(XSSimpleType type)
|
|
| Method Summary | |
|---|---|
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. |
boolean |
derivedFrom(java.lang.String namespace,
java.lang.String name,
short derivationMethod)
Convenience method which checks if this type is derived from the given ancestor type. |
boolean |
derivedFromType(org.apache.xerces.xs.XSTypeDefinition ancestorType,
short derivationMethod)
Convenience method which checks if this type is derived from the given ancestorType. |
org.apache.xerces.xs.XSObjectList |
getAnnotations()
A sequence of [annotations] or an empty XSObjectList. |
boolean |
getAnonymous()
Convenience attribute. |
org.apache.xerces.xs.XSTypeDefinition |
getBaseType()
{base type definition}: either a simple type definition or a complex type definition. |
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. |
org.apache.xerces.xs.XSObject |
getFacet(int facetType)
A constraining facet object. |
org.apache.xerces.xs.XSObjectList |
getFacets()
A list of constraining facets if it exists, otherwise an empty XSObjectList. |
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]: all defined facets for this type which are fixed. |
org.apache.xerces.xs.XSSimpleTypeDefinition |
getItemType()
If variety is list the item type definition (an atomic or
union simple type definition) is available, otherwise
null. |
org.apache.xerces.xs.StringList |
getLexicalEnumeration()
A list of enumeration values if it exists, otherwise an empty StringList. |
java.lang.String |
getLexicalFacetValue(short facetName)
Convenience method. |
org.apache.xerces.xs.StringList |
getLexicalPattern()
A list of pattern values if it exists, otherwise an empty StringList. |
org.apache.xerces.xs.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. |
org.apache.xerces.xs.XSObjectList |
getMultiValueFacets()
A list of enumeration and pattern constraining facets if it exists, otherwise an empty XSObjectList. |
java.lang.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. |
java.lang.String |
getNamespace()
The [target namespace] of this object, or null if it is
unspecified. |
org.apache.xerces.xs.XSNamespaceItem |
getNamespaceItem()
A namespace schema information item corresponding to the target namespace of the component, if it is 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. |
org.apache.xerces.xs.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. |
XSSimpleType |
getWrappedXSSimpleType()
|
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 restriction)
{final}. |
boolean |
isFixedFacet(short facetName)
Convenience method. |
boolean |
isIDType()
Check whether this type is or is derived from ID. |
java.lang.String |
toString()
|
java.lang.Object |
validate(java.lang.Object content,
ValidationContext context,
ValidatedInfo validatedInfo)
validate a given string value, represented by content.toString(). |
java.lang.Object |
validate(java.lang.String content,
ValidationContext context,
ValidatedInfo validatedInfo)
validate a given string against this simple type. |
void |
validate(ValidationContext context,
ValidatedInfo validatedInfo)
Validate an actual value against this simple type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final XSSimpleType type
| Constructor Detail |
|---|
public XSSimpleTypeDelegate(XSSimpleType type)
| Method Detail |
|---|
public XSSimpleType getWrappedXSSimpleType()
public org.apache.xerces.xs.XSObjectList getAnnotations()
org.apache.xerces.xs.XSSimpleTypeDefinitionXSObjectList.
getAnnotations in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic boolean getBounded()
org.apache.xerces.xs.XSSimpleTypeDefinition
getBounded in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic short getBuiltInKind()
org.apache.xerces.xs.XSSimpleTypeDefinitionINTEGER_DV is returned.
getBuiltInKind in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic short getDefinedFacets()
org.apache.xerces.xs.XSSimpleTypeDefinition
getDefinedFacets in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic org.apache.xerces.xs.XSObjectList getFacets()
org.apache.xerces.xs.XSSimpleTypeDefinitionXSObjectList. Note: This method must not be used to
retrieve values for enumeration and pattern
facets.
getFacets in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic org.apache.xerces.xs.XSObject getFacet(int facetType)
org.apache.xerces.xs.XSSimpleTypeDefinition
getFacet in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic boolean getFinite()
org.apache.xerces.xs.XSSimpleTypeDefinition
getFinite in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic short getFixedFacets()
org.apache.xerces.xs.XSSimpleTypeDefinition
getFixedFacets in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic org.apache.xerces.xs.XSSimpleTypeDefinition getItemType()
org.apache.xerces.xs.XSSimpleTypeDefinitionlist the item type definition (an atomic or
union simple type definition) is available, otherwise
null.
getItemType in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic org.apache.xerces.xs.StringList getLexicalEnumeration()
org.apache.xerces.xs.XSSimpleTypeDefinitionStringList.
getLexicalEnumeration in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic java.lang.String getLexicalFacetValue(short facetName)
org.apache.xerces.xs.XSSimpleTypeDefinitionenumeration and pattern facets.
getLexicalFacetValue in interface org.apache.xerces.xs.XSSimpleTypeDefinitionfacetName - 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.
facetName for
this simple type definition or null.public org.apache.xerces.xs.StringList getLexicalPattern()
org.apache.xerces.xs.XSSimpleTypeDefinitionStringList.
getLexicalPattern in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic org.apache.xerces.xs.XSObjectList getMemberTypes()
org.apache.xerces.xs.XSSimpleTypeDefinitionunion the list of member type definitions (a
non-empty sequence of simple type definitions) is available,
otherwise an empty XSObjectList.
getMemberTypes in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic org.apache.xerces.xs.XSObjectList getMultiValueFacets()
org.apache.xerces.xs.XSSimpleTypeDefinitionXSObjectList.
getMultiValueFacets in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic boolean getNumeric()
org.apache.xerces.xs.XSSimpleTypeDefinition
getNumeric in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic short getOrdered()
org.apache.xerces.xs.XSSimpleTypeDefinition
getOrdered in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic org.apache.xerces.xs.XSSimpleTypeDefinition getPrimitiveType()
org.apache.xerces.xs.XSSimpleTypeDefinitionatomic the primitive type definition (a
built-in primitive datatype definition or the simple ur-type
definition) is available, otherwise null.
getPrimitiveType in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic short getVariety()
org.apache.xerces.xs.XSSimpleTypeDefinition
getVariety in interface org.apache.xerces.xs.XSSimpleTypeDefinitionpublic boolean isDefinedFacet(short facetName)
org.apache.xerces.xs.XSSimpleTypeDefinition
isDefinedFacet in interface org.apache.xerces.xs.XSSimpleTypeDefinitionfacetName - The name of the facet.
public boolean isFixedFacet(short facetName)
org.apache.xerces.xs.XSSimpleTypeDefinition
isFixedFacet in interface org.apache.xerces.xs.XSSimpleTypeDefinitionfacetName - The name of the facet.
public boolean derivedFrom(java.lang.String namespace,
java.lang.String name,
short derivationMethod)
org.apache.xerces.xs.XSTypeDefinition
derivedFrom in interface org.apache.xerces.xs.XSTypeDefinitionnamespace - 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
.
public boolean derivedFromType(org.apache.xerces.xs.XSTypeDefinition ancestorType,
short derivationMethod)
org.apache.xerces.xs.XSTypeDefinitionancestorType.
derivedFromType in interface org.apache.xerces.xs.XSTypeDefinitionancestorType - 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
.public boolean getAnonymous()
org.apache.xerces.xs.XSTypeDefinition
getAnonymous in interface org.apache.xerces.xs.XSTypeDefinitionpublic org.apache.xerces.xs.XSTypeDefinition getBaseType()
org.apache.xerces.xs.XSTypeDefinition
getBaseType in interface org.apache.xerces.xs.XSTypeDefinitionpublic short getFinal()
org.apache.xerces.xs.XSTypeDefinitionDERIVATION_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 org.apache.xerces.xs.XSTypeDefinitionpublic short getTypeCategory()
org.apache.xerces.xs.XSTypeDefinition
getTypeCategory in interface org.apache.xerces.xs.XSTypeDefinitionpublic boolean isFinal(short restriction)
org.apache.xerces.xs.XSTypeDefinition
isFinal in interface org.apache.xerces.xs.XSTypeDefinitionrestriction - Extension, restriction, list, union constants
(defined in XSConstants).
restriction is in the final set,
otherwise false.public java.lang.String getName()
org.apache.xerces.xs.XSObjectNCName, 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. For anonymous types,
the processor must construct and expose an anonymous type name that
is distinct from the name of every named type and the name of every
other anonymous type.
getName in interface org.apache.xerces.xs.XSObjectpublic java.lang.String getNamespace()
org.apache.xerces.xs.XSObjectnull if it is
unspecified.
getNamespace in interface org.apache.xerces.xs.XSObjectpublic org.apache.xerces.xs.XSNamespaceItem getNamespaceItem()
org.apache.xerces.xs.XSObjectnull otherwise.
getNamespaceItem in interface org.apache.xerces.xs.XSObjectpublic short getType()
org.apache.xerces.xs.XSObjecttype of this object, i.e.
ELEMENT_DECLARATION.
getType in interface org.apache.xerces.xs.XSObject
public void applyFacets(XSFacets facets,
short presentFacet,
short fixedFacet,
ValidationContext context)
throws InvalidDatatypeFacetException
XSSimpleTypeXSFacets is used to pass the value of
different facets.
applyFacets in interface XSSimpleTypefacets - the value of all the facetspresentFacet - 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
InvalidDatatypeFacetException - exception for invalid facet values.public short getPrimitiveKind()
XSSimpleType
getPrimitiveKind in interface XSSimpleType
public short getWhitespace()
throws DatatypeException
XSSimpleType
getWhitespace in interface XSSimpleTypeDatatypeException - union datatypes don't have whitespace facet associated with them
public boolean isEqual(java.lang.Object value1,
java.lang.Object value2)
XSSimpleType
isEqual in interface XSSimpleTypevalue1 - the first valuevalue2 - the second value
public boolean isIDType()
XSSimpleType
isIDType in interface XSSimpleType
public void validate(ValidationContext context,
ValidatedInfo validatedInfo)
throws InvalidDatatypeValueException
XSSimpleType
validate in interface XSSimpleTypecontext - the validation contextvalidatedInfo - used to provide the actual value and member types
InvalidDatatypeValueException - exception for invalid values.
public java.lang.Object validate(java.lang.String content,
ValidationContext context,
ValidatedInfo validatedInfo)
throws InvalidDatatypeValueException
XSSimpleType
validate in interface XSSimpleTypecontent - the string value that needs to be validatedcontext - the validation contextvalidatedInfo - used to store validation result
InvalidDatatypeValueException
public java.lang.Object validate(java.lang.Object content,
ValidationContext context,
ValidatedInfo validatedInfo)
throws InvalidDatatypeValueException
XSSimpleType
validate in interface XSSimpleTypecontent - the string value that needs to be validatedcontext - the validation contextvalidatedInfo - used to store validation result
InvalidDatatypeValueExceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||