nenok.lc.constr
Class Algorithm

java.lang.Object
  extended by nenok.lc.constr.Algorithm
Direct Known Subclasses:
Deserializer, Elimination

public abstract class Algorithm
extends Object

The join tree construction algorithm base interface. This is the head class of a realization of the STRATEGY design pattern, allowing that the same type of join tree architecture can be constructed with different construction algorithms.

Version:
1.1
Author:
Marc Pouly

Constructor Summary
Algorithm()
           
 
Method Summary
abstract  Node buildTree(JoinTree.Construction data)
          Method to build join trees.
 double getConstructionTime()
           
abstract  String getName()
           
static void optimize(Node node, JoinTree.Construction data)
          Eliminates node chains within a jointree.
 void setConstructionTime(double time)
          Sets the construction time of the last constructed join tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Algorithm

public Algorithm()
Method Detail

buildTree

public abstract Node buildTree(JoinTree.Construction data)
                        throws ConstrException,
                               RemoteException
Method to build join trees. The JoinTree.Construction object given as argument contains all necessary informations for the construction process, this is: the knowledgebase, a set of queries that need to be covered by the join tree and the Node builder method for the type of architecture to be constructed.

Parameters:
data - Object that contains all necessary information to build join trees.
Returns:
The root node of the constructed join tree.
Throws:
ConstrException - Exceptions caused by the jointree construction process.
RemoteException - Exceptions caused by communication problems during the jointree construction process.

getConstructionTime

public double getConstructionTime()
Returns:
The construction time of the last constructed join tree.

setConstructionTime

public void setConstructionTime(double time)
Sets the construction time of the last constructed join tree. This method is called by the constructor of JoinTree.

Parameters:
time - The construction time.

getName

public abstract String getName()
Returns:
The name of the construction algorithm.

optimize

public static void optimize(Node node,
                            JoinTree.Construction data)
Eliminates node chains within a jointree.

Parameters:
node - The root node of the subtree that has to be optimized.
data - The construction data that was used to construct the tree.