dragon.ir.index
Class BasicIRDocIndexList

java.lang.Object
  |
  +--dragon.ir.index.BasicIRDocIndexList
All Implemented Interfaces:
IRDocIndexList

public class BasicIRDocIndexList
extends java.lang.Object
implements IRDocIndexList

The class is used to write or load the indexing information for a given document or document set

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Constructor Summary
BasicIRDocIndexList(java.lang.String filename, boolean writingMode)
           
 
Method Summary
 boolean add(IRDoc curDoc)
          Adds an IRDoc object to the index list
 void close()
          Releases occupied resources
 IRDoc get(int index)
          Gets the IRDoc specified by its index
 int size()
          Gets the number of documents in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicIRDocIndexList

public BasicIRDocIndexList(java.lang.String filename,
                           boolean writingMode)
Method Detail

get

public IRDoc get(int index)
Description copied from interface: IRDocIndexList
Gets the IRDoc specified by its index

Specified by:
get in interface IRDocIndexList
Parameters:
index - the index of the document
Returns:
the IRDoc object

add

public boolean add(IRDoc curDoc)
Description copied from interface: IRDocIndexList
Adds an IRDoc object to the index list

Specified by:
add in interface IRDocIndexList
Parameters:
curDoc - the IRDoc for adding
Returns:
true if added successfully.

close

public void close()
Description copied from interface: IRDocIndexList
Releases occupied resources

Specified by:
close in interface IRDocIndexList

size

public int size()
Description copied from interface: IRDocIndexList
Gets the number of documents in the list.

Specified by:
size in interface IRDocIndexList
Returns:
the number of documents in the list.