public abstract class ExternalObjectType extends AnyExternalObjectType
ItemType.WithSequenceTypeCache
THE_INSTANCE
Constructor and Description |
---|
ExternalObjectType() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateJavaScriptItemTypeAcceptor(java.lang.String errorCode,
int targetVersion)
Generate Javascript code to convert a supplied Javascript value to this item type,
if conversion is possible, or throw an error otherwise.
|
java.lang.String |
generateJavaScriptItemTypeTest(ItemType knownToBe,
int targetVersion)
Generate Javascript code to test whether an item conforms to this item type
|
abstract java.lang.String |
getName()
Get the name of this type.
|
abstract java.lang.String |
getTargetNamespace()
Get the target namespace of this type.
|
abstract StructuredQName |
getTypeName()
Get the name of this type
|
boolean |
isExternalType()
Ask whether this is an external type
|
boolean |
isPlainType()
Ask whether this is a plain type (a type whose instances are always atomic values)
|
getAlphaCode, getAtomizedItemType, getGenre, getPrimitiveItemType, getPrimitiveType, getUType, isAtomicType, isAtomizable, matches
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
explainMismatch, isTrueItemType, toExportString, toString
public abstract java.lang.String getName()
public abstract java.lang.String getTargetNamespace()
NamespaceConstant.JAVA_TYPE
.
For .net it is always NamespaceConstant.DOT_NET_TYPE
public boolean isExternalType()
public abstract StructuredQName getTypeName()
public final boolean isPlainType()
isPlainType
in interface ItemType
isPlainType
in class AnyExternalObjectType
public java.lang.String generateJavaScriptItemTypeTest(ItemType knownToBe, int targetVersion) throws XPathException
generateJavaScriptItemTypeTest
in interface ItemType
generateJavaScriptItemTypeTest
in class AnyExternalObjectType
knownToBe
- targetVersion
- XPathException
- if JS code cannot be generated for this item type, for example because
the test is schema-aware.public java.lang.String generateJavaScriptItemTypeAcceptor(java.lang.String errorCode, int targetVersion) throws XPathException
generateJavaScriptItemTypeAcceptor
in interface ItemType
generateJavaScriptItemTypeAcceptor
in class AnyExternalObjectType
errorCode
- the error to be thrown if conversion is not possibletargetVersion
- the version of Saxon-JSXPathException
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.