def __init__(self,annDic): self.dic = annDic self.id = annDic['id'] self.section_id = annDic['section_id'] self.start_index = annDic['start_index'] self.end_index = annDic['end_index'] self.deleted = annDic['deleted_on'] tempQuote = BeautifulSoup(FCUtil.removeSpecChar(annDic['quote']).lstrip().lstrip('\'')) self.quote = self.fixQuote(tempQuote.get_text()) self.text = annDic['annotation']
def __init__(self,annDic,uWorker): self.uWorker = uWorker self.dic = annDic self.id = annDic['id'] self.date = annDic['created_on'].strip().replace(' ','T')+'Z' self.user_id = annDic['user_id'] self.user = uWorker.getUserName(self.user_id) self.section_id = annDic['section_id'] self.start_index = annDic['start_index'] self.end_index = annDic['end_index'] tempQuote = BeautifulSoup(FCUtil.removeSpecChar(annDic['quote']).lstrip().lstrip('\'')) self.quote = self.fixQuote(tempQuote.get_text()) tempText = BeautifulSoup(FCUtil.removeSpecChar(annDic['annotation']).strip().strip('\'')) self.text = self.fixQuote(tempText.get_text()) if "NULL" in annDic['deleted_on']: self.deleted = False else: self.deleted = True