|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.saxonica.schema.SchemaStructure
com.saxonica.schema.UserDefinedType
com.saxonica.schema.UserSimpleType
com.saxonica.schema.UserAtomicType
public class UserAtomicType
An object belonging to this class represents an atomic type: either a built-in atomic type, or a user-defined atomic type. There is at most one AtomicType object for each distinct type in the schema (so equality can safely be tested using the == operator).
| Field Summary |
|---|
| Fields inherited from class com.saxonica.schema.UserDefinedType |
|---|
extendedTypes, finalProhibitions |
| Fields inherited from interface net.sf.saxon.type.SimpleType |
|---|
VARIETY_ATOMIC, VARIETY_LIST, VARIETY_UNION, VARIETY_UNSPECIFIED_SIMPLE |
| Fields inherited from interface net.sf.saxon.type.SchemaType |
|---|
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION, DERIVE_BY_SUBSTITUTION |
| Fields inherited from interface net.sf.saxon.type.SchemaComponent |
|---|
FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING |
| Constructor Summary | |
|---|---|
UserAtomicType(EnterpriseConfiguration config)
Create a UserAtomicType |
|
| Method Summary | |
|---|---|
AtomicType |
getAtomizedItemType()
Get the item type of the atomic values that will be produced when an item of this type is atomized |
double |
getDefaultPriority()
Determine the default priority of this item type when used on its own as a Pattern |
Set<PlainType> |
getPlainMemberTypes()
Get the set of atomic types that are subsumed by this type |
ItemType |
getPrimitiveItemType()
Get the primitive type from which this type is derived. |
int |
getPrimitiveType()
Get the primitive type from which this type is derived. |
String |
getSharedInstance(String value)
Get an instance of the facet value that is stored in the schema rather than the instance |
ItemType |
getSuperType(TypeHierarchy th)
Get the type from which this item type is derived by restriction. |
SequenceIterator<AtomicValue> |
getTypedValue(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 |
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()
Ask whether values of this type are atomizable |
boolean |
isBuiltInType()
Determine whether this is a built-in type or a user-defined 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()
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,
XPathContext context)
Test whether a given item conforms to this type |
boolean |
matchesItem(Item item,
boolean allowURIPromotion,
Configuration config)
Test whether a given item conforms to this type |
void |
serializeVariety(SchemaModelSerializer serializer)
Serialize the schema component |
String |
toString()
Produce string representation for use in diagnostic output |
String |
toString(NamePool pool)
Display the type descriptor for diagnostics |
ValidationFailure |
validate(AtomicValue primValue,
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(CharSequence value,
NamespaceResolver nsResolver,
ConversionRules rules)
Check whether a given input string is valid according to this SimpleType |
void |
visitNamedSchemaComponents(SchemaComponentVisitor visitor)
Visit all the schema components used in this ItemType definition |
| Methods inherited from class com.saxonica.schema.UserSimpleType |
|---|
addFacet, addInheritedFacets, analyzeContentExpression, applyWhitespaceNormalization, atomize, checkAgainstFacets, checkTypeDerivationIsOK, convertFacetValues, elaborate, getBuiltInBaseType, getExtendedFacetList, getFacet, getFacets, getLocalFacetList, getTypedValue, getWhitespaceAction, isListType, isSimpleType, isTypeDerivationOK, isUnionType, mergeEnumerationFacets, postprocess, preprocess, serialize, setFacetList |
| Methods inherited from class com.saxonica.schema.SchemaStructure |
|---|
fixup, getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, lookForCycles, setConfiguration, setFixupStatus, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatus |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.saxon.type.SimpleType |
|---|
getBuiltInBaseType, getWhitespaceAction, isExternalType, isListType, isUnionType, postprocess, preprocess |
| Methods inherited from interface net.sf.saxon.type.SchemaType |
|---|
allowsDerivation, analyzeContentExpression, atomize, checkTypeDerivationIsOK, getBaseType, getBlock, getDerivationMethod, getDescription, getDisplayName, getFingerprint, getName, getNameCode, getSystemId, getTargetNamespace, getTypedValue, isAnonymousType, isComplexType, isSameType, isSimpleType |
| Methods inherited from interface net.sf.saxon.type.SchemaComponent |
|---|
getRedefinitionLevel, getValidationStatus |
| Methods inherited from interface net.sf.saxon.type.PlainType |
|---|
isExternalType |
| Methods inherited from interface com.saxonica.schema.UserSchemaComponent |
|---|
fixup, lookForCycles |
| Constructor Detail |
|---|
public UserAtomicType(EnterpriseConfiguration config)
config - the Saxon configuration| Method Detail |
|---|
public boolean isAtomicType()
isAtomicType in interface ItemTypeisAtomicType in interface SchemaTypeisAtomicType in interface SimpleTypeisAtomicType in class UserSimpleTypepublic boolean isPlainType()
isPlainType in interface ItemTypepublic boolean isIdType()
isIdType in interface SchemaTypeisIdType in class UserSimpleTypepublic boolean isIdRefType()
isIdRefType in interface SchemaTypeisIdRefType in class UserSimpleTypepublic boolean isBuiltInType()
isBuiltInType in interface AtomicTypeisBuiltInType in interface SimpleTypepublic StructuredQName getTypeName()
getTypeName in interface AtomicTypepublic boolean isPrimitiveType()
isPrimitiveType in interface AtomicTypepublic boolean isOrdered()
isOrdered in interface AtomicTypepublic boolean isAbstract()
isAbstract in interface AtomicType
public boolean validate(SchemaCompiler compiler)
throws SchemaException
validate in interface UserSchemaComponentvalidate in class UserSimpleTypecompiler - used for error reporting
SchemaException - when this SimpleType definition
is invalid.
public boolean matches(Item item,
XPathContext context)
matches in interface ItemTypeitem - The item to be testedcontext - the XPath dynamic evaluation context
public boolean matchesItem(Item item,
boolean allowURIPromotion,
Configuration config)
matchesItem in interface ItemTypeitem - The item to be testedallowURIPromotion - true if URIs can be promoted to stringsconfig - the Saxon configuration
public ValidationFailure validateContent(CharSequence value,
NamespaceResolver nsResolver,
ConversionRules rules)
validateContent in interface SimpleTypevalue - 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 Configuration
UnsupportedOperationException - if the type is namespace-sensitive and no namespace
resolver is supplied
public SequenceIterator<AtomicValue> getTypedValue(CharSequence value,
NamespaceResolver resolver,
ConversionRules rules)
throws ValidationException
getTypedValue in interface SimpleTypevalue - the string valueresolver - the namespace resolverrules - the conversion rules for the Saxon configuration
ValidationException - if the supplied value is not in the lexical space of the data typepublic ItemType getSuperType(TypeHierarchy th)
getSuperType in interface ItemTypeth - the type hierarchy cache
public ItemType getPrimitiveItemType()
Type.isPrimitiveType(int)
getPrimitiveItemType in interface ItemTypepublic int getPrimitiveType()
Type.isPrimitiveType(int)
getPrimitiveType in interface ItemTypepublic boolean isNamespaceSensitive()
isNamespaceSensitive in interface SimpleTypepublic AtomicType getAtomizedItemType()
getAtomizedItemType in interface ItemTypepublic boolean isAtomizable()
isAtomizable in interface ItemTypepublic String getSharedInstance(String value)
value - the value required
public String toString()
toString in class Objectpublic String toString(NamePool pool)
toString in interface ItemTypepool - the name pool
public int hashCode()
hashCode in class Object
public ValidationFailure validate(AtomicValue primValue,
CharSequence lexicalValue,
ConversionRules rules)
validate in interface AtomicTypeprimValue - 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 configuration
UnsupportedOperationException - in the case of an external object type
public void serializeVariety(SchemaModelSerializer serializer)
throws XPathException
serializeVariety in class UserSimpleTypeXPathException
public void visitNamedSchemaComponents(SchemaComponentVisitor visitor)
throws XPathException
visitNamedSchemaComponents in interface ItemTypevisitor - the visitor class to be called when each component is visited
XPathException - if an error occurspublic Set<PlainType> getPlainMemberTypes()
getPlainMemberTypes in interface PlainTypepublic double getDefaultPriority()
getDefaultPriority in interface ItemType
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||