Search in sources :

Example 11 with NoteHelper

use of mom.trd.opentheso.bdd.helper.NoteHelper in project opentheso by miledrousset.

the class HistoriqueBean method load.

public void load(String idThesaurus, String idConcept, String idTerm, String lang) {
    if (typeHisto == 0 && dateHisto != null) {
        conceptHisto = new ConceptHelper().getConceptHisoriqueFromDate(connect.getPoolConnexion(), idConcept, idThesaurus, dateHisto);
        groupHisto = new GroupHelper().getGroupHistoriqueFromDate(connect.getPoolConnexion(), idConcept, idThesaurus, dateHisto);
        noteHisto = new NoteHelper().getNoteHistoriqueFromDate(connect.getPoolConnexion(), idConcept, idThesaurus, idTerm, lang, dateHisto);
        relationHisto = new RelationsHelper().getRelationHistoriqueFromDate(connect.getPoolConnexion(), idConcept, idThesaurus, dateHisto, lang);
        nonPrefTermHisto = new TermHelper().getNonPreferredTermsHistoriqueFromDate(connect.getPoolConnexion(), idTerm, idThesaurus, lang, dateHisto);
        termHisto = new TermHelper().getTermsHistoriqueFromDate(connect.getPoolConnexion(), idTerm, idThesaurus, lang, dateHisto);
    } else if (typeHisto == 1) {
        conceptHisto = new ConceptHelper().getConceptHisoriqueAll(connect.getPoolConnexion(), idConcept, idThesaurus);
        groupHisto = new GroupHelper().getGroupHistoriqueAll(connect.getPoolConnexion(), idConcept, idThesaurus);
        noteHisto = new NoteHelper().getNoteHistoriqueAll(connect.getPoolConnexion(), idConcept, idThesaurus, idTerm, lang);
        relationHisto = new RelationsHelper().getRelationHistoriqueAll(connect.getPoolConnexion(), idConcept, idThesaurus, lang);
        nonPrefTermHisto = new TermHelper().getNonPreferredTermsHistoriqueAll(connect.getPoolConnexion(), idTerm, idThesaurus, lang);
        termHisto = new TermHelper().getTermsHistoriqueAll(connect.getPoolConnexion(), idTerm, idThesaurus, lang);
    }
}
Also used : ConceptHelper(mom.trd.opentheso.bdd.helper.ConceptHelper) NoteHelper(mom.trd.opentheso.bdd.helper.NoteHelper) GroupHelper(mom.trd.opentheso.bdd.helper.GroupHelper) RelationsHelper(mom.trd.opentheso.bdd.helper.RelationsHelper) TermHelper(mom.trd.opentheso.bdd.helper.TermHelper)

Example 12 with NoteHelper

use of mom.trd.opentheso.bdd.helper.NoteHelper in project opentheso by miledrousset.

the class SelectedTerme method editNote.

/**
 * Cette fontion permet de modifié l'information du note
 */
public void editNote() {
    int idUser = user.getUser().getId();
    if (note.isEmpty()) {
        deleteThisNoteOfConcept("note");
        return;
    }
    if (new NoteHelper().isNoteExistOfConcept(connect.getPoolConnexion(), idC, idTheso, idlangue, "note")) {
        new NoteHelper().updateConceptNote(connect.getPoolConnexion(), idC, idlangue, idTheso, note, "note", idUser);
    } else {
        new NoteHelper().addConceptNote(connect.getPoolConnexion(), idC, idlangue, idTheso, note, "note", idUser);
    }
    majNotes();
    FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info12")));
}
Also used : NoteHelper(mom.trd.opentheso.bdd.helper.NoteHelper) FacesMessage(javax.faces.application.FacesMessage)

Example 13 with NoteHelper

use of mom.trd.opentheso.bdd.helper.NoteHelper in project opentheso by miledrousset.

the class SelectedTerme method editDef.

/**
 * Crée ou modifie la définition du terme courant
 */
