|
|||||||
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.SchemaTypeImpl
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 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 |
Fields inherited from interface com.saxonica.schema.SerializableSchemaComponent |
---|
ALL_COMPOSITOR, ATOMIC_TYPE, ATTRIBUTE_DECL, ATTRIBUTE_GROUP, ATTRIBUTE_GROUP_REF, ATTRIBUTE_USE, ATTRIBUTE_WILDCARD, CHOICE_COMPOSITOR, COMPLEX_TYPE, ELEMENT_DECL, ELEMENT_PARTICLE, ELEMENT_WILDCARD, FACET, KEY, KEYREF, LIST_TYPE, MODEL_GROUP, MODEL_GROUP_REF, NOTATION, SEQUENCE_COMPOSITOR, UNION_TYPE, UNIQUE |
Constructor Summary | |
---|---|
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 |
AtomicType |
getCommonAtomicType()
Get the most specific possible atomic type that all items in this SimpleType belong to |
int |
getComponentTypeCode()
Get a unique number identifying the type of component |
ItemType |
getPrimitiveItemType()
Get the primitive type from which this type is derived. |
int |
getPrimitiveType()
Get the primitive type from which this type is derived. |
ItemType |
getSuperType(TypeHierarchy th)
Get the type from which this item type is derived by restriction. |
SequenceIterator |
getTypedValue(CharSequence value,
NamespaceResolver resolver,
NameChecker nameChecker)
Get the typed value corresponding to a given string value, assuming it is valid against this type |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isAtomicType()
Test whether this Simple Type is an atomic type |
boolean |
isBuiltInType()
Determine whether this is a built-in type or a user-defined 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 |
matchesItem(Item item,
boolean allowURIPromotion,
Configuration config)
Test whether a given item conforms to this type |
void |
serialize(SchemaSerializer serializer)
Serialize the schema component |
AtomicValue |
setDerivedTypeLabel(AtomicValue primValue,
CharSequence lexicalValue,
boolean validate)
Factory method to create values of a derived atomic type. |
String |
toString()
Produce string representation for use in diagnostic output |
String |
toString(NamePool pool)
Display the type descriptor for diagnostics |
boolean |
validate(SchemaCompiler compiler)
Checks the validity of this SimpleType definition. |
ValidationException |
validateContent(CharSequence value,
NamespaceResolver nsResolver,
NameChecker checker)
Check whether a given input string is valid according to this SimpleType |
Methods inherited from class com.saxonica.schema.UserSimpleType |
---|
analyzeContentExpression, applyWhitespaceNormalization, atomize, checkAgainstFacets, checkTypeDerivationIsOK, getBuiltInBaseType, getFacet, getFacetCollection, getFacetList, getFacets, getFacets, getTypedValue, getWhitespaceAction, isListType, isSimpleType, isTypeDerivationOK, isUnionType, setFacetCollection |
Methods inherited from class com.saxonica.schema.SchemaStructure |
---|
getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getSystemId, getValidationStatus, lookForCycles, setConfiguration, setFixupStatus, setLineNumber, setLocator, setSystemId, setValidationStatus |
Methods inherited from class java.lang.Object |
---|
equals, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.saxon.type.SimpleType |
---|
getBuiltInBaseType, getWhitespaceAction, isExternalType, isListType, isUnionType |
Methods inherited from interface net.sf.saxon.type.SchemaType |
---|
allowsDerivation, analyzeContentExpression, atomize, checkTypeDerivationIsOK, getBaseType, getBlock, getDerivationMethod, getDescription, getDisplayName, getFingerprint, getNameCode, getTypedValue, isAnonymousType, isComplexType, isSameType, isSimpleType |
Methods inherited from interface net.sf.saxon.type.SchemaComponent |
---|
getValidationStatus |
Constructor Detail |
---|
public UserAtomicType()
Method Detail |
---|
public boolean isAtomicType()
isAtomicType
in interface ItemType
isAtomicType
in interface SchemaType
isAtomicType
in interface SimpleType
isAtomicType
in class UserSimpleType
public boolean isBuiltInType()
isBuiltInType
in interface SimpleType
public AtomicType getCommonAtomicType()
getCommonAtomicType
in interface SimpleType
public boolean isOrdered()
isOrdered
in interface AtomicType
public boolean validate(SchemaCompiler compiler) throws SchemaException, ValidationException
validate
in class UserSimpleType
SchemaException
- when this SimpleType definition
is invalid.
ValidationException
public boolean matchesItem(Item item, boolean allowURIPromotion, Configuration config)
matchesItem
in interface ItemType
item
- The item to be testedallowURIPromotion
- config
-
public ValidationException validateContent(CharSequence value, NamespaceResolver nsResolver, NameChecker checker)
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.checker
-
UnsupportedOperationException
- if the type is namespace-sensitive and no namespace
resolver is suppliedpublic SequenceIterator getTypedValue(CharSequence value, NamespaceResolver resolver, NameChecker nameChecker) throws ValidationException
getTypedValue
in interface SimpleType
value
- the string valueresolver
- nameChecker
-
ValidationException
- if the supplied value is not in the lexical space of the data typepublic ItemType getSuperType(TypeHierarchy th)
getSuperType
in interface ItemType
th
-
public ItemType getPrimitiveItemType()
Type.isPrimitiveType(int)
getPrimitiveItemType
in interface ItemType
public int getPrimitiveType()
Type.isPrimitiveType(int)
getPrimitiveType
in interface ItemType
public boolean isNamespaceSensitive()
isNamespaceSensitive
in interface SimpleType
public AtomicType getAtomizedItemType()
getAtomizedItemType
in interface ItemType
public String toString()
toString
in class Object
public String toString(NamePool pool)
toString
in interface ItemType
public int hashCode()
hashCode
in class Object
public AtomicValue setDerivedTypeLabel(AtomicValue primValue, CharSequence lexicalValue, boolean validate)
setDerivedTypeLabel
in interface AtomicType
primValue
- the value in the value space of the primitive type. This object will
have its type label changed to the new type.lexicalValue
- the value as supplied. If null, the string value of primValue
is used. The lexical value is this value after applying the
whitespace facet. The lexical value is checked against the pattern facet (if any)validate
- true if the value is to be validated against the facets of the derived
type; false if the caller knows that the value is already valid.
public void serialize(SchemaSerializer serializer) throws IOException
serialize
in interface SerializableSchemaComponent
IOException
public int getComponentTypeCode()
getComponentTypeCode
in interface SerializableSchemaComponent
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |