Search in sources :

Example 6 with GpsHelper

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

the class GpsBeans method creerAlignAuto.

public void creerAlignAuto(String idC, String idTheso, String nom, String idlangue) throws ParserConfigurationException, SAXException {
    GpsQuery gpsQuery = new GpsQuery();
    GpsHelper gpsHelper = new GpsHelper();
    if (selectedAlignement != null) {
        for (AlignementSource alignementSource : alignementSources) {
            if (alignementSource.getRequete() == null ? selectedAlignement == null : alignementSource.getRequete().equals(selectedAlignement)) {
                alignementPreferences = alignementSource;
            }
        }
        listAlignValues = new ArrayList<>();
        if ("REST".equalsIgnoreCase(alignementPreferences.getTypeRequete())) {
            if ("xml".equals(alignementPreferences.getAlignement_format())) {
                listAlignValues = gpsQuery.queryGps2(idC, idTheso, nom.trim(), idlangue, alignementPreferences.getRequete());
            }
        }
    }
}
Also used : GpsHelper(mom.trd.opentheso.bdd.helper.GpsHelper) GpsQuery(mom.trd.opentheso.core.alignment.GpsQuery) AlignementSource(mom.trd.opentheso.core.alignment.AlignementSource)

Example 7 with GpsHelper

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

the class GpsBeans method setListeAlignementSources1.

public void setListeAlignementSources1(String idtheso, int id_user) {
    id_theso = idtheso;
    id_user1 = id_user;
    GpsHelper gpsHelper = new GpsHelper();
    alignementSources = gpsHelper.getAlignementSource(connect.getPoolConnexion());
    if (!alignementSources.isEmpty()) {
        selectedAlignement = alignementSources.get(0).getSource();
    }
}
Also used : GpsHelper(mom.trd.opentheso.bdd.helper.GpsHelper)

Example 8 with GpsHelper

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

the class GpsBeans method validateParamretagesGps.

/**
 * Permet d'inserte dans la BDD les preferences du GPS pour cette Thesaurus
 *
 * @param id_Theso
 * @param id_lang
 */
public void validateParamretagesGps(String id_Theso, String id_lang, int id_user) {
    boolean status = true;
    if (selectedAlignement != null) {
        for (AlignementSource alignementSource : alignementSources) {
            if (alignementSource.getSource() == null ? selectedAlignement == null : alignementSource.getSource().equals(selectedAlignement)) {
                alignementPreferences = alignementSource;
            }
        }
        GpsHelper gpsHelper = new GpsHelper();
        if (!gpsHelper.garderPreferences(connect.getPoolConnexion(), id_Theso, integrerTraduction, remplacerTraduction, alignementAutomatique, alignementPreferences.getId(), id_user)) {
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", "Ne peux pas faire uptdate de preferences"));
            // message error
            status = false;
        }
    } else {
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", "Vous besoin selectionée une source"));
    }
    if (status) {
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", " validation de parametrisage fait!"));
    }
}
Also used : GpsHelper(mom.trd.opentheso.bdd.helper.GpsHelper) FacesMessage(javax.faces.application.FacesMessage) AlignementSource(mom.trd.opentheso.core.alignment.AlignementSource)

Example 9 with GpsHelper

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

the class ImportSkosHelper method addConcepts.

/**
 * récupération des concepts
 * @return
 */
