net.sf.saxon.dotnet
Class DotNetObjectValue
java.lang.Object
net.sf.saxon.value.Value
net.sf.saxon.value.AtomicValue
net.sf.saxon.value.ObjectValue
net.sf.saxon.dotnet.DotNetObjectValue
- All Implemented Interfaces:
- java.io.Serializable, PullEvent, SequenceIterable, GroundedValue, Item, ValueRepresentation, ConversionResult
public class DotNetObjectValue
- extends ObjectValue
An XPath value that encapsulates a .NET object. Such a value can only be obtained by
calling an extension function that returns it.
- See Also:
- Serialized Form
Methods inherited from class net.sf.saxon.value.ObjectValue |
convertToJava, copyAsSubType, displayTypeName, effectiveBooleanValue, equals, getObject, getPrimitiveType, getSchemaComparable, getStringValue, getXPathComparable, hashCode, setValue |
Methods inherited from class net.sf.saxon.value.AtomicValue |
asAtomic, checkPermittedContents, convert, convert, getCardinality, getComponent, getLength, getStringValueCS, getTypedValue, getTypeLabel, isNaN, itemAt, iterate, process, setTypeLabel, subsequence, toString |
Methods inherited from class net.sf.saxon.value.Value |
asItem, asItem, asIterator, asValue, convertJavaObjectToXPath, convertToJava, fromItem, getCanonicalLexicalRepresentation, getIterator, iterate, makeQNameValue, reduce, stringToNumber |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
DotNetObjectValue
public DotNetObjectValue(java.lang.Object value)
convertPrimitive
public ConversionResult convertPrimitive(BuiltInAtomicType requiredType,
boolean validate,
XPathContext context)
- Convert to target data type
- Overrides:
convertPrimitive
in class ObjectValue
- Parameters:
requiredType
- the required atomic type. This must either be a primitive type, or a built-in
type derived from the same primitive type as this atomic value.validate
- true if validation is required. If set to false, the caller guarantees that
the value is valid for the target data type, and that further validation
is therefore not required.
Note that a validation failure may be reported even if validation was not requested.context
- The conversion context to be used. This is required at present only when converting to
xs:Name or similar types: it determines the NameChecker to be used.
- Returns:
- the result of the conversion, if successful. If unsuccessful, the value returned
will be a ValidationFailure. The caller must check for this condition. No exception is thrown, instead
the exception information will be encapsulated within the ValidationFailure.
getItemType
public ItemType getItemType(TypeHierarchy th)
- Determine the data type of the expression
- Overrides:
getItemType
in class ObjectValue
- Parameters:
th
- the type hierarchy cache
- Returns:
- Type.OBJECT