public void updateInformation() { currentTerminoConcept = ControlerFactoryImpl.getTerminoOntoControler().getCurrentTerminoConcept(); if (currentTerminoConcept != null) { terminoConceptText.setText(currentTerminoConcept.getLabel()); termsTableViewer.setInput(UtilTools.setToList(currentTerminoConcept.getMappedTerms())); termsOtherLgTableViewer.setInput(getTCTranslationAnnotations(currentTerminoConcept)); sentencesWidget.setInput(getSentences()); } }
private ITerminoOntoAnnotation getStarTermAnnotation(ITerminoConcept tc) { Set<ITerminoOntoAnnotation> annotations = tc.getAnnotations(); Iterator<ITerminoOntoAnnotation> it = annotations.iterator(); ITerminoOntoAnnotation starTermAnnotation = null; while (it.hasNext()) { ITerminoOntoAnnotation tmp = it.next(); if (tmp.getTerminoOntoAnnotationType() .getLabel() .compareTo(DatabaseAdapter.STAR_TERM_ANNOTATION) == 0) { starTermAnnotation = tmp; } } return starTermAnnotation; }
private List<ITerminoOntoAnnotation> getTCTranslationAnnotations(ITerminoConcept tc) { Set<ITerminoOntoAnnotation> annotations = tc.getAnnotations(); Iterator<ITerminoOntoAnnotation> it = annotations.iterator(); List<ITerminoOntoAnnotation> res = new ArrayList<ITerminoOntoAnnotation>(); while (it.hasNext()) { ITerminoOntoAnnotation tmp = it.next(); if ((tmp.getTerminoOntoAnnotationType() .getLabel() .compareTo(DatabaseAdapter.LABEL_EN_ANNOTATION) == 0) || (tmp.getTerminoOntoAnnotationType() .getLabel() .compareTo(DatabaseAdapter.LABEL_SP_ANNOTATION) == 0)) { res.add(tmp); } } return res; }