public abstract class ExternalObjectType extends Object
Constructor and Description |
---|
ExternalObjectType() |
Modifier and Type | Method and Description |
---|---|
String |
generateJavaScriptItemTypeAcceptor(String errorCode)
Generate Javascript code to convert a supplied Javascript value to this item type,
if conversion is possible, or throw an error otherwise.
|
String |
generateJavaScriptItemTypeTest(ItemType knownToBe)
Generate Javascript code to test whether an item conforms to this item type
|
abstract String |
getName()
Get the name of this type.
|
abstract int |
getPrimitiveType()
Return the integer fingerprint of the underlying primitive type
|
abstract 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 String getName()
public abstract 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 String generateJavaScriptItemTypeTest(ItemType knownToBe) throws XPathException
knownToBe
- XPathException
- if JS code cannot be generated for this item type, for example because
the test is schema-aware.public String generateJavaScriptItemTypeAcceptor(String errorCode) throws XPathException
errorCode
- the error to be thrown if conversion is not possibleXPathException
Copyright (c) 2004-2017 Saxonica Limited. All rights reserved.