org.jrdf.query.relation.operation.mem.union
Class SubsumptionEngine
java.lang.Object
org.jrdf.query.relation.operation.mem.union.SubsumptionEngine
- All Implemented Interfaces:
- TupleEngine
public class SubsumptionEngine
- extends Object
- implements TupleEngine
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubsumptionEngine
public SubsumptionEngine(TupleFactory tupleFactory,
RelationHelper relationHelper)
getHeading
public SortedSet<Attribute> getHeading(Relation relation1,
Relation relation2)
- Specified by:
getHeading
in interface TupleEngine
process
public void process(SortedSet<Attribute> headings,
SortedSet<AttributeValuePair> avps1,
SortedSet<AttributeValuePair> avps2,
SortedSet<Tuple> result)
- Returns the tuples to be subsumed in the result set.
- Specified by:
process
in interface TupleEngine
- Parameters:
headings
- the headings of the resultant tuple.avps1
- the first set of avps to consider.avps2
- the second set of avps to consider.result
- the tuples to be subsumed.
subsumes
public int subsumes(SortedSet<Attribute> headings,
SortedSet<AttributeValuePair> avps1,
SortedSet<AttributeValuePair> avps2)
- -1 indicates 2 subsumes 1, 1 indicates 1 subsumes 2, 0 means that they are not subsumed.
- Parameters:
headings
- the headings to use.avps1
- The set of avps to compare.avps2
- The set of avps to compare.
- Returns:
- -1 indicates avps2 subsumes avps1, 1 indicates avps1 subsumes avps2 and 0 means they do not share any
common values or are equal.