MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.opt.expr
Class DTerm

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

public final class DTerm
extends Term

Represents a disjunction term, with consists of conjunction terms - needed for the max indexes


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
DTerm()
           
 
Method Summary
 void addAll(DTerm dList)
          Combines two disjunctin terms to one
 void addCTerm(CTerm cList)
          Adds a new conjunction term
 DTerm combineLists(DTerm l2)
          Merges two dList in the form that every element from one list is combined with every element in the second list.
 int evaluate(int level)
          Checks the condition and also removes false literals
 CTerm getCTerm(int i)
          Returns the conjunction term at position i
 int reset(int level)
          Resets the evaluation of the conjunction term up to a certain level of dependency
 void sort()
          Sortts the conjunctions terms according to the dependencies
 
Methods inherited from class ch.ethz.mxquery.opt.expr.Term
add, addAll, clone, get, size, 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

DTerm

public DTerm()
Method Detail

addCTerm

public void addCTerm(CTerm cList)
Adds a new conjunction term

Parameters:
cList -

addAll

public void addAll(DTerm dList)
Combines two disjunctin terms to one

Parameters:
dList -

getCTerm

public CTerm getCTerm(int i)
Returns the conjunction term at position i

Parameters:
i -
Returns:
the i-th CTerm

sort

public void sort()
Sortts the conjunctions terms according to the dependencies

Overrides:
sort in class Term

combineLists

public DTerm combineLists(DTerm l2)
Merges two dList in the form that every element from one list is combined with every element in the second list. If one of the lists is empty, the other list is returned;

Parameters:
l2 -
Returns:
the combination of the lists

evaluate

public int evaluate(int level)
             throws MXQueryException
Checks the condition and also removes false literals

Specified by:
evaluate in class Term
Parameters:
level - Up to this dependency level the unit is evaluated
Returns:
false, true or unknown
Throws:
MXQueryException

reset

public int reset(int level)
Resets the evaluation of the conjunction term up to a certain level of dependency

Specified by:
reset in class Term
Returns:
UNKNOWN, TRUE or FALSE

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich