MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.opt.expr
Class ValueLiteral

java.lang.Object
  extended by ch.ethz.mxquery.opt.expr.LogicalUnit
      extended by ch.ethz.mxquery.opt.expr.Literal
          extended by ch.ethz.mxquery.opt.expr.ValueLiteral
All Implemented Interfaces:
Traversable, java.lang.Cloneable, java.lang.Comparable

public final class ValueLiteral
extends Literal

A value literal is a wrapper for any kind of iterator. The result is materialized with Tokens and returned


Field Summary
 
Fields inherited from class ch.ethz.mxquery.opt.expr.LogicalUnit
DEPENDENCY_END, DEPENDENCY_NO, DEPENDENCY_START, DEPENDENCY_STARTEND, INDEX_IMPOSSIBLE, INDEX_POSSIBLE, INDEX_RECOMMEND, RESET, RESULT_FALSE, RESULT_TRUE, RESULT_UNKNOWN
 
Constructor Summary
ValueLiteral(XDMIterator iter)
           
 
Method Summary
 void evaluate()
          Evaluates and materializes the result
 int evaluate(int dependency)
          Evaluates the literator up to a specific level.
 void evaluateExpectOneValue()
          Evaluates but expects only on atomic value
 java.lang.String getColumnName()
          Returns a name of a childIterator - if the variable depends on one directly;
 Token getToken()
          Normally used together with evaluateExpectOneValue().
 Token[] getValues()
          Returns all tokens from the evaluation.
 int reset()
           
 int reset(int level)
          Resets the logical unit up to a certain degree on variable dependency
 void setColumnName(java.lang.String name)
           
 
Methods inherited from class ch.ethz.mxquery.opt.expr.Literal
clone, getIter, traverse
 
Methods inherited from class ch.ethz.mxquery.opt.expr.LogicalUnit
addDependency, compareTo, getDependency, getDependencyName, getDependencyNb, getResult, isDependendOnEnd, isDependendOnStart, isIndexable, isLowerDependency, isLowerOrEqualDependency, setDependency, setIndexable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueLiteral

public ValueLiteral(XDMIterator iter)
Method Detail

evaluate

public void evaluate()
              throws MXQueryException
Evaluates and materializes the result

Throws:
MXQueryException

evaluateExpectOneValue

public void evaluateExpectOneValue()
                            throws MXQueryException
Evaluates but expects only on atomic value

Throws:
MXQueryException

evaluate

public int evaluate(int dependency)
Description copied from class: Literal
Evaluates the literator up to a specific level. The level distinguish how many dependencies should be evalueted

Overrides:
evaluate in class Literal
Parameters:
dependency - Up to this dependency level the unit is evaluated
Returns:
false, true or unknown

getValues

public Token[] getValues()
Returns all tokens from the evaluation.

Returns:
all XDM tokens generated by the evaluation

getToken

public Token getToken()
Normally used together with evaluateExpectOneValue(). Returns the evaluated materialized token

Returns:
the generated token

getColumnName

public java.lang.String getColumnName()
Returns a name of a childIterator - if the variable depends on one directly;

Returns:
the step name if present

setColumnName

public void setColumnName(java.lang.String name)

reset

public int reset(int level)
Description copied from class: LogicalUnit
Resets the logical unit up to a certain degree on variable dependency

Overrides:
reset in class LogicalUnit
Returns:
UNKNOWN, TRUE or FALSE

reset

public int reset()

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich