use of mom.trd.opentheso.bdd.helper.GroupHelper in project opentheso by miledrousset.
the class NewTreeBean method changeGroupType.
public void changeGroupType(String type, TreeNode sbn) {
((MyTreeNode) sbn).setTypeDomaine(type);
GroupHelper gh = new GroupHelper();
gh.updateTypeGroup(this.connect.getPoolConnexion(), type, idThesoSelected, ((MyTreeNode) sbn).getIdConcept());
this.onNodeExpand(sbn);
for (TreeNode sn : sbn.getChildren()) {
if (((MyTreeNode) sn).isIsSubGroup())
changeGroupType(type, sn);
}
}
use of mom.trd.opentheso.bdd.helper.GroupHelper in project opentheso by miledrousset.
the class SearchBean method getNom.
public String getNom(String id) {
String nom;
ConceptHelper ch = new ConceptHelper();
Concept c = ch.getThisConcept(connect.getPoolConnexion(), id, theso.getThesaurus().getId_thesaurus());
if (c == null) {
nom = new GroupHelper().getLexicalValueOfGroup(connect.getPoolConnexion(), id, theso.getThesaurus().getId_thesaurus(), theso.getThesaurus().getLanguage());
} else {
nom = ch.getLexicalValueOfConcept(connect.getPoolConnexion(), id, theso.getThesaurus().getId_thesaurus(), theso.getThesaurus().getLanguage());
}
return nom;
}
use of mom.trd.opentheso.bdd.helper.GroupHelper in project opentheso by miledrousset.
the class SearchBean method research.
public void research() {
result1 = new ArrayList<>();
result2 = new ArrayList<>();
if (typeSearch == 1) {
// ALPHABETIQUE/HIERARCHIQUE
if (typeValueSearch == 0) {
if (onlyNote) {
result1 = new SearchHelper().searchNote(connect.getPoolConnexion(), entry, langue.trim(), theso.getThesaurus().getId_thesaurus(), idGroup, startByOrContain);
} else {
if (onlyNotation) {
result1 = new SearchHelper().searchNotation(connect.getPoolConnexion(), entry, langue.trim(), theso.getThesaurus().getId_thesaurus(), idGroup);
} else {
result1 = new SearchHelper().searchTerm(connect.getPoolConnexion(), entry, langue.trim(), theso.getThesaurus().getId_thesaurus(), idGroup, startByOrContain, withNote);
}
}
} else if (typeValueSearch == 1) {
// idC
result1 = new SearchHelper().searchIdConcept(connect.getPoolConnexion(), entry, theso.getThesaurus().getId_thesaurus(), theso.getWorkLanguage());
}
nbRes = result1.size();
} else if (typeSearch == 2) {
// PERMUTEE
if (typeValueSearch == 0) {
// Terme
if (idGroup == null || idGroup.equals("")) {
result2 = new SearchHelper().getListPermute(connect.getPoolConnexion(), theso.getThesaurus().getId_thesaurus(), langue.trim(), entry);
// result2.addAll(new SearchHelper().getListPermuteNonPreferredTerm(connect.getPoolConnexion(), theso.getThesaurus().getId_thesaurus(), langue.trim(), entry));
} else {
result2 = new SearchHelper().getListPermute(connect.getPoolConnexion(), theso.getThesaurus().getId_thesaurus(), langue.trim(), entry, idGroup);
// result2.addAll(new SearchHelper().getListPermuteNonPreferredTerm(connect.getPoolConnexion(), theso.getThesaurus().getId_thesaurus(), langue.trim(), entry, idGroup));
}
nbRes = result2.size();
} else if (typeValueSearch == 1) {
// idC
typeSearch = 1;
result1 = new SearchHelper().searchIdConcept(connect.getPoolConnexion(), entry, theso.getThesaurus().getId_thesaurus());
nbRes = result1.size();
}
}
if (!langue.isEmpty()) {
if (!langue.trim().equals(theso.getThesaurus().getLanguage())) {
theso.getThesaurus().setLanguage(langue.trim());
theso.update();
}
}
for (NodeSearch ns : result1) {
String temp;
if (typeValueSearch == 1) {
temp = new GroupHelper().getLexicalValueOfGroup(connect.getPoolConnexion(), ns.getIdGroup(), theso.getThesaurus().getId_thesaurus(), theso.getWorkLanguage());
} else
temp = new GroupHelper().getLexicalValueOfGroup(connect.getPoolConnexion(), ns.getIdGroup(), theso.getThesaurus().getId_thesaurus(), theso.getThesaurus().getLanguage());
ns.setGroupLabel(temp);
}
theso.getVue().setOnglet(1);
}
use of mom.trd.opentheso.bdd.helper.GroupHelper in project opentheso by miledrousset.
the class SelectedCandidat method showGroup.
/**
* permet de récupérer les Groups du concept sur lequel il faut accrocher le candidat
* @param np
*/
private void showGroup(NodeProposition np) {
boolean first = true;
ArrayList<NodeGroup> nodeGroups = new GroupHelper().getListGroupOfConcept(connect.getPoolConnexion(), idTheso, np.getIdConceptParent(), langueTheso);
for (NodeGroup nodeGroup : nodeGroups) {
if (first) {
domaine = nodeGroup.getLexicalValue();
first = false;
} else {
domaine = domaine + "; " + nodeGroup.getLexicalValue();
}
}
}
use of mom.trd.opentheso.bdd.helper.GroupHelper in project opentheso by miledrousset.
the class SelectedCandidat method setLevelInfos.
/**
* permet d'initialiser les Groupes pour le niveau de concept sélectionné dans le thésauurus
* @param idConcept
* @param idLang
* @return
*/
private boolean setLevelInfos(String idConcept, String idLang) {
GroupHelper groupHelper = new GroupHelper();
ArrayList<NodeGroup> nodeGroups = groupHelper.getListGroupOfConcept(connect.getPoolConnexion(), idTheso, idConcept, idLang);
if (nodeGroups == null)
return false;
String tmp = "";
boolean first = true;
for (NodeGroup nodeGroup : nodeGroups) {
if (!first)
tmp = tmp + "; ";
tmp = tmp + nodeGroup.getLexicalValue();
first = false;
}
selectedNvx.setGroupLexicalValue(tmp);
return true;
}
Aggregations