org.eml.sir.retr
Class IndexProperties

java.lang.Object
  extended byorg.eml.sir.retr.IndexProperties
All Implemented Interfaces:
java.io.Serializable

public class IndexProperties
extends java.lang.Object
implements java.io.Serializable

Covers propertiess of an index.

Author:
Hendrik Niederlich (EML-R)
See Also:
Serialized Form

Constructor Summary
IndexProperties(java.lang.String indexDir)
          Create a new instance of IndexProperties.
 
Method Summary
static java.lang.String concatList(java.util.ArrayList list)
          This method is part of this class, because it must be the same when indexing and searching, like other properties of the index do, too.
 org.apache.lucene.analysis.Analyzer getBasicAnalyzer()
          Return a new instance of the basic (not stemming) analyzer.
 char getIdfAlg()
          Return the idf algortihm (factor).
 java.lang.String getIndexDir()
          Return the index directory.
 org.apache.lucene.search.Similarity getIndexSimilarity()
          Return the index similarity.
 org.apache.lucene.analysis.Analyzer getStemmingAnalyzer()
          Return a new instance of the stemming analyzer.
 java.lang.String getStopWordFile()
          Return the stop word file path.
 char getTfAlg()
          Return the tf algorithm (factor).
 boolean isCompoundBaseMerging()
          Return wether to merge compound bases.
static IndexProperties load(java.lang.String fileName)
          Load a serialized instance of IndexProperties.
static java.lang.String processPhraseList(java.util.ArrayList list)
          This method is part of this class, because it must be the same when indexing and searching, like other properties of the index do, too.
 boolean save(java.lang.String fileName)
          Serialize an instance of IndexProperties and save it to a file.
 void setBasicAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
          Set a new instance of the basic (not stemming) analyzer.
 void setCompoundBaseMerging(boolean compoundBaseMerging)
          Set wether to merge compound bases.
 void setIdfAlg(char idfAlg)
          Set the idf algorithm (factor).
 void setIndexDir(java.lang.String indexDir)
          Set the index directory.
 void setIndexSimilarity(org.apache.lucene.search.Similarity indexSim)
          Set the index similarity.
 void setStemmingAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
          Set the analyzer.
 void setStopWordFile(java.lang.String stopWordFile)
          Set the stop word file path.
 void setTfAlg(char tfAlg)
          Set the tf algorithm (factor).
 java.lang.String toString()
          Return a String that contains important information about this instance of IndexProperties.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexProperties

public IndexProperties(java.lang.String indexDir)
Create a new instance of IndexProperties.

Method Detail

getIndexDir

public java.lang.String getIndexDir()
Return the index directory.


setIndexDir

public void setIndexDir(java.lang.String indexDir)
Set the index directory.


getIndexSimilarity

public org.apache.lucene.search.Similarity getIndexSimilarity()
Return the index similarity.


setIndexSimilarity

public void setIndexSimilarity(org.apache.lucene.search.Similarity indexSim)
Set the index similarity. If you use an AdjustableSimilarity, set also idf algorithm (factor) by calling setIdfAlg() and tf algorithm by calling setTfAlg().


getIdfAlg

public char getIdfAlg()
Return the idf algortihm (factor).


setIdfAlg

public void setIdfAlg(char idfAlg)
Set the idf algorithm (factor).


getTfAlg

public char getTfAlg()
Return the tf algorithm (factor).


setTfAlg

public void setTfAlg(char tfAlg)
Set the tf algorithm (factor).


getStemmingAnalyzer

public org.apache.lucene.analysis.Analyzer getStemmingAnalyzer()
Return a new instance of the stemming analyzer.


setStemmingAnalyzer

public void setStemmingAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
Set the analyzer. Don't hesitate to set the stop word list.


getStopWordFile

public java.lang.String getStopWordFile()
Return the stop word file path.


setStopWordFile

public void setStopWordFile(java.lang.String stopWordFile)
Set the stop word file path.


getBasicAnalyzer

public org.apache.lucene.analysis.Analyzer getBasicAnalyzer()
Return a new instance of the basic (not stemming) analyzer.


setBasicAnalyzer

public void setBasicAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
Set a new instance of the basic (not stemming) analyzer.


isCompoundBaseMerging

public boolean isCompoundBaseMerging()
Return wether to merge compound bases.


setCompoundBaseMerging

public void setCompoundBaseMerging(boolean compoundBaseMerging)
Set wether to merge compound bases.


concatList

public static java.lang.String concatList(java.util.ArrayList list)
This method is part of this class, because it must be the same when indexing and searching, like other properties of the index do, too. Concatenates an ArrayList and builds a String. The terms are separated by blanks.


processPhraseList

public static java.lang.String processPhraseList(java.util.ArrayList list)
This method is part of this class, because it must be the same when indexing and searching, like other properties of the index do, too. Creates a string of bigrams out of an ArrayList of phrases. The words of the bigrams are seperated by underscore ('_'). So each bigram is contiguous String. All characters become lower case.


toString

public java.lang.String toString()
Return a String that contains important information about this instance of IndexProperties.


load

public static IndexProperties load(java.lang.String fileName)
Load a serialized instance of IndexProperties.

Parameters:
fileName - Complete path and file name.

save

public boolean save(java.lang.String fileName)
Serialize an instance of IndexProperties and save it to a file.

Parameters:
fileName - Complete path and file name.