public void editDef() {
    int idUser = user.getUser().getId();
    if (definition.isEmpty()) {
        deleteThisNoteOfConcept("note");
        return;
    }
    if (new NoteHelper().isNoteExistOfTerm(connect.getPoolConnexion(), idT, idTheso, idlangue, "definition")) {
        new NoteHelper().updateTermNote(connect.getPoolConnexion(), idT, idlangue, idTheso, definition, "definition", idUser);
    } else {
        new NoteHelper().addTermNote(connect.getPoolConnexion(), idT, idlangue, idTheso, definition, "definition", idUser);
    }
    majNotes();
    FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info3")));
}
Also used : NoteHelper(mom.trd.opentheso.bdd.helper.NoteHelper) FacesMessage(javax.faces.application.FacesMessage)

Example 14 with NoteHelper

use of mom.trd.opentheso.bdd.helper.NoteHelper in project opentheso by miledrousset.

the class SelectedTerme method editNoteApp.

public void editNoteApp() {
    int idUser = user.getUser().getId();
    if (noteApplication.isEmpty()) {
        deleteThisNoteOfConcept("note");
        return;
    }
    if (new NoteHelper().isNoteExistOfConcept(connect.getPoolConnexion(), idC, idTheso, idlangue, "scopeNote")) {
        new NoteHelper().updateConceptNote(connect.getPoolConnexion(), idC, idlangue, idTheso, noteApplication, "scopeNote", idUser);
    } else {
        new NoteHelper().addConceptNote(connect.getPoolConnexion(), idC, idlangue, idTheso, noteApplication, "scopeNote", idUser);
    }
    majNotes();
    FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info12")));
}
Also used : NoteHelper(mom.trd.opentheso.bdd.helper.NoteHelper) FacesMessage(javax.faces.application.FacesMessage)

Example 15 with NoteHelper

use of mom.trd.opentheso.bdd.helper.NoteHelper in project opentheso by miledrousset.

the class SelectedTerme method deleteThisNoteOfTerm.

/**
 * Cette fonction permet de supprimer une note suivant son type
 *
 * @param noteTypeCode
 */
public void deleteThisNoteOfTerm(String noteTypeCode) {
    int idUser = user.getUser().getId();
    new NoteHelper().deleteThisNoteOfTerm(connect.getPoolConnexion(), idT, idTheso, idlangue, noteTypeCode);
    majNotes();
    FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info13")));
}
Also used : NoteHelper(mom.trd.opentheso.bdd.helper.NoteHelper) FacesMessage(javax.faces.application.FacesMessage)

Aggregations

NoteHelper (mom.trd.opentheso.bdd.helper.NoteHelper)24 TermHelper (mom.trd.opentheso.bdd.helper.TermHelper)14 ConceptHelper (mom.trd.opentheso.bdd.helper.ConceptHelper)12 NodeNote (mom.trd.opentheso.bdd.helper.nodes.notes.NodeNote)12 Term (mom.trd.opentheso.bdd.datas.Term)11 AlignmentHelper (mom.trd.opentheso.bdd.helper.AlignmentHelper)11 NodeEM (mom.trd.opentheso.bdd.helper.nodes.NodeEM)11 Concept (mom.trd.opentheso.bdd.datas.Concept)9 NodeTerm (mom.trd.opentheso.bdd.helper.nodes.term.NodeTerm)9 FacesMessage (javax.faces.application.FacesMessage)8 SQLException (java.sql.SQLException)5 NodeTermTraduction (mom.trd.opentheso.bdd.helper.nodes.term.NodeTermTraduction)5 SKOSMapping (skos.SKOSMapping)5 SKOSTopConcept (skos.SKOSTopConcept)5 ArrayList (java.util.ArrayList)4 RelationsHelper (mom.trd.opentheso.bdd.helper.RelationsHelper)4 Connection (java.sql.Connection)3 HierarchicalRelationship (mom.trd.opentheso.bdd.datas.HierarchicalRelationship)3 NodeAlignment (mom.trd.opentheso.bdd.helper.nodes.NodeAlignment)3 SKOSAnnotation (org.semanticweb.skos.SKOSAnnotation)3