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

## org.basex.query.xquery.expr
Class Expr

    java.lang.Object
      org.basex.query.xquery.expr.Expr

Direct Known Subclasses:
  Arr, Case, Cast, Castable, CComm, CDoc, Clc, CmpG, CmpN, CmpV, Context, CPI, CText, FLWOR, ForLet, FTCont, FTNot, FTOptions, FTSelect, FTWords, Fun, If, Instance, Item, Ord, Order, Range, Satisfy, Treat, Unary, VarCall

    public abstract class Expr

extends java.lang.Object

Abstract Expression.

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

Field Summary
`Type` | `type` Data type.

Constructor Summary
`Expr()`

Method Summary
`java.lang.String` | `cls()` Returns the simplified class name (for debugging).
`abstract Expr` | `comp(XQContext ctx)` Optimizes and compiles the expression tree.
`boolean` | `d()` Checks if this is a duration.
`boolean` | `e()` Returns if this is an empty sequence.
`abstract Item` | `eval(XQContext ctx)` Evaluates the expression and returns the resulting item.
`boolean` | `i()` Checks if this is an item.
`abstract java.lang.String` | `info()` Returns a string description of the expression.
`boolean` | `n()` Checks if this is a numeric item.
`boolean` | `node()` Checks if this is a node.
`boolean` | `s()` Checks if this is a string item.
`int` | `size()` Returns the sequence size or 0.
`byte[]` | `str()` Returns an atomized string.
`abstract java.lang.String` | `toString()`
`boolean` | `u()` Checks if this is an untyped item.

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

Field Detail

### type

    public Type type

  Data type.

Constructor Detail

### Expr

    public Expr()

Method Detail

### cls

    public final java.lang.String cls()

  Returns the simplified class name (for debugging).

  Returns:
    class name

### comp

    public abstract Expr comp(XQContext ctx)
                       throws XQException

  Optimizes and compiles the expression tree.

  Parameters:
    `ctx` - query context
  Returns:
    optimized Expression
  Throws:
    `XQException` - evaluation exception

### d

    public boolean d()

  Checks if this is a duration.

  Returns:
    result of check

### e

    public boolean e()

  Returns if this is an empty sequence.

  Returns:
    result of check

### eval

    public abstract Item eval(XQContext ctx)
                       throws XQException

  Evaluates the expression and returns the resulting item.

  Parameters:
    `ctx` - query context
  Returns:
    resulting item
  Throws:
    `XQException` - evaluation exception

### i

    public boolean i()

  Checks if this is an item.

  Returns:
    result of check

### info

    public abstract java.lang.String info()

  Returns a string description of the expression. Contrary to the `toString()` method, the current expressions aren't included in the output.

  Returns:
    result of check

### n

    public boolean n()

  Checks if this is a numeric item.

  Returns:
    result of check

### node

    public boolean node()

  Checks if this is a node.

  Returns:
    result of check

### s

    public boolean s()

  Checks if this is a string item.

  Returns:
    result of check

### size

    public int size()

  Returns the sequence size or 0.

  Returns:
    result of check

### str

    public byte[] str()

  Returns an atomized string.

  Returns:
    string representation

### toString

    public abstract java.lang.String toString()

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

### u

    public boolean u()

  Checks if this is an untyped item.

  Returns:
    result of check

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