org.basex.data
Class FTPosData

java.lang.Object
  extended by org.basex.data.FTPosData

public final class FTPosData
extends java.lang.Object

This class provides a container for query full-text positions, which is evaluated by the visualizations.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen, Sebastian Gath

Constructor Summary
FTPosData()
           
 
Method Summary
 void add(Data d, int pre, FTMatches all)
          Adds position data.
 FTPosData copy()
          Creates a copy.
 FTPos get(Data d, int p)
          Gets full-text data from the container.
 int size()
          Returns the number of entries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FTPosData

public FTPosData()
Method Detail

add

public void add(Data d,
                int pre,
                FTMatches all)
Adds position data.

Parameters:
d - data reference
pre - pre value
all - full-text matches

get

public FTPos get(Data d,
                 int p)
Gets full-text data from the container. If no data is stored for a pre value, null is returned. int[0] : [pos0, ..., posn] int[1] : [poi0, ..., poin]

Parameters:
d - data reference
p - int pre value
Returns:
int[2][n] full-text data or null

size

public int size()
Returns the number of entries.

Returns:
size

copy

public FTPosData copy()
Creates a copy.

Returns:
copy