use of mom.trd.opentheso.bdd.helper.AlignmentHelper in project opentheso by miledrousset.
the class GpsBeans method alignementautomatique.
/**
* Ajoute de manière automatique un alignement
*
* @param idTerm
* @return
*/
private boolean alignementautomatique(String idTerm) {
boolean status = false;
AlignmentHelper alignmentHelper = new AlignmentHelper();
if (alignmentHelper.addNewAlignment(connect.getPoolConnexion(), theUser.getUser().getId(), alignment_choisi.getName(), alignementPreferences.getSource(), alignment_choisi.getIdUrl(), 1, id_concept, id_theso, alignementPreferences.getId())) {
}
return status;
}
use of mom.trd.opentheso.bdd.helper.AlignmentHelper in project opentheso by miledrousset.
the class SelectedTerme method setAlignementSources.
/* public void setAlignementSources(ArrayList<AlignementSource> alignementSources) {
this.alignementSources = alignementSources;
}
*/
public void setAlignementSources() {
AlignmentHelper alignmentHelper = new AlignmentHelper();
alignementSources = alignmentHelper.getAlignementSource(connect.getPoolConnexion(), idTheso);
// return alignementSources;
}
use of mom.trd.opentheso.bdd.helper.AlignmentHelper in project opentheso by miledrousset.
the class SelectedTerme method majTerme.
/**
* *************************************** MISE A JOUR
* ****************************************
*/
/**
* Met à jour le terme à la sélection d'un node de l'arbre (traitement
* différent si Domaine/TopConcept/Concept)
*
* @param sN
*/
public void majTerme(MyTreeNode sN) {
// contrôler si la connexion est toujour valide
// connect.
selectedNode = sN;
reInitTerme();
majPref();
idC = sN.getIdConcept();
idTheso = sN.getIdTheso();
idlangue = sN.getLangue();
idDomaine = sN.getIdCurrentGroup();
idTopConcept = sN.getIdTopConcept();
type = sN.getTypeConcept();
status = "";
notation = "";
latitudLongitud = null;
totalConceptOfBranch = "";
totalNoticesOfBranch = "";
majTAsso();
GroupHelper groupHelper = new GroupHelper();
ConceptHelper conceptHelper = new ConceptHelper();
if (groupHelper.isIdOfGroup(connect.getPoolConnexion(), idC, idTheso)) {
microTheso = new GroupHelper().getLexicalValueOfGroup(connect.getPoolConnexion(), idDomaine, idTheso, idlangue);
NodeGroup ncg = new GroupHelper().getThisConceptGroup(connect.getPoolConnexion(), idC, idTheso, idlangue);
DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
nom = ncg.getLexicalValue();
idArk = ncg.getConceptGroup().getIdARk();
nomEdit = nom;
idT = "";
if (ncg.getCreated() != null && ncg.getModified() != null) {
dateC = dateFormat.format(ncg.getCreated());
dateM = dateFormat.format(ncg.getModified());
}
majGroupTGen();
majLangueGroup();
majTSpeGroup();
majNotes();
} else {
Concept concept = conceptHelper.getThisConcept(connect.getPoolConnexion(), idC, idTheso);
if (concept == null) {
return;
}
status = concept.getStatus();
notation = concept.getNotation();
if (!idDomaine.equals("Orphan")) {
majGroup();
majTGen();
} else {
microTheso = idDomaine;
}
Term t = new TermHelper().getThisTerm(connect.getPoolConnexion(), idC, idTheso, idlangue);
DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
nom = t.getLexical_value();
nomEdit = nom;
idT = t.getId_term();
dateC = dateFormat.format(t.getCreated());
dateM = dateFormat.format(t.getModified());
creator = t.getCreator();
contributor = t.getContributor();
images = new ImagesHelper().getImage(connect.getPoolConnexion(), idC, idTheso, user.getUser().getId());
majNotes();
majLangueConcept();
majSyno();
updateGps();
majTSpeConcept();
align = new AlignmentHelper().getAllAlignmentOfConcept(connect.getPoolConnexion(), idC, idTheso);
// ResourceBundle bundlePref = getBundlePref();
if (user.getNodePreference().isZ3950actif()) {
majNoticeZ3950();
}
if (user.getNodePreference().isBddActive()) {
majNoticeBdd();
}
idArk = conceptHelper.getIdArkOfConcept(connect.getPoolConnexion(), idC, idTheso);
idHandle = conceptHelper.getIdHandleOfConcept(connect.getPoolConnexion(), idC, idTheso);
reInitFacette();
initTree();
}
}
use of mom.trd.opentheso.bdd.helper.AlignmentHelper in project opentheso by miledrousset.
the class SelectedTerme method creerAlign.
public void creerAlign() {
AlignmentHelper alignmentHelper = new AlignmentHelper();
if (valueEdit == null || valueEdit2 == null || linkEdit == null || /*valueEdit.equals("") || valueEdit2.equals("") ||*/
linkEdit.equals("")) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("sTerme.error5")));
} else {
alignmentHelper.addNewAlignment(connect.getPoolConnexion(), user.getUser().getId(), valueEdit2.trim(), valueEdit.trim(), linkEdit.trim(), Integer.parseInt(statutEdit), idC, idTheso, 0);
valueEdit = "";
valueEdit2 = "";
linkEdit = "";
statutEdit = "";
align = alignmentHelper.getAllAlignmentOfConcept(connect.getPoolConnexion(), idC, idTheso);
vue.setAddAlign(0);
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info9")));
}
}
use of mom.trd.opentheso.bdd.helper.AlignmentHelper in project opentheso by miledrousset.
the class SelectedTerme method addOtherThesoAlign.
public void addOtherThesoAlign(NodeAutoCompletion term, String idOtherTheso, int alignType) {
if (term == null) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error :", "No term selected"));
return;
}
String termUri = "test/" + term.getIdConcept();
new AlignmentHelper().addNewAlignment(connect.getPoolConnexion(), user.getUser().getId(), term.getIdConcept(), idOtherTheso, termUri, alignType, idC, idTheso, -1);
align = new AlignmentHelper().getAllAlignmentOfConcept(connect.getPoolConnexion(), idC, idTheso);
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info11")));
vue.setAddAlign(0);
}
Aggregations