APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl.dv.xs

public Class XSSimpleTypeDelegate

extends Object
implements XSSimpleType
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType, com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition, com.sun.org.apache.xerces.internal.xs.XSTypeDefinition, com.sun.org.apache.xerces.internal.xs.XSObject
Imports
com.sun.org.apache.xerces.internal.impl.dv.DatatypeException, .InvalidDatatypeFacetException, .InvalidDatatypeValueException, .ValidatedInfo, .ValidationContext, .XSFacets, .XSSimpleType, com.sun.org.apache.xerces.internal.xs.StringList, .XSNamespaceItem, .XSObject, .XSObjectList, .XSSimpleTypeDefinition, .XSTypeDefinition

Base class for XSSimpleType wrapper implementations.

Field Summary

Modifier and TypeField and Description
protected final XSSimpleType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
applyFacets(XSFacets facets, short presentFacet, short fixedFacet, ValidationContext context)

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.applyFacets.

If this type is created from restriction, then some facets can be applied to the simple type.

public boolean
derivedFrom(String namespace, String name, short derivationMethod)

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFrom.

Convenience method which checks if this type is derived from the given ancestor type.

public boolean
derivedFromType(XSTypeDefinition ancestorType, short derivationMethod)

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFromType.

Convenience method which checks if this type is derived from the given ancestorType.

public XSObjectList
getAnnotations()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getAnnotations.

A sequence of [annotations] or an empty XSObjectList.

public boolean
public XSTypeDefinition
getBaseType()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getBaseType.

{base type definition}: either a simple type definition or a complex type definition.

public boolean
public short
getBuiltInKind()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getBuiltInKind.

Returns the closest built-in type category this type represents or derived from.

public short
public XSObject
getFacet(int facetType)

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getFacet.

A constraining facet object.

public XSObjectList
getFacets()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getFacets.

A list of constraining facets if it exists, otherwise an empty XSObjectList.

public short
getFinal()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.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.

public boolean
public short
getFixedFacets()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getFixedFacets.

[facets]: all defined facets for this type which are fixed.

public XSSimpleTypeDefinition
getItemType()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getItemType.

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

public StringList
getLexicalEnumeration()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getLexicalEnumeration.

A list of enumeration values if it exists, otherwise an empty StringList.

public String
public StringList
getLexicalPattern()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getLexicalPattern.

A list of pattern values if it exists, otherwise an empty StringList.

public XSObjectList
getMemberTypes()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.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.

public XSObjectList
getMultiValueFacets()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getMultiValueFacets.

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

public String
getName()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.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.

public String
getNamespace()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getNamespace.

The [target namespace] of this object, or null if it is unspecified.

public XSNamespaceItem
getNamespaceItem()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getNamespaceItem.

A namespace schema information item corresponding to the target namespace of the component, if it is globally declared; or null otherwise.

public boolean
public short
public short
getPrimitiveKind()

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.getPrimitiveKind.

return an ID representing the built-in primitive base type.

public XSSimpleTypeDefinition
getPrimitiveType()

Implements com.sun.org.apache.xerces.internal.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.

public short
getType()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getType.

The type of this object, i.e. ELEMENT_DECLARATION.

public short
getTypeCategory()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getTypeCategory.

Return whether this type definition is a simple type or complex type.

public short
getVariety()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getVariety.

[variety]: one of {atomic, list, union} or absent.

public short
getWhitespace()

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.getWhitespace.

Return the whitespace corresponding to this datatype.

public XSSimpleType
public boolean
public boolean
isEqual(Object value1, Object value2)

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.isEqual.

Check whether two actual values are equal.

public boolean
public boolean
public boolean
isIDType()

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.isIDType.

Check whether this type is or is derived from ID.

Revisit

this method makes ID special, which is not a good design.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
validate(ValidationContext context, ValidatedInfo validatedInfo)

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.validate.

Validate an actual value against this simple type.

public Object
validate(String content, ValidationContext context, ValidatedInfo validatedInfo)

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.validate.

validate a given string against this simple type.

public Object
validate(Object content, ValidationContext context, ValidatedInfo validatedInfo)

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.validate.

validate a given string value, represented by content.toString().

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

typeback to summary
protected final XSSimpleType type

Constructor Detail

XSSimpleTypeDelegateback to summary
public XSSimpleTypeDelegate(XSSimpleType type)

Method Detail

applyFacetsback to summary
public void applyFacets(XSFacets facets, short presentFacet, short fixedFacet, ValidationContext context) throws InvalidDatatypeFacetException

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.applyFacets.

Doc from com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.applyFacets.

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.

Exceptions
InvalidDatatypeFacetException:
exception for invalid facet values.
derivedFromback to summary
public boolean derivedFrom(String namespace, String name, short derivationMethod)

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFrom.

Doc from com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFrom.

Convenience method which checks if this type is derived from the given ancestor type.

derivedFromTypeback to summary
public boolean derivedFromType(XSTypeDefinition ancestorType, short derivationMethod)

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFromType.

Doc from com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFromType.

Convenience method which checks if this type is derived from the given ancestorType.

getAnnotationsback to summary
public XSObjectList getAnnotations()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getAnnotations.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getAnnotations.

A sequence of [annotations] or an empty XSObjectList.

getAnonymousback to summary
public boolean getAnonymous()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getAnonymous.

Doc from com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getAnonymous.

Convenience attribute. A boolean that specifies if the type definition is anonymous.

getBaseTypeback to summary
public XSTypeDefinition getBaseType()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getBaseType.

