This is an automated email from the git hooks/post-receive script. New change to branch feature/7587-PSVerifÉcranMarée in repository tutti. See http://git.codelutin.com/tutti.git at 366a663 Pour la cartographie : - Ajouter un titre aux calques - ne pas ajouer les claques vides (erreur au chargement : impossible de definir ses limites), - ne pas zoomer sur la route d'un navire si aucune donnée. This branch includes the following new commits: new 9a1c6d9 Ajout de trace dans les appels des services. new 9e30b35 Dans la référence d'un TripSeine ne pas mettre le label de l'observateur(qui n'exite pas) mais ses noms (prénoms + noms) new 81f921a les ports n'ont pas obligatoirement de coordonées new a46fc82 après la suppresion d'un tripSeine, le rétirer des données ouvertes new 366a663 Pour la cartographie : - Ajouter un titre aux calques - ne pas ajouer les claques vides (erreur au chargement : impossible de definir ses limites), - ne pas zoomer sur la route d'un navire si aucune donnée. The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 366a663cbcb0c58550e19b8d4810775c639af559 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Mar 4 11:09:50 2016 +0100 Pour la cartographie : - Ajouter un titre aux calques - ne pas ajouer les claques vides (erreur au chargement : impossible de definir ses limites), - ne pas zoomer sur la route d'un navire si aucune donnée. commit a46fc82aa43bb4687175418db1c909e0f8bdad27 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Mar 4 11:05:19 2016 +0100 après la suppresion d'un tripSeine, le rétirer des données ouvertes commit 81f921a501770c95cfeeec3c936ee8d8172072c6 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Mar 4 11:04:05 2016 +0100 les ports n'ont pas obligatoirement de coordonées commit 9e30b35901acdb577ac64e1cdad94ff958e08190 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Mar 4 11:02:39 2016 +0100 Dans la référence d'un TripSeine ne pas mettre le label de l'observateur(qui n'exite pas) mais ses noms (prénoms + noms) commit 9a1c6d92bed88daad6787bdb30b7163e4627a14d Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Mar 4 11:00:05 2016 +0100 Ajout de trace dans les appels des services. -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7587-PSVerifÉcranMarée in repository tutti. See http://git.codelutin.com/tutti.git commit 9a1c6d92bed88daad6787bdb30b7163e4627a14d Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Mar 4 11:00:05 2016 +0100 Ajout de trace dans les appels des services. --- .../service/seine/TripSeineServiceTopia.java | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/observe-services-topia/src/main/java/fr/ird/observe/services/service/seine/TripSeineServiceTopia.java b/observe-services-topia/src/main/java/fr/ird/observe/services/service/seine/TripSeineServiceTopia.java index 997a3cc..8525d28 100644 --- a/observe-services-topia/src/main/java/fr/ird/observe/services/service/seine/TripSeineServiceTopia.java +++ b/observe-services-topia/src/main/java/fr/ird/observe/services/service/seine/TripSeineServiceTopia.java @@ -22,6 +22,7 @@ package fr.ird.observe.services.service.seine; * #L% */ +import com.google.common.base.Joiner; import fr.ird.observe.entities.TripMapPoint; import fr.ird.observe.entities.referentiel.Program; import fr.ird.observe.entities.seine.TripSeine; @@ -37,6 +38,8 @@ import fr.ird.observe.services.dto.referential.ProgramDto; import fr.ird.observe.services.dto.result.SaveResultDto; import fr.ird.observe.services.dto.seine.TripSeineDto; import fr.ird.observe.services.entity.TripMapDtoFactory; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.nuiton.util.DateUtil; import java.util.ArrayList; @@ -50,12 +53,17 @@ import java.util.List; */ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSeineService { + private static final Log log = LogFactory.getLog(TripSeineServiceTopia.class); + protected TripSeineTopiaDao getDao() { return (TripSeineTopiaDao) serviceContext.getTopiaPersistenceContext().getDao(TripSeine.class); } @Override public DataReferenceSet<TripSeineDto> getAllTripSeine() { + if (log.isTraceEnabled()) { + log.trace("getAllTripSeine()"); + } List<TripSeine> tripSeines = loadEntities(TripSeine.class); @@ -66,6 +74,9 @@ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSe @Override public DataReferenceSet<TripSeineDto> getTripSeineByProgram(String programId) { + if (log.isTraceEnabled()) { + log.trace("getTripSeineByProgram(" + programId + ")"); + } ReferentialLocale referenceLocale = getReferentialLocale(); @@ -81,12 +92,19 @@ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSe @Override public int getTripSeinePositionInProgram(String programId, String tripSeineId) { + if (log.isTraceEnabled()) { + log.trace("getTripSeinePositionInProgram(" + programId + ", " + tripSeineId + ")"); + } + int position = getDao().findPositionByProgramId(programId, tripSeineId); return position; } @Override public Form<TripSeineDto> loadForm(String tripSeineId) { + if (log.isTraceEnabled()) { + log.trace("loadForm(" + tripSeineId + ")"); + } TripSeine tripSeine = loadEntity(TripSeineDto.class, tripSeineId); @@ -106,6 +124,9 @@ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSe @Override public TripSeineDto loadDto(String tripSeineId) { + if (log.isTraceEnabled()) { + log.trace("loadDto(" + tripSeineId + ")"); + } TripSeineDto dto = loadEntityToDataDto(TripSeineDto.class, tripSeineId); return dto; @@ -113,6 +134,9 @@ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSe @Override public TripMapDto getTripSeineMap(String tripSeineId) { + if (log.isTraceEnabled()) { + log.trace("getTripSeineMap(" + tripSeineId + ")"); + } LinkedHashSet<TripMapPoint> points = getDao().extractTripMapActivityPoints(tripSeineId); @@ -123,6 +147,9 @@ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSe @Override public DataReference<TripSeineDto> loadReferenceToRead(String tripSeineId) { + if (log.isTraceEnabled()) { + log.trace("loadReferenceToRead(" + tripSeineId + ")"); + } TripSeine tripSeine = loadEntity(TripSeineDto.class, tripSeineId); @@ -133,6 +160,9 @@ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSe @Override public boolean exists(String tripSeineId) { + if (log.isTraceEnabled()) { + log.trace("exists(" + tripSeineId + ")"); + } return existsEntity(TripSeine.class, tripSeineId); @@ -140,6 +170,9 @@ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSe @Override public Form<TripSeineDto> preCreate(String programId) { + if (log.isTraceEnabled()) { + log.trace("preCreate(" + programId + ")"); + } TripSeine tripSeine = newEntity(TripSeine.class); @@ -163,6 +196,9 @@ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSe @Override public SaveResultDto save(TripSeineDto dto) { + if (log.isTraceEnabled()) { + log.trace("save(" + dto.getId() + ")"); + } TripSeine entity = loadOrCreateEntityAndCheckLastUpdate(dto); @@ -179,6 +215,9 @@ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSe @Override public void delete(String tripSeineId) { + if (log.isTraceEnabled()) { + log.trace("delete(" + tripSeineId + ")"); + } deleteEntity(TripSeineDto.class, TripSeine.class, Collections.singleton(tripSeineId)); @@ -186,6 +225,9 @@ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSe @Override public int moveTripSeineToProgram(String tripSeineId, String programId) { + if (log.isTraceEnabled()) { + log.trace("moveTripSeineToProgram(" + tripSeineId + ", " + programId + ")"); + } TripSeine tripSeine = loadEntity(TripSeineDto.class, tripSeineId); Program program = loadEntity(ProgramDto.class, programId); @@ -200,6 +242,9 @@ public class TripSeineServiceTopia extends ObserveServiceTopia implements TripSe @Override public List<Integer> moveTripSeinesToProgram(List<String> tripSeineIds, String programId) { + if (log.isTraceEnabled()) { + log.trace("moveTripSeinesToProgram([" + Joiner.on(", ").join(tripSeineIds) + "], " + programId + ")"); + } Program program = loadEntity(ProgramDto.class, programId); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7587-PSVerifÉcranMarée in repository tutti. See http://git.codelutin.com/tutti.git commit 9e30b35901acdb577ac64e1cdad94ff958e08190 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Mar 4 11:02:39 2016 +0100 Dans la référence d'un TripSeine ne pas mettre le label de l'observateur(qui n'exite pas) mais ses noms (prénoms + noms) --- .../main/java/fr/ird/observe/services/binder/data/TripSeineBinder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/observe-services-topia/src/main/java/fr/ird/observe/services/binder/data/TripSeineBinder.java b/observe-services-topia/src/main/java/fr/ird/observe/services/binder/data/TripSeineBinder.java index 0279961..8ba32dd 100644 --- a/observe-services-topia/src/main/java/fr/ird/observe/services/binder/data/TripSeineBinder.java +++ b/observe-services-topia/src/main/java/fr/ird/observe/services/binder/data/TripSeineBinder.java @@ -12,6 +12,7 @@ import fr.ird.observe.services.dto.constants.ReferentialLocale; import fr.ird.observe.services.dto.referential.HarbourDto; import fr.ird.observe.services.dto.referential.OceanDto; import fr.ird.observe.services.dto.referential.PersonDto; +import fr.ird.observe.services.dto.referential.PersonDtos; import fr.ird.observe.services.dto.referential.ProgramDto; import fr.ird.observe.services.dto.referential.VesselDto; import fr.ird.observe.services.dto.seine.RouteStubDto; @@ -93,7 +94,7 @@ public class TripSeineBinder extends DataBinderSupport<TripSeine, TripSeineDto> dto.getStartDate(), dto.getEndDate(), getLabel(referentialLocale, dto.getVessel()), - getLabel(referentialLocale, dto.getObserver())); + PersonDtos.getNames(dto.getObserver())); } } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7587-PSVerifÉcranMarée in repository tutti. See http://git.codelutin.com/tutti.git commit 81f921a501770c95cfeeec3c936ee8d8172072c6 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Mar 4 11:04:05 2016 +0100 les ports n'ont pas obligatoirement de coordonées --- .../main/java/fr/ird/observe/entities/seine/TripSeineTopiaDao.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/observe-entities/src/main/java/fr/ird/observe/entities/seine/TripSeineTopiaDao.java b/observe-entities/src/main/java/fr/ird/observe/entities/seine/TripSeineTopiaDao.java index a5e4c60..dc89cad 100644 --- a/observe-entities/src/main/java/fr/ird/observe/entities/seine/TripSeineTopiaDao.java +++ b/observe-entities/src/main/java/fr/ird/observe/entities/seine/TripSeineTopiaDao.java @@ -89,7 +89,7 @@ public class TripSeineTopiaDao extends AbstractTripSeineTopiaDao<TripSeine> { // add departure harbours Harbour departureHarbour = tripSeine.getDepartureHarbour(); - if (departureHarbour != null) { + if (departureHarbour != null && departureHarbour.getLatitude() != null && departureHarbour.getLongitude() != null) { TripMapPoint departurePoint = new TripMapPoint(); departurePoint.setTime(tripSeine.getStartDate()); departurePoint.setLatitude(departureHarbour.getLatitude()); @@ -104,7 +104,7 @@ public class TripSeineTopiaDao extends AbstractTripSeineTopiaDao<TripSeine> { // add landing harbours Harbour landingHarbour = tripSeine.getLandingHarbour(); - if (landingHarbour != null) { + if (landingHarbour != null && landingHarbour.getLatitude() != null && landingHarbour.getLongitude() != null) { TripMapPoint landingPoint = new TripMapPoint(); landingPoint.setTime(tripSeine.getEndDate()); landingPoint.setLatitude(landingHarbour.getLatitude()); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7587-PSVerifÉcranMarée in repository tutti. See http://git.codelutin.com/tutti.git commit a46fc82aa43bb4687175418db1c909e0f8bdad27 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Mar 4 11:05:19 2016 +0100 après la suppresion d'un tripSeine, le rétirer des données ouvertes --- .../fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java index 3ba0763..a848ae2 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java @@ -307,6 +307,7 @@ public class TripSeineUIHandler extends ContentOpenableUIHandler<TripSeineDto> { } getTripSeineService().delete(bean.getId()); + getOpenDataManager().closeTripSeine(bean.getId()); if (log.isInfoEnabled()) { log.info("Delete done for Trip " + bean.getId()); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7587-PSVerifÉcranMarée in repository tutti. See http://git.codelutin.com/tutti.git commit 366a663cbcb0c58550e19b8d4810775c639af559 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Mar 4 11:09:50 2016 +0100 Pour la cartographie : - Ajouter un titre aux calques - ne pas ajouer les claques vides (erreur au chargement : impossible de definir ses limites), - ne pas zoomer sur la route d'un navire si aucune donnée. --- .../ui/util/tripMap/TripMapContentBuilder.java | 31 ++++++++++++++-------- .../observe/ui/util/tripMap/TripMapUIHandler.java | 6 +++-- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/util/tripMap/TripMapContentBuilder.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/util/tripMap/TripMapContentBuilder.java index d9b3c1c..290cfb3 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/util/tripMap/TripMapContentBuilder.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/util/tripMap/TripMapContentBuilder.java @@ -127,7 +127,7 @@ public class TripMapContentBuilder { SimpleFeatureSource featureSource = store.getFeatureSource(); Style style = SLD.createSimpleStyle(featureSource.getSchema()); style = findStyle(styledLayerDescriptor, store.getNames().get(0).getLocalPart(), null, style); - Layer layer = new FeatureLayer(featureSource, style); + Layer layer = new FeatureLayer(featureSource, style, layerFile.getName()); mapContent.addLayer(layer); } @@ -186,7 +186,7 @@ public class TripMapContentBuilder { previousPoint = point; } - if (coordinatesByDay.size() > 1) { + if (coordinatesByDay != null && coordinatesByDay.size() > 1) { LineString line = geometryFactory.createLineString(coordinatesByDay.toArray(new Coordinate[0])); lineBuilder.add(line); lineBuilder.add(DATE_FORMAT.format(previousPoint.getTime())); @@ -195,8 +195,11 @@ public class TripMapContentBuilder { } Style styleLines = findStyle(styledLayerDescriptor, TRIP_LINES_LAYER_NAME, null); - Layer layerLines = new FeatureLayer(linesFeatures, styleLines); - mapContent.addLayer(layerLines); + + if (! linesFeatures.isEmpty()) { + Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LINES_LAYER_NAME); + mapContent.addLayer(layerLines); + } // add line in legend @@ -263,9 +266,11 @@ public class TripMapContentBuilder { } } - Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_FISHING_ZONE_LAYER_NAME, null); - Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines); - mapContent.addLayer(layerLines); + if (!polygonsFeatures.isEmpty()) { + Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_FISHING_ZONE_LAYER_NAME, null); + Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines, TRIP_LONGLINE_FISHING_ZONE_LAYER_NAME); + mapContent.addLayer(layerLines); + } } public void addLonglineLine(List<TripMapPointDto> tripMapPoints) throws FactoryException { @@ -330,8 +335,10 @@ public class TripMapContentBuilder { } Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_LINE_LAYER_NAME, null); - Layer layerLines = new FeatureLayer(linesFeatures, styleLines); - mapContent.addLayer(layerLines); + if (!linesFeatures.isEmpty()) { + Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LONGLINE_LINE_LAYER_NAME); + mapContent.addLayer(layerLines); + } // add line in legend LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates()); @@ -406,8 +413,10 @@ public class TripMapContentBuilder { } - Layer pointsLayer = new FeatureLayer(pointsFeatures, stylePoints); - mapContent.addLayer(pointsLayer); + if (! pointsFeatures.isEmpty()) { + Layer pointsLayer = new FeatureLayer(pointsFeatures, stylePoints, TRIP_POINTS_LAYER_NAME); + mapContent.addLayer(pointsLayer); + } } diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/util/tripMap/TripMapUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/util/tripMap/TripMapUIHandler.java index 7c1ec8f..a4f3e8b 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/util/tripMap/TripMapUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/util/tripMap/TripMapUIHandler.java @@ -166,8 +166,10 @@ public class TripMapUIHandler { } public void zoomIt() { - JMapPane mapPane = getObserveMapPane(); - mapPane.setDisplayArea(tripArea); + if (! tripArea.isEmpty()) { + JMapPane mapPane = getObserveMapPane(); + mapPane.setDisplayArea(tripArea); + } } public void exportPng() { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm