Search in sources :

Example 11 with NodeGroup

use of mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup in project opentheso by miledrousset.

the class GroupHelper method getListConceptGroup2.

public ArrayList<NodeGroup> getListConceptGroup2(HikariDataSource ds, String idThesaurus, String idLang) throws SQLException {
    ArrayList<NodeGroup> nodeConceptGroupList;
    ArrayList tabIdConceptGroup = getListIdOfGroup(ds, idThesaurus);
    nodeConceptGroupList = new ArrayList<>();
    for (Object tabIdGroup1 : tabIdConceptGroup) {
        NodeGroup nodeConceptGroup;
        getThisConceptGroup2(ds, tabIdGroup1.toString(), idThesaurus, idLang, nodeConceptGroupList);
    }
    return nodeConceptGroupList;
}
Also used : ArrayList(java.util.ArrayList) NodeGroup(mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup)

Example 12 with NodeGroup

use of mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup in project opentheso by miledrousset.

the class SelectedThesaurus method listeDomaine.

/**
 * Récupère la liste des domaines du thésaurus courant
 *
 * @return un tableau de SelectItem contenant les domaine permetant de les
 * afficher dans une liste déroulante
 */
public SelectItem[] listeDomaine() {
    ArrayList<NodeGroup> lesDomaines = new GroupHelper().getListConceptGroup(connect.getPoolConnexion(), thesaurus.getId_thesaurus(), thesaurus.getLanguage());
    SelectItem[] laListe = new SelectItem[lesDomaines.size() + 1];
    int i = 1;
    laListe[0] = new SelectItem("", "");
    for (NodeGroup ncg : lesDomaines) {
        laListe[i] = new SelectItem(ncg.getConceptGroup().getIdgroup(), ncg.getLexicalValue() + "(" + ncg.getConceptGroup().getIdgroup() + ")");
        i++;
    }
    return laListe;
}
Also used : SelectItem(javax.faces.model.SelectItem) GroupHelper(mom.trd.opentheso.bdd.helper.GroupHelper) NodeGroup(mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup)

Example 13 with NodeGroup

use of mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup 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 14 with NodeGroup

use of mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup 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 15 with NodeGroup

use of mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup in project opentheso by miledrousset.

the class skosExportBean method init.

public void init(String idTheso, String idLang) {
    this.idTheso = idTheso;
    ThesaurusHelper thesaurusHelper = new ThesaurusHelper();
    languagesOfTheso = thesaurusHelper.getAllUsedLanguagesOfThesaurusNode(connect.getPoolConnexion(), idTheso);
    GroupHelper groupHelper = new GroupHelper();
    groupList = groupHelper.getListRootConceptGroup(connect.getPoolConnexion(), idTheso, idLang);
    selectedLanguages = new ArrayList<>();
    selectedGroups = new ArrayList<>();
    selectedLanguages = new ArrayList<>();
    for (NodeLang nodeLang : languagesOfTheso) {
        selectedLanguages.add(nodeLang);
    }
    selectedGroups = new ArrayList<>();
    for (NodeGroup nodeGroup : groupList) {
        selectedGroups.add(nodeGroup);
    }
}
Also used : ThesaurusHelper(mom.trd.opentheso.bdd.helper.ThesaurusHelper) NodeLang(mom.trd.opentheso.bdd.helper.nodes.NodeLang) GroupHelper(mom.trd.opentheso.bdd.helper.GroupHelper) NodeGroup(mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup)

Aggregations

NodeGroup (mom.trd.opentheso.bdd.helper.nodes.group.NodeGroup)29 GroupHelper (mom.trd.opentheso.bdd.helper.GroupHelper)18 ArrayList (java.util.ArrayList)8 Connection (java.sql.Connection)7 PreparedStatement (java.sql.PreparedStatement)7 ResultSet (java.sql.ResultSet)7 SQLException (java.sql.SQLException)7 Statement (java.sql.Statement)7 ConceptHelper (mom.trd.opentheso.bdd.helper.ConceptHelper)5 ThesaurusHelper (mom.trd.opentheso.bdd.helper.ThesaurusHelper)4 ConceptGroup (mom.trd.opentheso.bdd.datas.ConceptGroup)3 StatisticHelper (mom.trd.opentheso.bdd.helper.StatisticHelper)2 MyTreeNode (mom.trd.opentheso.bdd.helper.nodes.MyTreeNode)2 NodeLang (mom.trd.opentheso.bdd.helper.nodes.NodeLang)2 NodeThesaurus (mom.trd.opentheso.bdd.helper.nodes.thesaurus.NodeThesaurus)2 DefaultTreeNode (org.primefaces.model.DefaultTreeNode)2 TreeNode (org.primefaces.model.TreeNode)2 DateFormat (java.text.DateFormat)1 SimpleDateFormat (java.text.SimpleDateFormat)1 FacesMessage (javax.faces.application.FacesMessage)1