public abstract class ExternalObjectType
extends java.lang.Object
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 int |
getPrimitiveType()
Return the integer fingerprint of the underlying primitive 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)
|
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()
public abstract int getPrimitiveType()
public java.lang.String generateJavaScriptItemTypeTest(ItemType knownToBe, int targetVersion) throws XPathException
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
errorCode
- the error to be thrown if conversion is not possibletargetVersion
- XPathException
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.