com.bigdata.rdf.spo
Class DistinctMultiTermAdvancer

java.lang.Object
  extended by cutthecrap.utils.striterators.FilterBase
      extended by com.bigdata.btree.filter.Advancer<SPO>
          extended by com.bigdata.rdf.spo.DistinctMultiTermAdvancer
All Implemented Interfaces:
ITupleFilter<SPO>, IFilter, IPropertySet, Serializable, Cloneable

public class DistinctMultiTermAdvancer
extends Advancer<SPO>

This was cloned from the DistinctTermAdvancer. It supports an efficient scan of the distinct term identifiers that appear in the first position(s) of the keys for the statement index corresponding to the specified IKeyOrder. For example, using SPOKeyOrder.POS will give you the term identifiers for the distinct predicates actually in use within statements in the SPORelation.

Note: This class only offers additional functionality over the DistinctTermAdvancer for a quad store. For example, consider a triple store with 2-bound on the SPOKeyOrder.SPO index. Since you are only going to visit the distinct Object values, the advancer will not "advance" over anything and you might as well use a normal IAccessPath or rangeIterator.

Version:
$Id: DistinctMultiTermAdvancer.java 2886 2010-05-19 19:16:49Z mroycsi $
Author:
Bryan Thompson
See Also:
DistinctTermAdvancer, Serialized Form
TODO:
Unit tests?

Field Summary
 
Fields inherited from class com.bigdata.btree.filter.Advancer
log, src
 
Constructor Summary
DistinctMultiTermAdvancer(int arity, int boundEntries)
           
 
Method Summary
protected  void advance(ITuple<SPO> tuple)
          Offers an opportunity to advance the source ITupleCursor to a new key using {@link ITupleCursor#seek(byte[]).
 
Methods inherited from class com.bigdata.btree.filter.Advancer
filterOnce, init
 
Methods inherited from class cutthecrap.utils.striterators.FilterBase
addFilter, filter, getProperty, getRequiredProperty, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cutthecrap.utils.striterators.IFilter
filter
 
Methods inherited from interface cutthecrap.utils.striterators.IPropertySet
getProperty
 

Constructor Detail

DistinctMultiTermAdvancer

public DistinctMultiTermAdvancer(int arity,
                                 int boundEntries)
Method Detail

advance

protected void advance(ITuple<SPO> tuple)
Description copied from class: Advancer
Offers an opportunity to advance the source ITupleCursor to a new key using {@link ITupleCursor#seek(byte[]).

Specified by:
advance in class Advancer<SPO>
Parameters:
tuple - The current value.


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.