dragon.ir.index.sequence
Class AbstractSequenceIndexer

java.lang.Object
  |
  +--dragon.ir.index.sequence.AbstractSequenceIndexer
All Implemented Interfaces:
Indexer
Direct Known Subclasses:
BasicSequenceIndexer, OnlineSequenceIndexer

public abstract class AbstractSequenceIndexer
extends java.lang.Object
implements Indexer

The abstract indexer for indexing sequencial data

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Field Summary
protected  boolean initialized
           
protected  AbstractSequenceIndexWriter writer
           
 
Constructor Summary
AbstractSequenceIndexer(ConceptExtractor ce)
           
 
Method Summary
 void close()
          This method releases occupied resources.
 boolean index(Article article)
          An article has many sections such as title, abstract and body.
 boolean indexed(java.lang.String docKey)
           
 void initialize()
          It is required to call this method before calling index method to index articles.
 void setLog(java.lang.String logFile)
           
 void setSectionIndexOption(boolean title, boolean abt, boolean body, boolean meta)
           
protected  void writeLog(java.lang.String content)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

protected AbstractSequenceIndexWriter writer

initialized

protected boolean initialized
Constructor Detail

AbstractSequenceIndexer

public AbstractSequenceIndexer(ConceptExtractor ce)
Method Detail

setSectionIndexOption

public void setSectionIndexOption(boolean title,
                                  boolean abt,
                                  boolean body,
                                  boolean meta)

initialize

public void initialize()
Description copied from interface: Indexer
It is required to call this method before calling index method to index articles.

Specified by:
initialize in interface Indexer

close

public void close()
Description copied from interface: Indexer
This method releases occupied resources.

Specified by:
close in interface Indexer

index

public boolean index(Article article)
Description copied from interface: Indexer
An article has many sections such as title, abstract and body. The selection of sections for indexing is subject to the implemented indexers.

Specified by:
index in interface Indexer
Parameters:
article - the article for indexing
Returns:
true if indexed successfully

setLog

public void setLog(java.lang.String logFile)
Specified by:
setLog in interface Indexer

indexed

public boolean indexed(java.lang.String docKey)
Specified by:
indexed in interface Indexer
Parameters:
docKey - the unique document entry number
Returns:
true if this document has been indexed

writeLog

protected void writeLog(java.lang.String content)