# -*- coding: utf-8 *- #!/usr/bin/env python from EntryDTO import * import string class EntryManager: def __init__(self): pass def getWellMessageFromListEntryByEnglishWord(self,engword,listEntry): res = None for entr in listEntry: engtxt = self.getEngishTextFromEntry(entr) if engtxt: if engtxt == engword: return entr return res def getEngishTextFromEntry(self, entr): for txt in entr.listText: if txt.lang == 'ENGLISH': return txt.value if txt.lang == 'en': return txt.value return None def transformListEntryToText(self, listEntry): text = '' for entr in listEntry: text = text + entr.entry2xml() print entr return text