Exemplo n.º 1
0
  private void removeTerm() {

    TableItem[] sel = termsTableViewer.getTable().getSelection();

    if (sel.length > 0) {

      ITerm selTerm = (ITerm) (sel[0].getData());

      ITerminoConcept tc =
          ControlerFactoryImpl.getTerminoOntoControler().getCurrentTerminoConcept();

      ITerminoOntoAnnotation starTermAnnotation = getStarTermAnnotation(tc);

      if (starTermAnnotation != null) {

        if (starTermAnnotation.getValue().compareTo(selTerm.getId() + "") == 0) { // $NON-NLS-1$

          DatabaseAdapter.deleteTCAnnotation(tc, starTermAnnotation);
        }
      }

      List<ITerminoConcept> tcs = new ArrayList<ITerminoConcept>();
      tcs.add(tc);
      DatabaseAdapter.unlinkTerm(tcs, selTerm);

      updateInformation();
    }
  }
Exemplo n.º 2
0
  private void removeTranslatedTerm() {
    TableItem[] sel = termsOtherLgTableViewer.getTable().getSelection();

    if (sel.length > 0) {

      ITerminoOntoAnnotation selAnnot = (ITerminoOntoAnnotation) (sel[0].getData());

      ITerminoConcept tc =
          ControlerFactoryImpl.getTerminoOntoControler().getCurrentTerminoConcept();

      DatabaseAdapter.deleteTCAnnotation(tc, selAnnot);

      updateInformation();
    }
  }