Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: e356f4d8 by Tony CHEMIT at 2018-10-01T11:38:49Z can not select tab if not enabled - - - - - 56d4e718 by Tony CHEMIT at 2018-10-01T12:25:21Z [RAPPORTS] Les 4 requêtes sur espèces cibles ne fonctionnent pas - Closes #1101 - - - - - e88f041e by Tony CHEMIT at 2018-10-01T12:34:37Z update to geotools 20.0 - - - - - 1ca1414b by Tony CHEMIT at 2018-10-01T12:34:43Z update pom - - - - - 7 changed files: - client/pom.xml - client/src/main/java/fr/ird/observe/client/ui/actions/content/GoToTabUIActionSupport.java - client/src/main/java/fr/ird/observe/client/ui/util/tripMap/ObserveMapPaneLegendItem.java - client/src/main/java/fr/ird/observe/client/ui/util/tripMap/ObserverMapPanLegendDrawer.java - client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapContentBuilder.java - pom.xml - services/src/main/resources/observe-reports.properties Changes: ===================================== client/pom.xml ===================================== @@ -240,6 +240,14 @@ <groupId>it.geosolutions.jaiext.utilities</groupId> <artifactId>jt-utilities</artifactId> </exclusion> + <exclusion> + <groupId>it.geosolutions.jaiext.shadedrelief</groupId> + <artifactId>jt-shadedrelief</artifactId> + </exclusion> + <exclusion> + <groupId>it.geosolutions.jaiext.scale2</groupId> + <artifactId>jt-scale2</artifactId> + </exclusion> <exclusion> <groupId>org.jaitools</groupId> <artifactId>jt-zonalstats</artifactId> @@ -289,6 +297,11 @@ <artifactId>gt-epsg-hsql</artifactId> <version>${lib.version.geoTools}</version> </dependency> + <dependency> + <groupId>org.locationtech.jts</groupId> + <artifactId>jts-core</artifactId> + <version>1.16.0</version> + </dependency> </dependencies> </dependencyManagement> @@ -598,7 +611,7 @@ </dependency> <dependency> - <groupId>com.vividsolutions</groupId> + <groupId>org.locationtech.jts</groupId> <artifactId>jts-core</artifactId> </dependency> @@ -643,7 +656,6 @@ <dependency> <groupId>org.jetbrains</groupId> <artifactId>annotations</artifactId> - <version>16.0.1</version> </dependency> </dependencies> ===================================== client/src/main/java/fr/ird/observe/client/ui/actions/content/GoToTabUIActionSupport.java ===================================== @@ -51,12 +51,9 @@ public abstract class GoToTabUIActionSupport extends AbstractContentUIAction { @Override protected void actionPerformed(ContentUI<?, ?> contentUI) { JTabbedPane mainTabbedPane = (JTabbedPane) contentUI.getObjectById(tabbedPaneName); - if (mainTabbedPane == null) { - - // rien à faire - return; + if (mainTabbedPane != null && mainTabbedPane.isEnabledAt(tabIndex)) { + mainTabbedPane.setSelectedIndex(tabIndex); } - mainTabbedPane.setSelectedIndex(tabIndex); } @Override ===================================== client/src/main/java/fr/ird/observe/client/ui/util/tripMap/ObserveMapPaneLegendItem.java ===================================== @@ -10,20 +10,20 @@ package fr.ird.observe.client.ui.util.tripMap; * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ -import com.vividsolutions.jts.geom.Coordinate; import org.geotools.styling.Style; +import org.locationtech.jts.geom.Coordinate; import org.opengis.feature.simple.SimpleFeature; import java.awt.Color; @@ -37,7 +37,15 @@ public class ObserveMapPaneLegendItem { protected static final int LEGEND_SYMBOL_WIDTH = 50; protected static final int LEGEND_MARGIN = 5; protected static final Color LEGEND_BACKGROUND = new Color(1f, 1f, 1f, 0.8f); + protected SimpleFeature simpleFeature; + protected Style style; + protected String label; + public ObserveMapPaneLegendItem(SimpleFeature simpleFeature, Style style, String label) { + this.simpleFeature = simpleFeature; + this.style = style; + this.label = label; + } public static Coordinate[] lineCoordinates() { Coordinate[] coordinates = new Coordinate[2]; @@ -50,19 +58,6 @@ public class ObserveMapPaneLegendItem { return new Coordinate(LEGEND_SYMBOL_WIDTH / 2, LEGEND_ITEM_HEIGHT / 2); } - - protected SimpleFeature simpleFeature; - - protected Style style; - - protected String label; - - public ObserveMapPaneLegendItem(SimpleFeature simpleFeature, Style style, String label) { - this.simpleFeature = simpleFeature; - this.style = style; - this.label = label; - } - public SimpleFeature getSimpleFeature() { return simpleFeature; } ===================================== client/src/main/java/fr/ird/observe/client/ui/util/tripMap/ObserverMapPanLegendDrawer.java ===================================== @@ -10,25 +10,25 @@ package fr.ird.observe.client.ui.util.tripMap; * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ -import com.vividsolutions.jts.geom.Geometry; import org.geotools.geometry.jts.LiteShape; import org.geotools.legend.Drawer; import org.geotools.styling.LineSymbolizer; import org.geotools.styling.Rule; import org.geotools.styling.SLD; import org.geotools.styling.Symbolizer; +import org.locationtech.jts.geom.Geometry; import org.opengis.feature.simple.SimpleFeature; import java.awt.BasicStroke; ===================================== client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapContentBuilder.java ===================================== @@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.util.tripMap; * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. @@ -25,11 +25,6 @@ package fr.ird.observe.client.ui.util.tripMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.GeometryFactory; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.Point; -import com.vividsolutions.jts.geom.Polygon; import fr.ird.observe.client.ObserveSwingTechnicalException; import fr.ird.observe.dto.I18nEnumHelper; import fr.ird.observe.dto.data.TripMapPoint; @@ -56,6 +51,11 @@ import org.geotools.styling.StyleFactory; import org.geotools.styling.StyledLayer; import org.geotools.styling.StyledLayerDescriptor; import org.geotools.styling.UserLayer; +import org.locationtech.jts.geom.Coordinate; +import org.locationtech.jts.geom.GeometryFactory; +import org.locationtech.jts.geom.LineString; +import org.locationtech.jts.geom.Point; +import org.locationtech.jts.geom.Polygon; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.opengis.referencing.FactoryException; @@ -80,7 +80,7 @@ public class TripMapContentBuilder { public static final String TRIP_LONGLINE_FISHING_ZONE_LAYER_NAME = "Trip longline zone"; public static final String TRIP_LONGLINE_LINE_LAYER_NAME = "Trip longline line"; public static final String TRIP_POINTS_LAYER_NAME = "Trip points"; - + public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM"); protected static final Set<TripMapPointType> TRIP_MAP_POINT_TYPES_IN_LEGEND = ImmutableSet.of( TripMapPointType.seineActivityInHarbour, TripMapPointType.seineActivityWithFreeSchoolType, @@ -92,12 +92,9 @@ public class TripMapContentBuilder { TripMapPointType.longlineActivityWithHaulingEnd, TripMapPointType.longlineActivityWithStation, TripMapPointType.longlineActivityWithInteraction); - - public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM"); - - protected StyledLayerDescriptor styledLayerDescriptor; protected final MapContent mapContent; protected final List<ObserveMapPaneLegendItem> legendItems; + protected StyledLayerDescriptor styledLayerDescriptor; public TripMapContentBuilder() { mapContent = new MapContent(); @@ -132,7 +129,7 @@ public class TripMapContentBuilder { public void addTripLine(List<TripMapPoint> tripMapPoints) throws FactoryException { - GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); + org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); SimpleFeatureTypeBuilder lineFeatureTypeBuilder = new SimpleFeatureTypeBuilder(); lineFeatureTypeBuilder.setName("lineBuilder"); ===================================== pom.xml ===================================== @@ -26,7 +26,7 @@ <parent> <groupId>io.ultreia.maven</groupId> <artifactId>pom</artifactId> - <version>2018.58</version> + <version>2018.59</version> </parent> <groupId>fr.ird.observe</groupId> ===================================== services/src/main/resources/observe-reports.properties ===================================== @@ -728,7 +728,7 @@ Join r.activitySeine a \ Join a.setSeine.targetSample ts \ Join ts.targetLength tl \ Where t.id In :tripId \ -And tl.sizeMeasureType = 1 \ +And tl.sizeMeasureType = 'fr.ird.observe.entities.referentiel.SizeMeasureType#1433499466774#0.529249255312607' \ And ts.discarded = false report.targetStoredDistributionLengthsLD1.request.1=0,0|row| \ Select tl.length , Sum(tl.count) \ @@ -739,7 +739,7 @@ Join a.setSeine.targetSample ts \ Join ts.targetLength tl \ Where t.id In :tripId \ And tl.species.id = :speciesId \ - And tl.sizeMeasureType = 1 \ + And tl.sizeMeasureType = 'fr.ird.observe.entities.referentiel.SizeMeasureType#1433499466774#0.529249255312607' \ And ts.discarded = false \ Group By tl.length \ Order By tl.length @@ -759,7 +759,7 @@ Join r.activitySeine a \ Join a.setSeine.targetSample ts \ Join ts.targetLength tl \ Where t.id In :tripId \ -And tl.sizeMeasureType = 1 \ +And tl.sizeMeasureType = 'fr.ird.observe.entities.referentiel.SizeMeasureType#1433499466774#0.529249255312607' \ And ts.discarded = true report.targetDiscardedDistributionLengthsLD1.request.1=0,0|row| \ Select tl.length , Sum(tl.count) \ @@ -770,7 +770,7 @@ Join a.setSeine.targetSample ts \ Join ts.targetLength tl \ Where t.id In :tripId \ And tl.species.id = :speciesId \ - And tl.sizeMeasureType = 1\ + And tl.sizeMeasureType = 'fr.ird.observe.entities.referentiel.SizeMeasureType#1433499466774#0.529249255312607'\ And ts.discarded = true \ Group By tl.length \ Order By tl.length @@ -790,7 +790,7 @@ Join r.activitySeine a \ Join a.setSeine.targetSample ts \ Join ts.targetLength tl \ Where t.id In :tripId \ -And tl.sizeMeasureType = 2 \ +And tl.sizeMeasureType = 'fr.ird.observe.entities.referentiel.SizeMeasureType#1433499465700#0.0902433863375336' \ And ts.discarded = false report.targetStoredDistributionLengthsLF.request.1=0,0|row| \ Select tl.length , Sum(tl.count) \ @@ -801,7 +801,7 @@ Join a.setSeine.targetSample ts \ Join ts.targetLength tl \ Where t.id In :tripId \ And tl.species.id = :speciesId \ - And tl.sizeMeasureType = 2 \ + And tl.sizeMeasureType = 'fr.ird.observe.entities.referentiel.SizeMeasureType#1433499465700#0.0902433863375336' \ And ts.discarded = false \ Group By tl.length \ Order By tl.length @@ -821,7 +821,7 @@ Join r.activitySeine a \ Join a.setSeine.targetSample ts \ Join ts.targetLength tl \ Where t.id In :tripId \ -And tl.sizeMeasureType = 2 \ +And tl.sizeMeasureType = 'fr.ird.observe.entities.referentiel.SizeMeasureType#1433499465700#0.0902433863375336' \ And ts.discarded = true report.targetDiscardedDistributionLengthsLF.request.1=0,0|row| \ Select tl.length , Sum(tl.count) \ @@ -832,7 +832,7 @@ Join a.setSeine.targetSample ts \ Join ts.targetLength tl \ Where t.id In :tripId \ And tl.species.id = :speciesId \ - And tl.sizeMeasureType = 2 \ + And tl.sizeMeasureType = 'fr.ird.observe.entities.referentiel.SizeMeasureType#1433499465700#0.0902433863375336' \ And ts.discarded = true \ Group By tl.length \ Order By tl.length View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/26c0d1842ae7c2d93bccd124785... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/26c0d1842ae7c2d93bccd124785... You're receiving this email because of your account on gitlab.com.