net.sf.saxon.type
public class ExternalObjectType extends Object implements AtomicType, Serializable
Field Summary | |
---|---|
int | baseFingerprint |
int | fingerprint |
static ExternalObjectType | GENERAL_EXTERNAL_OBJECT_TYPE |
Constructor Summary | |
---|---|
ExternalObjectType(Class javaClass) |
Method Summary | |
---|---|
boolean | allowsDerivation(int derivation)
Determines whether derivation (of a particular kind)
from this type is allowed, based on the "final" property
|
void | analyzeContentExpression(Expression expression, int kind, StaticContext env)
Analyze an expression to see whether the expression is capable of delivering a value of this
type.
|
static void | analyzeContentExpression(SimpleType simpleType, Expression expression, StaticContext env, int kind)
Analyze an expression to see whether the expression is capable of delivering a value of this
type. |
CharSequence | applyWhitespaceNormalization(CharSequence value)
Apply the whitespace normalization rules for this simple type
|
Value | atomize(NodeInfo node)
Get the typed value of a node that is annotated with this schema type. |
AtomicType | getAtomizedItemType()
Get the item type of the atomic values that will be produced when an item
of this type is atomized |
SchemaType | getBaseType()
Returns the base type that this type inherits from. |
int | getBlock()
Returns the value of the 'block' attribute for this type, as a bit-signnificant
integer with fields such as DERIVATION_LIST and DERIVATION_EXTENSION
|
SchemaType | getBuiltInBaseType()
Returns the built-in base type this type is derived from.
|
AtomicType | getCommonAtomicType()
Get the most specific possible atomic type that all items in this SimpleType belong to |
int | getDerivationMethod()
Gets the integer code of the derivation method used to derive this type from its
parent. |
String | getDescription() |
String | getDisplayName() |
int | getFingerprint() |
Class | getJavaClass() |
SchemaType | getKnownBaseType()
Returns the base type that this type inherits from. |
int | getNameCode()
Get the namecode of the name of this type. |
ItemType | getPrimitiveItemType()
Get the primitive item type corresponding to this item type. |
int | getPrimitiveType()
Get the primitive type corresponding to this item type. |
ItemType | getSuperType(TypeHierarchy th) |
SequenceIterator | getTypedValue(NodeInfo node)
Get the typed value of a node that is annotated with this schema type
|
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 | getValidationStatus()
Get the validation status - always valid |
int | getWhitespaceAction(TypeHierarchy th)
Determine the whitespace normalization required for values of this type
|
boolean | isAtomicType()
Test whether this Simple Type is an atomic type |
boolean | isBuiltIn() |
boolean | isComplexType()
Test whether this SchemaType is a complex type
|
boolean | isListType()
Returns true if this type is derived by list, or if it is derived by restriction
from a list type, or if it is a union that contains a list as one of its members
|
boolean | isNamespaceSensitive()
Test whether this simple type is namespace-sensitive, that is, whether
it is derived from xs:QName or xs:NOTATION
|
boolean | isSameType(SchemaType other)
Test whether this is the same type as another type. |
boolean | isSimpleType()
Returns true if this SchemaType is a SimpleType
|
void | isTypeDerivationOK(SchemaType type, int block)
Check that this type is validly derived from a given type
|
boolean | isUnionType()
Return true if this type is a union type (that is, if its variety is union)
|
AtomicValue | makeDerivedValue(AtomicValue primValue, CharSequence lexicalValue, boolean validate)
Factory method to create values of a derived atomic type. |
boolean | matchesItem(Item item, XPathContext context, boolean allowURIPromotion) |
String | toString(NamePool pool)
Produce a representation of this type name for use in error messages.
|
String | toString() |
ValidationException | validateContent(CharSequence value, NamespaceResolver nsResolver, NameChecker nameChecker)
Check whether a given input string is valid according to this SimpleType |
Parameters: derivation the kind of derivation, for example DERIVATION_LIST
Returns: true if this kind of derivation is allowed
Parameters: expression the expression that delivers the content kind the node kind whose content is being delivered: ELEMENT, ATTRIBUTE, or DOCUMENT env
Throws: net.sf.saxon.trans.XPathException if the expression will never deliver a value of the correct type
Parameters: simpleType the simple type against which the expression is to be checked expression the expression that delivers the content kind the node kind whose content is being delivered: ELEMENT, ATTRIBUTE, or DOCUMENT
Throws: net.sf.saxon.trans.XPathException if the expression will never deliver a value of the correct type
Parameters: value the string before whitespace normalization
Returns: the string after whitespace normalization
Parameters: node the node whose typed value is required
Returns: the typed value.
Since: 8.5
Returns: the base type.
Throws: IllegalStateException if this type is not valid.
Returns: the value of the 'block' attribute for this type
Returns: the first built-in type found when searching up the type hierarchy
Returns: the lowest common supertype of all member types
Returns: a numeric code representing the derivation method, for example DERIVATION_RESTRICTION
Returns: the base type.
Throws: IllegalStateException if this type is not valid.
Parameters: node the node whose typed value is required
Returns: an iterator over the items making up the typed value of this node. The objects returned by this SequenceIterator will all be of type AtomicValue
Parameters: value the string value resolver a namespace resolver used to resolve any namespace prefixes appearing in the content of values. Can supply null, in which case any namespace-sensitive content will be rejected. nameChecker
Returns: an iterator over the atomic sequence comprising the typed value. The objects returned by this SequenceIterator will all be of type AtomicValue
Parameters: th
Returns: one of PRESERVE, REPLACE, COLLAPSE
Returns: true, this is considered to be an atomic type
Returns: true if this SchemaType is a complex type
Returns: true if this is a list type
Returns: true if this type is derived from xs:QName or xs:NOTATION
Returns: true (always)
Parameters: type the type from which this type is derived block the derivations that are blocked by the relevant element declaration
Throws: SchemaException if the derivation is not allowed
Returns: true for a union type
Parameters: 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 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.
Parameters: value the input string to be checked nsResolver 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. nameChecker
Returns: null if validation succeeds; return a ValidationException describing the validation failure if validation fails, unless throwException is true, in which case the exception is thrown rather than being returned.
Throws: UnsupportedOperationException if the type is namespace-sensitive and no namespace resolver is supplied