textmaven.application.translator.writer
Interface ITranslationWriter

All Known Implementing Classes:
AbstractTranslationWriter

public interface ITranslationWriter

Used to write words and their translations. Writers are identified by a identification defined in the configuration file.

Author:
Thomas Krebs

Field Summary
static java.lang.String NO_TRANSLATION
          Printed as translation substitute if no translation was found
 
Method Summary
 java.lang.String getBookTitle()
          Returns bool title
 java.lang.String getId()
          Returns writers identification
 int getNrOfSentences()
          Returns number of sentences to be printed at most
 void setBookTitle(java.lang.String title)
          Sets title of book.
 void setId(java.lang.String ids)
          Each writer is identified by a unique id.
 void setNrOfSentences(int nrOfSentences)
          Sets number of sentences to be printed at most
 void writeFooter(java.io.Writer out)
          Called after writing all translations.
 void writeHeader(java.io.Writer out)
          Called before writing any translations.
 void writeTranslation(java.io.Writer out, java.lang.String key, java.util.Iterator translations, java.lang.String line, java.lang.String chapter, java.util.Vector sentences)
          Called for each translation.
 

Field Detail

NO_TRANSLATION

public static final java.lang.String NO_TRANSLATION
Printed as translation substitute if no translation was found

See Also:
Constant Field Values
Method Detail

setBookTitle

public void setBookTitle(java.lang.String title)
Sets title of book.

Parameters:
title - Title of book

getBookTitle

public java.lang.String getBookTitle()
Returns bool title

Returns:
book title

setNrOfSentences

public void setNrOfSentences(int nrOfSentences)
Sets number of sentences to be printed at most

Parameters:
nrOfSentences - number of sentence to be printed at most

getNrOfSentences

public int getNrOfSentences()
Returns number of sentences to be printed at most

Returns:
number of sentences

writeHeader

public void writeHeader(java.io.Writer out)
Called before writing any translations. Implementations should write any header informations required before translations are written.

Parameters:
out - writer output is written to

writeFooter

public void writeFooter(java.io.Writer out)
Called after writing all translations. Implementations should write any trailing information.

Parameters:
out - writer output is written to.

writeTranslation

public void writeTranslation(java.io.Writer out,
                             java.lang.String key,
                             java.util.Iterator translations,
                             java.lang.String line,
                             java.lang.String chapter,
                             java.util.Vector sentences)
Called for each translation.

Parameters:
out - output is written to.
key - Word as found in the input.
translations - Iterator of Translation
line - line location where the word occured
chapter - chapter the word occurred
sentences - vector of StringBuffers

setId

public void setId(java.lang.String ids)
Each writer is identified by a unique id.

Parameters:
ids -

getId

public java.lang.String getId()
Returns writers identification

Returns:
identification


Copyright © 2002-2005 Sourceforge. All Rights Reserved.