org.basex.query.expr
Class IndexAccess

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.IndexAccess

public final class IndexAccess
extends Single

This index class retrieves texts and attribute values from the index.

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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.basex.query.expr.Expr
Expr.Use
 
Field Summary
 
Fields inherited from class org.basex.query.expr.Single
expr
 
Constructor Summary
IndexAccess(Expr e, Data.Type t, IndexContext ic)
          Constructor.
 
Method Summary
 String color()
          Returns a color string for the expression.
 boolean duplicates(QueryContext ctx)
          Returns true if the expression might yield duplicates and unsorted results.
 Iter iter(QueryContext ctx)
          Evaluates the expression and returns an iterator on the resulting items.
 void plan(Serializer ser)
          Recursively sends the abstract syntax of this expression to the specified serializer.
 Return returned(QueryContext ctx)
          Indicates the return type of an expression.
 boolean sameAs(Expr cmp)
          Checks the current and specified expression for equality.
 String toString()
           
 
Methods inherited from class org.basex.query.expr.Single
comp, remove, uses
 
Methods inherited from class org.basex.query.expr.Expr
addText, atomic, checkCtx, checkDbl, checkItr, e, ebv, i, indexAccessible, indexEquivalent, removable, size, test, v
 
Methods inherited from class org.basex.query.ExprInfo
info, name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexAccess

public IndexAccess(Expr e,
                   Data.Type t,
                   IndexContext ic)
Constructor.

Parameters:
e - index expression
t - access type
ic - index context
Method Detail

iter

public Iter iter(QueryContext ctx)
          throws QueryException
Description copied from class: Expr
Evaluates the expression and returns an iterator on the resulting items. If this method is not overwritten, Expr.atomic(org.basex.query.QueryContext) must be implemented.

Overrides:
iter in class Expr
Parameters:
ctx - query context
Returns:
resulting item
Throws:
QueryException - query exception

returned

public Return returned(QueryContext ctx)
Description copied from class: Expr
Indicates the return type of an expression. Called by the compiler to check if expressions can be reformulated. null is returned by default.

Overrides:
returned in class Expr
Parameters:
ctx - query context
Returns:
result of check

duplicates

public boolean duplicates(QueryContext ctx)
Description copied from class: Expr
Returns true if the expression might yield duplicates and unsorted results.

Overrides:
duplicates in class Expr
Parameters:
ctx - query context
Returns:
result of check

sameAs

public boolean sameAs(Expr cmp)
Description copied from class: Expr
Checks the current and specified expression for equality.

Overrides:
sameAs in class Expr
Parameters:
cmp - expression to be compared
Returns:
result of check

color

public String color()
Description copied from class: ExprInfo
Returns a color string for the expression.

Overrides:
color in class ExprInfo
Returns:
color

plan

public void plan(Serializer ser)
          throws IOException
Description copied from class: ExprInfo
Recursively sends the abstract syntax of this expression to the specified serializer.

Overrides:
plan in class Single
Parameters:
ser - serializer
Throws:
IOException - I/O exception

toString

public String toString()
Specified by:
toString in class ExprInfo