textmaven.dictionaries
Class CSVDictionary

java.lang.Object
  extended bytextmaven.dictionaries.BaseDictionary
      extended bytextmaven.dictionaries.CSVDictionary
All Implemented Interfaces:
IBaseDictionary, IDictionarySource, IDictionaryWriter

public class CSVDictionary
extends BaseDictionary
implements IDictionarySource, IDictionaryWriter

Implements a Dictionary backed on CSV file. This type of dictionary is mainly intended to be used as a transportalbe format.

Author:
krebtho

Constructor Summary
CSVDictionary()
           
 
Method Summary
 void close()
          Closes the dictionary for further write operations including closing all "open" iterators making them unusable for further iteration.
 java.lang.String getFileName()
           
 java.lang.String getSeparator()
           
 java.lang.String getTerminator()
           
 void open()
          Opens connection to datasource
 void setFileName(java.lang.String fileName)
           
 void setSeparator(java.lang.String separator)
           
 void setTerminator(java.lang.String terminator)
           
 java.util.Iterator translations()
          Returns iterator returning translations Translation
 void write(Translation t)
           
 
Methods inherited from class textmaven.dictionaries.BaseDictionary
getDescription, getId, getLanguage, setDescription, setId, setLanguage, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface textmaven.dictionaries.IBaseDictionary
getDescription, getId, getLanguage, setDescription, setId, setLanguage
 

Constructor Detail

CSVDictionary

public CSVDictionary()
Method Detail

translations

public java.util.Iterator translations()
Description copied from interface: IDictionarySource
Returns iterator returning translations Translation

Specified by:
translations in interface IDictionarySource
Returns:
Iterator

write

public void write(Translation t)
Specified by:
write in interface IDictionaryWriter

open

public void open()
Description copied from interface: IBaseDictionary
Opens connection to datasource

Specified by:
open in interface IBaseDictionary

close

public void close()
Closes the dictionary for further write operations including closing all "open" iterators making them unusable for further iteration.

Specified by:
close in interface IBaseDictionary
See Also:
IBaseDictionary.close()

getFileName

public java.lang.String getFileName()
Returns:
Returns the mFileName.

setFileName

public void setFileName(java.lang.String fileName)
Parameters:
fileName - The mFileName to set.

getSeparator

public java.lang.String getSeparator()
Returns:
Returns the separator.

setSeparator

public void setSeparator(java.lang.String separator)
Parameters:
separator - The separator to set.

getTerminator

public java.lang.String getTerminator()
Returns:
Returns the string terminating an entry.

setTerminator

public void setTerminator(java.lang.String terminator)
Parameters:
terminator - The string to use to terminate an entry.


Copyright © 2002-2005 Sourceforge. All Rights Reserved.