org.basex.query.expr
Class Catch

java.lang.Object
  extended by org.basex.query.ExprInfo
      extended by org.basex.query.expr.Expr
          extended by org.basex.query.expr.Single
              extended by org.basex.query.expr.Catch

public final class Catch
extends Single

Catch clause.

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

Field Summary
 
Fields inherited from class org.basex.query.expr.Single
expr
 
Constructor Summary
Catch(Expr ct, QNm[] c, Var v1, Var v2, Var v3)
          Constructor.
 
Method Summary
 Iter iter(QueryContext ctx, QueryException e)
          Catch iterator.
 Expr remove(Var v)
          Removes the specified variable in a sub expression.
 java.lang.String toString()
           
 boolean uses(Expr.Use use, QueryContext ctx)
          Indicates if an expression uses the specified type.
 
Methods inherited from class org.basex.query.expr.Single
comp, plan
 
Methods inherited from class org.basex.query.expr.Expr
addText, atomic, checkCtx, checkDbl, checkItr, duplicates, e, ebv, i, indexAccessible, indexEquivalent, iter, removable, returned, sameAs, size, test
 
Methods inherited from class org.basex.query.ExprInfo
color, info, name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Catch

public Catch(Expr ct,
             QNm[] c,
             Var v1,
             Var v2,
             Var v3)
Constructor.

Parameters:
ct - catch expression
c - supported error codes
v1 - first variable
v2 - second variable
v3 - third variable
Method Detail

iter

public Iter iter(QueryContext ctx,
                 QueryException e)
          throws QueryException
Catch iterator.

Parameters:
ctx - query context
e - thrown exception
Returns:
resulting item
Throws:
QueryException - evaluation exception

uses

public boolean uses(Expr.Use use,
                    QueryContext ctx)
Description copied from class: Expr
Indicates if an expression uses the specified type. Called by the compiler to perform certain optimizations. true is returned by default and thus assumed as "worst-case".

Overrides:
uses in class Single
Parameters:
use - use type to be checked
ctx - query context
Returns:
result of check

remove

public Expr remove(Var v)
Description copied from class: Expr
Removes the specified variable in a sub expression.

Overrides:
remove in class Single
Parameters:
v - variable to be removed
Returns:
expression with removed variable

toString

public java.lang.String toString()
Specified by:
toString in class ExprInfo