This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See http://git.codelutin.com/observe.git commit 4b0a2bfc28050d3f0ea3afa4615ec87d35debb0c Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed Apr 22 15:36:38 2015 +0200 change trip map point type values, add style for longline, --- .../entities/longline/TripLonglineDAOImpl.java | 12 +- .../observe/entities/seine/TripSeineDAOImpl.java | 10 +- .../fr/ird/observe/tripMap/TripMapPointType.java | 20 ++-- .../open/impl/longline/TripLonglineUIHandler.java | 2 + .../open/impl/seine/TripSeineUIHandler.java | 3 + observe-swing/src/main/map/style.xml | 122 ++++++++++++++++++++- 6 files changed, 149 insertions(+), 20 deletions(-) diff --git a/observe-entities/src/main/java/fr/ird/observe/entities/longline/TripLonglineDAOImpl.java b/observe-entities/src/main/java/fr/ird/observe/entities/longline/TripLonglineDAOImpl.java index 5fb8b58..f422c34 100644 --- a/observe-entities/src/main/java/fr/ird/observe/entities/longline/TripLonglineDAOImpl.java +++ b/observe-entities/src/main/java/fr/ird/observe/entities/longline/TripLonglineDAOImpl.java @@ -86,6 +86,7 @@ public class TripLonglineDAOImpl<E extends TripLongline> extends TripLonglineDAO departurePoint.setTime(tripLongline.getStartDate()); departurePoint.setLatitude(departureHarbour.getLatitude()); departurePoint.setLongitude(departureHarbour.getLongitude()); + departurePoint.setType(TripMapPointType.LONGLINE_DEPARTURE_HARBOUR); tripMapPoints.add(departurePoint); } @@ -105,6 +106,7 @@ public class TripLonglineDAOImpl<E extends TripLongline> extends TripLonglineDAO landingPoint.setTime(tripLongline.getEndDate()); landingPoint.setLatitude(landingHarbour.getLatitude()); landingPoint.setLongitude(landingHarbour.getLongitude()); + landingPoint.setType(TripMapPointType.LONGLINE_LANDINGE_HARBOUR); tripMapPoints.add(landingPoint); } @@ -158,7 +160,7 @@ public class TripLonglineDAOImpl<E extends TripLongline> extends TripLonglineDAO activity.setTime(resultSet.getDate(1)); activity.setLatitude(resultSet.getFloat(2)); activity.setLongitude(resultSet.getFloat(3)); - activity.setType(TripMapPointType.activity); + activity.setType(TripMapPointType.LONGLINE_ACTIVITY); result.add(activity); // settingStart @@ -167,7 +169,7 @@ public class TripLonglineDAOImpl<E extends TripLongline> extends TripLonglineDAO settingStart.setTime(resultSet.getDate(4)); settingStart.setLatitude(resultSet.getFloat(5)); settingStart.setLongitude(resultSet.getFloat(6)); - settingStart.setType(TripMapPointType.settingStart); + settingStart.setType(TripMapPointType.LONGLINE_ACTIVITY_WITH_SETTING_START); result.add(settingStart); } @@ -177,7 +179,7 @@ public class TripLonglineDAOImpl<E extends TripLongline> extends TripLonglineDAO settingEnd.setTime(resultSet.getDate(7)); settingEnd.setLatitude(resultSet.getFloat(8)); settingEnd.setLongitude(resultSet.getFloat(9)); - settingEnd.setType(TripMapPointType.settingEnd); + settingEnd.setType(TripMapPointType.LONGLINE_ACTIVITY_WITH_SETTING_END); result.add(settingEnd); } @@ -187,7 +189,7 @@ public class TripLonglineDAOImpl<E extends TripLongline> extends TripLonglineDAO haulingStart.setTime(resultSet.getDate(10)); haulingStart.setLatitude(resultSet.getFloat(11)); haulingStart.setLongitude(resultSet.getFloat(12)); - haulingStart.setType(TripMapPointType.haulingStart); + haulingStart.setType(TripMapPointType.LONGLINE_ACTIVITY_WITH_HAULING_START); result.add(haulingStart); } @@ -197,7 +199,7 @@ public class TripLonglineDAOImpl<E extends TripLongline> extends TripLonglineDAO haulingEnd.setTime(resultSet.getDate(13)); haulingEnd.setLatitude(resultSet.getFloat(14)); haulingEnd.setLongitude(resultSet.getFloat(15)); - haulingEnd.setType(TripMapPointType.haulingEnd); + haulingEnd.setType(TripMapPointType.LONGLINE_ACTIVITY_WITH_HAULING_END); result.add(haulingEnd); } diff --git a/observe-entities/src/main/java/fr/ird/observe/entities/seine/TripSeineDAOImpl.java b/observe-entities/src/main/java/fr/ird/observe/entities/seine/TripSeineDAOImpl.java index aeda497..2814ff2 100644 --- a/observe-entities/src/main/java/fr/ird/observe/entities/seine/TripSeineDAOImpl.java +++ b/observe-entities/src/main/java/fr/ird/observe/entities/seine/TripSeineDAOImpl.java @@ -92,6 +92,7 @@ public class TripSeineDAOImpl<E extends TripSeine> extends TripSeineDAOAbstract< departurePoint.setTime(tripSeine.getStartDate()); departurePoint.setLatitude(departureHarbour.getLatitude()); departurePoint.setLongitude(departureHarbour.getLongitude()); + departurePoint.setType(TripMapPointType.SEINE_DEPARTURE_HARBOUR); tripMapPoints.add(departurePoint); } @@ -106,6 +107,7 @@ public class TripSeineDAOImpl<E extends TripSeine> extends TripSeineDAOAbstract< landingPoint.setTime(tripSeine.getEndDate()); landingPoint.setLatitude(landingHarbour.getLatitude()); landingPoint.setLongitude(landingHarbour.getLongitude()); + landingPoint.setType(TripMapPointType.SEINE_LANDINGE_HARBOUR); tripMapPoints.add(landingPoint); } @@ -155,18 +157,18 @@ public class TripSeineDAOImpl<E extends TripSeine> extends TripSeineDAOAbstract< point.setLatitude(resultSet.getFloat(3)); point.setLongitude(resultSet.getFloat(4)); if (resultSet.getString(5) == null) { - point.setType(TripMapPointType.activity); + point.setType(TripMapPointType.SEINE_ACTIVITY); } else { SchoolType schoolType = SchoolType.values()[resultSet.getInt(5)]; switch (schoolType) { case libre: - point.setType(TripMapPointType.schoolLibre); + point.setType(TripMapPointType.SEINE_ACTIVITY_WITH_FREE_SCHOOL_TYPE); break; case objet: - point.setType(TripMapPointType.schoolObjet); + point.setType(TripMapPointType.SEINE_ACTIVITY_WITH_OBJECT_SCHOOL_TYPE); break; default: - point.setType(TripMapPointType.activity); + point.setType(TripMapPointType.SEINE_ACTIVITY); } } diff --git a/observe-entities/src/main/java/fr/ird/observe/tripMap/TripMapPointType.java b/observe-entities/src/main/java/fr/ird/observe/tripMap/TripMapPointType.java index 500e7a2..cbe7b85 100644 --- a/observe-entities/src/main/java/fr/ird/observe/tripMap/TripMapPointType.java +++ b/observe-entities/src/main/java/fr/ird/observe/tripMap/TripMapPointType.java @@ -5,12 +5,18 @@ package fr.ird.observe.tripMap; */ public enum TripMapPointType { - activity, - schoolLibre, - schoolObjet, - settingStart, - settingEnd, - haulingStart, - haulingEnd; + SEINE_DEPARTURE_HARBOUR, + SEINE_LANDINGE_HARBOUR, + SEINE_ACTIVITY, + SEINE_ACTIVITY_WITH_FREE_SCHOOL_TYPE, + SEINE_ACTIVITY_WITH_OBJECT_SCHOOL_TYPE, + + LONGLINE_DEPARTURE_HARBOUR, + LONGLINE_LANDINGE_HARBOUR, + LONGLINE_ACTIVITY, + LONGLINE_ACTIVITY_WITH_SETTING_START, + LONGLINE_ACTIVITY_WITH_SETTING_END, + LONGLINE_ACTIVITY_WITH_HAULING_START, + LONGLINE_ACTIVITY_WITH_HAULING_END; } diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/longline/TripLonglineUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/longline/TripLonglineUIHandler.java index 38cb49c..1f75db7 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/longline/TripLonglineUIHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/longline/TripLonglineUIHandler.java @@ -181,6 +181,8 @@ public class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLongline } } + getUi().getTripLonglineTabPane().setSelectedIndex(0); + finalizeOpenUI(mode, create); } diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java index 587b34f..d487cf2 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java @@ -178,6 +178,9 @@ public class TripSeineUIHandler extends ContentOpenableUIHandler<TripSeine> { } } + + getUi().getTripSeineTabPane().setSelectedIndex(0); + finalizeOpenUI(mode, create); } diff --git a/observe-swing/src/main/map/style.xml b/observe-swing/src/main/map/style.xml index 50354f7..e895b04 100644 --- a/observe-swing/src/main/map/style.xml +++ b/observe-swing/src/main/map/style.xml @@ -65,17 +65,18 @@ </FeatureTypeStyle> </UserStyle> </NamedLayer> + <NamedLayer> <Name>Trip points</Name> <UserStyle> <IsDefault>true</IsDefault> <FeatureTypeStyle> <Rule> - <Name>Point libre</Name> + <Name>Point seine activity with free school type</Name> <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:PropertyName>pointType</ogc:PropertyName> - <ogc:Literal>schoolLibre</ogc:Literal> + <ogc:Literal>SEINE_ACTIVITY_WITH_FREE_SCHOOL_TYPE</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> <PointSymbolizer> @@ -95,13 +96,41 @@ </PointSymbolizer> </Rule> </FeatureTypeStyle> + + <FeatureTypeStyle> + <Rule> + <Name>Point seine activity with object school type</Name> + <ogc:Filter> + <ogc:PropertyIsEqualTo> + <ogc:PropertyName>pointType</ogc:PropertyName> + <ogc:Literal>SEINE_ACTIVITY_WITH_OBJECT_SCHOOL_TYPE</ogc:Literal> + </ogc:PropertyIsEqualTo> + </ogc:Filter> + <PointSymbolizer> + <Graphic> + <Mark> + <WellKnownName>X</WellKnownName> + <Fill> + <CssParameter name="fill">#00FF00</CssParameter> + </Fill> + <Stroke> + <CssParameter name="stroke">#000000</CssParameter> + <CssParameter name="stroke-width">1</CssParameter> + </Stroke> + </Mark> + <Size>16</Size> + </Graphic> + </PointSymbolizer> + </Rule> + </FeatureTypeStyle> + <FeatureTypeStyle> <Rule> - <Name>Point objet</Name> + <Name>Point longline activity with setting start</Name> <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:PropertyName>pointType</ogc:PropertyName> - <ogc:Literal>schoolObjet</ogc:Literal> + <ogc:Literal>LONGLINE_ACTIVITY_WITH_SETTING_START</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> <PointSymbolizer> @@ -121,6 +150,91 @@ </PointSymbolizer> </Rule> </FeatureTypeStyle> + + + <FeatureTypeStyle> + <Rule> + <Name>Point longline activity with setting end</Name> + <ogc:Filter> + <ogc:PropertyIsEqualTo> + <ogc:PropertyName>pointType</ogc:PropertyName> + <ogc:Literal>LONGLINE_ACTIVITY_WITH_SETTING_END</ogc:Literal> + </ogc:PropertyIsEqualTo> + </ogc:Filter> + <PointSymbolizer> + <Graphic> + <Mark> + <WellKnownName>Circle</WellKnownName> + <Fill> + <CssParameter name="fill">#00FF00</CssParameter> + </Fill> + <Stroke> + <CssParameter name="stroke">#000000</CssParameter> + <CssParameter name="stroke-width">1</CssParameter> + </Stroke> + </Mark> + <Size>14</Size> + </Graphic> + </PointSymbolizer> + </Rule> + </FeatureTypeStyle> + + + <FeatureTypeStyle> + <Rule> + <Name>Point longline activity with hauling start</Name> + <ogc:Filter> + <ogc:PropertyIsEqualTo> + <ogc:PropertyName>pointType</ogc:PropertyName> + <ogc:Literal>LONGLINE_ACTIVITY_WITH_HAULING_START</ogc:Literal> + </ogc:PropertyIsEqualTo> + </ogc:Filter> + <PointSymbolizer> + <Graphic> + <Mark> + <WellKnownName>X</WellKnownName> + <Fill> + <CssParameter name="fill">#FF0000</CssParameter> + </Fill> + <Stroke> + <CssParameter name="stroke">#000000</CssParameter> + <CssParameter name="stroke-width">1</CssParameter> + </Stroke> + </Mark> + <Size>16</Size> + </Graphic> + </PointSymbolizer> + </Rule> + </FeatureTypeStyle> + + + <FeatureTypeStyle> + <Rule> + <Name>Point longline activity with hauling end</Name> + <ogc:Filter> + <ogc:PropertyIsEqualTo> + <ogc:PropertyName>pointType</ogc:PropertyName> + <ogc:Literal>LONGLINE_ACTIVITY_WITH_HAULING_END</ogc:Literal> + </ogc:PropertyIsEqualTo> + </ogc:Filter> + <PointSymbolizer> + <Graphic> + <Mark> + <WellKnownName>Circle</WellKnownName> + <Fill> + <CssParameter name="fill">#FF0000</CssParameter> + </Fill> + <Stroke> + <CssParameter name="stroke">#000000</CssParameter> + <CssParameter name="stroke-width">1</CssParameter> + </Stroke> + </Mark> + <Size>14</Size> + </Graphic> + </PointSymbolizer> + </Rule> + </FeatureTypeStyle> + </UserStyle> </NamedLayer> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.