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

## org.basex.query.xquery
Class XQResult

    java.lang.Object
      org.basex.query.xquery.XQResult

All Implemented Interfaces:
  Result

    public final class XQResult

extends java.lang.Object
implements Result

This is a container for XQuery results.

Author:
  Workgroup DBIS, University of Konstanz 2005-08, ISC License, Christian Gruen

Constructor Summary
`XQResult(XQContext c, SeqBuilder sb)` Constructor.

Method Summary
`Item` | `item()` Returns an item representation of the result.
`boolean` | `same(Result v)` Compares values for equality.
`void` | `serialize(Serializer ser)` Serializes the complete result.
`void` | `serialize(Serializer ser, int n)` Serializes the specified result.
`int` | `size()` Number of values, stored in the result instance.
`java.lang.String` | `toString()`
`Result` | `xpResult(Data data)` Converts nodes to an XPath result.

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

Constructor Detail

### XQResult

    public XQResult(XQContext c,
                    SeqBuilder sb)

  Constructor.

  Parameters:
    `c` - query context
    `sb` - result sequence

Method Detail

### size

    public int size()

  Number of values, stored in the result instance.

  Specified by:
    `size` in interface `Result`
  Returns:
    number of values

### same

    public boolean same(Result v)

  Compares values for equality.

  Specified by:
    `same` in interface `Result`
  Parameters:
    `v` - value to be compared
  Returns:
    true if values are equal

### serialize

    public void serialize(Serializer ser)
                   throws java.io.IOException

  Serializes the complete result.

  Specified by:
    `serialize` in interface `Result`
  Parameters:
    `ser` - serializer
  Throws:
    `java.io.IOException` - exception

### serialize

    public void serialize(Serializer ser,
                          int n)
                   throws java.io.IOException

  Serializes the specified result.

  Specified by:
    `serialize` in interface `Result`
  Parameters:
    `ser` - serializer
    `n` - number of result to serialize
  Throws:
    `java.io.IOException` - exception

### xpResult

    public Result xpResult(Data data)

  Converts nodes to an XPath result. If that's not possible, the XQuery value is returned.

  Parameters:
    `data` - data reference
  Returns:
    BaseX node set

### item

    public Item item()

  Returns an item representation of the result.

  Returns:
    item

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

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