Search in sources :

Example 1 with ToolsHelper

use of mom.trd.opentheso.bdd.helper.ToolsHelper in project opentheso by miledrousset.

the class ImportSkosHelper method getNewId.

private String getNewId() {
    ConceptHelper conceptHelper = new ConceptHelper();
    ToolsHelper toolsHelper = new ToolsHelper();
    String id = toolsHelper.getNewId(10);
    while (conceptHelper.isIdExiste(ds, id, thesaurus.getId_thesaurus())) {
        id = toolsHelper.getNewId(10);
    }
    return id;
}
Also used : ToolsHelper(mom.trd.opentheso.bdd.helper.ToolsHelper) ConceptHelper(mom.trd.opentheso.bdd.helper.ConceptHelper)

Example 2 with ToolsHelper

use of mom.trd.opentheso.bdd.helper.ToolsHelper in project opentheso by miledrousset.

the class ImportRdf4jHelper method getNewGroupId.

private String getNewGroupId() {
    GroupHelper groupHelper = new GroupHelper();
    ToolsHelper toolsHelper = new ToolsHelper();
    String id = toolsHelper.getNewId(10);
    while (groupHelper.isIdOfGroup(ds, id, thesaurus.getId_thesaurus())) {
        id = toolsHelper.getNewId(10);
    }
    return id;
}
Also used : ToolsHelper(mom.trd.opentheso.bdd.helper.ToolsHelper) GroupHelper(mom.trd.opentheso.bdd.helper.GroupHelper)

Example 3 with ToolsHelper

use of mom.trd.opentheso.bdd.helper.ToolsHelper in project opentheso by miledrousset.

the class SelectedThesaurus method regenerateOrphan.

/**
 * Cette fonction permet de regénérer les Orphelins
 *
 * @return
 */
public boolean regenerateOrphan() {
    if (thesaurus.getLanguage() == null || thesaurus.getId_thesaurus() == null) {
        return false;
    }
    if (!new ToolsHelper().orphanDetect(connect.getPoolConnexion(), thesaurus.getId_thesaurus())) {
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error"), "error"));
        vue.setRegenerateOrphan(0);
        return false;
    }
    return true;
}
Also used : ToolsHelper(mom.trd.opentheso.bdd.helper.ToolsHelper) FacesMessage(javax.faces.application.FacesMessage)

Example 4 with ToolsHelper

use of mom.trd.opentheso.bdd.helper.ToolsHelper in project opentheso by miledrousset.

the class SelectedThesaurus method removeLoopRelations.

private void removeLoopRelations() {
    if (thesaurus.getLanguage() == null || thesaurus.getId_thesaurus() == null) {
        return;
    }
    new ToolsHelper().removeLoopRelations(connect.getPoolConnexion(), "BT", thesaurus.getId_thesaurus());
    new ToolsHelper().removeLoopRelations(connect.getPoolConnexion(), "NT", thesaurus.getId_thesaurus());
    new ToolsHelper().removeLoopRelations(connect.getPoolConnexion(), "RT", thesaurus.getId_thesaurus());
}
Also used : ToolsHelper(mom.trd.opentheso.bdd.helper.ToolsHelper)

Aggregations

ToolsHelper (mom.trd.opentheso.bdd.helper.ToolsHelper)4 FacesMessage (javax.faces.application.FacesMessage)1 ConceptHelper (mom.trd.opentheso.bdd.helper.ConceptHelper)1 GroupHelper (mom.trd.opentheso.bdd.helper.GroupHelper)1