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.Simple
              extended by org.basex.query.expr.IndexAccess

public final class IndexAccess
extends Simple

This index class retrieves attribute values from the index.

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

Constructor Summary
IndexAccess(IndexToken i, IndexContext ic)
          Constructor.
 
Method Summary
 java.lang.String color()
          Returns a string description of 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.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.expr.Simple
comp, uses
 
Methods inherited from class org.basex.query.expr.Expr
addText, atomic, checkCtx, checkDbl, checkItr, e, ebv, i, indexAccessible, indexEquivalent, removable, remove, sameAs, size, test
 
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(IndexToken i,
                   IndexContext ic)
Constructor.

Parameters:
i - index reference
ic - index context
Method Detail

iter

public Iter iter(QueryContext ctx)
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

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

color

public java.lang.String color()
Description copied from class: ExprInfo
Returns a string description of the expression. Contrary to the ExprInfo.toString() method, the current expressions aren't included in the output.

Overrides:
color in class Simple
Returns:
result of check

plan

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

Overrides:
plan in class Simple
Parameters:
ser - serializer
Throws:
java.io.IOException - exception

toString

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