public boolean addConcepts() {
    String uri;
    Value value;
    boolean isTopConcept = true;
    Concept concept = new Concept();
    ConceptHelper conceptHelper = new ConceptHelper();
    TermHelper termHelper = new TermHelper();
    NoteHelper noteHelper = new NoteHelper();
    Term term = new Term();
    AlignmentHelper alignmentHelper = new AlignmentHelper();
    // pour intégrer les coordonnées GPS
    NodeGps nodeGps = new NodeGps();
    GpsHelper gpsHelper = new GpsHelper();
    // ajout des termes et traductions
    NodeTerm nodeTerm = new NodeTerm();
    ArrayList<NodeTermTraduction> nodeTermTraductionList = new ArrayList<>();
    // Enregister les synonymes et traductions
    ArrayList<NodeEM> nodeEMList = new ArrayList<>();
    // ajout des notes
    ArrayList<NodeNote> nodeNotes = new ArrayList<>();
    // ajout des alignements
    ArrayList<NodeAlignment> nodeAlignments = new ArrayList<>();
    // ajout des relations
    ArrayList<HierarchicalRelationship> hierarchicalRelationships = new ArrayList<>();
    // ajout des relations Groups
    ArrayList<String> idGrps = new ArrayList<>();
    if (dataSet.getSKOSConcepts().isEmpty())
        return false;
    conceptsCount = dataSet.getSKOSConcepts().size();
    // i can get all the concepts from this scheme
    for (SKOSConcept skosConcept : dataSet.getSKOSConcepts()) {
        // URI du Concept récupération automatique de l'identifiant
        String id = getIdFromUri(skosConcept.getURI().toString());
        if (id == null || id.isEmpty()) {
            message = message + "identifiant null pour l'URI : " + skosConcept.getURI().toString();
            continue;
        } else {
            concept.setIdConcept(id);
        }
        concept.setIdThesaurus(thesaurus.getId_thesaurus());
        // concept.setIdGroup(idGroup.get(0));
        concept.setNotation("");
        // skos:notation
        /* if(anno.getURI().getFragment().equalsIgnoreCase("notation")) {
                            value = getValue(anno);
                            NodeTermTraduction nodeTermTraduction = new NodeTermTraduction();
                            nodeTermTraduction.setLexicalValue(value.getValue());
                            nodeTermTraduction.setLang(value.getLang());
                            nodeTermTraductionList.add(nodeTermTraduction);
                        }*/
        concept.setStatus("");
        concept.setIdArk(skosConcept.getURI().toString());
        for (SKOSAnnotation anno : skosConcept.getSKOSAnnotations(dataSet)) {
            // c'est une valeur
            if (anno.isAnnotationByConstant()) {
                // balises SKOS
                if (anno.getURI().getFragment() != null) {
                    // get notation
                    if (anno.getURI().getFragment().equalsIgnoreCase("notation")) {
                        value = getValue(anno);
                        concept.setNotation(value.getValue());
                    }
                    // get GPS : long and lat
                    if (anno.getURI().getFragment().equalsIgnoreCase("long")) {
                        value = getValue(anno);
                        nodeGps.setLongitude(Double.parseDouble(value.getValue()));
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("lat")) {
                        value = getValue(anno);
                        nodeGps.setLatitude(Double.parseDouble(value.getValue()));
                    }
                    // get altLabels
                    if (anno.getURI().getFragment().equalsIgnoreCase("prefLabel")) {
                        value = getValue(anno);
                        NodeTermTraduction nodeTermTraduction = new NodeTermTraduction();
                        nodeTermTraduction.setLexicalValue(value.getValue());
                        nodeTermTraduction.setLang(value.getLang());
                        nodeTermTraductionList.add(nodeTermTraduction);
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("altLabel")) {
                        value = getValue(anno);
                        NodeEM nodeEM = new NodeEM();
                        nodeEM.setLexical_value(value.getValue());
                        nodeEM.setLang(value.getLang());
                        nodeEM.setSource("" + idUser);
                        nodeEM.setStatus("USE");
                        nodeEM.setHiden(false);
                        nodeEMList.add(nodeEM);
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("hiddenLabel")) {
                        value = getValue(anno);
                        NodeEM nodeEM = new NodeEM();
                        nodeEM.setLexical_value(value.getValue());
                        nodeEM.setLang(value.getLang());
                        nodeEM.setSource("" + idUser);
                        nodeEM.setStatus("Hidden");
                        nodeEM.setHiden(true);
                        nodeEMList.add(nodeEM);
                    }
                    // get notes
                    if (anno.getURI().getFragment().equalsIgnoreCase("definition")) {
                        value = getValue(anno);
                        NodeNote nodeNote = new NodeNote();
                        nodeNote.setLang(value.getLang());
                        nodeNote.setLexicalvalue(value.getValue());
                        nodeNote.setNotetypecode("definition");
                        nodeNotes.add(nodeNote);
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("note")) {
                        value = getValue(anno);
                        NodeNote nodeNote = new NodeNote();
                        nodeNote.setLang(value.getLang());
                        nodeNote.setLexicalvalue(value.getValue());
                        nodeNote.setNotetypecode("note");
                        nodeNotes.add(nodeNote);
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("scopeNote")) {
                        value = getValue(anno);
                        NodeNote nodeNote = new NodeNote();
                        nodeNote.setLang(value.getLang());
                        nodeNote.setLexicalvalue(value.getValue());
                        nodeNote.setNotetypecode("scopeNote");
                        nodeNotes.add(nodeNote);
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("editorialNote")) {
                        value = getValue(anno);
                        NodeNote nodeNote = new NodeNote();
                        nodeNote.setLang(value.getLang());
                        nodeNote.setLexicalvalue(value.getValue());
                        nodeNote.setNotetypecode("editorialNote");
                        nodeNotes.add(nodeNote);
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("historyNote")) {
                        value = getValue(anno);
                        NodeNote nodeNote = new NodeNote();
                        nodeNote.setLang(value.getLang());
                        nodeNote.setLexicalvalue(value.getValue());
                        nodeNote.setNotetypecode("historyNote");
                        nodeNotes.add(nodeNote);
                    }
                } else // balises DublinCore dc
                {
                    uri = getIdFromUri(anno.getURI().toString());
                    if (uri.equalsIgnoreCase("created") || uri.equalsIgnoreCase("date")) {
                        concept = addDates(concept, formatDate, getValue(anno).getValue(), "created");
                    }
                    if (uri.equalsIgnoreCase("modified")) {
                        concept = addDates(concept, formatDate, getValue(anno).getValue(), "modified");
                    }
                    // get the identifier from dcterms ceci peut être aussi l'identifiant ark
                    if (uri.equalsIgnoreCase("identifier")) {
                        concept.setIdArk(getValue(anno).getValue());
                    }
                }
            } else // c'est une relation
            {
                // balises SKOS
                if (anno.getURI().getFragment() != null) {
                    // get relations hiérarchiques
                    if (anno.getURI().getFragment().equalsIgnoreCase("narrower")) {
                        uri = getIdFromUri(anno.getAnnotationValue().getURI().toString());
                        HierarchicalRelationship hierarchicalRelationship = new HierarchicalRelationship();
                        hierarchicalRelationship.setIdConcept1(concept.getIdConcept());
                        hierarchicalRelationship.setIdConcept2(uri);
                        hierarchicalRelationship.setIdThesaurus(thesaurus.getId_thesaurus());
                        hierarchicalRelationship.setRole("NT");
                        hierarchicalRelationships.add(hierarchicalRelationship);
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("broader")) {
                        uri = getIdFromUri(anno.getAnnotationValue().getURI().toString());
                        HierarchicalRelationship hierarchicalRelationship = new HierarchicalRelationship();
                        hierarchicalRelationship.setIdConcept1(concept.getIdConcept());
                        hierarchicalRelationship.setIdConcept2(uri);
                        hierarchicalRelationship.setIdThesaurus(thesaurus.getId_thesaurus());
                        hierarchicalRelationship.setRole("BT");
                        hierarchicalRelationships.add(hierarchicalRelationship);
                        isTopConcept = false;
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("related")) {
                        uri = getIdFromUri(anno.getAnnotationValue().getURI().toString());
                        HierarchicalRelationship hierarchicalRelationship = new HierarchicalRelationship();
                        hierarchicalRelationship.setIdConcept1(concept.getIdConcept());
                        hierarchicalRelationship.setIdConcept2(uri);
                        hierarchicalRelationship.setIdThesaurus(thesaurus.getId_thesaurus());
                        hierarchicalRelationship.setRole("RT");
                        hierarchicalRelationships.add(hierarchicalRelationship);
                    }
                    // get scheme
                    if (anno.getURI().getFragment().equalsIgnoreCase("inScheme")) {
                    // uri = anno.getAnnotationValue().getURI().toString();
                    }
                    // get Groups
                    if (anno.getURI().getFragment().equalsIgnoreCase("memberOf")) {
                        uri = getIdFromUri(anno.getAnnotationValue().getURI().toString());
                        idGrps.add(uri);
                        addIdGroupToVector(uri);
                    }
                    // get Alignements
                    if (anno.getURI().getFragment().equalsIgnoreCase("closeMatch")) {
                        uri = anno.getAnnotationValue().getURI().toString();
                        NodeAlignment nodeAlignment = new NodeAlignment();
                        nodeAlignment.setId_author(idUser);
                        nodeAlignment.setConcept_target("");
                        nodeAlignment.setThesaurus_target("");
                        nodeAlignment.setUri_target(uri);
                        nodeAlignment.setInternal_id_concept(concept.getIdConcept());
                        nodeAlignment.setInternal_id_thesaurus(thesaurus.getId_thesaurus());
                        nodeAlignment.setAlignement_id_type(2);
                        nodeAlignments.add(nodeAlignment);
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("exactMatch")) {
                        uri = anno.getAnnotationValue().getURI().toString();
                        NodeAlignment nodeAlignment = new NodeAlignment();
                        nodeAlignment.setId_author(idUser);
                        nodeAlignment.setConcept_target("");
                        nodeAlignment.setThesaurus_target("");
                        nodeAlignment.setUri_target(uri);
                        nodeAlignment.setInternal_id_concept(concept.getIdConcept());
                        nodeAlignment.setInternal_id_thesaurus(thesaurus.getId_thesaurus());
                        nodeAlignment.setAlignement_id_type(1);
                        nodeAlignments.add(nodeAlignment);
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("broadMatch")) {
                        uri = anno.getAnnotationValue().getURI().toString();
                        NodeAlignment nodeAlignment = new NodeAlignment();
                        nodeAlignment.setId_author(idUser);
                        nodeAlignment.setConcept_target("");
                        nodeAlignment.setThesaurus_target("");
                        nodeAlignment.setUri_target(uri);
                        nodeAlignment.setInternal_id_concept(concept.getIdConcept());
                        nodeAlignment.setInternal_id_thesaurus(thesaurus.getId_thesaurus());
                        nodeAlignment.setAlignement_id_type(3);
                        nodeAlignments.add(nodeAlignment);
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("narrowMatch")) {
                        uri = anno.getAnnotationValue().getURI().toString();
                        NodeAlignment nodeAlignment = new NodeAlignment();
                        nodeAlignment.setId_author(idUser);
                        nodeAlignment.setConcept_target("");
                        nodeAlignment.setThesaurus_target("");
                        nodeAlignment.setUri_target(uri);
                        nodeAlignment.setInternal_id_concept(concept.getIdConcept());
                        nodeAlignment.setInternal_id_thesaurus(thesaurus.getId_thesaurus());
                        nodeAlignment.setAlignement_id_type(5);
                        nodeAlignments.add(nodeAlignment);
                    }
                    if (anno.getURI().getFragment().equalsIgnoreCase("relatedMatch")) {
                        uri = anno.getAnnotationValue().getURI().toString();
                        NodeAlignment nodeAlignment = new NodeAlignment();
                        nodeAlignment.setId_author(idUser);
                        nodeAlignment.setConcept_target("");
                        nodeAlignment.setThesaurus_target("");
                        nodeAlignment.setUri_target(uri);
                        nodeAlignment.setInternal_id_concept(concept.getIdConcept());
                        nodeAlignment.setInternal_id_thesaurus(thesaurus.getId_thesaurus());
                        nodeAlignment.setAlignement_id_type(4);
                        nodeAlignments.add(nodeAlignment);
                    }
                }
            }
        }
        // ajout des termes et traductions
        nodeTerm.setNodeTermTraduction(nodeTermTraductionList);
        nodeTerm.setIdTerm(concept.getIdConcept());
        nodeTerm.setIdConcept(concept.getIdConcept());
        nodeTerm.setIdThesaurus(thesaurus.getId_thesaurus());
        nodeTerm.setSource("");
        nodeTerm.setStatus("");
        nodeTerm.setCreated(concept.getCreated());
        nodeTerm.setModified(concept.getModified());
        // conctrole si le concept est vide aucun prefLable, on l'ignore
        if (!isConceptEmpty(nodeTermTraductionList)) {
            if (idGrps.isEmpty()) {
                concept.setTopConcept(isTopConcept);
                concept.setIdGroup(idGroupDefault);
                conceptHelper.insertConceptInTable(ds, concept, idUser);
            } else {
                for (String idGrp : idGrps) {
                    concept.setTopConcept(isTopConcept);
                    concept.setIdGroup(idGrp);
                    conceptHelper.insertConceptInTable(ds, concept, idUser);
                }
            }
            termHelper.insertTerm(ds, nodeTerm, idUser);
            try {
                Connection conn = ds.getConnection();
                conn.setAutoCommit(false);
                for (HierarchicalRelationship hierarchicalRelationship : hierarchicalRelationships) {
                    conceptHelper.addLinkHierarchicalRelation(conn, hierarchicalRelationship, idUser);
                }
                conn.commit();
                conn.close();
            } catch (SQLException ex) {
            }
            for (NodeNote nodeNoteList1 : nodeNotes) {
                if (nodeNoteList1.getNotetypecode().contains("scopeNote")) {
                    noteHelper.addConceptNote(ds, concept.getIdConcept(), nodeNoteList1.getLang(), thesaurus.getId_thesaurus(), nodeNoteList1.getLexicalvalue(), nodeNoteList1.getNotetypecode(), idUser);
                }
                if (nodeNoteList1.getNotetypecode().contains("historyNote")) {
                    noteHelper.addConceptNote(ds, concept.getIdConcept(), nodeNoteList1.getLang(), thesaurus.getId_thesaurus(), nodeNoteList1.getLexicalvalue(), nodeNoteList1.getNotetypecode(), idUser);
                }
                if (nodeNoteList1.getNotetypecode().contains("definition")) {
                    noteHelper.addTermNote(ds, nodeTerm.getIdTerm(), nodeNoteList1.getLang(), thesaurus.getId_thesaurus(), nodeNoteList1.getLexicalvalue(), nodeNoteList1.getNotetypecode(), idUser);
                }
                if (nodeNoteList1.getNotetypecode().contains("editorialNote")) {
                    noteHelper.addTermNote(ds, nodeTerm.getIdTerm(), nodeNoteList1.getLang(), thesaurus.getId_thesaurus(), nodeNoteList1.getLexicalvalue(), nodeNoteList1.getNotetypecode(), idUser);
                }
                if (nodeNoteList1.getNotetypecode().contains("note")) {
                    noteHelper.addConceptNote(ds, nodeTerm.getIdTerm(), nodeNoteList1.getLang(), thesaurus.getId_thesaurus(), nodeNoteList1.getLexicalvalue(), nodeNoteList1.getNotetypecode(), idUser);
                }
            }
            for (NodeAlignment nodeAlignment : nodeAlignments) {
                alignmentHelper.addNewAlignment(ds, nodeAlignment);
            }
            for (NodeEM nodeEMList1 : nodeEMList) {
                term.setId_concept(concept.getIdConcept());
                term.setId_term(nodeTerm.getIdTerm());
                term.setLexical_value(nodeEMList1.getLexical_value());
                term.setLang(nodeEMList1.getLang());
                term.setId_thesaurus(thesaurus.getId_thesaurus());
                term.setSource(nodeEMList1.getSource());
                term.setStatus(nodeEMList1.getStatus());
                termHelper.addNonPreferredTerm(ds, term, idUser);
            }
            if (nodeGps.getLatitude() != 0.0) {
                if (nodeGps.getLongitude() != 0.0) {
                    // insertion des données GPS
                    gpsHelper.insertCoordonees(ds, concept.getIdConcept(), thesaurus.getId_thesaurus(), nodeGps.getLatitude(), nodeGps.getLongitude());
                }
            }
        }
        // initialisation des variables
        concept = new Concept();
        term = new Term();
        nodeTerm = new NodeTerm();
        nodeTermTraductionList = new ArrayList<>();
        nodeEMList = new ArrayList<>();
        nodeNotes = new ArrayList<>();
        nodeAlignments = new ArrayList<>();
        hierarchicalRelationships = new ArrayList<>();
        idGrps = new ArrayList<>();
        isTopConcept = true;
        nodeGps = new NodeGps();
    }
    for (String idTopConcept1 : idTopConcept) {
        if (!conceptHelper.setTopConcept(ds, idTopConcept1, thesaurus.getId_thesaurus())) {
        // erreur;
        }
    }
    addGroups();
    addLangsToThesaurus(ds, thesaurus.getId_thesaurus());
    message = message + "\n nombre de Concepts importés : " + conceptsCount;
    return true;
}
Also used : SQLException(java.sql.SQLException) ArrayList(java.util.ArrayList) GpsHelper(mom.trd.opentheso.bdd.helper.GpsHelper) TermHelper(mom.trd.opentheso.bdd.helper.TermHelper) SKOSConcept(org.semanticweb.skos.SKOSConcept) Concept(mom.trd.opentheso.bdd.datas.Concept) ConceptHelper(mom.trd.opentheso.bdd.helper.ConceptHelper) NodeTerm(mom.trd.opentheso.bdd.helper.nodes.term.NodeTerm) NodeGps(mom.trd.opentheso.bdd.helper.nodes.NodeGps) Connection(java.sql.Connection) NoteHelper(mom.trd.opentheso.bdd.helper.NoteHelper) AlignmentHelper(mom.trd.opentheso.bdd.helper.AlignmentHelper) Term(mom.trd.opentheso.bdd.datas.Term) NodeTerm(mom.trd.opentheso.bdd.helper.nodes.term.NodeTerm) NodeTermTraduction(mom.trd.opentheso.bdd.helper.nodes.term.NodeTermTraduction) SKOSAnnotation(org.semanticweb.skos.SKOSAnnotation) NodeEM(mom.trd.opentheso.bdd.helper.nodes.NodeEM) NodeAlignment(mom.trd.opentheso.bdd.helper.nodes.NodeAlignment) HierarchicalRelationship(mom.trd.opentheso.bdd.datas.HierarchicalRelationship) NodeNote(mom.trd.opentheso.bdd.helper.nodes.notes.NodeNote) SKOSConcept(org.semanticweb.skos.SKOSConcept)

