use of mom.trd.opentheso.bdd.helper.GpsHelper in project opentheso by miledrousset.
the class GpsBeans method prevPosition.
public void prevPosition() {
if (position <= 0) {
return;
}
erreur = "";
GpsHelper gpsHelper = new GpsHelper();
ConceptHelper conceptHelper = new ConceptHelper();
if (optionAllBranch == optionOfAlignement || optionOfAlignement == optionWorkFlow) {
position--;
id_concept = listOfChildrenInConcept.get(position);
comprobationFin();
if (fin) {
return;
}
nomduterm = conceptHelper.getLexicalValueOfConcept(connect.getPoolConnexion(), id_concept, selectedTerme.getIdTheso(), selectedTerme.getIdlangue());
}
if (optionNonAligned == optionOfAlignement) {
position--;
id_concept = listOfChildrenInConcept.get(position);
comprobationFin();
while (gpsHelper.isHaveCoordinate(connect.getPoolConnexion(), id_concept, id_theso)) {
position++;
id_concept = listOfChildrenInConcept.get(position);
comprobationFin();
}
nomduterm = conceptHelper.getLexicalValueOfConcept(connect.getPoolConnexion(), id_concept, selectedTerme.getIdTheso(), selectedTerme.getIdlangue());
}
try {
creerAlignAutoParLot(id_concept, id_theso, nomduterm, id_langue);
} catch (ParserConfigurationException ex) {
Logger.getLogger(GpsBeans.class.getName()).log(Level.SEVERE, null, ex);
} catch (SAXException ex) {
Logger.getLogger(GpsBeans.class.getName()).log(Level.SEVERE, null, ex);
}
listConceptTraites.remove(id_concept);
}
use of mom.trd.opentheso.bdd.helper.GpsHelper in project opentheso by miledrousset.
the class GpsBeans method nextPosition.
public void nextPosition() {
if (fin) {
return;
}
listConceptTraites.add(id_concept);
erreur = "";
GpsHelper gpsHelper = new GpsHelper();
ConceptHelper conceptHelper = new ConceptHelper();
if (optionAllBranch == optionOfAlignement || optionOfAlignement == optionWorkFlow) {
position++;
if (position < listOfChildrenInConcept.size()) {
id_concept = listOfChildrenInConcept.get(position);
}
comprobationFin();
if (fin) {
return;
}
nomduterm = conceptHelper.getLexicalValueOfConcept(connect.getPoolConnexion(), id_concept, selectedTerme.getIdTheso(), selectedTerme.getIdlangue());
}
if (optionNonAligned == optionOfAlignement) {
position++;
if (position < listOfChildrenInConcept.size()) {
id_concept = listOfChildrenInConcept.get(position);
}
comprobationFin();
while (gpsHelper.isHaveCoordinate(connect.getPoolConnexion(), id_concept, id_theso)) {
position++;
if (position < listOfChildrenInConcept.size()) {
id_concept = listOfChildrenInConcept.get(position);
}
comprobationFin();
if (fin)
return;
}
nomduterm = conceptHelper.getLexicalValueOfConcept(connect.getPoolConnexion(), id_concept, selectedTerme.getIdTheso(), selectedTerme.getIdlangue());
}
try {
creerAlignAutoParLot(id_concept, id_theso, nomduterm, id_langue);
} catch (ParserConfigurationException ex) {
Logger.getLogger(GpsBeans.class.getName()).log(Level.SEVERE, null, ex);
} catch (SAXException ex) {
Logger.getLogger(GpsBeans.class.getName()).log(Level.SEVERE, null, ex);
}
}
use of mom.trd.opentheso.bdd.helper.GpsHelper in project opentheso by miledrousset.
the class GpsBeans method addCoordinates.
/*
public void onGeocode(GeocodeEvent event) {
boolean premiere = true;
List<GeocodeResult> results = event.getResults();
geoModel = new DefaultMapModel();
if (results != null && !results.isEmpty()) {
LatLng center = results.get(0).getLatLng();
centerGeoMap = center.getLat() + "," + center.getLng();
for (int i = 0; i < results.size(); i++) {
GeocodeResult result = results.get(i);
geoModel.addOverlay(new Marker(result.getLatLng(), result.getAddress()));
if (premiere) {
latitud = result.getLatLng().getLat();
longitud = result.getLatLng().getLng();
premiere = false;
}
}
}
}
*/
/**
* Ajoute le coordonées a la BDD
*
* @param idConcept
* @param idTheso
* @return
*/
public boolean addCoordinates(String idConcept, String idTheso) {
GpsHelper gpshelper = new GpsHelper();
gpshelper.insertCoordonees(connect.getPoolConnexion(), idConcept, idTheso, latitud, longitud);
return true;
}
use of mom.trd.opentheso.bdd.helper.GpsHelper 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();
}
}
use of mom.trd.opentheso.bdd.helper.GpsHelper in project opentheso by miledrousset.
the class GpsBeans method recuperatePreferences.
public void recuperatePreferences() {
if (!selectedAlignement.isEmpty()) {
GpsHelper gpsHelper = new GpsHelper();
GpsPreferences gpsPreferences;
for (AlignementSource alignementSource : alignementSources) {
if (alignementSource.getSource().equals(selectedAlignement)) {
alignement_source = alignementSource;
}
}
gpsPreferences = gpsHelper.getGpsPreferences(connect.getPoolConnexion(), id_theso, id_user1, alignement_source.getId());
integrerTraduction = gpsPreferences.isGps_integrertraduction();
alignementAutomatique = gpsPreferences.isGps_alignementautomatique();
remplacerTraduction = gpsPreferences.isGps_reemplacertraduction();
}
}
Aggregations