org.cdlib.xtf.textIndexer
Class IndexDump

Object
  extended by IndexDump

public class IndexDump
extends Object

This class dumps the contents of user-selected fields from an XTF text index.

Author:
Martin Haye

Constructor Summary
IndexDump()
           
 
Method Summary
private static void dumpFields(IndexReader indexReader, String[] fieldNames, Writer out)
           
private static void dumpTermFreqs(IndexReader indexReader, DocNumMap docNumMap, String[] fields, Writer out)
           
static void main(String[] args)
          Main entry-point for the index dumper.
private static String stripValue(String str)
          Removes XTF's special characters (such as bump markers and field start/end markers) from the input string.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexDump

public IndexDump()
Method Detail

main

public static void main(String[] args)
Main entry-point for the index dumper.

This function takes the command line arguments passed and uses them to find an index and print out fields in it.


dumpFields

private static void dumpFields(IndexReader indexReader,
                               String[] fieldNames,
                               Writer out)
                        throws IOException
Throws:
IOException

dumpTermFreqs

private static void dumpTermFreqs(IndexReader indexReader,
                                  DocNumMap docNumMap,
                                  String[] fields,
                                  Writer out)
                           throws IOException
Throws:
IOException

stripValue

private static String stripValue(String str)
Removes XTF's special characters (such as bump markers and field start/end markers) from the input string. Also changes characters we use for field and value markers ('|' and ';') to something else so they won't be taken for markers.