Search in sources :

Example 6 with AlignmentHelper

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

the class EditAlignementSourceBean method selectSourceOfThesoInTable.

/**
 * Met dans l'etat "séléctioné" les sources dans la table qui coresponde au
 * tesaurus selectioné
 *
 * @param idTheso
 */
public void selectSourceOfThesoInTable(String idTheso) {
    AlignmentHelper alignmentHelper = new AlignmentHelper();
    ArrayList<AlignementSource> alignementOfTheso = alignmentHelper.getAlignementSource(connect.getPoolConnexion(), idTheso);
    alignementSources = alignementOfTheso;
}
Also used : AlignmentHelper(mom.trd.opentheso.bdd.helper.AlignmentHelper) AlignementSource(mom.trd.opentheso.core.alignment.AlignementSource)

Example 7 with AlignmentHelper

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

the class EditAlignementSourceBean method getTypes_alignement_format.

public ArrayList<String> getTypes_alignement_format() throws SQLException {
    AlignmentHelper aligneAlignmentHelper = new AlignmentHelper();
    types_alignement_format = aligneAlignmentHelper.typesRequetes(connect.getPoolConnexion(), "alignement_format");
    return types_alignement_format;
}
Also used : AlignmentHelper(mom.trd.opentheso.bdd.helper.AlignmentHelper)

Example 8 with AlignmentHelper

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

the class GpsBeans method getPreferenceAlignement.

/**
 * Recuperation des preferences pour alignement
 *
 * @param idTheso
 * @param id_user
 */
public void getPreferenceAlignement(String idTheso, int id_user) {
    alignementPreferencesAlignement = new AlignementPreferences();
    AlignmentHelper alignmentHelper = new AlignmentHelper();
    alignementPreferencesAlignement = alignmentHelper.getListPreferencesAlignement(connect.getPoolConnexion(), idTheso, id_user, id_concept_depart, nodePreference.getId_alignement_source());
}
Also used : AlignmentHelper(mom.trd.opentheso.bdd.helper.AlignmentHelper) AlignementPreferences(mom.trd.opentheso.core.alignment.AlignementPreferences)

Example 9 with AlignmentHelper

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

the class GpsBeans method isNonAligne.

public void isNonAligne(String id_Concept, String id_theso, String id_lang) {
    ConceptHelper conceptHelper = new ConceptHelper();
    AlignmentHelper alignmentHelper = new AlignmentHelper();
    GpsHelper gpsHelper = new GpsHelper();
    if (!gpsHelper.isHaveCoordinate(connect.getPoolConnexion(), id_Concept, id_theso)) {
        // si n'est pas aligne
        id_concept = listOfChildrenInConcept.get(0);
        nomduterm = conceptHelper.getLexicalValueOfConcept(connect.getPoolConnexion(), listOfChildrenInConcept.get(0), selectedTerme.getIdTheso(), selectedTerme.getIdlangue());
        try {
            creerAlignAutoParLot(listOfChildrenInConcept.get(0), id_theso, nomduterm, id_lang);
        } catch (Exception e) {
        }
    } else {
        // si il est déjà aligne
        nextPosition();
    }
}
Also used : GpsHelper(mom.trd.opentheso.bdd.helper.GpsHelper) ConceptHelper(mom.trd.opentheso.bdd.helper.ConceptHelper) AlignmentHelper(mom.trd.opentheso.bdd.helper.AlignmentHelper) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) SAXException(org.xml.sax.SAXException)

Example 10 with AlignmentHelper

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

the class GpsBeans method doAll.

/**
 * permet d'ajouter le coordonées gps automatique
 *
 * @param idC
 * @param id_Theso
 * @param id_user
 * @param langEnCour
 * @param idTerm
 * @return
 * @throws ParserConfigurationException
 */
public boolean doAll(String idC, String id_Theso, int id_user, String langEnCour, String idTerm) throws ParserConfigurationException {
    id_theso = id_Theso;
    id_concept = idC;
    boolean status = false;
    boolean found = false;
    if (codeid != null) {
        for (NodeAlignment na : listAlignValues) {
            if (na.getIdUrl() == null ? codeid == null : na.getIdUrl().equals(codeid) && !found) {
                alignment_choisi = na;
                found = true;
            }
        }
        if (found) {
            if (alignment_choisi == null) {
                return false;
            }
            latitud = alignment_choisi.getLat();
            longitud = alignment_choisi.getLng();
            addCoordinates(idC, id_Theso);
            if (alignementAutomatique) {
                status = alignementautomatique(idTerm);
            }
            if (integrerTraduction) {
                status = integreTraduction(idTerm, langEnCour);
            }
            if (listOfChildrenInConcept != null) {
                nextPosition();
            }
            selectedTerme.majLangueConcept();
            selectedTerme.setAlign(new AlignmentHelper().getAllAlignmentOfConcept(connect.getPoolConnexion(), idC, id_theso));
            initcoordonees();
        }
    }
    return status;
}
Also used : NodeAlignment(mom.trd.opentheso.bdd.helper.nodes.NodeAlignment) AlignmentHelper(mom.trd.opentheso.bdd.helper.AlignmentHelper)

Aggregations

AlignmentHelper (mom.trd.opentheso.bdd.helper.AlignmentHelper)42 ConceptHelper (mom.trd.opentheso.bdd.helper.ConceptHelper)16 NoteHelper (mom.trd.opentheso.bdd.helper.NoteHelper)11 Concept (mom.trd.opentheso.bdd.datas.Concept)10 Term (mom.trd.opentheso.bdd.datas.Term)10 TermHelper (mom.trd.opentheso.bdd.helper.TermHelper)10 NodeEM (mom.trd.opentheso.bdd.helper.nodes.NodeEM)9 NodeTerm (mom.trd.opentheso.bdd.helper.nodes.term.NodeTerm)9 NodeNote (mom.trd.opentheso.bdd.helper.nodes.notes.NodeNote)8 ArrayList (java.util.ArrayList)7 NodeAlignment (mom.trd.opentheso.bdd.helper.nodes.NodeAlignment)7 FacesMessage (javax.faces.application.FacesMessage)6 AlignementSource (mom.trd.opentheso.core.alignment.AlignementSource)6 SQLException (java.sql.SQLException)5 SKOSMapping (skos.SKOSMapping)5 SKOSTopConcept (skos.SKOSTopConcept)5 PrefixString (com.k_int.IR.QueryModels.PrefixString)4 HierarchicalRelationship (mom.trd.opentheso.bdd.datas.HierarchicalRelationship)4 GpsHelper (mom.trd.opentheso.bdd.helper.GpsHelper)4 NodeTermTraduction (mom.trd.opentheso.bdd.helper.nodes.term.NodeTermTraduction)4