dragon.ir.index
Class AbstractIndexer

java.lang.Object
  |
  +--dragon.ir.index.AbstractIndexer
All Implemented Interfaces:
Indexer
Direct Known Subclasses:
BasicIndexer, OnlineIndexer

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

AbstractIndexer implements basic functions of interface Indexer such as building index for an article and options for section index and relation index

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Field Summary
protected  IRSection[] arrSections
           
protected  boolean enable_AllSection
           
protected  boolean initialized
           
protected  boolean relationSupported
           
 
Constructor Summary
AbstractIndexer(boolean relationSupported)
           
 
Method Summary
protected  boolean addSection(IRSection section)
           
protected abstract  boolean extract(java.lang.String text, java.util.ArrayList conceptList)
           
protected abstract  boolean extract(java.lang.String text, java.util.ArrayList conceptList, java.util.ArrayList relationList)
           
protected abstract  java.lang.String getRemainingSections(Article article)
           
protected  java.lang.String getSection(Article paper, int sectionID)
           
 boolean index(Article article)
          An article has many sections such as title, abstract and body.
protected abstract  void initDocIndexing()
           
 void initialize()
          It is required to call this method before calling index method to index articles.
protected abstract  void initIndex()
           
protected abstract  void initSectionWrite(IRSection section)
           
protected abstract  boolean setDoc(java.lang.String docKey)
           
 void setLog(java.lang.String logFile)
           
protected abstract  void write(int sectionID, java.util.ArrayList conceptList)
           
protected abstract  void write(int sectionID, java.util.ArrayList conceptList, java.util.ArrayList relationList)
           
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
 
Methods inherited from interface dragon.ir.index.Indexer
close, indexed
 

Field Detail

arrSections

protected IRSection[] arrSections

relationSupported

protected boolean relationSupported

initialized

protected boolean initialized

enable_AllSection

protected boolean enable_AllSection
Constructor Detail

AbstractIndexer

public AbstractIndexer(boolean relationSupported)
Method Detail

initDocIndexing

protected abstract void initDocIndexing()

getRemainingSections

protected abstract java.lang.String getRemainingSections(Article article)

extract

protected abstract boolean extract(java.lang.String text,
                                   java.util.ArrayList conceptList)

extract

protected abstract boolean extract(java.lang.String text,
                                   java.util.ArrayList conceptList,
                                   java.util.ArrayList relationList)

setDoc

protected abstract boolean setDoc(java.lang.String docKey)

initSectionWrite

protected abstract void initSectionWrite(IRSection section)

initIndex

protected abstract void initIndex()

write

protected abstract void write(int sectionID,
                              java.util.ArrayList conceptList)

write

protected abstract void write(int sectionID,
                              java.util.ArrayList conceptList,
                              java.util.ArrayList relationList)

setLog

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

addSection

protected boolean addSection(IRSection section)

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

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

getSection

protected java.lang.String getSection(Article paper,
                                      int sectionID)

writeLog

protected void writeLog(java.lang.String content)