API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.search.simpleindexer. JOTIndexHandler View Source
Author(s)
thibautc
Since
Version
Serial
Hierarchy
 Object
      JOTIndexHandler
Implements
Subclasses
Description
public class JOTIndexHandler
  Helper to JOTSimpleSearchEngine to handle the index files.
See also:   
Constructors
public JOTIndexHandler (File rootFolder) throws Exception
Methods
Hide/Show inherited methods
public void addMasterEntry (int id, String key, long lastModified) throws Exception
  Adds a new entry to index.txt
public String findKeywordIndexLine (String keyword) throws Exception
Return the index file line for a specific keyword or empty string if none found.
public long getEntryStamp (String key)
  Get the timestamp of last indexing of an entry
public String getMasterIdByKey (String key)
public String getMasterKeyById (String id)
public boolean indexKeyword (String id, String word, Vector lines) throws Exception
  Add a keyword to the index id: id of the key in index.txt word: the keyword to be indexed lines: vector of line numbers return: wether it was a new keyword or not
public boolean isNewKey (String key)
  wether the key is new or already indexed
protected void loadMasterFile () throws Exception
  Called from constructor loads existing index.txt
public void removeEntries (String key) throws Exception
  Remove an entry keywords from indexes Does not remove the entry itself(ie: file) from the index master itself, call removeMasterEntry for that.
public void removeMasterEntry (String key) throws Exception
  Remove the file/key from the master index (ie: deleted file)
public void saveMasterFile () throws Exception
  saves index.txt
Fields
Hide/Show inherited fields
pack-private Hashtable indexById
pack-private Hashtable indexByKey
pack-private File indexFile
pack-private File indexRoot
pack-private Hashtable indexStamps
pack-privatestatic Pattern pattern
pack-private File tempIndexFile
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar