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;
}
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;
}
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);
}
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);
}
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);
}
}
Aggregations