Search in sources :

Example 1 with StatisticHelper

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

the class StatBean method findCptByGroup.

/**
 * méthode pour charger des concepts en filtrant par un groupe
 * #JM
 * @param idTheso
 * @param langue
 */
public void findCptByGroup(String idTheso, String langue) {
    if (this.selectedGroup == null) {
        this.selectedGroup = this.statGroup.get(0);
    }
    String group = this.selectedGroup.split("\\(")[1];
    group = group.replace(")", "");
    statConcept = new StatisticHelper().getStatConceptByGroupAndDate(connect.getPoolConnexion(), "" + new java.sql.Date(0), "" + new Date(), "created", idTheso, lang, group, this.limit);
}
Also used : StatisticHelper(mom.trd.opentheso.bdd.helper.StatisticHelper) Date(java.util.Date)

Example 2 with StatisticHelper

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

the class StatBean method loadStatTheso.

public void loadStatTheso(String idTheso, String langue) {
    statTheso = new ArrayList<>();
    nbCpt = new StatisticHelper().getNbCpt(connect.getPoolConnexion(), idTheso);
    ArrayList<NodeGroup> lng = new GroupHelper().getListConceptGroup(connect.getPoolConnexion(), idTheso, langue);
    Collections.sort(lng);
    StatisticHelper sh = new StatisticHelper();
    for (NodeGroup ng : lng) {
        NodeStatTheso nst = new NodeStatTheso();
        nst.setGroup(ng.getLexicalValue() + "(" + ng.getConceptGroup().getIdgroup() + ")");
        nst.setNbDescripteur(sh.getNbDescOfGroup(connect.getPoolConnexion(), idTheso, ng.getConceptGroup().getIdgroup()));
        nst.setNbNonDescripteur(sh.getNbNonDescOfGroup(connect.getPoolConnexion(), idTheso, ng.getConceptGroup().getIdgroup(), langue));
        int termNonTraduit = nst.getNbDescripteur() - sh.getNbTradOfGroup(connect.getPoolConnexion(), idTheso, ng.getConceptGroup().getIdgroup(), langue);
        nst.setNbNoTrad(termNonTraduit);
        int nombreNote = sh.getNbDefinitionNoteOfGroup(connect.getPoolConnexion(), idTheso, langue, ng.getConceptGroup().getIdgroup());
        nst.setNbNotes(nombreNote);
        statTheso.add(nst);
    }
    vue.setStatTheso(true);
    vue.setStatCpt(false);
    vue.setStatPermuted(false);
}
Also used : StatisticHelper(mom.trd.opentheso.bdd.helper.StatisticHelper) GroupHelper(mom.trd.opentheso.bdd.helper.GroupHelper) NodeStatTheso(mom.trd.opentheso.bdd.helper.nodes.statistic.NodeStatTheso) NodeGroup(mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup)

Example 3 with StatisticHelper

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

the class showPermuted method loadStatPermuted.

public void loadStatPermuted(String idTheso, String idLange) throws SQLException {
    Thesaurus datatheso = new Thesaurus();
    Connexion conn = new Connexion();
    String id_theso = datatheso.getId_thesaurus();
    String langue = datatheso.getLanguage();
    statTheso = new ArrayList<>();
    ArrayList<NodeGroup> lng = new GroupHelper().getListConceptGroup2(connect.getPoolConnexion(), idTheso, idLange);
    StatisticHelper sh = new StatisticHelper();
    for (NodeGroup ng : lng) {
        prendrePermuted nst = new prendrePermuted();
        nst.setOrd(ng.getOrde());
        nst.setId_concept(ng.getId_concept());
        nst.setId_group(ng.getId_group());
        nst.setId_theso(idTheso);
        nst.setId_lang(idLange);
        nst.setLexical_value(ng.getLexicalValue());
        nst.setIspreferredterm(ng.isIspreferredterm());
        nst.setOriginal_value(ng.getOriginal_value());
        statTheso.add(nst);
    }
    vue.setStatPermuted(true);
    vue.setStatTheso(false);
    vue.setStatCpt(false);
}
Also used : Thesaurus(mom.trd.opentheso.bdd.datas.Thesaurus) StatisticHelper(mom.trd.opentheso.bdd.helper.StatisticHelper) Connexion(mom.trd.opentheso.bdd.helper.Connexion) GroupHelper(mom.trd.opentheso.bdd.helper.GroupHelper) NodeGroup(mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup) mom.trd.opentheso.core.exports.privatesdatas.prendrePermuted(mom.trd.opentheso.core.exports.privatesdatas.prendrePermuted)

Example 4 with StatisticHelper

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

the class SelectedTerme method getTheNbConceptOfBranch.

/**
 * Fonction pour trouver le nombre des concepts dans une branche
 *
 * @return
 */
public String getTheNbConceptOfBranch() {
    if (totalConceptOfBranch.isEmpty()) {
        StatisticHelper statisticHelper = new StatisticHelper();
        int tot = statisticHelper.getConceptCountOfBranch(connect.getPoolConnexion(), idC, idTheso);
        totalConceptOfBranch = "" + tot;
    }
    return totalConceptOfBranch;
}
Also used : StatisticHelper(mom.trd.opentheso.bdd.helper.StatisticHelper)

Aggregations

StatisticHelper (mom.trd.opentheso.bdd.helper.StatisticHelper)4 GroupHelper (mom.trd.opentheso.bdd.helper.GroupHelper)2 NodeGroup (mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup)2 Date (java.util.Date)1 Thesaurus (mom.trd.opentheso.bdd.datas.Thesaurus)1 Connexion (mom.trd.opentheso.bdd.helper.Connexion)1 NodeStatTheso (mom.trd.opentheso.bdd.helper.nodes.statistic.NodeStatTheso)1 mom.trd.opentheso.core.exports.privatesdatas.prendrePermuted (mom.trd.opentheso.core.exports.privatesdatas.prendrePermuted)1