This is an automated email from the git hooks/post-receive script. New commit to branch feature/6855 in repository observe. See http://git.codelutin.com/observe.git commit 1c1665e89aad038a00d5ffb37c288aa2f0c2da53 Author: Tony Chemit <chemit@codelutin.com> Date: Tue Mar 24 09:03:00 2015 +0000 refs #6855: add seine gear data + remove old seine data --- .../DataSourceMigrationForVersion_3_16.java | 90 ++++++++++++++++++++- .../main/resources/db/3.16/add-gear-data-H2.sql | 18 +++++ .../main/resources/db/3.16/add-gear-data-PG.sql | 18 +++++ .../db/3.16/remove-tripSeine-seine-H2.sql | 3 + .../db/3.16/remove-tripSeine-seine-PG.sql | 3 + observe-entities/src/main/xmi/observe-seine.zargo | Bin 82186 -> 85886 bytes .../ui/content/open/impl/seine/TripSeineUI.css | 34 -------- .../ui/content/open/impl/seine/TripSeineUI.jaxx | 78 +++++++++--------- .../open/impl/seine/TripSeineUIHandler.java | 3 - .../content/open/impl/seine/TripSeineUIModel.java | 10 +-- .../TripSeine-n1-create-warning-validation.xml | 39 --------- .../TripSeine-n1-update-warning-validation.xml | 40 --------- .../i18n/observe-validation_en_GB.properties | 3 - .../i18n/observe-validation_es_ES.properties | 3 - .../i18n/observe-validation_fr_FR.properties | 3 - 15 files changed, 174 insertions(+), 171 deletions(-) diff --git a/observe-entities/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_3_16.java b/observe-entities/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_3_16.java index 52a29a2..f9b46b0 100644 --- a/observe-entities/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_3_16.java +++ b/observe-entities/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_3_16.java @@ -4,10 +4,19 @@ import fr.ird.observe.entities.migration.AbstractDataSourceMigration; import fr.ird.observe.entities.migration.AbstractObserveMigrationCallBack; import fr.ird.observe.entities.migration.H2DataSourceMigration; import fr.ird.observe.entities.migration.PGDataSourceMigration; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.hibernate.jdbc.Work; import org.nuiton.topia.TopiaException; import org.nuiton.topia.framework.TopiaContextImplementor; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashSet; import java.util.List; +import java.util.Set; /** * Created on 3/23/15. @@ -17,6 +26,9 @@ import java.util.List; */ public class DataSourceMigrationForVersion_3_16 extends AbstractObserveMigrationCallBack { + /** Logger. */ + private static final Log log = LogFactory.getLog(DataSourceMigrationForVersion_3_16.class); + public DataSourceMigrationForVersion_3_16(AbstractDataSourceMigration callBack, String scriptSuffix) { super(AbstractDataSourceMigration.V_3_16, callBack, scriptSuffix); } @@ -27,8 +39,84 @@ public class DataSourceMigrationForVersion_3_16 extends AbstractObserveMigration boolean showSql, boolean showProgression) throws TopiaException { - addScript("add-gear-referential", queries); +// addScript("add-gear-referential", queries); + addScript("add-gear-data", queries); + migrateTripSenneData(tx, queries); + addScript("remove-tripSeine-seine", queries); + } + + private void migrateTripSenneData(TopiaContextImplementor tx, List<String> queries) throws TopiaException { + + String gearUseFeaturesIdPrefix = "fr.ird.observe.entities.seine.GearUseFeatures#1427183650941#"; + + int gearUseFeaturesCount = -1; + Set<SenneData> senneData = getSenneData(tx); + for (SenneData senne : senneData) { + + String gearUseFeaturesId = gearUseFeaturesIdPrefix + (++gearUseFeaturesCount); + if (log.isInfoEnabled()) { + log.info(String.format("Transform senne from trip: %s to: %s", senne.tripId, gearUseFeaturesId)); + } + // Create GearUseFeatures + queries.add(String.format("INSERT INTO OBSERVE_SEINE.GEARUSEFEATURES(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, TRIP, GEAR) VALUES ('%s', 0, TIMESTAMP '2015-03-24 00:00:00.00', '%s', 'fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20' );", gearUseFeaturesId, senne.tripId)); + + // Create GearUseFeaturesMeasurements + String gearUseFeatureMeasurementIdPrefix = "fr.ird.observe.entities.seine.GearUseFeaturesMeasurement#1427183650941#" + gearUseFeaturesCount; + if (senne.seineCircumference != null) { + String gearUseFeatureMeasurementId = gearUseFeatureMeasurementIdPrefix + 0; + queries.add(String.format("INSERT INTO OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, GEARCARACTERISTIC, GEARUSEFEATURES, MEASUREMENTVALUE) VALUES ('%s', 0, TIMESTAMP '2015-03-24 00:00:00.00', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.7', '%s', '%s' );", gearUseFeatureMeasurementId, gearUseFeaturesId, senne.seineCircumference)); + } + if (senne.seineDepth != null) { + String gearUseFeatureMeasurementId = gearUseFeatureMeasurementIdPrefix + 1; + queries.add(String.format("INSERT INTO OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, GEARCARACTERISTIC, GEARUSEFEATURES, MEASUREMENTVALUE) VALUES ('%s', 0, TIMESTAMP '2015-03-24 00:00:00.00', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.10', '%s', '%s' );", gearUseFeatureMeasurementId, gearUseFeaturesId, senne.seineBallastWeight)); + } + if (senne.seineBallastWeight != null) { + String gearUseFeatureMeasurementId = gearUseFeatureMeasurementIdPrefix + 2; + queries.add(String.format("INSERT INTO OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, GEARCARACTERISTIC, GEARUSEFEATURES, MEASUREMENTVALUE) VALUES ('%s', 0, TIMESTAMP '2015-03-24 00:00:00.00', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.9', '%s', '%s' );", gearUseFeatureMeasurementId, gearUseFeaturesId, senne.seineDepth)); + } + } + } + + private static class SenneData { + + String tripId; + + Integer seineCircumference; + + Integer seineDepth; + + Integer seineBallastWeight; + } + + protected Set<SenneData> getSenneData(TopiaContextImplementor tx) throws TopiaException { + + final Set<SenneData> result = new HashSet<SenneData>(); + + tx.getHibernate().doWork(new Work() { + + @Override + public void execute(Connection connection) throws SQLException { + String sql = "SELECT topiaId, seineCircumference, seineDepth, seineBallastWeight FROM OBSERVE_SEINE.TRIP WHERE seineDepth IS NOT NULL OR seineDepth IS NOT NULL OR seineBallastWeight IS NOT NULL;"; + PreparedStatement ps = connection.prepareStatement(sql); + try { + ResultSet set = ps.executeQuery(); + while (set.next()) { + SenneData senneData = new SenneData(); + senneData.tripId = set.getString(1); + senneData.seineCircumference = set.getInt(2); + senneData.seineDepth = set.getInt(3); + senneData.seineBallastWeight = set.getInt(4); + result.add(senneData); + } + } catch (Exception e) { + throw new SQLException("Could not obtain trip senne data", e); + } finally { + ps.close(); + } + } + }); + return result; } public static class H2DataSourceMigrationForVersion extends DataSourceMigrationForVersion_3_16 { diff --git a/observe-entities/src/main/resources/db/3.16/add-gear-data-H2.sql b/observe-entities/src/main/resources/db/3.16/add-gear-data-H2.sql new file mode 100644 index 0000000..5128dc8 --- /dev/null +++ b/observe-entities/src/main/resources/db/3.16/add-gear-data-H2.sql @@ -0,0 +1,18 @@ +-- +-- GearUseFeatures Definition +-- +CREATE TABLE OBSERVE_SEINE.GEARUSEFEATURES(topiaid VARCHAR(255) NOT NULL,topiaversion BIGINT NOT NULL, topiacreatedate DATE, trip VARCHAR(255) NOT NULL, gear VARCHAR(255) NOT NULL, comment VARCHAR(1023), usedInTrip BOOLEAN); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURES ADD CONSTRAINT PK_GEARUSEFEATURES PRIMARY KEY(TOPIAID); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURES ADD CONSTRAINT FK_GEARUSEFEATURES_TRIP FOREIGN KEY(trip) REFERENCES OBSERVE_SEINE.TRIP(topiaid); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURES ADD CONSTRAINT FK_GEARUSEFEATURES_GEAR FOREIGN KEY(gear) REFERENCES OBSERVE_COMMON.GEAR(topiaid); +CREATE INDEX FK_GEARUSEFEATURES_TRIP_IDX ON OBSERVE_SEINE.GEARUSEFEATURES(trip); +CREATE INDEX FK_GEARUSEFEATURES_GEAR_IDX ON OBSERVE_SEINE.GEARUSEFEATURES(gear); +-- +-- GearUseFeaturesMeasurement Definition +-- +CREATE TABLE OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT(topiaid VARCHAR(255) NOT NULL,topiaversion BIGINT NOT NULL, topiacreatedate DATE, gearCaracteristic VARCHAR(255) NOT NULL, gearUseFeatures VARCHAR(255) NOT NULL, measurementValue VARCHAR(255) NOT NULL); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT ADD CONSTRAINT PK_GEARUSEFEATURESMEASUREMENT PRIMARY KEY(TOPIAID); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT ADD CONSTRAINT FK_GEARUSEFEATURESMEASUREMENT_GEARCARACTERISTIC FOREIGN KEY(gearCaracteristic) REFERENCES OBSERVE_COMMON.GEARCARACTERISTIC(topiaid); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT ADD CONSTRAINT FK_GEARUSEFEATURESMEASUREMENT_GEARUSEFEATURES FOREIGN KEY(gearUseFeatures) REFERENCES OBSERVE_SEINE.GEARUSEFEATURES(topiaid); +CREATE INDEX FK_GEARUSEFEATURESMEASUREMENT_GEARCARACTERISTIC_IDX ON OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT(gearCaracteristic); +CREATE INDEX FK_GEARUSEFEATURESMEASUREMENT_GEARUSEFEATURES_IDX ON OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT(GearUseFeatures); \ No newline at end of file diff --git a/observe-entities/src/main/resources/db/3.16/add-gear-data-PG.sql b/observe-entities/src/main/resources/db/3.16/add-gear-data-PG.sql new file mode 100644 index 0000000..8a483d1 --- /dev/null +++ b/observe-entities/src/main/resources/db/3.16/add-gear-data-PG.sql @@ -0,0 +1,18 @@ +-- +-- GearUseFeatures Definition +-- +CREATE TABLE OBSERVE_SEINE.GEARUSEFEATURES(topiaid character varying(255) NOT NULL,topiaversion BIGINT NOT NULL, topiacreatedate DATE, trip character varying(255) NOT NULL, gear character varying(255) NOT NULL, comment VARCHAR(1023), usedInTrip BOOLEAN); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURES ADD CONSTRAINT PK_GEARUSEFEATURES PRIMARY KEY(TOPIAID); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURES ADD CONSTRAINT FK_GEARUSEFEATURES_TRIP FOREIGN KEY(trip) REFERENCES OBSERVE_SEINE.TRIP(topiaid); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURES ADD CONSTRAINT FK_GEARUSEFEATURES_GEAR FOREIGN KEY(gear) REFERENCES OBSERVE_COMMON.GEAR(topiaid); +CREATE INDEX FK_GEARUSEFEATURES_TRIP_IDX ON OBSERVE_SEINE.GEARUSEFEATURES(trip); +CREATE INDEX FK_GEARUSEFEATURES_GEAR_IDX ON OBSERVE_SEINE.GEARUSEFEATURES(gear); +-- +-- GearUseFeaturesMeasurement Definition +-- +CREATE TABLE OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT(topiaid character varying(255) NOT NULL,topiaversion BIGINT NOT NULL, topiacreatedate DATE, gearCaracteristic character varying(255) NOT NULL, gearUseFeatures character varying(255) NOT NULL, measurementValue character varying(255) NOT NULL); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT ADD CONSTRAINT PK_GEARUSEFEATURESMEASUREMENT PRIMARY KEY(TOPIAID); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT ADD CONSTRAINT FK_GEARUSEFEATURESMEASUREMENT_GEARCARACTERISTIC FOREIGN KEY(gearCaracteristic) REFERENCES OBSERVE_COMMON.GEARCARACTERISTIC(topiaid); +ALTER TABLE OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT ADD CONSTRAINT FK_GEARUSEFEATURESMEASUREMENT_GEARUSEFEATURES FOREIGN KEY(gearUseFeatures) REFERENCES OBSERVE_SEINE.GEARUSEFEATURES(topiaid); +CREATE INDEX FK_GEARUSEFEATURESMEASUREMENT_GEARCARACTERISTIC_IDX ON OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT(gearCaracteristic); +CREATE INDEX FK_GEARUSEFEATURESMEASUREMENT_GEARUSEFEATURES_IDX ON OBSERVE_SEINE.GEARUSEFEATURESMEASUREMENT(GearUseFeatures); \ No newline at end of file diff --git a/observe-entities/src/main/resources/db/3.16/remove-tripSeine-seine-H2.sql b/observe-entities/src/main/resources/db/3.16/remove-tripSeine-seine-H2.sql new file mode 100644 index 0000000..9c8fdf3 --- /dev/null +++ b/observe-entities/src/main/resources/db/3.16/remove-tripSeine-seine-H2.sql @@ -0,0 +1,3 @@ +ALTER TABLE OBSERVE_SEINE.TRIP DROP COLUMN seineCircumference; +ALTER TABLE OBSERVE_SEINE.TRIP DROP COLUMN seineDepth; +ALTER TABLE OBSERVE_SEINE.TRIP DROP COLUMN seineBallastWeight; \ No newline at end of file diff --git a/observe-entities/src/main/resources/db/3.16/remove-tripSeine-seine-PG.sql b/observe-entities/src/main/resources/db/3.16/remove-tripSeine-seine-PG.sql new file mode 100644 index 0000000..9c8fdf3 --- /dev/null +++ b/observe-entities/src/main/resources/db/3.16/remove-tripSeine-seine-PG.sql @@ -0,0 +1,3 @@ +ALTER TABLE OBSERVE_SEINE.TRIP DROP COLUMN seineCircumference; +ALTER TABLE OBSERVE_SEINE.TRIP DROP COLUMN seineDepth; +ALTER TABLE OBSERVE_SEINE.TRIP DROP COLUMN seineBallastWeight; \ No newline at end of file diff --git a/observe-entities/src/main/xmi/observe-seine.zargo b/observe-entities/src/main/xmi/observe-seine.zargo index 750b53b..4ae6784 100644 Binary files a/observe-entities/src/main/xmi/observe-seine.zargo and b/observe-entities/src/main/xmi/observe-seine.zargo differ diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.css b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.css index 467403c..fc43d24 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.css +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.css @@ -136,40 +136,6 @@ NumberEditor { text:{getStringValue(bean.getErsId())}; } -#senneContainer { - border:{new TitledBorder(t("observe.common.senne"))}; -} - -#seineCircumferenceLabel { - text:"observe.common.seineCircumference"; - labelFor:{seineCircumference}; -} - -#seineCircumference { - property:{TripSeine.PROPERTY_SEINE_CIRCUMFERENCE}; - model:{bean.getSeineCircumference()}; -} - -#seineDepthLabel { - text:"observe.common.seineDepth"; - labelFor:{seineDepth}; -} - -#seineDepth { - property:{TripSeine.PROPERTY_SEINE_DEPTH}; - model:{bean.getSeineDepth()}; -} - -#seineBallastWeightLabel { - text:"observe.common.seineBallastWeight"; - labelFor:{seineBallastWeight}; -} - -#seineBallastWeight { - property:{TripSeine.PROPERTY_SEINE_BALLAST_WEIGHT}; - model:{bean.getSeineBallastWeight()}; -} - #startDateLabel { text:"observe.common.startDate"; labelFor:{startDate}; diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.jaxx b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.jaxx index e418817..0a21730 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.jaxx +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.jaxx @@ -235,45 +235,45 @@ protected boolean canEditOcean(java.util.List<Route> routes) { <tab id='caracteristicTab'> - <Table fill="both" weightx="1"> - - <!-- senne --> - <row> - <cell anchor='west' columns="2"> - <Table fill="both" id='senneContainer'> - <row> - <cell anchor='west'> - <JLabel id='seineCircumferenceLabel'/> - </cell> - <cell anchor='east' weightx="1" fill="both"> - <NumberEditor id='seineCircumference' constructorParams='this'/> - </cell> - </row> - <row> - <cell> - <JLabel id='seineDepthLabel'/> - </cell> - <cell> - <NumberEditor id='seineDepth' constructorParams='this'/> - </cell> - </row> - <row> - <cell> - <JLabel id='seineBallastWeightLabel'/> - </cell> - <cell> - <NumberEditor id='seineBallastWeight' constructorParams='this'/> - </cell> - </row> - </Table> - </cell> - </row> - <row> - <cell weighty="1"> - <JLabel/> - </cell> - </row> - </Table> + <!--<Table fill="both" weightx="1">--> + + <!--<!– senne –>--> + <!--<row>--> + <!--<cell anchor='west' columns="2">--> + <!--<Table fill="both" id='senneContainer'>--> + <!--<row>--> + <!--<cell anchor='west'>--> + <!--<JLabel id='seineCircumferenceLabel'/>--> + <!--</cell>--> + <!--<cell anchor='east' weightx="1" fill="both">--> + <!--<NumberEditor id='seineCircumference' constructorParams='this'/>--> + <!--</cell>--> + <!--</row>--> + <!--<row>--> + <!--<cell>--> + <!--<JLabel id='seineDepthLabel'/>--> + <!--</cell>--> + <!--<cell>--> + <!--<NumberEditor id='seineDepth' constructorParams='this'/>--> + <!--</cell>--> + <!--</row>--> + <!--<row>--> + <!--<cell>--> + <!--<JLabel id='seineBallastWeightLabel'/>--> + <!--</cell>--> + <!--<cell>--> + <!--<NumberEditor id='seineBallastWeight' constructorParams='this'/>--> + <!--</cell>--> + <!--</row>--> + <!--</Table>--> + <!--</cell>--> + <!--</row>--> + <!--<row>--> + <!--<cell weighty="1">--> + <!--<JLabel/>--> + <!--</cell>--> + <!--</row>--> + <!--</Table>--> </tab> </JTabbedPane> 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 63e6e38..a489f2c 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 @@ -225,9 +225,6 @@ public class TripSeineUIHandler extends ContentOpenableUIHandler<TripSeine> { TripSeineUI.BINDING_CAPTAIN_SELECTED_ITEM, TripSeineUI.BINDING_DATA_ENTRY_OPERATOR_SELECTED_ITEM, TripSeineUI.BINDING_OCEAN_SELECTED_ITEM, - TripSeineUI.BINDING_SEINE_CIRCUMFERENCE_MODEL, - TripSeineUI.BINDING_SEINE_DEPTH_MODEL, - TripSeineUI.BINDING_SEINE_BALLAST_WEIGHT_MODEL, TripSeineUI.BINDING_START_DATE_DATE, TripSeineUI.BINDING_END_DATE_DATE, TripSeineUI.BINDING_COMMENT2_TEXT, diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIModel.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIModel.java index cb68330..73bc4c5 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIModel.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIModel.java @@ -60,9 +60,7 @@ public class TripSeineUIModel extends ContentOpenableUIModel<TripSeine> { TripSeine.PROPERTY_REPORTS_URL).build(); public static final Set<String> CARACTERISTICS_TAB_PROPERTIES = - ImmutableSet.<String>builder().add(TripSeine.PROPERTY_SEINE_BALLAST_WEIGHT, - TripSeine.PROPERTY_SEINE_CIRCUMFERENCE, - TripSeine.PROPERTY_SEINE_DEPTH).build(); + ImmutableSet.<String>builder().add(TripSeine.PROPERTY_GEAR_USE_FEATURES).build(); private static final long serialVersionUID = 1L; @@ -105,9 +103,6 @@ public class TripSeineUIModel extends ContentOpenableUIModel<TripSeine> { TripSeine.PROPERTY_REPORTS_URL, TripSeine.PROPERTY_COMMENT, TripSeine.PROPERTY_VESSEL, - TripSeine.PROPERTY_SEINE_CIRCUMFERENCE, - TripSeine.PROPERTY_SEINE_DEPTH, - TripSeine.PROPERTY_SEINE_BALLAST_WEIGHT, TripSeine.PROPERTY_OBSERVER, TripSeine.PROPERTY_CAPTAIN, TripSeine.PROPERTY_DATA_ENTRY_OPERATOR, @@ -116,11 +111,14 @@ public class TripSeineUIModel extends ContentOpenableUIModel<TripSeine> { TripSeine.PROPERTY_LANDING_HARBOUR, TripSeine.PROPERTY_PROGRAM, TripSeine.PROPERTY_ROUTE, + TripSeine.PROPERTY_GEAR_USE_FEATURES, TripSeine.PROPERTY_ERS_ID, TripSeine.PROPERTY_OPEN); // on ajoute la recopie de l'association route builder.addCollectionStrategy(Binder.CollectionStrategy.duplicate, TripSeine.PROPERTY_ROUTE); + // on ajoute la recopie de l'association gearUseFeatues + builder.addCollectionStrategy(Binder.CollectionStrategy.duplicate, TripSeine.PROPERTY_GEAR_USE_FEATURES); return builder; diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/seine/TripSeine-n1-create-warning-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/seine/TripSeine-n1-create-warning-validation.xml index c17e256..a39dbb4 100644 --- a/observe-validation/src/main/resources/fr/ird/observe/entities/seine/TripSeine-n1-create-warning-validation.xml +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/seine/TripSeine-n1-create-warning-validation.xml @@ -33,45 +33,6 @@ </field> - <field name="seineCircumference"> - - <!-- 0 <= seineCircumference <= 6000 --> - <field-validator type="double" short-circuit="true"> - <param name="minInclusive">0</param> - <param name="maxInclusive">6000</param> - <message> - validator.trip.bound.seineCircumference##${minInclusive}##${maxInclusive} - </message> - </field-validator> - - </field> - - <field name="seineDepth"> - - <!-- 0 <= seineDepth <= 500 --> - <field-validator type="double" short-circuit="true"> - <param name="minInclusive">0</param> - <param name="maxInclusive">500</param> - <message> - validator.trip.bound.seineDepth##${minInclusive}##${maxInclusive} - </message> - </field-validator> - - </field> - - <field name="seineBallastWeight"> - - <!-- 0 <= seineBallastWeight <= 1000 --> - <field-validator type="double" short-circuit="true"> - <param name="minInclusive">0</param> - <param name="maxInclusive">1000</param> - <message> - validator.trip.bound.seineBallastWeight##${minInclusive}##${maxInclusive} - </message> - </field-validator> - - </field> - <field name="captain"> <!-- pas de captain selectionne --> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/seine/TripSeine-n1-update-warning-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/seine/TripSeine-n1-update-warning-validation.xml index b6bac7b..5162dae 100644 --- a/observe-validation/src/main/resources/fr/ird/observe/entities/seine/TripSeine-n1-update-warning-validation.xml +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/seine/TripSeine-n1-update-warning-validation.xml @@ -26,7 +26,6 @@ "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> <validators> - <field name="departureHarbour"> <!-- pas de departureHarbour selectionne --> @@ -45,45 +44,6 @@ </field> - <field name="seineCircumference"> - - <!-- 0 <= seineCircumference <= 6000 --> - <field-validator type="double" short-circuit="true"> - <param name="minInclusive">0</param> - <param name="maxInclusive">6000</param> - <message> - validator.trip.bound.seineCircumference##${minInclusive}##${maxInclusive} - </message> - </field-validator> - - </field> - - <field name="seineDepth"> - - <!-- 0 <= seineDepth <= 500 --> - <field-validator type="double" short-circuit="true"> - <param name="minInclusive">0</param> - <param name="maxInclusive">500</param> - <message> - validator.trip.bound.seineDepth##${minInclusive}##${maxInclusive} - </message> - </field-validator> - - </field> - - <field name="seineBallastWeight"> - - <!-- 0 <= seineBallastWeight <= 1000 --> - <field-validator type="double" short-circuit="true"> - <param name="minInclusive">0</param> - <param name="maxInclusive">1000</param> - <message> - validator.trip.bound.seineBallastWeight##${minInclusive}##${maxInclusive} - </message> - </field-validator> - - </field> - <field name="ocean"> <!-- pas d'ocean selectionne --> diff --git a/observe-validation/src/main/resources/i18n/observe-validation_en_GB.properties b/observe-validation/src/main/resources/i18n/observe-validation_en_GB.properties index b449fbf..b1df383 100644 --- a/observe-validation/src/main/resources/i18n/observe-validation_en_GB.properties +++ b/observe-validation/src/main/resources/i18n/observe-validation_en_GB.properties @@ -360,9 +360,6 @@ validator.transmittingBuoy.desactivated.transmittingBuoyType= validator.transmittingBuoy.null.code= validator.transmittingBuoy.required.transmittingBuoyOperation= validator.transmittingBuoy.required.transmittingBuoyType= -validator.trip.bound.seineBallastWeight= -validator.trip.bound.seineCircumference= -validator.trip.bound.seineDepth= validator.trip.comment.tobig= validator.trip.desactivated.captain= validator.trip.desactivated.dataEntryOperator= diff --git a/observe-validation/src/main/resources/i18n/observe-validation_es_ES.properties b/observe-validation/src/main/resources/i18n/observe-validation_es_ES.properties index 051d68f..0665513 100644 --- a/observe-validation/src/main/resources/i18n/observe-validation_es_ES.properties +++ b/observe-validation/src/main/resources/i18n/observe-validation_es_ES.properties @@ -360,9 +360,6 @@ validator.transmittingBuoy.desactivated.transmittingBuoyType= validator.transmittingBuoy.null.code=El código de baliza no ha sido especificado. validator.transmittingBuoy.required.transmittingBuoyOperation= validator.transmittingBuoy.required.transmittingBuoyType= -validator.trip.bound.seineBallastWeight=Le weight du lest de la senne debe estar comprendido entre %1$s et %2$s. -validator.trip.bound.seineCircumference=La circonférence de la senne debe estar comprendido entre %1$s et %2$s. -validator.trip.bound.seineDepth=La profondeur de la senne debe estar comprendido entre %1$s et %2$s. validator.trip.comment.tobig=La longitud del campo de comentarios está limitado a 1024 carácteres. validator.trip.desactivated.captain= validator.trip.desactivated.dataEntryOperator= diff --git a/observe-validation/src/main/resources/i18n/observe-validation_fr_FR.properties b/observe-validation/src/main/resources/i18n/observe-validation_fr_FR.properties index 4de32e4..809099d 100644 --- a/observe-validation/src/main/resources/i18n/observe-validation_fr_FR.properties +++ b/observe-validation/src/main/resources/i18n/observe-validation_fr_FR.properties @@ -360,9 +360,6 @@ validator.transmittingBuoy.desactivated.transmittingBuoyType=Le type de balise s validator.transmittingBuoy.null.code=Le code de la balise n'est pas renseigné. validator.transmittingBuoy.required.transmittingBuoyOperation=La sélection d'une opération sur balise est obligatoire. validator.transmittingBuoy.required.transmittingBuoyType=La sélection d'une type de balise est obligatoire. -validator.trip.bound.seineBallastWeight=Le poids du lest de la senne doit être comprise entre %1$s et %2$s. -validator.trip.bound.seineCircumference=La circonférence de la senne doit être comprise entre %1$s et %2$s. -validator.trip.bound.seineDepth=La profondeur de la senne doit être comprise entre %1$s et %2$s. validator.trip.comment.tobig=La taille du commentaire est limitée à 1024 caractères. validator.trip.desactivated.captain=Le capitaine sélectionné est désactivé. validator.trip.desactivated.dataEntryOperator=Le saisisseur sélectionné est désactivé. -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.