org.jrdf.query.relation.operation.mem.project
Class ProjectImpl

java.lang.Object
  extended by org.jrdf.query.relation.operation.mem.project.ProjectImpl
All Implemented Interfaces:
Project

public class ProjectImpl
extends Object
implements Project

Implements restrict by going through the relation and removing the columns.

Version:
$Revision:$
Author:
Andrew Newman

Constructor Summary
ProjectImpl(TupleFactory tupleFactory, RelationFactory relationFactory)
           
 
Method Summary
 Relation exclude(Relation relation, Set<Attribute> attributes)
          The attributes to exclude in the project.
 Relation include(Relation relation, Set<Attribute> attributes)
          The attributes to include in the projection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectImpl

public ProjectImpl(TupleFactory tupleFactory,
                   RelationFactory relationFactory)
Method Detail

include

public Relation include(Relation relation,
                        Set<Attribute> attributes)
Description copied from interface: Project
The attributes to include in the projection. This is the usual idea of project found in SQL's SELECT for example. Will overwrite any existing inclusion or exclusion.

Specified by:
include in interface Project
attributes - the set of attributes to keep during projection.

exclude

public Relation exclude(Relation relation,
                        Set<Attribute> attributes)
Description copied from interface: Project
The attributes to exclude in the project. Will overwrite any existing inclusion or exclusion.

Specified by:
exclude in interface Project
attributes - the set of attributes to remove during projection.