de.fuberlin.wiwiss.d2rq.algebra
Interface RelationalOperators

All Known Subinterfaces:
Relation
All Known Implementing Classes:
MutableRelation, RelationImpl

public interface RelationalOperators


Method Summary
 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.
 

Method Detail

select

Relation select(Map attributeConditions)

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.

Parameters:
attributeConditions - A map from Attributes to Strings
Returns:
A relation whose tuples satisfy the conditions

renameColumns

Relation renameColumns(ColumnRenamer renamer)

Applies the rename operator to this relation.

Renames of attributes that don't exist in the relation are ignored.

Parameters:
renamer - A map from original to replacement names
Returns:
A relation in which all occurrences of the old names have been replaced with the new ones