org.cdlib.xtf.textEngine
Class XtfChunkSource

Object
  extended by ChunkSource
      extended by XtfChunkSource

 class XtfChunkSource
extends ChunkSource

Performs special loading duties for our XTF chunks


Field Summary
private static char bumpMarker
           
private static char nodeMarker
           
 
Fields inherited from class ChunkSource
analyzer, chunkBump, chunkCache, chunkCacheSize, chunkOverlap, chunkSize, docNumMap, field, firstChunk, lastChunk, mainDocNum, reader
 
Constructor Summary
XtfChunkSource(IndexReader reader, DocNumMap docNumMap, int mainDocNum, String field, Analyzer analyzer)
          Construct a chunk source
 
Method Summary
protected  Chunk createChunkTokens(int chunkNum)
          Create a new storage place for chunk tokens (derived classes may wish to override)
private  void debugChunk(XtfChunk chunk)
          DEBUGGING ONLY: Print out debugging info for the current chunk, including all of its tokens.
 Chunk loadChunk(int chunkNum)
          Read in and tokenize a chunk.
protected  void loadText(int chunkNum, Chunk ct)
          Read the text for the given chunk (derived classes may wish to override)
 
Methods inherited from class ChunkSource
getChunkOverlap, getChunkSize, inMainDoc
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bumpMarker

private static final char bumpMarker
See Also:
Constant Field Values

nodeMarker

private static final char nodeMarker
See Also:
Constant Field Values
Constructor Detail

XtfChunkSource

XtfChunkSource(IndexReader reader,
               DocNumMap docNumMap,
               int mainDocNum,
               String field,
               Analyzer analyzer)
Construct a chunk source

Method Detail

createChunkTokens

protected Chunk createChunkTokens(int chunkNum)
Create a new storage place for chunk tokens (derived classes may wish to override)

Overrides:
createChunkTokens in class ChunkSource

loadText

protected void loadText(int chunkNum,
                        Chunk ct)
                 throws IOException
Read the text for the given chunk (derived classes may wish to override)

Overrides:
loadText in class ChunkSource
Throws:
IOException

loadChunk

public Chunk loadChunk(int chunkNum)
Read in and tokenize a chunk. Maintains a cache of recently loaded chunks for speed.

Overrides:
loadChunk in class ChunkSource

debugChunk

private void debugChunk(XtfChunk chunk)

DEBUGGING ONLY:

Print out debugging info for the current chunk, including all of its tokens.