public class UserAtomicType extends UserSimpleType implements AtomicType
SchemaComponent.ValidationStatus
ItemType.WithSequenceTypeCache
extendedTypes, finalProhibitions
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION, DERIVE_BY_SUBSTITUTION
COMPONENT_FUNCTION_TYPE
Constructor and Description |
---|
UserAtomicType(EnterpriseConfiguration config)
Create a UserAtomicType
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAlphaCode()
Get an alphabetic code representing the type, or at any rate, the nearest built-in type
from which this type is derived.
|
AtomicType |
getAtomizedItemType()
Get the item type of the atomic values that will be produced when an item
of this type is atomized
|
java.util.Set<? extends PlainType> |
getPlainMemberTypes()
Get the set of atomic types that are subsumed by this type
|
AtomicType |
getPrimitiveItemType()
Get the primitive type from which this type is derived.
|
int |
getPrimitiveType()
Get the primitive type from which this type is derived.
|
java.lang.String |
getSharedInstance(java.lang.String value)
Get an instance of the facet value that is stored in the schema rather than the instance
|
StringConverter |
getStringConverter(ConversionRules rules)
Get a StringConverter, an object which converts strings in the lexical space of this
data type to instances (in the value space) of the data type.
|
AtomicValue |
getTypedValue(java.lang.CharSequence value,
NamespaceResolver resolver,
ConversionRules rules)
Get the typed value corresponding to a given string value, assuming it is
valid against this type
|
StructuredQName |
getTypeName()
Get the name of this type as a StructuredQName, unless the type is anonymous, in which case
return null
|
UType |
getUType()
Get the corresponding
UType . |
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
isAbstract()
Determine whether the type is abstract, that is, whether it cannot have instances that are not also
instances of some concrete subtype
|
boolean |
isAtomicType()
Test whether this Simple Type is an atomic type
|
boolean |
isAtomizable(TypeHierarchy th)
Ask whether values of this type are atomizable
|
boolean |
isBuiltInType()
Determine whether this is a built-in type or a user-defined type
|
boolean |
isCompilable()
Ask whether it is possible to generate bytecode to perform validation
against this atomic type
|
boolean |
isIdRefType()
Ask whether this type is an IDREF or IDREFS type.
|
boolean |
isIdType()
Ask whether this type is an ID type.
|
boolean |
isNamespaceSensitive()
Test whether this simple type is namespace-sensitive, that is, whether
it is derived from xs:QName or xs:NOTATION
|
boolean |
isOrdered(boolean optimistic)
Determine whether the atomic type is ordered, that is, whether less-than and greater-than comparisons
are permitted
|
boolean |
isPlainType()
Ask whether this is a plain type (a type whose instances are always atomic values)
|
boolean |
isPrimitiveType()
Determine whether the atomic type is a primitive type.
|
boolean |
matches(Item item,
TypeHierarchy th)
Test whether a given item conforms to this type
|
void |
serializeVariety(SchemaModelSerializer serializer)
Serialize the schema component
|
void |
setUncompilable(boolean flag)
Say that compilation to bytecode for this type has failed, and should not
be attempted again
|
java.lang.String |
toExportString()
Return a string representation of this ItemType suitable for use in stylesheet
export files.
|
java.lang.String |
toString()
Produce a string representation of the type name.
|
ValidationFailure |
validate(AtomicValue primValue,
java.lang.CharSequence lexicalValue,
ConversionRules rules)
Validate that a primitive atomic value is a valid instance of a type derived from the
same primitive type.
|
boolean |
validate(SchemaCompiler compiler)
Checks the validity of this SimpleType definition.
|
ValidationFailure |
validateContent(java.lang.CharSequence value,
NamespaceResolver nsResolver,
ConversionRules rules)
Check whether a given input string is valid according to this SimpleType
|
addFacet, addInheritedFacets, analyzeContentExpression, applyWhitespaceNormalization, atomize, checkAgainstFacets, checkTypeDerivationIsOK, convertFacetValues, elaborate, generateJavaScriptItemTypeAcceptor, generateJavaScriptItemTypeTest, getBuiltInBaseType, getComponentAsFunction, getComponentAsFunction, getContextComponent, getEQName, getExtendedFacetList, getFacet, getLocalFacetList, getWhitespaceAction, isListType, isSimpleType, isTypeDerivationOK, isUnionType, makeValidationFailure, mergeEnumerationFacets, postprocess, preprocess, serialize, setContextComponent, setFacetList
allowsDerivation, containingDeclarationIsElement, getBaseType, getBaseTypeFingerprint, getBaseTypeReference, getBlock, getContainingDeclarationName, getDerivationMethod, getDescription, getDisplayName, getExtensionTypes, getFinalProhibitions, getFingerprint, getName, getNamePool, getStructuredQName, getTargetNamespace, isAnonymousType, isComplexType, isExternalType, isSameType, isSameURI, registerExtensionType, setBaseTypeReference, setContainingDeclaration, setDerivationMethod, setDerivationMethodName, setExtendedTypes, setFinalProhibitions, setTypeName
fixup, getColumnNumber, getConfiguration, getFixupStatus, getGeneratedId, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, hasSameLocation, isValidationNeeded, lookForCycles, makeXPathExpressionPropertyRecord, saveLocation, setConfiguration, setFixupStatus, setGeneratedId, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatus
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
explainMismatch, getGenre
getBuiltInBaseType, getWhitespaceAction, isExternalType, isListType, isUnionType, postprocess, preprocess
allowsDerivation, analyzeContentExpression, atomize, checkTypeDerivationIsOK, getBaseType, getBlock, getDerivationMethod, getDescription, getDisplayName, getEQName, getFinalProhibitions, getFingerprint, getName, getNearestNamedType, getStructuredQName, getSystemId, getTargetNamespace, isAnonymousType, isComplexType, isSameType, isSimpleType
getComponentAsFunction, getRedefinitionLevel, getValidationStatus
isExternalType
generateJavaScriptItemTypeAcceptor, generateJavaScriptItemTypeTest, isTrueItemType
fixup, lookForCycles
public UserAtomicType(EnterpriseConfiguration config)
config
- the Saxon configurationpublic boolean isAtomicType()
isAtomicType
in interface ItemType
isAtomicType
in interface SchemaType
isAtomicType
in interface SimpleType
isAtomicType
in class UserSimpleType
public boolean isPlainType()
isPlainType
in interface ItemType
public boolean isIdType() throws MissingComponentException
isIdType
in interface SchemaType
isIdType
in class UserSimpleType
MissingComponentException
public boolean isIdRefType() throws MissingComponentException
isIdRefType
in interface SchemaType
isIdRefType
in class UserSimpleType
MissingComponentException
public boolean isBuiltInType()
isBuiltInType
in interface AtomicType
isBuiltInType
in interface SimpleType
public java.lang.String getAlphaCode()
getAlphaCode
in interface ItemType
public StructuredQName getTypeName()
getTypeName
in interface AtomicType
getTypeName
in interface PlainType
public boolean isPrimitiveType()
isPrimitiveType
in interface AtomicType
public UType getUType()
UType
. A UType is a union of primitive item
types.public boolean isOrdered(boolean optimistic)
isOrdered
in interface AtomicType
optimistic
- if true, the function takes an optimistic view, returning true if ordering comparisons
are available for some subtype. This mainly affects xs:duration, where the function returns true if
optimistic is true, false if it is false.public boolean isAbstract()
isAbstract
in interface AtomicType
public StringConverter getStringConverter(ConversionRules rules)
getStringConverter
in interface AtomicType
rules
- the conversion rules to be usedpublic boolean validate(SchemaCompiler compiler) throws SchemaException
validate
in interface UserSchemaComponent
validate
in class UserSimpleType
compiler
- used for error reportingSchemaException
- when this SimpleType definition
is invalid.public boolean matches(Item item, TypeHierarchy th)
public boolean isCompilable()
public ValidationFailure validateContent(java.lang.CharSequence value, NamespaceResolver nsResolver, ConversionRules rules)
validateContent
in interface SimpleType
value
- the input string to be checkednsResolver
- a namespace resolver used to resolve namespace prefixes if the type
is namespace sensitive. The value supplied may be null; in this case any namespace-sensitive
content will throw an UnsupportedOperationException.rules
- the conversion rules for this Configurationjava.lang.UnsupportedOperationException
- if the type is namespace-sensitive and no namespace
resolver is suppliedpublic AtomicValue getTypedValue(java.lang.CharSequence value, NamespaceResolver resolver, ConversionRules rules) throws ValidationException
getTypedValue
in interface SimpleType
value
- the string valueresolver
- the namespace resolverrules
- the conversion rules for the Saxon configurationValidationException
- if the supplied value is not in the lexical space of the data typepublic AtomicType getPrimitiveItemType()
Type.isPrimitiveAtomicType(int)
getPrimitiveItemType
in interface ItemType
getPrimitiveItemType
in interface PlainType
public int getPrimitiveType()
Type.isPrimitiveAtomicType(int)
getPrimitiveType
in interface ItemType
public boolean isNamespaceSensitive()
isNamespaceSensitive
in interface SimpleType
public AtomicType getAtomizedItemType()
getAtomizedItemType
in interface ItemType
public boolean isAtomizable(TypeHierarchy th)
isAtomizable
in interface ItemType
th
- The type hierarchy cachepublic java.lang.String getSharedInstance(java.lang.String value)
value
- the value requiredpublic java.lang.String toString()
toString
in interface ItemType
toString
in class UserDefinedType
public java.lang.String toExportString()
toString()
.toExportString
in interface ItemType
public int hashCode()
hashCode
in class java.lang.Object
public ValidationFailure validate(AtomicValue primValue, java.lang.CharSequence lexicalValue, ConversionRules rules)
validate
in interface AtomicType
primValue
- the value in the value space of the primitive type.lexicalValue
- the value in the lexical space. If null, the string value of primValue
is used. This value is checked against the pattern facet (if any)rules
- the conversion rules used for this configurationjava.lang.UnsupportedOperationException
- in the case of an external object typepublic void serializeVariety(SchemaModelSerializer serializer) throws XPathException
serializeVariety
in class UserSimpleType
XPathException
public java.util.Set<? extends PlainType> getPlainMemberTypes()
getPlainMemberTypes
in interface PlainType
public void setUncompilable(boolean flag)
flag
- true if bytecode generation has failedCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.