Terrier IR Platform
1.1.1

uk.ac.gla.terrier.structures.trees
Class BlockFieldDocumentTreeNode

java.lang.Object
  extended by uk.ac.gla.terrier.structures.trees.TreeNode
      extended by uk.ac.gla.terrier.structures.trees.FieldDocumentTreeNode
          extended by uk.ac.gla.terrier.structures.trees.BlockFieldDocumentTreeNode
All Implemented Interfaces:
java.lang.Comparable<TreeNode>

Deprecated.

public class BlockFieldDocumentTreeNode
extends FieldDocumentTreeNode

Models the tree node used when building the direct index with block and field information.

Version:
$Revision: 1.14 $
Author:
Douglas Johnson, Craig Macdonald

Field Summary
 gnu.trove.TIntHashSet BlockIds
          Deprecated. Hashset of blockids
 BlockFieldDocumentTreeNode left
          Deprecated. The left child of the node.
 BlockFieldDocumentTreeNode right
          Deprecated. The right child of the node.
 
Fields inherited from class uk.ac.gla.terrier.structures.trees.TreeNode
frequency, term, termCode
 
Constructor Summary
BlockFieldDocumentTreeNode(java.lang.String newTerm, int blockId)
          Deprecated. Constructs a tree node for the given term and block id.
BlockFieldDocumentTreeNode(java.lang.String newTerm, int blockId, java.util.Set<java.lang.String> fields)
          Deprecated. Constructs a tree node for the given term, block id and the html tag.
BlockFieldDocumentTreeNode(java.lang.String newTerm, int blockId, java.lang.String field)
          Deprecated. Constructs a tree node for the given term, block id and the field.
 
Method Summary
 int getBlockCount()
          Deprecated. Returns how many separate blocks does this term occur in.
 int[] getBlockIds()
          Deprecated. Returns an array of the blocksids stored in this object.
 boolean insertBlock(int blockId)
          Deprecated. Adds a block to the hashset of blocks already saved for this node
 
Methods inherited from class uk.ac.gla.terrier.structures.trees.FieldDocumentTreeNode
addToFieldScore, addToFieldScore, getFieldScore
 
Methods inherited from class uk.ac.gla.terrier.structures.trees.TreeNode
compareTo, equals
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

left

public BlockFieldDocumentTreeNode left
Deprecated. 
The left child of the node.


right

public BlockFieldDocumentTreeNode right
Deprecated. 
The right child of the node.


BlockIds

public final gnu.trove.TIntHashSet BlockIds
Deprecated. 
Hashset of blockids

Constructor Detail

BlockFieldDocumentTreeNode

public BlockFieldDocumentTreeNode(java.lang.String newTerm,
                                  int blockId)
Deprecated. 
Constructs a tree node for the given term and block id.

Parameters:
newTerm - the term.
blockId - the block id.

BlockFieldDocumentTreeNode

public BlockFieldDocumentTreeNode(java.lang.String newTerm,
                                  int blockId,
                                  java.lang.String field)
Deprecated. 
Constructs a tree node for the given term, block id and the field.

Parameters:
newTerm - the term.
blockId - the block id.
field - the field containing the term.

BlockFieldDocumentTreeNode

public BlockFieldDocumentTreeNode(java.lang.String newTerm,
                                  int blockId,
                                  java.util.Set<java.lang.String> fields)
Deprecated. 
Constructs a tree node for the given term, block id and the html tag.

Parameters:
newTerm - the term.
blockId - the block id.
fields - the fields that contain the term.
Method Detail

insertBlock

public boolean insertBlock(int blockId)
Deprecated. 
Adds a block to the hashset of blocks already saved for this node

Parameters:
blockId - The id of the new block
Returns:
True if the blockid hasn't been seen before, false if we already had something at that block

getBlockIds

public int[] getBlockIds()
Deprecated. 
Returns an array of the blocksids stored in this object. Sorted using Arrays.sort()

Returns:
integer array of sorted ascending blockids

getBlockCount

public int getBlockCount()
Deprecated. 
Returns how many separate blocks does this term occur in. This should be the same as the term frequency if the block size == 1.

Returns:
integer of how many different blocks this terms occurs in.

Terrier IR Platform
1.1.1

Terrier Information Retrieval Platform 1.1.1. Copyright 2004-2007 University of Glasgow