Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.xsl.process
Class ResultTreeFragment

    java.lang.Object
      com.novell.xsl.process.ResultTreeFragment

All Implemented Interfaces:
  ExpressionValue

    public class ResultTreeFragment

extends Object
implements ExpressionValue

Implements the XSLT result-tree-fragment type.

Field Summary

Fields inherited from interface com.novell.xml.xpath.ExpressionValue
`BOOLEAN, EXTENDED, NATIVE, NODE_SET, NUMBER, STRING`

Constructor Summary
`ResultTreeFragment(Node root)` Construct a ResultTreeFragment object using the passed node as the root of the fragment.

Method Summary
`void` | `castFrom(Object type)` Convert from a different type of expression value to the type of the class implementing the ExpressionValue interface.
`void` | `dump(PrintWriter writer)` Output a human-readable form for the value
`static Class` | `getArgType()` Return the Class object for objects of this type.
`boolean` | `getBooleanValue()` Return boolean value of expression value (will convert to boolean if value is not of type boolean)
`Object` | `getNativeValue()` return the underlying native value (java.lang.Boolean, java.lang.Double, etc.)
`NodeSet` | `getNodeSetValue()` Return node-set value of this ExpressionValue.
`double` | `getNumberValue()` Return numeric value of ExpressionValue.
`Node` | `getRoot()` Return the root of the result tree fragment.
`String` | `getStringValue()` Return string value of this ExpressionValue.
`int` | `getValueType()` Return type of expression value

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ResultTreeFragment

    public ResultTreeFragment(Node root)

  Construct a ResultTreeFragment object using the passed node as the root of the fragment.

  Parameters:
    `root` - The result tree fragment root (may be null).

Method Detail

### getArgType

    public static Class getArgType()

  Return the Class object for objects of this type. This is used for FunctionSignature objects.

  Returns:
    The Class object corresponding to NodeSet

### getValueType

    public int getValueType()

  Return type of expression value

  Specified by:
    `getValueType` in interface `ExpressionValue`
  Returns:
    ExpressionValue.BOOLEAN, ExpressionValue.NUMBER, etc.

### castFrom

    public void castFrom(Object type)
                  throws XPathConversionException

  Convert from a different type of expression value to the type of the class implementing the ExpressionValue interface. This is used primarily for converting parameters for function calls. The XPath basic types (Boolean, Number, String, Node-set) use the required methods of ExpressionValue to perform this function. Extended types must implement this according to their language definitions.

  Specified by:
    `castFrom` in interface `ExpressionValue`
  Parameters:
    `type` - The object to convert from.
  Throws:
    `XPathConversionException`

### getBooleanValue

    public boolean getBooleanValue()
                            throws XPathConversionException

  Return boolean value of expression value (will convert to boolean if value is not of type boolean)

  Specified by:
    `getBooleanValue` in interface `ExpressionValue`
  Returns:
    true or false
  Throws:
    `XPathConversionException`

### getNumberValue

    public double getNumberValue()
                          throws XPathConversionException

  Return numeric value of ExpressionValue. Will convert to a number if value is not of NUMBER type

  Specified by:
    `getNumberValue` in interface `ExpressionValue`
  Returns:
    numeric value
  Throws:
    `XPathConversionException`

### getStringValue

    public String getStringValue()

  Return string value of this ExpressionValue. Will convert to a string if underlying type is not string.

  Specified by:
    `getStringValue` in interface `ExpressionValue`
  Returns:
    String value of ExpressionValue

### getNodeSetValue

    public NodeSet getNodeSetValue()
                            throws XPathConversionException

  Return node-set value of this ExpressionValue. Will NOT convert an underlying type to a node-set.

  Specified by:
    `getNodeSetValue` in interface `ExpressionValue`
  Throws:
    `XPathConversionException`

### getNativeValue

    public Object getNativeValue()

  return the underlying native value (java.lang.Boolean, java.lang.Double, etc.)

  Specified by:
    `getNativeValue` in interface `ExpressionValue`
  Returns:
    The native java class that is the value

### dump

    public void dump(PrintWriter writer)

  Output a human-readable form for the value

  Specified by:
    `dump` in interface `ExpressionValue`
  Parameters:
    `writer` - Output device

### getRoot

    public Node getRoot()

  Return the root of the result tree fragment.

  Returns:
    The root node of the result tree fragment.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD