de.fuberlin.wiwiss.d2rq.algebra
Class TripleRelation

java.lang.Object
  extended by de.fuberlin.wiwiss.d2rq.algebra.TripleRelation
All Implemented Interfaces:
RDFRelation, TripleMaker

public class TripleRelation
extends Object
implements RDFRelation

A respresentation of a d2rq:PropertyBridge, describing how a set of virtual triples are to be obtained from a database. The virtual subjects, predicates and objects are generated by NodeMakers.

Version:
$Id: TripleRelation.java,v 1.2 2007/10/22 10:21:16 cyganiak Exp $
Author:
Chris Bizer chris@bizer.de, Richard Cyganiak (richard@cyganiak.de)

Field Summary
 
Fields inherited from interface de.fuberlin.wiwiss.d2rq.algebra.RDFRelation
EMPTY
 
Constructor Summary
TripleRelation(Relation baseRelation, NodeMaker subjectMaker, NodeMaker predicateMaker, NodeMaker objectMaker)
           
 
Method Summary
 Relation baseRelation()
           
 boolean isUnique()
           
 Collection makeTriples(ResultRow row)
           
 NodeMaker namedNodeMaker(String name)
           
 Collection names()
           
 NodeMaker nodeMaker(int index)
          TODO Get rid of RDFRelation.nodeMaker(index)
 Set projectionColumns()
           
 RDFRelation renameColumns(ColumnRenamer renamer)
           
 RDFRelation selectTriple(Triple t)
           
 String toString()
           
 RDFRelation withPrefix(int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TripleRelation

public TripleRelation(Relation baseRelation,
                      NodeMaker subjectMaker,
                      NodeMaker predicateMaker,
                      NodeMaker objectMaker)
Method Detail

baseRelation

public Relation baseRelation()
Specified by:
baseRelation in interface RDFRelation

isUnique

public boolean isUnique()
Specified by:
isUnique in interface RDFRelation

projectionColumns

public Set projectionColumns()
Specified by:
projectionColumns in interface RDFRelation

nodeMaker

public NodeMaker nodeMaker(int index)
Description copied from interface: RDFRelation
TODO Get rid of RDFRelation.nodeMaker(index)

Specified by:
nodeMaker in interface RDFRelation
Parameters:
index - 0, 1 or 2
Returns:
The subject, predicate or object NodeMaker

toString

public String toString()
Overrides:
toString in class Object

withPrefix

public RDFRelation withPrefix(int index)

makeTriples

public Collection makeTriples(ResultRow row)
Specified by:
makeTriples in interface TripleMaker

selectTriple

public RDFRelation selectTriple(Triple t)
Specified by:
selectTriple in interface RDFRelation

renameColumns

public RDFRelation renameColumns(ColumnRenamer renamer)
Specified by:
renameColumns in interface RDFRelation

names

public Collection names()
Specified by:
names in interface RDFRelation

namedNodeMaker

public NodeMaker namedNodeMaker(String name)
Specified by:
namedNodeMaker in interface RDFRelation