de.fuberlin.wiwiss.d2rq.algebra
Class NodeRelation
java.lang.Object
de.fuberlin.wiwiss.d2rq.algebra.NodeRelation
- Direct Known Subclasses:
- TripleRelation
public class NodeRelation
- extends Object
A Relation
associated with a number of named NodeMaker
s.
TODO: This is really just a Relation and a BindingMaker wrapped into one. Refactor as such?
- Author:
- Richard Cyganiak (richard@cyganiak.de)
TRUE
public static final NodeRelation TRUE
NodeRelation
public NodeRelation(Relation base,
Map<Var,NodeMaker> nodeMakers)
empty
public static NodeRelation empty(Set<Var> variables)
baseRelation
public Relation baseRelation()
variables
public Set<Var> variables()
nodeMaker
public NodeMaker nodeMaker(Var variables)
withPrefix
public NodeRelation withPrefix(int index)
renameSingleRelation
public NodeRelation renameSingleRelation(RelationName oldName,
RelationName newName)
extendWith
public NodeRelation extendWith(Binding binding)
- Joins this NodeRelation with a Binding. Any row in this
NodeRelation that is incompatible with the binding will be
dropped, and any compatible row will be extended with
FixedNodeMakers whose node is taken from the binding.
- Parameters:
binding
- A binding to join with this NodeRelation
- Returns:
- The joined NodeRelation
select
public NodeRelation select(Expression expression)
orderBy
public NodeRelation orderBy(Var variable,
boolean ascending)
limit
public NodeRelation limit(int limit)
toString
public String toString()
- Overrides:
toString
in class Object