Doc from com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getBaseType.

{base type definition}: either a simple type definition or a complex type definition.

getBoundedback to summary
public boolean getBounded()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getBounded.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getBounded.

Fundamental Facet: bounded.

getBuiltInKindback to summary
public short getBuiltInKind()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getBuiltInKind.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.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.

getDefinedFacetsback to summary
public short getDefinedFacets()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getDefinedFacets.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getDefinedFacets.

[facets]: all facets defined on this type. The value is a bit combination of FACET_XXX constants of all defined facets.

getFacetback to summary
public XSObject getFacet(int facetType)

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getFacet.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getFacet.

A constraining facet object. An instance of XSFacet or XSMultiValueFacet.

getFacetsback to summary
public XSObjectList getFacets()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getFacets.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.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.

getFinalback to summary
public short getFinal()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getFinal.

Doc from com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.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. 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.

getFiniteback to summary
public boolean getFinite()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getFinite.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getFinite.

Fundamental Facet: cardinality.

getFixedFacetsback to summary
public short getFixedFacets()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getFixedFacets.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getFixedFacets.

[facets]: all defined facets for this type which are fixed.

getItemTypeback to summary
public XSSimpleTypeDefinition getItemType()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getItemType.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getItemType.

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

getLexicalEnumerationback to summary
public StringList getLexicalEnumeration()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getLexicalEnumeration.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getLexicalEnumeration.

A list of enumeration values if it exists, otherwise an empty StringList.

getLexicalFacetValueback to summary
public String getLexicalFacetValue(short facetName)

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getLexicalFacetValue.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.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 for enumeration and pattern facets.

getLexicalPatternback to summary
public StringList getLexicalPattern()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getLexicalPattern.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getLexicalPattern.

A list of pattern values if it exists, otherwise an empty StringList.

getMemberTypesback to summary
public XSObjectList getMemberTypes()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getMemberTypes.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.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.

getMultiValueFacetsback to summary
public XSObjectList getMultiValueFacets()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getMultiValueFacets.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getMultiValueFacets.

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

getNameback to summary
public String getName()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getName.

Doc from com.sun.org.apache.xerces.internal.xs.XSObject.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. 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.

getNamespaceback to summary
public String getNamespace()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getNamespace.

Doc from com.sun.org.apache.xerces.internal.xs.XSObject.getNamespace.

The [target namespace] of this object, or null if it is unspecified.

getNamespaceItemback to summary
public XSNamespaceItem getNamespaceItem()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getNamespaceItem.

Doc from com.sun.org.apache.xerces.internal.xs.XSObject.getNamespaceItem.

A namespace schema information item corresponding to the target namespace of the component, if it is globally declared; or null otherwise.

getNumericback to summary
public boolean getNumeric()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getNumeric.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getNumeric.

Fundamental Facet: numeric.

getOrderedback to summary
public short getOrdered()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getOrdered.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getOrdered.

Fundamental Facet: ordered.

getPrimitiveKindback to summary
public short getPrimitiveKind()

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.getPrimitiveKind.

Doc from com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.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.

getPrimitiveTypeback to summary
public XSSimpleTypeDefinition getPrimitiveType()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getPrimitiveType.

Doc from com.sun.org.apache.xerces.internal.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.

getTypeback to summary
public short getType()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getType.

Doc from com.sun.org.apache.xerces.internal.xs.XSObject.getType.

The type of this object, i.e. ELEMENT_DECLARATION.

getTypeCategoryback to summary
public short getTypeCategory()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getTypeCategory.

Doc from com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getTypeCategory.

Return whether this type definition is a simple type or complex type.

getVarietyback to summary
public short getVariety()

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getVariety.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.getVariety.

[variety]: one of {atomic, list, union} or absent.

getWhitespaceback to summary
public short getWhitespace() throws DatatypeException

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.getWhitespace.

Doc from com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.getWhitespace.

Return the whitespace corresponding to this datatype.

Exceptions
DatatypeException:
union datatypes don't have whitespace facet associated with them
getWrappedXSSimpleTypeback to summary
public XSSimpleType getWrappedXSSimpleType()
isDefinedFacetback to summary
public boolean isDefinedFacet(short facetName)

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.isDefinedFacet.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.isDefinedFacet.

Convenience method. [Facets]: check whether a facet is defined on this type.

isEqualback to summary
public boolean isEqual(Object value1, Object value2)

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.isEqual.

Doc from com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.isEqual.

Check whether two actual values are equal.

isFinalback to summary
public boolean isFinal(short restriction)

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.isFinal.

Doc from com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.isFinal.

{final}. For a complex type definition it is a subset of {extension, restriction}. For a simple type definition it is a subset of {extension, list, restriction, union}.

isFixedFacetback to summary
public boolean isFixedFacet(short facetName)

Implements com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.isFixedFacet.

Doc from com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition.isFixedFacet.

Convenience method. [Facets]: check whether a facet is defined and fixed on this type.

isIDTypeback to summary
public boolean isIDType()

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.isIDType.

Doc from com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.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.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

validateback to summary
public void validate(ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.validate.

Doc from com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.validate.

Validate an actual value against this simple type.

Exceptions
InvalidDatatypeValueException:
exception for invalid values.
validateback to summary
public Object validate(String content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.validate.

Doc from com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.validate.

validate a given string against this simple type.

validateback to summary
public Object validate(Object content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException

Implements com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.validate.

Doc from com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType.validate.

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.