Example 10 with GpsHelper

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

the class SelectedThesaurus method regenIdConcept.

/**
 * Cette fonction remplace tout les id des concepts du théso
 */
private void regenIdConcept(Connection conn, String idTheso, ArrayList<String> idGroup) throws Exception {
    /*récup les concepts*/
    ConceptHelper conceptHelper = new ConceptHelper();
    ArrayList<String> idConcepts = conceptHelper.getAllIdConceptOfThesaurus(conn, idTheso);
    if (idConcepts == null || idConcepts.isEmpty()) {
        throw new Exception("No concept in this thesaurus");
    }
    /*génération des nouveaux id*/
    ArrayList<String> reservedId = idConcepts;
    reservedId.addAll(idGroup);
    ArrayList<String> newIdConcepts = createNewId(reservedId, idConcepts.size());
    /*maj des tables*/
    NoteHelper noteHelper = new NoteHelper();
    GpsHelper gpsHelper = new GpsHelper();
    ImagesHelper imagesHelper = new ImagesHelper();
    AlignmentHelper alignmentHelper = new AlignmentHelper();
    for (int i = 0; i < idConcepts.size(); i++) {
        String id = idConcepts.get(i);
        String newId = newIdConcepts.get(i);
        // table concept
        conceptHelper.setIdConcept(conn, idTheso, id, newId);
        // table concept_group_concept
        conceptHelper.setIdConceptGroupConcept(conn, idTheso, id, newId);
        // table concept_historique
        conceptHelper.setIdConceptHistorique(conn, idTheso, id, newId);
        // table concept_orphan
        conceptHelper.setIdConceptOrphan(conn, idTheso, id, newId);
        // table gps
        gpsHelper.setIdConceptGPS(conn, idTheso, id, newId);
        // table hierarchical_relationship
        conceptHelper.setIdConceptHieraRelation(conn, idTheso, id, newId);
        // table hierarchical_relationship_historique
        conceptHelper.setIdConceptHieraRelationHisto(conn, idTheso, id, newId);
        // table note
        noteHelper.setIdConceptNote(conn, idTheso, id, newId);
        // table note_historique
        noteHelper.setIdConceptNoteHisto(conn, idTheso, id, newId);
        // table images
        imagesHelper.setIdConceptImage(conn, idTheso, id, newId);
        // table concept_fusion
        conceptHelper.setIdConceptFusion(conn, idTheso, id, newId);
        // table preferred_term
        conceptHelper.setIdConceptPreferedTerm(conn, idTheso, id, newId);
        // table alignement
        alignmentHelper.setIdConceptAlignement(conn, idTheso, id, newId);
    }
}
Also used : ImagesHelper(mom.trd.opentheso.bdd.helper.ImagesHelper) GpsHelper(mom.trd.opentheso.bdd.helper.GpsHelper) ConceptHelper(mom.trd.opentheso.bdd.helper.ConceptHelper) NoteHelper(mom.trd.opentheso.bdd.helper.NoteHelper) AlignmentHelper(mom.trd.opentheso.bdd.helper.AlignmentHelper) SQLException(java.sql.SQLException)

