de.fuberlin.wiwiss.d2rq.algebra
Class CompatibleRelationGroup

java.lang.Object
  extended by de.fuberlin.wiwiss.d2rq.algebra.CompatibleRelationGroup

public class CompatibleRelationGroup
extends Object

A group of Relations that can be combined into a single relation without changing the semantics of NodeMakers. Relations can be combined if they access the same database and they contain exactly the same joins. If they both contain no joins, they must contain only columns from the same table. Relations that just differ in their WHERE clause (condition) can still be combined, but require that the new relation has the disjunction (OR) of all conditions as a WHERE clause, and the individual conditions must be added to the SELECT list (as ProjectionSpecs) so that bindings are generated only if that clause is TRUE TODO: Should check if the BindingMaker already has a condition?

Author:
Richard Cyganiak (richard@cyganiak.de)

Constructor Summary
CompatibleRelationGroup()
           
 
Method Summary
 void addBindingMaker(Relation relation, BindingMaker bindingMaker)
           
 void addRelation(Relation relation)
           
 Relation baseRelation()
           
 Collection<BindingMaker> bindingMakers()
           
static Collection<CompatibleRelationGroup> groupNodeRelations(Collection<? extends NodeRelation> nodeRelations)
           
 boolean isCompatible(Relation otherRelation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompatibleRelationGroup

public CompatibleRelationGroup()
Method Detail

groupNodeRelations

public static Collection<CompatibleRelationGroup> groupNodeRelations(Collection<? extends NodeRelation> nodeRelations)

isCompatible

public boolean isCompatible(Relation otherRelation)

addRelation

public void addRelation(Relation relation)

addBindingMaker

public void addBindingMaker(Relation relation,
                            BindingMaker bindingMaker)

baseRelation

public Relation baseRelation()

bindingMakers

public Collection<BindingMaker> bindingMakers()