org.wdssii.webindex.servlet
Class WebIndexDAO

java.lang.Object
  extended by org.wdssii.webindex.servlet.WebIndexDAO

public class WebIndexDAO
extends Object


Nested Class Summary
private static class WebIndexDAO.FileToRead
           
 
Field Summary
private  IndexRecordList currentRecordList
           
private  FamIndexHelper famIndexHelper
           
private  HashMap<String,IndexRecordBean> filename_to_record
           
private  List<WebIndexDAO.FileToRead> filesToRead
           
private  String indexDir
           
private  org.apache.commons.logging.Log log
           
private  HashMap<IndexRecordBean,String> record_to_filename
           
private  int recordsRead
           
private  String source
           
private  long targetNumberOfRecords
           
 
Constructor Summary
WebIndexDAO()
           
 
Method Summary
private  void addRecordToMaps(String filename, IndexRecordBean rec)
           
private  IndexRecordBean extractContent(WebIndexDAO.FileToRead fileToRead)
           
 IndexRecordList getCurrentRecordList(long lastRead)
           
 FamIndexHelper getFamIndexHelper()
           
 String getIndexDir()
           
 String getSource()
           
 long getTargetNumberOfRecords()
           
protected  void init()
           
private  void prune()
           
 void setFamIndexHelper(FamIndexHelper helper)
           
 void setIndexDir(String indexDir)
           
 void setSource(String source)
           
 void setTargetNumberOfRecords(long n)
           
private  void update()
          Invoked on every user request for currentRecordList.
private  void update(WebIndexDAO.FileToRead[] newfiles)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

private String source

indexDir

private String indexDir

targetNumberOfRecords

private long targetNumberOfRecords

currentRecordList

private IndexRecordList currentRecordList

recordsRead

private int recordsRead

filename_to_record

private HashMap<String,IndexRecordBean> filename_to_record

record_to_filename

private HashMap<IndexRecordBean,String> record_to_filename

log

private final org.apache.commons.logging.Log log

famIndexHelper

private FamIndexHelper famIndexHelper

filesToRead

private List<WebIndexDAO.FileToRead> filesToRead
Constructor Detail

WebIndexDAO

public WebIndexDAO()
Method Detail

getSource

public String getSource()

setSource

public void setSource(String source)

getIndexDir

public String getIndexDir()

setIndexDir

public void setIndexDir(String indexDir)

getTargetNumberOfRecords

public long getTargetNumberOfRecords()

setTargetNumberOfRecords

public void setTargetNumberOfRecords(long n)

setFamIndexHelper

public void setFamIndexHelper(FamIndexHelper helper)

getFamIndexHelper

public FamIndexHelper getFamIndexHelper()

init

protected void init()

extractContent

private IndexRecordBean extractContent(WebIndexDAO.FileToRead fileToRead)

update

private void update(WebIndexDAO.FileToRead[] newfiles)

update

private final void update()
Invoked on every user request for currentRecordList.


addRecordToMaps

private void addRecordToMaps(String filename,
                             IndexRecordBean rec)

prune

private void prune()

getCurrentRecordList

public IndexRecordList getCurrentRecordList(long lastRead)
Returns:
a TransferObject that clients own. Changes to the TO will not affect this business object in any way. See the constants in IndexRecordList for special values that lastRead can take.