Aggregations

GpsHelper (mom.trd.opentheso.bdd.helper.GpsHelper)15 ConceptHelper (mom.trd.opentheso.bdd.helper.ConceptHelper)5 AlignmentHelper (mom.trd.opentheso.bdd.helper.AlignmentHelper)4 AlignementSource (mom.trd.opentheso.core.alignment.AlignementSource)4 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)3 NodeGps (mom.trd.opentheso.bdd.helper.nodes.NodeGps)3 SAXException (org.xml.sax.SAXException)3 SQLException (java.sql.SQLException)2 FacesMessage (javax.faces.application.FacesMessage)2 NoteHelper (mom.trd.opentheso.bdd.helper.NoteHelper)2 GpsPreferences (mom.trd.opentheso.core.alignment.GpsPreferences)2 GpsQuery (mom.trd.opentheso.core.alignment.GpsQuery)2 Connection (java.sql.Connection)1 ArrayList (java.util.ArrayList)1 Concept (mom.trd.opentheso.bdd.datas.Concept)1 HierarchicalRelationship (mom.trd.opentheso.bdd.datas.HierarchicalRelationship)1 Term (mom.trd.opentheso.bdd.datas.Term)1 ImagesHelper (mom.trd.opentheso.bdd.helper.ImagesHelper)1 TermHelper (mom.trd.opentheso.bdd.helper.TermHelper)1 NodeAlignment (mom.trd.opentheso.bdd.helper.nodes.NodeAlignment)1