use of mom.trd.opentheso.bdd.helper.nodes.NodeAutoCompletion in project opentheso by miledrousset.
the class SelectedCandidat method initNewProposal.
private void initNewProposal() {
selectedNvx = new NodeAutoCompletion();
noteEdit = "";
domaineEdit = "";
niveauEdit = "";
valueEdit = "";
}
use of mom.trd.opentheso.bdd.helper.nodes.NodeAutoCompletion in project opentheso by miledrousset.
the class SelectedTerme method initConceptFusion.
/**
* initialisation pour la fusion des concepts.
*
* @return
*/
public boolean initConceptFusion() {
conceptFusionId = "";
conceptFusionNodeRT = new ArrayList<>();
conceptFusionAlign = new ArrayList<>();
selectedTermComp = new NodeAutoCompletion();
return true;
}
use of mom.trd.opentheso.bdd.helper.nodes.NodeAutoCompletion in project opentheso by miledrousset.
the class AutoCompletBean method newSpecialTSpe.
public void newSpecialTSpe() {
createValid = false;
terme.setValueEdit(terme.getSelectedTermComp().getTermLexicalValue());
if (terme.getValueEdit().trim().equals("")) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("tree.error1")));
return;
}
String valueEdit = terme.getValueEdit().trim();
// vérification si c'est le même nom, on fait rien
if (valueEdit.equalsIgnoreCase(terme.getNom())) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("autoComp.impossible")));
return;
}
// vérification si le term à ajouter existe déjà
if ((terme.isTermExist(valueEdit)) != null) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("sTerme.error6")));
return;
}
String BTtag = null;
switch(tree.getNTtag()) {
case "NTG":
BTtag = "BTG";
break;
case "NTP":
BTtag = "BTP";
break;
case "NTI":
BTtag = "BTI";
break;
}
if (!terme.creerSpecialTermeSpe(((MyTreeNode) tree.getSelectedNode()), BTtag, tree.getNTtag())) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("error")));
return;
} else {
tree.reInit();
tree.reExpand();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", valueEdit + " " + langueBean.getMsg("tree.info1")));
}
terme.setSelectedTermComp(new NodeAutoCompletion());
createValid = true;
}
use of mom.trd.opentheso.bdd.helper.nodes.NodeAutoCompletion in project opentheso by miledrousset.
the class AutoCompletBean method completOtherGroup.
public List<NodeAutoCompletion> completOtherGroup(String query) {
selectedAtt = new NodeAutoCompletion();
List<NodeAutoCompletion> liste = new ArrayList<>();
if (theso.getThesaurus().getId_thesaurus() != null && theso.getThesaurus().getLanguage() != null) {
liste = new GroupHelper().getAutoCompletionOtherGroup(connect.getPoolConnexion(), theso.getThesaurus().getId_thesaurus(), terme.getIdDomaine(), theso.getThesaurus().getLanguage(), query);
}
return liste;
}
use of mom.trd.opentheso.bdd.helper.nodes.NodeAutoCompletion in project opentheso by miledrousset.
the class AutoCompletBean method completGroup.
public List<NodeAutoCompletion> completGroup(String query) {
selectedAtt = new NodeAutoCompletion();
List<NodeAutoCompletion> liste = new ArrayList<>();
if (theso.getThesaurus().getId_thesaurus() != null && theso.getThesaurus().getLanguage() != null) {
liste = new GroupHelper().getAutoCompletionGroup(connect.getPoolConnexion(), theso.getThesaurus().getId_thesaurus(), theso.getThesaurus().getLanguage(), query);
}
return liste;
}
Aggregations