Package org.apache.xerces.impl.dv.xs
Class XSSimpleTypeDecl
- java.lang.Object
-
- org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl
-
- All Implemented Interfaces:
XSSimpleType,org.apache.xerces.xs.XSObject,org.apache.xerces.xs.XSSimpleTypeDefinition,org.apache.xerces.xs.XSTypeDefinition,org.w3c.dom.TypeInfo
public class XSSimpleTypeDecl extends java.lang.Object implements XSSimpleType, org.w3c.dom.TypeInfo
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: XSSimpleTypeDecl.java 1026362 2010-10-22 15:15:18Z sandygao $
- Author:
- Sandy Gao, IBM, Neeraj Bajaj, Sun Microsystems, inc.
-
-
Field Summary
Fields Modifier and Type Field Description static shortANYATOMICTYPE_DTstatic shortDAYTIMEDURATION_DTprotected static shortDV_ANYATOMICTYPEprotected static shortDV_ANYSIMPLETYPEprotected static shortDV_ANYURIprotected static shortDV_BASE64BINARYprotected static shortDV_BOOLEANprotected static shortDV_DATEprotected static shortDV_DATETIMEprotected static shortDV_DAYTIMEDURATIONprotected static shortDV_DECIMALprotected static shortDV_DOUBLEprotected static shortDV_DURATIONprotected static shortDV_ENTITYprotected static shortDV_FLOATprotected static shortDV_GDAYprotected static shortDV_GMONTHprotected static shortDV_GMONTHDAYprotected static shortDV_GYEARprotected static shortDV_GYEARMONTHprotected static shortDV_HEXBINARYprotected static shortDV_IDprotected static shortDV_IDREFprotected static shortDV_INTEGERprotected static shortDV_LISTprotected static shortDV_NOTATIONprotected static shortDV_PRECISIONDECIMALprotected static shortDV_QNAMEprotected static shortDV_STRINGprotected static shortDV_TIMEprotected static shortDV_UNIONprotected static shortDV_YEARMONTHDURATIONorg.apache.xerces.xs.XSObjectListenumerationAnnotationsorg.apache.xerces.xs.XSAnnotationfractionDigitsAnnotationorg.apache.xerces.xs.XSAnnotationlengthAnnotationorg.apache.xerces.xs.XSAnnotationmaxExclusiveAnnotationorg.apache.xerces.xs.XSAnnotationmaxInclusiveAnnotationorg.apache.xerces.xs.XSAnnotationmaxLengthAnnotationorg.apache.xerces.xs.XSAnnotationminExclusiveAnnotationorg.apache.xerces.xs.XSAnnotationminInclusiveAnnotationorg.apache.xerces.xs.XSAnnotationminLengthAnnotationXSObjectListImplpatternAnnotationsstatic shortPRECISIONDECIMAL_DTorg.apache.xerces.xs.XSAnnotationtotalDigitsAnnotationorg.apache.xerces.xs.XSAnnotationwhiteSpaceAnnotationstatic shortYEARMONTHDURATION_DT-
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
-
-
Constructor Summary
Constructors Modifier Constructor Description XSSimpleTypeDecl()protectedXSSimpleTypeDecl(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl[] memberTypes, org.apache.xerces.xs.XSObjectList annotations)protectedXSSimpleTypeDecl(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl itemType, boolean isImmutable, org.apache.xerces.xs.XSObjectList annotations)protectedXSSimpleTypeDecl(XSSimpleTypeDecl base, java.lang.String name, short validateDV, short ordered, boolean bounded, boolean finite, boolean numeric, boolean isImmutable, short builtInKind)protectedXSSimpleTypeDecl(XSSimpleTypeDecl base, java.lang.String name, java.lang.String uri, short finalSet, boolean isImmutable, org.apache.xerces.xs.XSObjectList annotations)protectedXSSimpleTypeDecl(XSSimpleTypeDecl base, java.lang.String name, java.lang.String uri, short finalSet, boolean isImmutable, org.apache.xerces.xs.XSObjectList annotations, short builtInKind)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyFacets(XSFacets facets, short presentFacet, short fixedFacet, ValidationContext context)Ifis chosen booleanderivedFrom(java.lang.String ancestorNS, java.lang.String ancestorName, short derivation)Convenience method which checks if this type is derived from the given ancestor type.booleanderivedFromType(org.apache.xerces.xs.XSTypeDefinition ancestor, short derivation)Convenience method which checks if this type is derived from the givenancestorType.org.apache.xerces.xs.datatypes.ObjectListgetActualEnumeration()A list of actual enumeration values if it exists, otherwise an emptyObjectList.protected ValidatedInfogetActualEnumValue(java.lang.String lexical, ValidationContext ctx, ValidatedInfo info)org.apache.xerces.xs.XSObjectListgetAnnotations()[annotations]: a set of annotations for this simple type component if it exists, otherwise an emptyXSObjectList.booleangetAnonymous()Convenience attribute.org.apache.xerces.xs.XSTypeDefinitiongetBaseType(){base type definition}: either a simple type definition or a complex type definition.booleangetBounded()Fundamental Facet: bounded.shortgetBuiltInKind()Returns the closest built-in type category this type represents or derived from.shortgetDefinedFacets()[facets]: all facets defined on this type.org.apache.xerces.xs.datatypes.ObjectListgetEnumerationItemTypeList()A list of enumeration type values (as a list of ShortList objects) if it exists, otherwise returns nullorg.apache.xerces.xs.ShortListgetEnumerationTypeList()org.apache.xerces.xs.XSObjectgetFacet(int facetType)A constraining facet object.org.apache.xerces.xs.XSObjectListgetFacets()A list of constraining facets if it exists, otherwise an emptyXSObjectList.shortgetFinal()For complex types the returned value is a bit combination of the subset of {DERIVATION_EXTENSION, DERIVATION_RESTRICTION} corresponding tofinalset of this type orDERIVATION_NONE.booleangetFinite()Fundamental Facet: cardinality.shortgetFixedFacets()[facets]: all defined facets for this type which are fixed.protected static TypeValidator[]getGDVs()org.apache.xerces.xs.XSSimpleTypeDefinitiongetItemType()If variety islistthe item type definition (an atomic or union simple type definition) is available, otherwisenull.org.apache.xerces.xs.StringListgetLexicalEnumeration()A list of enumeration values if it exists, otherwise an emptyStringList.java.lang.StringgetLexicalFacetValue(short facetName)Convenience method.org.apache.xerces.xs.StringListgetLexicalPattern()A list of pattern values if it exists, otherwise an emptyStringList.java.lang.ObjectgetMaxExclusiveValue()java.lang.ObjectgetMaxInclusiveValue()org.apache.xerces.xs.XSObjectListgetMemberTypes()If variety isunionthe list of member type definitions (a non-empty sequence of simple type definitions) is available, otherwise an emptyXSObjectList.java.lang.ObjectgetMinExclusiveValue()java.lang.ObjectgetMinInclusiveValue()org.apache.xerces.xs.XSObjectListgetMultiValueFacets()A list of enumeration and pattern constraining facets if it exists, otherwise an emptyXSObjectList.java.lang.StringgetName()The name of typeNCName, as defined in XML Namespaces, of this declaration specified in the{name}property of the component ornullif the definition of this component does not have a{name}property.java.lang.StringgetNamespace()The [target namespace] of this object, ornullif it is unspecified.org.apache.xerces.xs.XSNamespaceItemgetNamespaceItem()A namespace schema information item corresponding to the target namespace of the component, if it is globally declared; ornullotherwise.booleangetNumeric()Fundamental Facet: numeric.shortgetOrdered()Fundamental Facet: ordered.shortgetPrimitiveKind()return an ID representing the built-in primitive base type.org.apache.xerces.xs.XSSimpleTypeDefinitiongetPrimitiveType()If variety isatomicthe primitive type definition (a built-in primitive datatype definition or the simple ur-type definition) is available, otherwisenull.shortgetType()Thetypeof this object, i.e.shortgetTypeCategory()Return whether this type definition is a simple type or complex type.java.lang.StringgetTypeName()java.lang.StringgetTypeNamespace()shortgetVariety()[variety]: one of {atomic, list, union} or absent.shortgetWhitespace()Return the whitespace corresponding to this datatype.booleanisDefinedFacet(short facetName)Convenience method.booleanisDerivedFrom(java.lang.String typeNamespaceArg, java.lang.String typeNameArg, int derivationMethod)booleanisDOMDerivedFrom(java.lang.String ancestorNS, java.lang.String ancestorName, int derivationMethod)Checks if a type is derived from another by restriction, given the name and namespace.booleanisEqual(java.lang.Object value1, java.lang.Object value2)Check whether two actual values are equal.booleanisFinal(short derivation){final}.booleanisFixedFacet(short facetName)Convenience method.booleanisIdentical(java.lang.Object value1, java.lang.Object value2)booleanisIDType()Check whether this type is or is derived from ID.protected java.lang.Stringnormalize(java.lang.Object content, short ws)static java.lang.Stringnormalize(java.lang.String content, short ws)voidreset()voidsetAnonymous(boolean anon)protected voidsetDVs(TypeValidator[] dvs)protected XSSimpleTypeDeclsetListValues(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl itemType, org.apache.xerces.xs.XSObjectList annotations)voidsetNamespaceItem(org.apache.xerces.xs.XSNamespaceItem namespaceItem)protected XSSimpleTypeDeclsetRestrictionValues(XSSimpleTypeDecl base, java.lang.String name, java.lang.String uri, short finalSet, org.apache.xerces.xs.XSObjectList annotations)protected XSSimpleTypeDeclsetUnionValues(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl[] memberTypes, org.apache.xerces.xs.XSObjectList annotations)java.lang.StringtoString()java.lang.Objectvalidate(java.lang.Object content, ValidationContext context, ValidatedInfo validatedInfo)validate a value, and return the compiled formjava.lang.Objectvalidate(java.lang.String content, ValidationContext context, ValidatedInfo validatedInfo)validate a value, and return the compiled formvoidvalidate(ValidationContext context, ValidatedInfo validatedInfo)validate an actual value against this DVValidatedInfovalidateWithInfo(java.lang.String content, ValidationContext context, ValidatedInfo validatedInfo)validate a value, and return the compiled form
-
-
-
Field Detail
-
DV_STRING
protected static final short DV_STRING
- See Also:
- Constant Field Values
-
DV_BOOLEAN
protected static final short DV_BOOLEAN
- See Also:
- Constant Field Values
-
DV_DECIMAL
protected static final short DV_DECIMAL
- See Also:
- Constant Field Values
-
DV_FLOAT
protected static final short DV_FLOAT
- See Also:
- Constant Field Values
-
DV_DOUBLE
protected static final short DV_DOUBLE
- See Also:
- Constant Field Values
-
DV_DURATION
protected static final short DV_DURATION
- See Also:
- Constant Field Values
-
DV_DATETIME
protected static final short DV_DATETIME
- See Also:
- Constant Field Values
-
DV_TIME
protected static final short DV_TIME
- See Also:
- Constant Field Values
-
DV_DATE
protected static final short DV_DATE
- See Also:
- Constant Field Values
-
DV_GYEARMONTH
protected static final short DV_GYEARMONTH
- See Also:
- Constant Field Values
-
DV_GYEAR
protected static final short DV_GYEAR
- See Also:
- Constant Field Values
-
DV_GMONTHDAY
protected static final short DV_GMONTHDAY
- See Also:
- Constant Field Values
-
DV_GDAY
protected static final short DV_GDAY
- See Also:
- Constant Field Values
-
DV_GMONTH
protected static final short DV_GMONTH
- See Also:
- Constant Field Values
-
DV_HEXBINARY
protected static final short DV_HEXBINARY
- See Also:
- Constant Field Values
-
DV_BASE64BINARY
protected static final short DV_BASE64BINARY
- See Also:
- Constant Field Values
-
DV_ANYURI
protected static final short DV_ANYURI
- See Also:
- Constant Field Values
-
DV_QNAME
protected static final short DV_QNAME
- See Also:
- Constant Field Values
-
DV_PRECISIONDECIMAL
protected static final short DV_PRECISIONDECIMAL
- See Also:
- Constant Field Values
-
DV_NOTATION
protected static final short DV_NOTATION
- See Also:
- Constant Field Values
-
DV_ANYSIMPLETYPE
protected static final short DV_ANYSIMPLETYPE
- See Also:
- Constant Field Values
-
DV_ID
protected static final short DV_ID
- See Also:
- Constant Field Values
-
DV_IDREF
protected static final short DV_IDREF
- See Also:
- Constant Field Values
-
DV_ENTITY
protected static final short DV_ENTITY
- See Also:
- Constant Field Values
-
DV_INTEGER
protected static final short DV_INTEGER
- See Also:
- Constant Field Values
-
DV_LIST
protected static final short DV_LIST
- See Also:
- Constant Field Values
-
DV_UNION
protected static final short DV_UNION
- See Also:
- Constant Field Values
-
DV_YEARMONTHDURATION
protected static final short DV_YEARMONTHDURATION
- See Also:
- Constant Field Values
-
DV_DAYTIMEDURATION
protected static final short DV_DAYTIMEDURATION
- See Also:
- Constant Field Values
-
DV_ANYATOMICTYPE
protected static final short DV_ANYATOMICTYPE
- See Also:
- Constant Field Values
-
YEARMONTHDURATION_DT
public static final short YEARMONTHDURATION_DT
- See Also:
- Constant Field Values
-
DAYTIMEDURATION_DT
public static final short DAYTIMEDURATION_DT
- See Also:
- Constant Field Values
-
PRECISIONDECIMAL_DT
public static final short PRECISIONDECIMAL_DT
- See Also:
- Constant Field Values
-
ANYATOMICTYPE_DT
public static final short ANYATOMICTYPE_DT
- See Also:
- Constant Field Values
-
lengthAnnotation
public org.apache.xerces.xs.XSAnnotation lengthAnnotation
-
minLengthAnnotation
public org.apache.xerces.xs.XSAnnotation minLengthAnnotation
-
maxLengthAnnotation
public org.apache.xerces.xs.XSAnnotation maxLengthAnnotation
-
whiteSpaceAnnotation
public org.apache.xerces.xs.XSAnnotation whiteSpaceAnnotation
-
totalDigitsAnnotation
public org.apache.xerces.xs.XSAnnotation totalDigitsAnnotation
-
fractionDigitsAnnotation
public org.apache.xerces.xs.XSAnnotation fractionDigitsAnnotation
-
patternAnnotations
public XSObjectListImpl patternAnnotations
-
enumerationAnnotations
public org.apache.xerces.xs.XSObjectList enumerationAnnotations
-
maxInclusiveAnnotation
public org.apache.xerces.xs.XSAnnotation maxInclusiveAnnotation
-
maxExclusiveAnnotation
public org.apache.xerces.xs.XSAnnotation maxExclusiveAnnotation
-
minInclusiveAnnotation
public org.apache.xerces.xs.XSAnnotation minInclusiveAnnotation
-
minExclusiveAnnotation
public org.apache.xerces.xs.XSAnnotation minExclusiveAnnotation
-
-
Constructor Detail
-
XSSimpleTypeDecl
public XSSimpleTypeDecl()
-
XSSimpleTypeDecl
protected XSSimpleTypeDecl(XSSimpleTypeDecl base, java.lang.String name, short validateDV, short ordered, boolean bounded, boolean finite, boolean numeric, boolean isImmutable, short builtInKind)
-
XSSimpleTypeDecl
protected XSSimpleTypeDecl(XSSimpleTypeDecl base, java.lang.String name, java.lang.String uri, short finalSet, boolean isImmutable, org.apache.xerces.xs.XSObjectList annotations, short builtInKind)
-
XSSimpleTypeDecl
protected XSSimpleTypeDecl(XSSimpleTypeDecl base, java.lang.String name, java.lang.String uri, short finalSet, boolean isImmutable, org.apache.xerces.xs.XSObjectList annotations)
-
XSSimpleTypeDecl
protected XSSimpleTypeDecl(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl itemType, boolean isImmutable, org.apache.xerces.xs.XSObjectList annotations)
-
XSSimpleTypeDecl
protected XSSimpleTypeDecl(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl[] memberTypes, org.apache.xerces.xs.XSObjectList annotations)
-
-
Method Detail
-
getGDVs
protected static TypeValidator[] getGDVs()
-
setDVs
protected void setDVs(TypeValidator[] dvs)
-
setRestrictionValues
protected XSSimpleTypeDecl setRestrictionValues(XSSimpleTypeDecl base, java.lang.String name, java.lang.String uri, short finalSet, org.apache.xerces.xs.XSObjectList annotations)
-
setListValues
protected XSSimpleTypeDecl setListValues(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl itemType, org.apache.xerces.xs.XSObjectList annotations)
-
setUnionValues
protected XSSimpleTypeDecl setUnionValues(java.lang.String name, java.lang.String uri, short finalSet, XSSimpleTypeDecl[] memberTypes, org.apache.xerces.xs.XSObjectList annotations)
-
getType
public short getType()
Description copied from interface:org.apache.xerces.xs.XSObjectThetypeof this object, i.e.ELEMENT_DECLARATION.- Specified by:
getTypein interfaceorg.apache.xerces.xs.XSObject
-
getTypeCategory
public short getTypeCategory()
Description copied from interface:org.apache.xerces.xs.XSTypeDefinitionReturn whether this type definition is a simple type or complex type.- Specified by:
getTypeCategoryin interfaceorg.apache.xerces.xs.XSTypeDefinition
-
getName
public java.lang.String getName()
Description copied from interface:org.apache.xerces.xs.XSObjectThe name of typeNCName, as defined in XML Namespaces, of this declaration specified in the{name}property of the component ornullif 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.- Specified by:
getNamein interfaceorg.apache.xerces.xs.XSObject
-
getTypeName
public java.lang.String getTypeName()
- Specified by:
getTypeNamein interfaceorg.w3c.dom.TypeInfo
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:org.apache.xerces.xs.XSObjectThe [target namespace] of this object, ornullif it is unspecified.- Specified by:
getNamespacein interfaceorg.apache.xerces.xs.XSObject
-
getFinal
public short getFinal()
Description copied from interface:org.apache.xerces.xs.XSTypeDefinitionFor complex types the returned value is a bit combination of the subset of {DERIVATION_EXTENSION, DERIVATION_RESTRICTION} corresponding tofinalset of this type orDERIVATION_NONE. For simple types the returned value is a bit combination of the subset of {DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST} corresponding tofinalset of this type orDERIVATION_NONE.- Specified by:
getFinalin interfaceorg.apache.xerces.xs.XSTypeDefinition
-
isFinal
public boolean isFinal(short derivation)
Description copied from interface:org.apache.xerces.xs.XSTypeDefinition{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}.- Specified by:
isFinalin interfaceorg.apache.xerces.xs.XSTypeDefinition- Parameters:
derivation- Extension, restriction, list, union constants (defined inXSConstants).- Returns:
- True if
restrictionis in the final set, otherwise false.
-
getBaseType
public org.apache.xerces.xs.XSTypeDefinition getBaseType()
Description copied from interface:org.apache.xerces.xs.XSTypeDefinition{base type definition}: either a simple type definition or a complex type definition.- Specified by:
getBaseTypein interfaceorg.apache.xerces.xs.XSTypeDefinition
-
getAnonymous
public boolean getAnonymous()
Description copied from interface:org.apache.xerces.xs.XSTypeDefinitionConvenience attribute. A boolean that specifies if the type definition is anonymous.- Specified by:
getAnonymousin interfaceorg.apache.xerces.xs.XSTypeDefinition
-
getVariety
public short getVariety()
Description copied from interface:org.apache.xerces.xs.XSSimpleTypeDefinition[variety]: one of {atomic, list, union} or absent.- Specified by:
getVarietyin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
isIDType
public boolean isIDType()
Description copied from interface:XSSimpleTypeCheck 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.- Specified by:
isIDTypein interfaceXSSimpleType- Returns:
- whether this simple type is or is derived from ID.
-
getWhitespace
public short getWhitespace() throws DatatypeExceptionDescription copied from interface:XSSimpleTypeReturn the whitespace corresponding to this datatype.- Specified by:
getWhitespacein interfaceXSSimpleType- Returns:
- valid values are WS_PRESERVE, WS_REPLACE, WS_COLLAPSE.
- Throws:
DatatypeException- union datatypes don't have whitespace facet associated with them
-
getPrimitiveKind
public short getPrimitiveKind()
Description copied from interface:XSSimpleTypereturn 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.- Specified by:
getPrimitiveKindin interfaceXSSimpleType- Returns:
- an ID representing the built-in primitive base type
-
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 theINTEGER_DVis returned.- Specified by:
getBuiltInKindin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getPrimitiveType
public org.apache.xerces.xs.XSSimpleTypeDefinition getPrimitiveType()
If variety isatomicthe primitive type definition (a built-in primitive datatype definition or the simple ur-type definition) is available, otherwisenull.- Specified by:
getPrimitiveTypein interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getItemType
public org.apache.xerces.xs.XSSimpleTypeDefinition getItemType()
If variety islistthe item type definition (an atomic or union simple type definition) is available, otherwisenull.- Specified by:
getItemTypein interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getMemberTypes
public org.apache.xerces.xs.XSObjectList getMemberTypes()
If variety isunionthe list of member type definitions (a non-empty sequence of simple type definitions) is available, otherwise an emptyXSObjectList.- Specified by:
getMemberTypesin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
applyFacets
public void applyFacets(XSFacets facets, short presentFacet, short fixedFacet, ValidationContext context) throws InvalidDatatypeFacetException
Ifis chosen - Specified by:
applyFacetsin interfaceXSSimpleType- Parameters:
facets- 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- Throws:
InvalidDatatypeFacetException- exception for invalid facet values.
-
validate
public java.lang.Object validate(java.lang.String content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueExceptionvalidate a value, and return the compiled form- Specified by:
validatein interfaceXSSimpleType- Parameters:
content- the string value that needs to be validatedcontext- the validation contextvalidatedInfo- used to store validation result- Returns:
- the actual value (QName, Boolean) of the string value
- Throws:
InvalidDatatypeValueException
-
getActualEnumValue
protected ValidatedInfo getActualEnumValue(java.lang.String lexical, ValidationContext ctx, ValidatedInfo info) throws InvalidDatatypeValueException
- Throws:
InvalidDatatypeValueException
-
validateWithInfo
public ValidatedInfo validateWithInfo(java.lang.String content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException
validate a value, and return the compiled form- Throws:
InvalidDatatypeValueException
-
validate
public java.lang.Object validate(java.lang.Object content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueExceptionvalidate a value, and return the compiled form- Specified by:
validatein interfaceXSSimpleType- Parameters:
content- the string value that needs to be validatedcontext- the validation contextvalidatedInfo- used to store validation result- Returns:
- the actual value (QName, Boolean) of the string value
- Throws:
InvalidDatatypeValueException
-
validate
public void validate(ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException
validate an actual value against this DV- Specified by:
validatein interfaceXSSimpleType- Parameters:
context- the validation contextvalidatedInfo- used to provide the actual value and member types- Throws:
InvalidDatatypeValueException- exception for invalid values.
-
isEqual
public boolean isEqual(java.lang.Object value1, java.lang.Object value2)Description copied from interface:XSSimpleTypeCheck whether two actual values are equal.- Specified by:
isEqualin interfaceXSSimpleType- Parameters:
value1- the first valuevalue2- the second value- Returns:
- true if the two value are equal
-
isIdentical
public boolean isIdentical(java.lang.Object value1, java.lang.Object value2)
-
normalize
public static java.lang.String normalize(java.lang.String content, short ws)
-
normalize
protected java.lang.String normalize(java.lang.Object content, short ws)
-
getOrdered
public short getOrdered()
Fundamental Facet: ordered.- Specified by:
getOrderedin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getBounded
public boolean getBounded()
Fundamental Facet: bounded.- Specified by:
getBoundedin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getFinite
public boolean getFinite()
Fundamental Facet: cardinality.- Specified by:
getFinitein interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getNumeric
public boolean getNumeric()
Fundamental Facet: numeric.- Specified by:
getNumericin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
isDefinedFacet
public boolean isDefinedFacet(short facetName)
Convenience method. [Facets]: check whether a facet is defined on this type.- Specified by:
isDefinedFacetin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition- Parameters:
facetName- The name of the facet.- Returns:
- True if the facet is defined, false otherwise.
-
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.- Specified by:
getDefinedFacetsin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
isFixedFacet
public boolean isFixedFacet(short facetName)
Convenience method. [Facets]: check whether a facet is defined and fixed on this type.- Specified by:
isFixedFacetin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition- Parameters:
facetName- The name of the facet.- Returns:
- True if the facet is fixed, false otherwise.
-
getFixedFacets
public short getFixedFacets()
[facets]: all defined facets for this type which are fixed.- Specified by:
getFixedFacetsin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getLexicalFacetValue
public java.lang.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 forenumerationandpatternfacets.- Specified by:
getLexicalFacetValuein interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition- Parameters:
facetName- The name of the facet, i.e.FACET_LENGTH, FACET_TOTALDIGITS(seeXSConstants). 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
public org.apache.xerces.xs.StringList getLexicalEnumeration()
A list of enumeration values if it exists, otherwise an emptyStringList.- Specified by:
getLexicalEnumerationin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getActualEnumeration
public org.apache.xerces.xs.datatypes.ObjectList getActualEnumeration()
A list of actual enumeration values if it exists, otherwise an emptyObjectList.
-
getEnumerationItemTypeList
public org.apache.xerces.xs.datatypes.ObjectList getEnumerationItemTypeList()
A list of enumeration type values (as a list of ShortList objects) if it exists, otherwise returns null
-
getEnumerationTypeList
public org.apache.xerces.xs.ShortList getEnumerationTypeList()
-
getLexicalPattern
public org.apache.xerces.xs.StringList getLexicalPattern()
A list of pattern values if it exists, otherwise an emptyStringList.- Specified by:
getLexicalPatternin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getAnnotations
public org.apache.xerces.xs.XSObjectList getAnnotations()
[annotations]: a set of annotations for this simple type component if it exists, otherwise an emptyXSObjectList.- Specified by:
getAnnotationsin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
derivedFromType
public boolean derivedFromType(org.apache.xerces.xs.XSTypeDefinition ancestor, short derivation)Description copied from interface:org.apache.xerces.xs.XSTypeDefinitionConvenience method which checks if this type is derived from the givenancestorType.- Specified by:
derivedFromTypein interfaceorg.apache.xerces.xs.XSTypeDefinition- Parameters:
ancestor- An ancestor type definition.derivation- A bit combination representing a subset of {DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST}.- Returns:
- True if this type is derived from
ancestorTypeusing only derivation methods from thederivationMethod.
-
derivedFrom
public boolean derivedFrom(java.lang.String ancestorNS, java.lang.String ancestorName, short derivation)Description copied from interface:org.apache.xerces.xs.XSTypeDefinitionConvenience method which checks if this type is derived from the given ancestor type.- Specified by:
derivedFromin interfaceorg.apache.xerces.xs.XSTypeDefinition- Parameters:
ancestorNS- An ancestor type namespace.ancestorName- An ancestor type name.derivation- A bit combination representing a subset of {DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST}.- Returns:
- True if this type is derived from
ancestorTypeusing only derivation methods from thederivationMethod.
-
isDOMDerivedFrom
public boolean isDOMDerivedFrom(java.lang.String ancestorNS, java.lang.String ancestorName, int derivationMethod)Checks if a type is derived from another by restriction, given the name and namespace. See: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom- Parameters:
ancestorNS- The namspace of the ancestor type declarationancestorName- The name of the ancestor type declarationderivationMethod- The derivation method- Returns:
- boolean True if the ancestor type is derived from the reference type by the specifiied derivation method.
-
reset
public void reset()
-
getNamespaceItem
public org.apache.xerces.xs.XSNamespaceItem getNamespaceItem()
Description copied from interface:org.apache.xerces.xs.XSObjectA namespace schema information item corresponding to the target namespace of the component, if it is globally declared; ornullotherwise.- Specified by:
getNamespaceItemin interfaceorg.apache.xerces.xs.XSObject- See Also:
XSObject.getNamespaceItem()
-
setNamespaceItem
public void setNamespaceItem(org.apache.xerces.xs.XSNamespaceItem namespaceItem)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
getFacets
public org.apache.xerces.xs.XSObjectList getFacets()
A list of constraining facets if it exists, otherwise an emptyXSObjectList. Note: This method must not be used to retrieve values forenumerationandpatternfacets.- Specified by:
getFacetsin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getFacet
public org.apache.xerces.xs.XSObject getFacet(int facetType)
Description copied from interface:org.apache.xerces.xs.XSSimpleTypeDefinitionA constraining facet object. An instance of XSFacet or XSMultiValueFacet.- Specified by:
getFacetin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getMultiValueFacets
public org.apache.xerces.xs.XSObjectList getMultiValueFacets()
A list of enumeration and pattern constraining facets if it exists, otherwise an emptyXSObjectList.- Specified by:
getMultiValueFacetsin interfaceorg.apache.xerces.xs.XSSimpleTypeDefinition
-
getMinInclusiveValue
public java.lang.Object getMinInclusiveValue()
-
getMinExclusiveValue
public java.lang.Object getMinExclusiveValue()
-
getMaxInclusiveValue
public java.lang.Object getMaxInclusiveValue()
-
getMaxExclusiveValue
public java.lang.Object getMaxExclusiveValue()
-
setAnonymous
public void setAnonymous(boolean anon)
-
getTypeNamespace
public java.lang.String getTypeNamespace()
- Specified by:
getTypeNamespacein interfaceorg.w3c.dom.TypeInfo
-
isDerivedFrom
public boolean isDerivedFrom(java.lang.String typeNamespaceArg, java.lang.String typeNameArg, int derivationMethod)- Specified by:
isDerivedFromin interfaceorg.w3c.dom.TypeInfo
-
-