|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saxon.type.SchemaType | +--net.sf.saxon.type.SimpleType | +--net.sf.saxon.type.AtomicType
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 net.sf.saxon.type.SchemaType |
ALL_DERIVATIONS, DERIVE_BY_EXTENSION, DERIVE_BY_LIST, DERIVE_BY_RESTRICTION, DERIVE_BY_SUBSTITUTION, DERIVE_BY_UNION, finalProhibitions, INVALID, UNVALIDATED, VALIDATED, VALIDATING, validationPhase |
Constructor Summary | |
AtomicType()
|
Method Summary | |
AtomicType |
getAtomizedItemType()
Get the item type of the atomic values that will be produced when an item of this type is atomized |
int |
getPrimitiveType()
Get the primitive type from which this type is derived. |
ItemType |
getSuperType()
Get the type from which this item type is derived by restriction. |
SequenceIterator |
getTypedValue(java.lang.CharSequence value,
NodeInfo node)
Get the typed value corresponding to a given string value, assuming it is valid against this type |
boolean |
isBuiltIn()
Test whether this is a built-in type |
boolean |
isSameType(ItemType other)
Determine whether this AtomicType represents the same type as another ItemType |
boolean |
matchesItem(Item item)
Test whether a given item conforms to this type |
void |
setIsBuiltIn(boolean yesOrNo)
Mark this as a built-in type |
java.lang.String |
toString()
Produce string representation for use in diagnostic output |
boolean |
validate(SchemaMarker schema)
Checks the validity of this SimpleType definition. |
void |
validateContent(java.lang.CharSequence value,
NamespaceResolver nsResolver)
Check whether a given input string is valid according to this SimpleType |
Methods inherited from class net.sf.saxon.type.SimpleType |
applyWhitespaceNormalization, getBuiltInBaseType, getFacet, getFacetCollection, getFacets, getFacets, getTypedValue, getWhitespaceAction, isListType, isNamespaceSensitive, isSimpleType, isTypeDerivationOK, isUnionType, iterateMemberTypes, setFacetCollection |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AtomicType()
Method Detail |
public void setIsBuiltIn(boolean yesOrNo)
public boolean isBuiltIn()
public boolean validate(SchemaMarker schema) throws javax.xml.transform.TransformerException
validate
in class SimpleType
schema
- a Schema used for error reporting
javax.xml.transform.TransformerException
- when this SimpleType definition
is invalid.public boolean matchesItem(Item item)
matchesItem
in interface ItemType
item
- The item to be tested
public void validateContent(java.lang.CharSequence value, NamespaceResolver nsResolver) throws ValidationException
validateContent
in class 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.
ValidationException
- if the content is invalid
java.lang.UnsupportedOperationException
- if the type is namespace-sensitive and no namespace
resolver is suppliedpublic SequenceIterator getTypedValue(java.lang.CharSequence value, NodeInfo node) throws ValidationException
getTypedValue
in class SimpleType
value
- the string valuenode
- the node containing the value, used to resolve namespace prefixes
ValidationException
public ItemType getSuperType()
getSuperType
in interface ItemType
public int getPrimitiveType()
Type.isPrimitiveType(int)
getPrimitiveType
in interface ItemType
public AtomicType getAtomizedItemType()
getAtomizedItemType
in interface ItemType
public java.lang.String toString()
toString
in interface ItemType
toString
in class java.lang.Object
public boolean isSameType(ItemType other)
isSameType
in interface ItemType
other
- the other type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |