org.imemex.itrails.impl.dictionaries
Class AbstractMultiLangDictionary

java.lang.Object
  extended by org.imemex.itrails.impl.dictionaries.AbstractMultiLangDictionary
All Implemented Interfaces:
Dictionary

public abstract class AbstractMultiLangDictionary
extends java.lang.Object
implements Dictionary


Constructor Summary
AbstractMultiLangDictionary()
           
 
Method Summary
 void close()
          closes the dictionary
 void createDictionary(java.lang.String dataFile)
          crates a dictionary objects
abstract  void createDictionary(java.lang.String dataFile, java.lang.String indexFile)
          crates a dictionary objects, also performs the indexing
 PullOperator<java.lang.String> languages()
           
 PullOperator<java.lang.String> lookUp(java.lang.String word)
          Looks up the word in the dictionary
 PullOperator<java.lang.String> lookUp(java.lang.String word, java.lang.String fromLanguage, java.lang.String toLanguage)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMultiLangDictionary

public AbstractMultiLangDictionary()
Method Detail

close

public void close()
Description copied from interface: Dictionary
closes the dictionary

Specified by:
close in interface Dictionary

createDictionary

public abstract void createDictionary(java.lang.String dataFile,
                                      java.lang.String indexFile)
Description copied from interface: Dictionary
crates a dictionary objects, also performs the indexing

Specified by:
createDictionary in interface Dictionary
Parameters:
dataFile - -- the file that contains the word list that can be parsed by the dictinary
indexFile - -- the file where the indexes are to be created

createDictionary

public void createDictionary(java.lang.String dataFile)
Description copied from interface: Dictionary
crates a dictionary objects

Specified by:
createDictionary in interface Dictionary
Parameters:
dataFile - -- the file that contains the word list that can be parsed by the dictinary

lookUp

public PullOperator<java.lang.String> lookUp(java.lang.String word)
Description copied from interface: Dictionary
Looks up the word in the dictionary

Specified by:
lookUp in interface Dictionary
Parameters:
word - -- the word to lookup for
Returns:
-- a pull operator of all the results

lookUp

public PullOperator<java.lang.String> lookUp(java.lang.String word,
                                             java.lang.String fromLanguage,
                                             java.lang.String toLanguage)
Specified by:
lookUp in interface Dictionary
Parameters:
word - -- the word to lookup for
fromLanguage - -- the language of the word
toLanguage - -- the language to be translated to
Returns:
-- a pull operator of all the results

languages

public PullOperator<java.lang.String> languages()
Specified by:
languages in interface Dictionary
Returns:
returns all translations provided by the dictionary

main

public static void main(java.lang.String[] args)