Interface ObjectConverter

    • Method Detail

      • toObject

        java.lang.Object toObject​(XQItemAccessor xqItemAccessor)
                           throws XQException
        Convert an Item to a Java object
        Parameters:
        xqItemAccessor - the XQJ object representing the item to be converted
        Returns:
        the Java object that results from the conversion
        Throws:
        XQException - if no conversion is possible
      • convertToItem

        Item convertToItem​(java.lang.Object value)
                    throws XQException
        Convert a Java object to an Item, when no information is available about the required type
        Parameters:
        value - the supplied Java object. If null is supplied, null is returned.
        Returns:
        the Item that results from the conversion
        Throws:
        XQException - if the Java object cannot be converted to an XQItem
      • convertToItem

        Item convertToItem​(java.lang.Object value,
                           XQItemType type)
                    throws XQException
        Convert a Java object to an Item, when a required type has been specified. Note that Saxon only calls this method when none of the standard conversions defined in the XQJ specification is able to handle the object.
        Parameters:
        value - the supplied Java object. If null is supplied, null is returned.
        type - the required XPath data type
        Returns:
        the Item that results from the conversion
        Throws:
        XQException - if the Java object cannot be converted to an XQItem