de.fuberlin.wiwiss.d2rq.algebra
Class UnionOverSameBase
java.lang.Object
de.fuberlin.wiwiss.d2rq.algebra.UnionOverSameBase
- All Implemented Interfaces:
- RDFRelation, TripleMaker
public class UnionOverSameBase
- extends Object
- implements RDFRelation
- Version:
- $Id: UnionOverSameBase.java,v 1.11 2006/11/02 21:15:43 cyganiak Exp $
- Author:
- Richard Cyganiak (richard@cyganiak.de)
Fields inherited from interface de.fuberlin.wiwiss.d2rq.algebra.RDFRelation |
EMPTY |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnionOverSameBase
public UnionOverSameBase(List baseRelations)
isSameBase
public static boolean isSameBase(RDFRelation first,
RDFRelation second)
- Checks if two
RDFRelation
s can be combined into
a single SQL statement. Relations can be combined iff
they access the same database and they contain exactly the same
joins and WHERE clauses. If they both contain no joins, they
must contain only columns from the same table.
TODO This should be done via Relation.equals?
- Returns:
- true if both arguments are combinable
baseRelation
public Relation baseRelation()
- Specified by:
baseRelation
in interface RDFRelation
projectionColumns
public Set projectionColumns()
- Specified by:
projectionColumns
in interface RDFRelation
isUnique
public boolean isUnique()
- Specified by:
isUnique
in interface RDFRelation
makeTriples
public Collection makeTriples(ResultRow row)
- Specified by:
makeTriples
in interface TripleMaker
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
selectTriple
public RDFRelation selectTriple(Triple triplePattern)
- 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