de.fuberlin.wiwiss.d2rq.fastpath
Class ConstraintHandler

java.lang.Object
  extended by de.fuberlin.wiwiss.d2rq.fastpath.ConstraintHandler

public class ConstraintHandler
extends Object

Handles variable node constraints for a TripleQuery conjunction. Assumption: Bound variables in conjunction allready have been bound. (This code could as well be kept in PatternQueryCombiner.)

Version:
$Id: ConstraintHandler.java,v 1.1 2006/09/18 16:59:26 cyganiak Exp $
Author:
jgarbers

Nested Class Summary
 class ConstraintHandler.NodeMakerIterator
          Iterates over all the nodes of a triple conjunction.
 
Field Summary
 VariableBindings bindings
           
 boolean possible
           
 Map variableToConstraint
          Mapping between a variable (Node) and its NodeConstraints.
 
Constructor Summary
ConstraintHandler()
           
 
Method Summary
 void addConstraintsToSQL(SelectStatementBuilder sql)
          Creates SQL code for the node constraints.
 void makeConstraints()
          Creates Node constraints for all shared Bind variables.
 ConstraintHandler.NodeMakerIterator makeNodeMakerIterator(Set indexSet)
           
 void setRDQLConstraints(Collection rdqlConstraints)
           
 void setTripleQueryConjunction(RDFRelation[] conjunction)
           
 void setVariableBindings(VariableBindings bindings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

possible

public boolean possible

bindings

public VariableBindings bindings

variableToConstraint

public Map variableToConstraint
Mapping between a variable (Node) and its NodeConstraints.

Constructor Detail

ConstraintHandler

public ConstraintHandler()
Method Detail

setVariableBindings

public void setVariableBindings(VariableBindings bindings)

setTripleQueryConjunction

public void setTripleQueryConjunction(RDFRelation[] conjunction)

setRDQLConstraints

public void setRDQLConstraints(Collection rdqlConstraints)

makeConstraints

public void makeConstraints()
Creates Node constraints for all shared Bind variables. Iterates over the positions, where shared Bind variables occour until no more constraint information is derived.


addConstraintsToSQL

public void addConstraintsToSQL(SelectStatementBuilder sql)
Creates SQL code for the node constraints.

Parameters:
sql - contains both the places where to store expressions and the methods, how to format them.

makeNodeMakerIterator

public ConstraintHandler.NodeMakerIterator makeNodeMakerIterator(Set indexSet)