net.sf.saxon.type
Class ExternalObjectType

java.lang.Object
  |
  +--net.sf.saxon.type.SchemaType
        |
        +--net.sf.saxon.type.SimpleType
              |
              +--net.sf.saxon.type.AtomicType
                    |
                    +--net.sf.saxon.type.ExternalObjectType
All Implemented Interfaces:
ItemType, java.io.Serializable, javax.xml.transform.SourceLocator

public class ExternalObjectType
extends AtomicType

This class represents the type of an external Java object returned by an extension function.

See Also:
Serialized Form

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
ExternalObjectType(java.lang.Class javaClass)
           
 
Method Summary
 int getFingerprint()
          Get the fingerprint of the name of this type
 ItemType getSuperType()
          Get the type from which this item type is derived by restriction.
 boolean isBuiltIn()
          Test whether this is a built-in type
 boolean matchesItem(Item item)
          Test whether a given item conforms to this type
 java.lang.String toString()
          Produce string representation for use in diagnostic output
 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.AtomicType
getAtomizedItemType, getPrimitiveType, getTypedValue, isSameType, setIsBuiltIn, validate
 
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 net.sf.saxon.type.SchemaType
allowsDerivation, checkDerivation, containingDeclarationIsElement, getBaseType, getBaseTypeFingerprint, getBlock, getColumnNumber, getContainingDeclarationName, getDerivationMethod, getDescription, getDisplayName, getLineNumber, getLocalName, getNamePool, getPublicId, getSystemId, isComplexType, setBaseType, setBaseTypeFingerprint, setContainingDeclaration, setDerivationMethod, setDerivationMethodName, setFinalProhibitions, setFingerprint, setLineNumber, setLocalName, setLocator, setNamePool, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExternalObjectType

public ExternalObjectType(java.lang.Class javaClass)
Method Detail

isBuiltIn

public boolean isBuiltIn()
Description copied from class: AtomicType
Test whether this is a built-in type

Overrides:
isBuiltIn in class AtomicType

matchesItem

public boolean matchesItem(Item item)
Description copied from class: AtomicType
Test whether a given item conforms to this type

Specified by:
matchesItem in interface ItemType
Overrides:
matchesItem in class AtomicType
Parameters:
item - The item to be tested
Returns:
true if the item is an instance of this type; false otherwise

validateContent

public void validateContent(java.lang.CharSequence value,
                            NamespaceResolver nsResolver)
                     throws ValidationException
Check whether a given input string is valid according to this SimpleType

Overrides:
validateContent in class AtomicType
Parameters:
value - the input string to be checked
nsResolver - a namespace resolver used to resolve namespace prefixes if the type is namespace sensitive.
Throws:
ValidationException - if the content is invalid. This implementation of the method always throws a ValidationException, because external objects cannot be stored in nodes and cannot be validated

getSuperType

public ItemType getSuperType()
Description copied from class: AtomicType
Get the type from which this item type is derived by restriction. This is the supertype in the XPath type heirarchy, as distinct from the Schema base type: this means that the supertype of xs:boolean is xdt:anyAtomicType, whose supertype is item() (rather than xs:anySimpleType).

Specified by:
getSuperType in interface ItemType
Overrides:
getSuperType in class AtomicType
Returns:
the supertype, or null if this type is item()

getFingerprint

public int getFingerprint()
Description copied from class: SchemaType
Get the fingerprint of the name of this type

Overrides:
getFingerprint in class SchemaType
Returns:
the fingerprint. Returns -1 for an anonymous type.

toString

public java.lang.String toString()
Description copied from class: AtomicType
Produce string representation for use in diagnostic output

Specified by:
toString in interface ItemType
Overrides:
toString in class AtomicType