recoinx.clef
Class CLEFTopicTranslator.TopicTranslatorRunnable

java.lang.Object
recoin.group.ComponentRunnable
recoinx.clef.CLEFTopicTranslator.TopicTranslatorRunnable
- All Implemented Interfaces:
- java.lang.Runnable
- Enclosing class:
- CLEFTopicTranslator
- protected class CLEFTopicTranslator.TopicTranslatorRunnable
- extends recoin.group.ComponentRunnable
The TopicTranslatorRunnable class implements the special behavior to translate
the english topic of a CLEFQuery into German, Spanish and English and complete
the CLEFQuery.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLEFTopicTranslator.TopicTranslatorRunnable
public CLEFTopicTranslator.TopicTranslatorRunnable(recoin.container.RetrievalContainer container,
recoin.group.ComponentWorker worker)
- Creates a new TopicTranslatorRunnable with the specified RetrievalContainer.
CLEFTopicTranslator.TopicTranslatorRunnable
public CLEFTopicTranslator.TopicTranslatorRunnable(recoin.container.RetrievalContainer rc,
recoin.group.ComponentSupport cs,
recoin.group.ComponentWorker worker)
- Creates a new TopicTranslatorRunnable with the specified ComponentSupport and
RetrievalContainer.
CLEFTopicTranslator.TopicTranslatorRunnable
public CLEFTopicTranslator.TopicTranslatorRunnable(recoin.container.RetrievalContainer rc,
recoin.group.ComponentSupport cs,
recoin.group.ComponentRunnable r,
recoin.group.ComponentWorker worker)
- Creates a new TopicTranslatorRunnable with the specified RetrievalContainer,
ComponentSupport and ComponentRunnable.
run
public void run()
- The run-method of this TopicTranslatorRunnable.
It takes the DocNo of the CLEFQuery and uses it to look up the different
translations of the topic in the translation files. The translations are
then stored as topics in the CLEFQuery.
getTopicTranslated
private java.lang.String getTopicTranslated(java.lang.String topicNumber,
int language)
- Returns a translation of the topic with the specified number in the specified
language.
A Filter will look for files starting with 'DE_', 'ES_' or 'FR_' depending
on the language and gather all translations for the topic. This implies that
there may be several translated files for one language. The translations are
merged and doublette tokens are removed before the translation is returned.
mergeTranslations
private java.lang.String mergeTranslations(java.lang.String[] translations)
- Merges the translations in the specified String[] into one String. Doublettes
are eliminated and the merged translation is returned.
createDocument
private org.dom4j.Document createDocument(java.io.File file)
throws org.dom4j.DocumentException
- Returns a org.dom4j.Document that represents the specified file.
getTopicIterator
private java.util.Iterator getTopicIterator(org.dom4j.Document doc)