net.sf.saxon.dotnet
Class DotNetObjectValue

java.lang.Object
  extended by net.sf.saxon.value.Value
      extended by net.sf.saxon.value.AtomicValue
          extended by net.sf.saxon.value.ObjectValue
              extended by 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

Field Summary
 
Fields inherited from class net.sf.saxon.value.AtomicValue
typeLabel
 
Fields inherited from class net.sf.saxon.value.Value
EMPTY_CLASS_ARRAY, INDETERMINATE_ORDERING
 
Fields inherited from interface net.sf.saxon.om.ValueRepresentation
EMPTY_VALUE_ARRAY
 
Constructor Summary
DotNetObjectValue(java.lang.Object value)
           
 
Method Summary
 ConversionResult convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
          Convert to target data type
 ItemType getItemType(TypeHierarchy th)
          Determine the data type of the expression
 
Methods inherited from class net.sf.saxon.value.ObjectValue
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, convertToJava, fromItem, getCanonicalLexicalRepresentation, getIterator, iterate, makeQNameValue, reduce, stringToNumber
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DotNetObjectValue

public DotNetObjectValue(java.lang.Object value)
Method Detail

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