com.bigdata.rdf.spo
Class DistinctTermAdvancer

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

public class DistinctTermAdvancer
extends Advancer<SPO>

Advances the source ITupleCursor through the distinct term identifiers for some SPOAccessPath. Each time a new ITuple is visited, the term identifier for the first position in that tuple is decoded and its successor is formed. The source ITupleCursor is then advanced to the key having that term identifier in its first position and IRawTripleStore.NULL in its 2nd and 3rd position. For example, if the ITupleCursor visits an ITuple whose term identifiers are, in the order in which they appear in the key:

 [ 12, 4, 44 ]
 
Then the source ITupleCursor will be advanced to the key:
 [ 13, 0, 0 ]
 
This is used to efficiently visit the distinct terms actually appearing in the subject, predicate, or object position of SPOs in the database.

Version:
$Id: DistinctTermAdvancer.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.bigdata.btree.filter.Advancer
INFO, log, src
 
Constructor Summary
DistinctTermAdvancer(int arity)
           
 
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
filter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistinctTermAdvancer

public DistinctTermAdvancer(int arity)
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-2009 SYSTAP, LLC. All Rights Reserved.