org.d2rq.lang
Class JoinSetParser

java.lang.Object
  extended by org.d2rq.lang.JoinSetParser

public class JoinSetParser
extends Object

Parses join condition strings as used in d2rq:join. Groups multiple condition that connect the same two table (multi-column keys) into a single join ColumnListEquality expression. Join conditions have the format: [schema.]table.column OP [schema.].table.column Where OP is either <= or = or =>. The arrow-style operators assert that a foreign key relationship exists along the join. The asserted foreign keys can be retrieved as well.


Nested Class Summary
static class JoinSetParser.Direction
           
 
Constructor Summary
JoinSetParser(Collection<String> joinExpressions)
           
 
Method Summary
 Map<ForeignKey,TableName> getAssertedForeignKeys()
           
 Set<ColumnListEquality> getExpressions()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinSetParser

public JoinSetParser(Collection<String> joinExpressions)
Parameters:
joinExpressions - a collection of D2RQ-style join expressions
Method Detail

getExpressions

public Set<ColumnListEquality> getExpressions()

getAssertedForeignKeys

public Map<ForeignKey,TableName> getAssertedForeignKeys()

run

public void run()