|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fuberlin.wiwiss.d2rq.algebra.MutableRelation
public class MutableRelation
Wraps a relation and allows it to be modified by relational operators. Normally, applying an operator to a relation results in a new object. This is impractical in some places. The MutableRelation solves this problem.
Field Summary | |
---|---|
static MutableRelation |
DUMMY
|
Constructor Summary | |
---|---|
MutableRelation(Relation initialState)
|
Method Summary | |
---|---|
Relation |
immutableSnapshot()
|
Relation |
renameColumns(ColumnRenamer renamer)
Applies the rename operator to this relation. |
Relation |
select(Map attributeConditions)
Applies the selection operator to this relation, using equality conditions on a number of attributes as the selection expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final MutableRelation DUMMY
Constructor Detail |
---|
public MutableRelation(Relation initialState)
Method Detail |
---|
public Relation immutableSnapshot()
public Relation renameColumns(ColumnRenamer renamer)
RelationalOperators
Applies the rename operator to this relation.
Renames of attributes that don't exist in the relation are ignored.
renameColumns
in interface RelationalOperators
renamer
- A map from original to replacement names
public Relation select(Map attributeConditions)
RelationalOperators
Applies the selection operator to this relation, using equality conditions on a number of attributes as the selection expression. The new relation will contain only tuples whose attribute values are equal to the string values in the argument map.
Selection on attributes that don't exist in the relation are considered to be always false and will cause an empty relation.
select
in interface RelationalOperators
attributeConditions
- A map from Attribute
s to Strings
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |