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 ab863584ff97731d81fceb99da4c898e58766cde Author: Tony Chemit <chemit@codelutin.com> Date: Mon Mar 23 19:14:21 2015 +0000 refs #6855: add referentials --- .../main/java/fr/ird/observe/DecoratorService.java | 9 + .../i18n/observe-business_en_GB.properties | 3 + .../i18n/observe-business_es_ES.properties | 3 + .../i18n/observe-business_fr_FR.properties | 3 + .../java/fr/ird/observe/entities/Entities.java | 40 +---- .../migration/AbstractDataSourceMigration.java | 4 +- .../DataSourceMigrationForVersion_3_16.java | 50 ++++++ .../resources/db/3.16/add-gear-referential-H2.sql | 120 +++++++++++++ .../resources/db/3.16/add-gear-referential-PG.sql | 120 +++++++++++++ .../src/main/xmi/observe-common.properties | 3 +- observe-entities/src/main/xmi/observe-common.zargo | Bin 33078 -> 35711 bytes .../src/main/xmi/observe-longline.properties | 4 +- .../src/main/xmi/observe-seine.properties | 2 +- .../content/ref/impl/GearCaracteristicTypeUI.jaxx | 162 +++++++++++++++++ .../ref/impl/GearCaracteristicTypeUIModel.java | 20 +++ .../ui/content/ref/impl/GearCaracteristicUI.css | 42 +++++ .../ui/content/ref/impl/GearCaracteristicUI.jaxx | 186 +++++++++++++++++++ .../content/ref/impl/GearCaracteristicUIModel.java | 27 +++ .../fr/ird/observe/ui/content/ref/impl/GearUI.css | 49 ++++++ .../fr/ird/observe/ui/content/ref/impl/GearUI.jaxx | 196 +++++++++++++++++++++ .../observe/ui/content/ref/impl/GearUIHandler.java | 82 +++++++++ .../observe/ui/content/ref/impl/GearUIModel.java | 70 ++++++++ .../resources/i18n/observe-swing_en_GB.properties | 32 +++- .../resources/i18n/observe-swing_es_ES.properties | 29 +++ .../resources/i18n/observe-swing_fr_FR.properties | 41 ++++- .../Gear-n1-create-error-validation.xml | 75 ++++++++ .../Gear-n1-create-warning-validation.xml | 67 +++++++ .../Gear-n1-update-error-validation.xml | 75 ++++++++ .../Gear-n1-update-warning-validation.xml | 67 +++++++ ...earCaracteristic-n1-create-error-validation.xml | 90 ++++++++++ ...rCaracteristic-n1-create-warning-validation.xml | 67 +++++++ ...earCaracteristic-n1-update-error-validation.xml | 90 ++++++++++ ...rCaracteristic-n1-update-warning-validation.xml | 67 +++++++ ...aracteristicType-n1-create-error-validation.xml | 75 ++++++++ ...acteristicType-n1-create-warning-validation.xml | 67 +++++++ ...aracteristicType-n1-update-error-validation.xml | 75 ++++++++ ...acteristicType-n1-update-warning-validation.xml | 67 +++++++ .../i18n/observe-validation_en_GB.properties | 2 + .../i18n/observe-validation_es_ES.properties | 2 + .../i18n/observe-validation_fr_FR.properties | 2 + .../validation/BeanValidatorDetectorTest.java | 11 +- 41 files changed, 2150 insertions(+), 46 deletions(-) diff --git a/observe-business/src/main/java/fr/ird/observe/DecoratorService.java b/observe-business/src/main/java/fr/ird/observe/DecoratorService.java index aa2e375..a3f2538 100644 --- a/observe-business/src/main/java/fr/ird/observe/DecoratorService.java +++ b/observe-business/src/main/java/fr/ird/observe/DecoratorService.java @@ -40,6 +40,9 @@ import fr.ird.observe.entities.longline.SetLongline; import fr.ird.observe.entities.longline.Tdr; import fr.ird.observe.entities.referentiel.Country; import fr.ird.observe.entities.referentiel.FpaZone; +import fr.ird.observe.entities.referentiel.Gear; +import fr.ird.observe.entities.referentiel.GearCaracteristic; +import fr.ird.observe.entities.referentiel.GearCaracteristicType; import fr.ird.observe.entities.referentiel.Harbour; import fr.ird.observe.entities.referentiel.Ocean; import fr.ird.observe.entities.referentiel.Organism; @@ -363,6 +366,9 @@ public class DecoratorService extends DecoratorProvider { n("observe.common.floatlineLengths"); n("observe.common.locode"); n("observe.common.name"); + n("observe.common.gearCaracteristicType"); + n("observe.common.gearCaracteristic"); + n("observe.common.gear"); n("observe.common.floatline1Length"); n("observe.common.floatline2Length"); @@ -454,6 +460,9 @@ public class DecoratorService extends DecoratorProvider { registerDefaultReferenceEntityDecorator(TripType.class, libelle); registerDefaultReferenceEntityDecorator(VesselActivityLongline.class, libelle); registerDefaultReferenceEntityDecorator(WeightMeasureType.class, libelle); + registerDefaultReferenceEntityDecorator(GearCaracteristicType.class, libelle); + registerDefaultReferenceEntityDecorator(GearCaracteristic.class, libelle); + registerDefaultReferenceEntityDecorator(Gear.class, libelle); registerReferenceEntityDecorator(Harbour.class, "${code}$s##${name}$s##${locode}$s"); diff --git a/observe-business/src/main/resources/i18n/observe-business_en_GB.properties b/observe-business/src/main/resources/i18n/observe-business_en_GB.properties index 84f1cf1..e0ae654 100644 --- a/observe-business/src/main/resources/i18n/observe-business_en_GB.properties +++ b/observe-business/src/main/resources/i18n/observe-business_en_GB.properties @@ -25,6 +25,9 @@ observe.common.floatline2Length= observe.common.floatlineLengths= observe.common.floatlinesComposition= observe.common.fpaZone= +observe.common.gear=Gear +observe.common.gearCaracteristic=Gear caracteristic +observe.common.gearCaracteristicType=Gear caracteristic type observe.common.gps.activity= observe.common.gps.gpsPoint= observe.common.gps.gpsPointInterval= diff --git a/observe-business/src/main/resources/i18n/observe-business_es_ES.properties b/observe-business/src/main/resources/i18n/observe-business_es_ES.properties index e89dc83..c5a6a02 100644 --- a/observe-business/src/main/resources/i18n/observe-business_es_ES.properties +++ b/observe-business/src/main/resources/i18n/observe-business_es_ES.properties @@ -25,6 +25,9 @@ observe.common.floatline2Length= observe.common.floatlineLengths= observe.common.floatlinesComposition= observe.common.fpaZone= +observe.common.gear= +observe.common.gearCaracteristic= +observe.common.gearCaracteristicType= observe.common.gps.activity=Actividad observe.common.gps.gpsPoint=Punto GPS observe.common.gps.gpsPointInterval=Intervalo de puntos diff --git a/observe-business/src/main/resources/i18n/observe-business_fr_FR.properties b/observe-business/src/main/resources/i18n/observe-business_fr_FR.properties index 5dc2f60..698dfd9 100644 --- a/observe-business/src/main/resources/i18n/observe-business_fr_FR.properties +++ b/observe-business/src/main/resources/i18n/observe-business_fr_FR.properties @@ -25,6 +25,9 @@ observe.common.floatline2Length=Orin 2 (m) observe.common.floatlineLengths=Template observe.common.floatlinesComposition=Composition des orins observe.common.fpaZone=Zone FPA +observe.common.gear=Équipement +observe.common.gearCaracteristic=Caractéristique d'un équipement +observe.common.gearCaracteristicType=Type de caractéristique d'équipement observe.common.gps.activity=Activité observe.common.gps.gpsPoint=Point GPS observe.common.gps.gpsPointInterval=Intervalle de points diff --git a/observe-entities/src/main/java/fr/ird/observe/entities/Entities.java b/observe-entities/src/main/java/fr/ird/observe/entities/Entities.java index df81451..da63dac 100644 --- a/observe-entities/src/main/java/fr/ird/observe/entities/Entities.java +++ b/observe-entities/src/main/java/fr/ird/observe/entities/Entities.java @@ -59,6 +59,9 @@ public class Entities { ObserveEntityEnum.Organism, ObserveEntityEnum.LengthWeightParameter, ObserveEntityEnum.Program, + ObserveEntityEnum.GearCaracteristicType, + ObserveEntityEnum.GearCaracteristic, + ObserveEntityEnum.Gear, ObserveEntityEnum.VesselActivitySeine, ObserveEntityEnum.SurroundingActivity, @@ -104,19 +107,6 @@ public class Entities { ObserveEntityEnum.WeightMeasureType }; - /** - * FIXME : cela n'est pas vrai !!! (voir l'algortihme de replication qui - * detecte tout seul l'ordre a utiliser). - * <p/> - * la liste des entités du réferentiel dans l'ordre de précédence. - * <p/> - * Ainsi on pourra lors des duplications de base parcourir cet ordre sans - * avoir à se préoccuper d'éventuels viloations d'intégrités en base (sur - * les clef étrangères des associations). - */ - public static final List<ObserveEntityEnum> REFERENCE_ENTITIES_LIST = - Collections.unmodifiableList(Arrays.asList(REFERENCE_ENTITIES)); - public static final ObserveEntityEnum[] REFERENCE_COMMON_ENTITIES = new ObserveEntityEnum[]{ ObserveEntityEnum.VesselSizeCategory, @@ -133,7 +123,10 @@ public class Entities { ObserveEntityEnum.Ocean, ObserveEntityEnum.Organism, ObserveEntityEnum.LengthWeightParameter, - ObserveEntityEnum.Program + ObserveEntityEnum.Program, + ObserveEntityEnum.GearCaracteristicType, + ObserveEntityEnum.GearCaracteristic, + ObserveEntityEnum.Gear }; public static final List<ObserveEntityEnum> REFERENCE_COMMON_ENTITIES_LIST = @@ -269,9 +262,6 @@ public class Entities { ObserveEntityEnum.TripSeine }; - public static final List<ObserveEntityEnum> DATA_SEINE_ENTITIES_LIST = - Collections.unmodifiableList(Arrays.asList(DATA_SEINE_ENTITIES)); - public static final ObserveEntityEnum[] DATA_LONGLINE_ENTITIES = new ObserveEntityEnum[]{ ObserveEntityEnum.ActivityLongline, @@ -293,9 +283,6 @@ public class Entities { ObserveEntityEnum.WeightMeasure }; - public static final List<ObserveEntityEnum> DATA_LONGLINE_ENTITIES_LIST = - Collections.unmodifiableList(Arrays.asList(DATA_LONGLINE_ENTITIES)); - public static final ObserveEntityEnum[] ALL_ENTITIES = ObserveEntityEnum.values(); @@ -331,19 +318,6 @@ public class Entities { } /** - * @param constant le type d'entite a tester - * @return {@code true} si c'est une classe de donnée. - */ - public static boolean isDataClass(ObserveEntityEnum constant) { - for (ObserveEntityEnum c : DATA_ENTITIES_LIST) { - if (c.equals(constant)) { - return true; - } - } - return false; - } - - /** * @param klass le type d'entite a tester * @return {@code true} si c'est une classe de donnée. */ diff --git a/observe-entities/src/main/java/fr/ird/observe/entities/migration/AbstractDataSourceMigration.java b/observe-entities/src/main/java/fr/ird/observe/entities/migration/AbstractDataSourceMigration.java index 443608a..c06246a 100644 --- a/observe-entities/src/main/java/fr/ird/observe/entities/migration/AbstractDataSourceMigration.java +++ b/observe-entities/src/main/java/fr/ird/observe/entities/migration/AbstractDataSourceMigration.java @@ -73,9 +73,11 @@ public abstract class AbstractDataSourceMigration extends TopiaMigrationCallback public static final Version V_3_15 = Versions.valueOf("3.15"); + public static final Version V_3_16 = Versions.valueOf("3.16"); + /** Les versions de mise à jour disponibles. */ public static final Version[] availableVersions = new Version[]{ - V_3_1, V_3_5, V_3_7, V_3_8, V_3_9, V_3_10, V_3_11, V_3_12, V_3_14, V_3_15 + V_3_1, V_3_5, V_3_7, V_3_8, V_3_9, V_3_10, V_3_11, V_3_12, V_3_14, V_3_15, V_3_16 }; private static Supplier<ApplicationConfig> applicationConfigSupplier; 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 new file mode 100644 index 0000000..52a29a2 --- /dev/null +++ b/observe-entities/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_3_16.java @@ -0,0 +1,50 @@ +package fr.ird.observe.entities.migration.versions; + +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.nuiton.topia.TopiaException; +import org.nuiton.topia.framework.TopiaContextImplementor; + +import java.util.List; + +/** + * Created on 3/23/15. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 3.16 + */ +public class DataSourceMigrationForVersion_3_16 extends AbstractObserveMigrationCallBack { + + public DataSourceMigrationForVersion_3_16(AbstractDataSourceMigration callBack, String scriptSuffix) { + super(AbstractDataSourceMigration.V_3_16, callBack, scriptSuffix); + } + + @Override + protected void prepareMigrationScript(TopiaContextImplementor tx, + List<String> queries, + boolean showSql, + boolean showProgression) throws TopiaException { + + addScript("add-gear-referential", queries); + + } + + public static class H2DataSourceMigrationForVersion extends DataSourceMigrationForVersion_3_16 { + + public H2DataSourceMigrationForVersion(AbstractDataSourceMigration callBack) { + super(callBack, H2DataSourceMigration.TYPE); + } + + } + + public static class PGDataSourceMigrationForVersion extends DataSourceMigrationForVersion_3_16 { + + public PGDataSourceMigrationForVersion(AbstractDataSourceMigration callBack) { + super(callBack, PGDataSourceMigration.TYPE); + } + + } + +} \ No newline at end of file diff --git a/observe-entities/src/main/resources/db/3.16/add-gear-referential-H2.sql b/observe-entities/src/main/resources/db/3.16/add-gear-referential-H2.sql new file mode 100644 index 0000000..db7a2c7 --- /dev/null +++ b/observe-entities/src/main/resources/db/3.16/add-gear-referential-H2.sql @@ -0,0 +1,120 @@ +-- +-- Gear caracteristic type Definition +-- +CREATE TABLE OBSERVE_COMMON.GEARCARACTERISTICTYPE(topiaid VARCHAR(255) NOT NULL,topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), needcomment boolean, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), unit VARCHAR(255) ); +ALTER TABLE OBSERVE_COMMON.GEARCARACTERISTICTYPE ADD CONSTRAINT PK_GEARCARACTERISTICTYPE PRIMARY KEY(TOPIAID); +-- +-- Gear caracteristic type Data +-- +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.1', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Texte'),STRINGDECODE('Text'),STRINGDECODE('Texte')); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.2', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Boolean'),STRINGDECODE('Boolean'),STRINGDECODE('Boolean')); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.3', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Entier signé'),STRINGDECODE('Signed Integer'),STRINGDECODE('Signed Integer')); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.4', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Décimal signé'),STRINGDECODE('Signed Decimal'),STRINGDECODE('Signed Decimal')); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Entier non signé'),STRINGDECODE('Unsigned Integer'),STRINGDECODE('Unsigned Integer')); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.6', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Décimal non signé'),STRINGDECODE('Unsigned Decimal'),STRINGDECODE('Unsigned Decimal')); +-- +-- Gear caracteristic Definition +-- +CREATE TABLE OBSERVE_COMMON.GEARCARACTERISTIC(topiaid VARCHAR(255) NOT NULL,topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), needcomment boolean, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), unit VARCHAR(255), gearCaracteristicType VARCHAR(255)); +ALTER TABLE OBSERVE_COMMON.GEARCARACTERISTIC ADD CONSTRAINT PK_GEARCARACTERISTIC PRIMARY KEY(TOPIAID); +ALTER TABLE OBSERVE_COMMON.GEARCARACTERISTIC ADD CONSTRAINT FK_GEARCARACTERISTIC_GEARCARACTERISTICTYPE FOREIGN KEY(GEARCARACTERISTICTYPE) REFERENCES OBSERVE_COMMON.GEARCARACTERISTICTYPE(topiaid); +CREATE INDEX FK_GEARCARACTERISTIC_GEARCARACTERISTICTYPE_IDX ON OBSERVE_COMMON.GEARCARACTERISTIC(GEARCARACTERISTICTYPE); +-- +-- Gear caracteristic Data +-- +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Portée'), null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.2', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Puissance moteur'), null, null, 'cv', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.3', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Fréquence'), null, null, 'Hz', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.4', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Fréquence basse'), null, null, 'Hz', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.5', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Fréquence haute'), null, null, 'Hz', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.6', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Type'), null, null, null, 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.1'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.7', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Circonférence surface'), null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.8', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Circonference fond'), null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.9', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Profondeur'), null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.10', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Poids du lest'), null, null, 'kg', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.11', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Maille de poche'), null, null, 'mm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.12', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Autre maillage'), null, null, 'mm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.13', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Capacité en volume'), null, null, 'm³', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.14', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Capacité en masse'), null, null, 't', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.15', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Diamètre'), null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.16', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Rapport d''armement'), null, null, '%', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.17', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Fournisseur/marque'), null, null, null, 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.1'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.18', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Fréquence d''interrogation'), null, null, 'fois / jour', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.19', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Nombre de mises à l''eau'), null, null, null, 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.20', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Hauteur'), null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.21', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Non maillant'), null, null, null, 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.2'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.22', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Matériau écologique'), null, null, null, 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.2'); +-- +-- Gear Definition +-- +CREATE TABLE OBSERVE_COMMON.GEAR(topiaid VARCHAR(255) NOT NULL,topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), needcomment boolean, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255) ); +ALTER TABLE OBSERVE_COMMON.GEAR ADD CONSTRAINT PK_GEAR PRIMARY KEY(TOPIAID); +-- +-- Gear Data +-- +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.1', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Sondeur vertical'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.2', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Sondeur latéral'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.3', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Radar de route'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.4', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Radar oiseaux'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.5', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Sonar'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.6', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Thermomètre'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.7', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Courantomètre'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.8', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Grandes jumelles en veille'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.9', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Petites jumelles'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.10', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Téléphonie'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.11', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Radio BLU'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.12', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Radio VHF'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.13', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Logiciel cartographique'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.14', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Logiciel météo'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.15', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Autre logiciel'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.16', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Skiff'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.17', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Vedette'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.18', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Speed boat'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.19', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('AIS'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Senne'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.21', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Salabarde'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.22', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Compas satellitaire'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.23', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Sonde de profondeur de senne'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.24', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Balise émettrice pour DCP'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.25', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Radeau'), null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.26', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, STRINGDECODE('Autre'), null, null); +-- +-- Gear GearCaracteristics Definition +-- +CREATE TABLE OBSERVE_COMMON.GEAR_GEARCARACTERISTIC (GEAR VARCHAR(255) NOT NULL, GEARCARACTERISTIC VARCHAR(255) NOT NULL); +ALTER TABLE OBSERVE_COMMON.GEAR_GEARCARACTERISTIC ADD CONSTRAINT FK_GEAR_GEARCARACTERISTIC_GEAR FOREIGN KEY(GEAR) REFERENCES OBSERVE_COMMON.GEAR(topiaid); +ALTER TABLE OBSERVE_COMMON.GEAR_GEARCARACTERISTIC ADD CONSTRAINT FK_GEAR_GEARCARACTERISTIC_GEARCARACTERISTIC FOREIGN KEY(GEARCARACTERISTIC) REFERENCES OBSERVE_COMMON.GEARCARACTERISTIC(topiaid); +CREATE INDEX FK_GEAR_GEARCARACTERISTIC_GEAR_IDX ON OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR); +CREATE INDEX FK_GEAR_GEARCARACTERISTIC_GEARCARACTERISTIC_IDX ON OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEARCARACTERISTIC); +-- +-- Gear GearCaracteristics Data +-- +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.1', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.2', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.3', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.4', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.8', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.9', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.16', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.2'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.17', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.2'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.18', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.2'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.7'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.8'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.9'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.10'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.11'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.12'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.16'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.17'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.21', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.13'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.21', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.14'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.21', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.15'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.23', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.17'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.23', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.6'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.24', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.17'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.24', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.6'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.24', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.18'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.24', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.19'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.25', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.20'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.25', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.21'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.25', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.22'); diff --git a/observe-entities/src/main/resources/db/3.16/add-gear-referential-PG.sql b/observe-entities/src/main/resources/db/3.16/add-gear-referential-PG.sql new file mode 100644 index 0000000..bf8c99d --- /dev/null +++ b/observe-entities/src/main/resources/db/3.16/add-gear-referential-PG.sql @@ -0,0 +1,120 @@ +-- +-- Gear caracteristic type Definition +-- +CREATE TABLE OBSERVE_COMMON.GEARCARACTERISTICTYPE(topiaid character varying(255) NOT NULL,topiaversion BIGINT NOT NULL, topiacreatedate DATE, code character varying(255), status INTEGER DEFAULT 1, uri character varying(255), needcomment boolean, label1 character varying(255), label2 character varying(255), label3 character varying(255), label4 character varying(255), label5 character varying(255), label6 character varying(255), label7 character varying(255), label8 character varying(255) [...] +ALTER TABLE OBSERVE_COMMON.GEARCARACTERISTICTYPE ADD CONSTRAINT PK_GEARCARACTERISTICTYPE PRIMARY KEY(TOPIAID); +-- +-- Gear caracteristic type Data +-- +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.1', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Texte','Text','Texte'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.2', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Boolean','Boolean','Boolean'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.3', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Entier signé','Signed Integer','Signed Integer'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.4', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Décimal signé','Signed Decimal','Signed Decimal'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Entier non signé','Unsigned Integer','Unsigned Integer'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTICTYPE(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.6', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Décimal non signé','Unsigned Decimal','Unsigned Decimal'); +-- +-- Gear caracteristic Definition +-- +CREATE TABLE OBSERVE_COMMON.GEARCARACTERISTIC(topiaid character varying(255) NOT NULL,topiaversion BIGINT NOT NULL, topiacreatedate DATE, code character varying(255), status INTEGER DEFAULT 1, uri character varying(255), needcomment boolean, label1 character varying(255), label2 character varying(255), label3 character varying(255), label4 character varying(255), label5 character varying(255), label6 character varying(255), label7 character varying(255), label8 character varying(255), un [...] +ALTER TABLE OBSERVE_COMMON.GEARCARACTERISTIC ADD CONSTRAINT PK_GEARCARACTERISTIC PRIMARY KEY(TOPIAID); +ALTER TABLE OBSERVE_COMMON.GEARCARACTERISTIC ADD CONSTRAINT FK_GEARCARACTERISTIC_GEARCARACTERISTICTYPE FOREIGN KEY(GEARCARACTERISTICTYPE) REFERENCES OBSERVE_COMMON.GEARCARACTERISTICTYPE(topiaid); +CREATE INDEX FK_GEARCARACTERISTIC_GEARCARACTERISTICTYPE_IDX ON OBSERVE_COMMON.GEARCARACTERISTIC(GEARCARACTERISTICTYPE); +-- +-- Gear caracteristic Data +-- +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Portée', null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.2', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Puissance moteur', null, null, 'cv', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.3', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Fréquence', null, null, 'Hz', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.4', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Fréquence basse', null, null, 'Hz', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.5', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Fréquence haute', null, null, 'Hz', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.6', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Type', null, null, null, 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.1'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.7', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Circonférence surface', null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.8', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Circonference fond', null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.9', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Profondeur', null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.10', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Poids du lest', null, null, 'kg', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.11', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Maille de poche', null, null, 'mm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.12', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Autre maillage', null, null, 'mm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.13', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Capacité en volume', null, null, 'm³', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.14', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Capacité en masse', null, null, 't', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.15', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Diamètre', null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.16', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Rapport d''armement', null, null, '%', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.17', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Fournisseur/marque', null, null, null, 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.1'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.18', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Fréquence d''interrogation', null, null, 'fois / jour', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.19', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Nombre de mises à l''eau', null, null, null, 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.20', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Hauteur', null, null, 'm', 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.21', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Non maillant', null, null, null, 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.2'); +INSERT INTO OBSERVE_COMMON.GEARCARACTERISTIC(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3, UNIT, GEARCARACTERISTICTYPE) VALUES ('fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.22', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Matériau écologique', null, null, null, 'fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.2'); +-- +-- Gear Definition +-- +CREATE TABLE OBSERVE_COMMON.GEAR(topiaid character varying(255) NOT NULL,topiaversion BIGINT NOT NULL, topiacreatedate DATE, code character varying(255), status INTEGER DEFAULT 1, uri character varying(255), needcomment boolean, label1 character varying(255), label2 character varying(255), label3 character varying(255), label4 character varying(255), label5 character varying(255), label6 character varying(255), label7 character varying(255), label8 character varying(255) ); +ALTER TABLE OBSERVE_COMMON.GEAR ADD CONSTRAINT PK_GEAR PRIMARY KEY(TOPIAID); +-- +-- Gear Data +-- +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.1', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Sondeur vertical', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.2', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Sondeur latéral', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.3', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Radar de route', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.4', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Radar oiseaux', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.5', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Sonar', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.6', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Thermomètre', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.7', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Courantomètre', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.8', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Grandes jumelles en veille', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.9', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Petites jumelles', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.10', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Téléphonie', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.11', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Radio BLU', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.12', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Radio VHF', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.13', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Logiciel cartographique', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.14', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Logiciel météo', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.15', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Autre logiciel', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.16', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Skiff', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.17', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Vedette', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.18', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Speed boat', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.19', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'AIS', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Senne', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.21', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Salabarde', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.22', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Compas satellitaire', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.23', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Sonde de profondeur de senne', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.24', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Balise émettrice pour DCP', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.25', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Radeau', null, null); +INSERT INTO OBSERVE_COMMON.GEAR(TOPIAID, TOPIAVERSION, TOPIACREATEDATE, STATUS, NEEDCOMMENT,CODE, LABEL2, LABEL1, LABEL3) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.26', 0, TIMESTAMP '2015-03-28 00:00:00.00', 1, FALSE, null, 'Autre', null, null); +-- +-- Gear GearCaracteristics Definition +-- +CREATE TABLE OBSERVE_COMMON.GEAR_GEARCARACTERISTIC (GEAR character varying(255) NOT NULL, GEARCARACTERISTIC character varying(255) NOT NULL); +ALTER TABLE OBSERVE_COMMON.GEAR_GEARCARACTERISTIC ADD CONSTRAINT FK_GEAR_GEARCARACTERISTIC_GEAR FOREIGN KEY(GEAR) REFERENCES OBSERVE_COMMON.GEAR(topiaid); +ALTER TABLE OBSERVE_COMMON.GEAR_GEARCARACTERISTIC ADD CONSTRAINT FK_GEAR_GEARCARACTERISTIC_GEARCARACTERISTIC FOREIGN KEY(GEARCARACTERISTIC) REFERENCES OBSERVE_COMMON.GEARCARACTERISTIC(topiaid); +CREATE INDEX FK_GEAR_GEARCARACTERISTIC_GEAR_IDX ON OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR); +CREATE INDEX FK_GEAR_GEARCARACTERISTIC_GEARCARACTERISTIC_IDX ON OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEARCARACTERISTIC); +-- +-- Gear GearCaracteristics Data +-- +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.1', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.2', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.3', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.4', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.8', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.9', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.1'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.16', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.2'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.17', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.2'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.18', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.2'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.7'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.8'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.9'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.10'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.11'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.12'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.16'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.17'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.21', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.13'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.21', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.14'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.21', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.15'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.23', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.17'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.23', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.6'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.24', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.17'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.24', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.6'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.24', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.18'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.24', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.19'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.25', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.20'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.25', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.21'); +INSERT INTO OBSERVE_COMMON.GEAR_GEARCARACTERISTIC(GEAR, GEARCARACTERISTIC ) VALUES ('fr.ird.observe.entities.referentiel.Gear#1239832686125#0.25', 'fr.ird.observe.entities.referentiel.GearCaracteristic#1239832686124#0.22'); diff --git a/observe-entities/src/main/xmi/observe-common.properties b/observe-entities/src/main/xmi/observe-common.properties index 94b641f..1a1328d 100644 --- a/observe-entities/src/main/xmi/observe-common.properties +++ b/observe-entities/src/main/xmi/observe-common.properties @@ -19,7 +19,7 @@ # <http://www.gnu.org/licenses/gpl-3.0.html>. # #L% ### -model.tagvalue.version=3.15 +model.tagvalue.version=3.16 model.tagvalue.notGenerateToString=true model.tagvalue.generateOperatorForDAOHelper=true model.tagvalue.generateStandaloneEnumForDAOHelper=true @@ -61,6 +61,7 @@ fr.ird.observe.entities.referentiel.Species.attribute.maxLength.tagvalue.sqlType ### Données lazy ############################################################## ############################################################################### +fr.ird.observe.entities.referentiel.Gear.attribute.gearCaracteristic.tagvalue.lazy=false fr.ird.observe.entities.referentiel.Vessel.attribute.flagCountry.tagvalue.lazy=false fr.ird.observe.entities.referentiel.Vessel.attribute.vesselType.tagvalue.lazy=false fr.ird.observe.entities.referentiel.Vessel.attribute.vesselSizeCategory.tagvalue.lazy=false diff --git a/observe-entities/src/main/xmi/observe-common.zargo b/observe-entities/src/main/xmi/observe-common.zargo index 48f5235..b5a60fe 100644 Binary files a/observe-entities/src/main/xmi/observe-common.zargo and b/observe-entities/src/main/xmi/observe-common.zargo differ diff --git a/observe-entities/src/main/xmi/observe-longline.properties b/observe-entities/src/main/xmi/observe-longline.properties index 87a8fc9..37f3b3f 100644 --- a/observe-entities/src/main/xmi/observe-longline.properties +++ b/observe-entities/src/main/xmi/observe-longline.properties @@ -19,7 +19,7 @@ # <http://www.gnu.org/licenses/gpl-3.0.html>. # #L% ### -model.tagvalue.version=3.15 +model.tagvalue.version=3.16 model.tagvalue.notGenerateToString=true model.tagvalue.generateOperatorForDAOHelper=true model.tagvalue.generateStandaloneEnumForDAOHelper=true @@ -62,7 +62,7 @@ fr.ird.observe.entities.longline.SetLongline.attribute.tdr.tagvalue.reverseDbNam fr.ird.observe.entities.longline.SetLongline.attribute.catchLongline.tagvalue.reverseDbName=set fr.ird.observe.entities.longline.SetLongline.attribute.branchlinesComposition.tagvalue.reverseDbName=set fr.ird.observe.entities.longline.SetLongline.attribute.mitigationType.tagvalue.reverseDbName=set - fr.ird.observe.entities.longline.SetLongline.attribute.mitigationType.tagvalue.manyToManyTableName=mitigationtype_set +fr.ird.observe.entities.longline.SetLongline.attribute.mitigationType.tagvalue.manyToManyTableName=mitigationtype_set fr.ird.observe.entities.longline.Section.attribute.setLongline.tagvalue.dbName=set diff --git a/observe-entities/src/main/xmi/observe-seine.properties b/observe-entities/src/main/xmi/observe-seine.properties index 421f917..682f25b 100644 --- a/observe-entities/src/main/xmi/observe-seine.properties +++ b/observe-entities/src/main/xmi/observe-seine.properties @@ -20,7 +20,7 @@ # #L% ### -model.tagvalue.version=3.15 +model.tagvalue.version=3.16 model.tagvalue.notGenerateToString=true model.tagvalue.generateOperatorForDAOHelper=true model.tagvalue.generateStandaloneEnumForDAOHelper=true diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicTypeUI.jaxx b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicTypeUI.jaxx new file mode 100644 index 0000000..978a079 --- /dev/null +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicTypeUI.jaxx @@ -0,0 +1,162 @@ +<!-- + #%L + ObServe :: Swing + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<fr.ird.observe.ui.content.ref.ContentReferenceUI + superGenericType='GearCaracteristicType' + contentTitle='{n("observe.title.content.gearCaracteristicTypes")}' + listText='{n("observe.list.gearCaracteristicType")}' + createToolTip='{n("observe.action.gearCaracteristicType.create.tip")}' + detailToolTip='{n("observe.action.gearCaracteristicType.detail.tip")}' + modifyToolTip='{n("observe.action.gearCaracteristicType.modify.tip")}' + deleteToolTip='{n("observe.action.gearCaracteristicType.delete.tip")}' + saveToolTip='{n("observe.action.gearCaracteristicType.save.tip")}'> + + <style source="ReferenceEntity.css"/> + <style source="I18nReferenceEntity.css"/> + + <import> + fr.ird.observe.entities.constants.ReferenceStatus + fr.ird.observe.entities.referentiel.GearCaracteristicType + fr.ird.observe.ui.content.ref.ContentReferenceUIModel + + static fr.ird.observe.ui.UIHelper.getStringValue + static org.nuiton.i18n.I18n.n + </import> + + <!-- validator --> + <BeanValidator id='validator' autoField='true' + beanClass='fr.ird.observe.entities.referentiel.GearCaracteristicType' + context='n1-create' + errorTableModel='{getErrorTableModel()}'/> + + <!-- model --> + <GearCaracteristicTypeUIModel id='model'/> + + <!-- edit bean --> + <GearCaracteristicType id='bean'/> + + <Table id='editTable'> + + <!-- uri --> + <row> + <cell anchor="west"> + <JLabel id="uriLabel"/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='uri' onKeyReleased='getBean().setUri(uri.getText())'/> + </cell> + </row> + + <!-- code / status --> + <row> + <cell anchor="west"> + <JLabel id='codeStatusLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JPanel id='codeStatusPanel' layout='{new BorderLayout()}'> + <JTextField id='code' constraints='BorderLayout.WEST' + onKeyReleased='getBean().setCode(code.getText())'/> + <EnumEditor id='status' constraints='BorderLayout.CENTER' + constructorParams='ReferenceStatus.class' + genericType='ReferenceStatus' + onItemStateChanged='getBean().setStatus((ReferenceStatus)status.getSelectedItem())'/> + </JPanel> + </cell> + </row> + + <!-- needComment --> + <row> + <cell anchor='east' weightx="1" fill="both" columns="2"> + <JCheckBox id='needComment' + onItemStateChanged='getBean().setNeedComment(needComment.isSelected())'/> + </cell> + </row> + </Table> + + + <Table id='editI18nTable'> + <row> + <cell anchor="west"> + <JLabel id='label1Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label1' + onKeyReleased='getBean().setLabel1(label1.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label2Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label2' + onKeyReleased='getBean().setLabel2(label2.getText())'/> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel id='label3Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label3' + onKeyReleased='getBean().setLabel3(label3.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label4Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label4' + onKeyReleased='getBean().setLabel4(label4.getText())'/> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel id='label5Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label5' + onKeyReleased='getBean().setLabel5(label5.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label6Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label6' + onKeyReleased='getBean().setLabel6(label6.getText())'/> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel id='label7Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label7' + onKeyReleased='getBean().setLabel7(label7.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label8Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label8' + onKeyReleased='getBean().setLabel8(label8.getText())'/> + </cell> + </row> + </Table> +</fr.ird.observe.ui.content.ref.ContentReferenceUI> diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicTypeUIModel.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicTypeUIModel.java new file mode 100644 index 0000000..b2c6404 --- /dev/null +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicTypeUIModel.java @@ -0,0 +1,20 @@ +package fr.ird.observe.ui.content.ref.impl; + +import fr.ird.observe.entities.referentiel.GearCaracteristicType; +import fr.ird.observe.ui.content.ref.ContentReferenceUIModel; + +/** + * Created on 3/23/15. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 3.16 + */ +public class GearCaracteristicTypeUIModel extends ContentReferenceUIModel<GearCaracteristicType> { + + private static final long serialVersionUID = 1L; + + public GearCaracteristicTypeUIModel() { + super(GearCaracteristicType.class); + } + +} \ No newline at end of file diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicUI.css b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicUI.css new file mode 100644 index 0000000..9d50757 --- /dev/null +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicUI.css @@ -0,0 +1,42 @@ +/* + * #%L + * ObServe :: Swing + * %% + * Copyright (C) 2008 - 2015 IRD, Codelutin, Tony Chemit + * %% + * This program is free software: you can redistribute it and/or modify + * 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% + */ + +#gearCaracteristicTypeLabel { + text:"observe.gear.gearCaracteristicType"; + labelFor:{gearCaracteristicType}; +} + +#gearCaracteristicType { + property:{GearCaracteristic.PROPERTY_GEAR_CARACTERISTIC_TYPE}; + bean:{bean}; + selectedItem:{bean.getGearCaracteristicType()}; + showReset:{true}; +} + +#unitLabel { + text:"observe.gear.unit"; + labelFor:{unit}; +} + +#unit { + text:{getStringValue(bean.getUnit())}; +} \ No newline at end of file diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicUI.jaxx b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicUI.jaxx new file mode 100644 index 0000000..1b7692a --- /dev/null +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicUI.jaxx @@ -0,0 +1,186 @@ +<!-- + #%L + ObServe :: Swing + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<fr.ird.observe.ui.content.ref.ContentReferenceUI + superGenericType='GearCaracteristic' + contentTitle='{n("observe.title.content.gearCaracteristics")}' + listText='{n("observe.list.gearCaracteristic")}' + createToolTip='{n("observe.action.gearCaracteristic.create.tip")}' + detailToolTip='{n("observe.action.gearCaracteristic.detail.tip")}' + modifyToolTip='{n("observe.action.gearCaracteristic.modify.tip")}' + deleteToolTip='{n("observe.action.gearCaracteristic.delete.tip")}' + saveToolTip='{n("observe.action.gearCaracteristic.save.tip")}'> + + <style source="ReferenceEntity.css"/> + <style source="I18nReferenceEntity.css"/> + + <import> + fr.ird.observe.entities.constants.ReferenceStatus + fr.ird.observe.entities.referentiel.GearCaracteristic + fr.ird.observe.entities.referentiel.GearCaracteristicType + fr.ird.observe.ui.content.ref.ContentReferenceUIModel + + jaxx.runtime.swing.editor.bean.BeanComboBox + + static fr.ird.observe.ui.UIHelper.getStringValue + static org.nuiton.i18n.I18n.n + </import> + + <!-- validator --> + <BeanValidator id='validator' autoField='true' + beanClass='fr.ird.observe.entities.referentiel.GearCaracteristic' + context='n1-create' + errorTableModel='{getErrorTableModel()}'/> + + <!-- model --> + <GearCaracteristicUIModel id='model'/> + + <!-- edit bean --> + <GearCaracteristic id='bean'/> + + <Table id='editTable'> + + <!-- uri --> + <row> + <cell anchor="west"> + <JLabel id="uriLabel"/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='uri' onKeyReleased='getBean().setUri(uri.getText())'/> + </cell> + </row> + + <!-- code / status --> + <row> + <cell anchor="west"> + <JLabel id='codeStatusLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JPanel id='codeStatusPanel' layout='{new BorderLayout()}'> + <JTextField id='code' constraints='BorderLayout.WEST' + onKeyReleased='getBean().setCode(code.getText())'/> + <EnumEditor id='status' constraints='BorderLayout.CENTER' + constructorParams='ReferenceStatus.class' + genericType='ReferenceStatus' + onItemStateChanged='getBean().setStatus((ReferenceStatus)status.getSelectedItem())'/> + </JPanel> + </cell> + </row> + + <!-- needComment --> + <row> + <cell anchor='east' weightx="1" fill="both" columns="2"> + <JCheckBox id='needComment' + onItemStateChanged='getBean().setNeedComment(needComment.isSelected())'/> + </cell> + </row> + + <!-- gearCaracteristicType --> + <row> + <cell anchor='west'> + <JLabel id='gearCaracteristicTypeLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <BeanComboBox id='gearCaracteristicType' constructorParams='this' genericType='GearCaracteristicType'/> + </cell> + </row> + + <!-- unit --> + <row> + <cell anchor='west'> + <JLabel id='unitLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='unit' onKeyReleased='getBean().setUnit(unit.getText())'/> + </cell> + </row> + + </Table> + + + <Table id='editI18nTable'> + <row> + <cell anchor="west"> + <JLabel id='label1Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label1' + onKeyReleased='getBean().setLabel1(label1.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label2Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label2' + onKeyReleased='getBean().setLabel2(label2.getText())'/> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel id='label3Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label3' + onKeyReleased='getBean().setLabel3(label3.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label4Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label4' + onKeyReleased='getBean().setLabel4(label4.getText())'/> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel id='label5Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label5' + onKeyReleased='getBean().setLabel5(label5.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label6Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label6' + onKeyReleased='getBean().setLabel6(label6.getText())'/> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel id='label7Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label7' + onKeyReleased='getBean().setLabel7(label7.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label8Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label8' + onKeyReleased='getBean().setLabel8(label8.getText())'/> + </cell> + </row> + </Table> +</fr.ird.observe.ui.content.ref.ContentReferenceUI> diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicUIModel.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicUIModel.java new file mode 100644 index 0000000..7c02e74 --- /dev/null +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearCaracteristicUIModel.java @@ -0,0 +1,27 @@ +package fr.ird.observe.ui.content.ref.impl; + +import fr.ird.observe.entities.referentiel.GearCaracteristic; +import fr.ird.observe.ui.content.ref.ContentReferenceUIModel; + +/** + * Created on 3/23/15. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 3.16 + */ +public class GearCaracteristicUIModel extends ContentReferenceUIModel<GearCaracteristic> { + + private static final long serialVersionUID = 1L; + + public GearCaracteristicUIModel() { + super(GearCaracteristic.class, + new String[]{ + GearCaracteristic.PROPERTY_GEAR_CARACTERISTIC_TYPE, + GearCaracteristic.PROPERTY_UNIT, + }, + new String[]{GearCaracteristic.PROPERTY_GEAR_CARACTERISTIC_TYPE + SUFFIX_SELECTED_ITEM, + GearCaracteristic.PROPERTY_UNIT + SUFFIX_TEXT} + ); + } + +} \ No newline at end of file diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUI.css b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUI.css new file mode 100644 index 0000000..731fe9d --- /dev/null +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUI.css @@ -0,0 +1,49 @@ +/* + * #%L + * ObServe :: Swing + * %% + * Copyright (C) 2008 - 2014 IRD, Codelutin, Tony Chemit + * %% + * This program is free software: you can redistribute it and/or modify + * 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% + */ + +#generalTab { + title:{t("observe.gear.tab.general")}; + icon:{getHandler().getErrorIconIfFalse(model.isGeneralTabValid())}; +} + +#gearCaracteristicTab { + title:{t("observe.gear.tab.gearCaracteristic")}; + icon:{getHandler().getErrorIconIfFalse(model.isGearCaracteristicTabValid())}; +} + +#editI18nTable2 { + border:{new TitledBorder(t("observe.common.libelles"))}; +} + +#gearCaracteristicPane { + verticalScrollBarPolicy:{JScrollPane.VERTICAL_SCROLLBAR_NEVER}; + horizontalScrollBarPolicy:{JScrollPane.HORIZONTAL_SCROLLBAR_NEVER}; +} + +#gearCaracteristic { + property:{Gear.PROPERTY_GEAR_CARACTERISTIC}; + selected:{bean.getGearCaracteristic()}; + _validatorLabel: {t("observe.gear.gearCaracteristic")}; + showListLabel: true; + universeLabel:{t("observe.gear.availableGearCaracteristic")}; + selectedLabel:{t("observe.gear.selectedGearCaracteristic")}; +} diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUI.jaxx b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUI.jaxx new file mode 100644 index 0000000..6b96511 --- /dev/null +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUI.jaxx @@ -0,0 +1,196 @@ +<!-- + #%L + ObServe :: Swing + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<fr.ird.observe.ui.content.ref.ContentReferenceUI + superGenericType='Gear' + contentTitle='{n("observe.title.content.gears")}' + listText='{n("observe.list.gear")}' + createToolTip='{n("observe.action.gear.create.tip")}' + detailToolTip='{n("observe.action.gear.detail.tip")}' + modifyToolTip='{n("observe.action.gear.modify.tip")}' + deleteToolTip='{n("observe.action.gear.delete.tip")}' + saveToolTip='{n("observe.action.gear.save.tip")}'> + + <style source="ReferenceEntity.css"/> + <style source="I18nReferenceEntity.css"/> + + <import> + fr.ird.observe.entities.constants.ReferenceStatus + fr.ird.observe.entities.referentiel.Gear + fr.ird.observe.entities.referentiel.GearCaracteristic + fr.ird.observe.ui.content.ref.ContentReferenceUIModel + + org.nuiton.jaxx.widgets.select.FilterableDoubleList + + static fr.ird.observe.ui.UIHelper.getStringValue + static org.nuiton.i18n.I18n.n + </import> + + <!-- validator --> + <BeanValidator id='validator' autoField='true' + beanClass='fr.ird.observe.entities.referentiel.Gear' + context='n1-create' + errorTableModel='{getErrorTableModel()}'/> + + <!-- model --> + <GearUIModel id='model'/> + + <!-- edit bean --> + <Gear id='bean'/> + + <!-- handler --> + <GearUIHandler id='handler' constructorParams="this"/> + + <Table id="editView" insets="0" fill="both"> + <row> + <cell anchor="north" weightx="1"> + <JTabbedPane id='tabPane'> + <tab id='generalTab'> + <Table fill="both"> + + <!-- uri --> + <row> + <cell anchor="west"> + <JLabel id='uriLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='uri' onKeyReleased='getBean().setUri(uri.getText())'/> + </cell> + </row> + + <!-- code / status --> + <row> + <cell anchor="west"> + <JLabel id='codeStatusLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JPanel id='codeStatusPanel' layout='{new BorderLayout()}'> + <JTextField id='code' constraints='BorderLayout.WEST' + onKeyReleased='getBean().setCode(code.getText())'/> + <EnumEditor id='status' constraints='BorderLayout.CENTER' + constructorParams='ReferenceStatus.class' + genericType='ReferenceStatus' + onItemStateChanged='getBean().setStatus((ReferenceStatus)status.getSelectedItem())'/> + </JPanel> + </cell> + </row> + + <!-- needComment --> + <row> + <cell anchor='east' weightx="1" fill="both" columns="2"> + <JCheckBox id='needComment' onItemStateChanged='getBean().setNeedComment(needComment.isSelected())'/> + </cell> + </row> + + <row> + <cell columns="2"> + <Table id='editI18nTable2'> + <row> + <cell anchor="west"> + <JLabel id='label1Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label1' onKeyReleased='getBean().setLabel1(label1.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label2Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label2' onKeyReleased='getBean().setLabel2(label2.getText())'/> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel id='label3Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label3' onKeyReleased='getBean().setLabel3(label3.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label4Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label4' onKeyReleased='getBean().setLabel4(label4.getText())'/> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel id='label5Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label5' onKeyReleased='getBean().setLabel5(label5.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label6Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label6' onKeyReleased='getBean().setLabel6(label6.getText())'/> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel id='label7Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label7' onKeyReleased='getBean().setLabel7(label7.getText())'/> + </cell> + <cell anchor="west"> + <JLabel id='label8Label'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label8' onKeyReleased='getBean().setLabel8(label8.getText())'/> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell columns="2" weighty="1"> + <JLabel/> + </cell> + </row> + </Table> + </tab> + + <tab id='gearCaracteristicTab'> + <Table fill="both" weightx="1"> + <!-- gearCaracteristic --> + <row> + <cell weightx="1" weighty="1"> + <JScrollPane id='gearCaracteristicPane' layout='{new GridLayout(1,1)}'> + <FilterableDoubleList id='gearCaracteristic' genericType='GearCaracteristic'/> + </JScrollPane> + </cell> + </row> + </Table> + </tab> + </JTabbedPane> + </cell> + </row> + <row> + <cell columns="2" weighty="1"> + <JLabel/> + </cell> + </row> + </Table> + +</fr.ird.observe.ui.content.ref.ContentReferenceUI> diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUIHandler.java new file mode 100644 index 0000000..ba5a33e --- /dev/null +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUIHandler.java @@ -0,0 +1,82 @@ +package fr.ird.observe.ui.content.ref.impl; + +import fr.ird.observe.entities.referentiel.Gear; +import fr.ird.observe.ui.content.ref.ContentReferenceUI; +import fr.ird.observe.ui.content.ref.ContentReferenceUIHandler; +import jaxx.runtime.validator.swing.SwingValidatorMessage; +import jaxx.runtime.validator.swing.SwingValidatorMessageTableModel; +import org.nuiton.validator.NuitonValidatorScope; + +import javax.swing.event.TableModelEvent; +import javax.swing.event.TableModelListener; +import java.util.HashSet; +import java.util.Set; + +/** + * Created on 3/23/15. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 3.16 + */ +public class GearUIHandler extends ContentReferenceUIHandler<Gear> { + + // Compute valid state of tab from the error table + protected final TableModelListener computeTabValidStateListener = new TableModelListener() { + @Override + public void tableChanged(TableModelEvent e) { + + SwingValidatorMessageTableModel source = (SwingValidatorMessageTableModel) e.getSource(); + computeTabValidState(source); + + } + }; + + public GearUIHandler(ContentReferenceUI<Gear> ui) { + super(ui); + } + + @Override + public void initUI() throws Exception { + + super.initUI(); + + // To be sure always remove listener (could prevent some leaks) + getUi().getErrorTableModel().removeTableModelListener(computeTabValidStateListener); + // listen messages to see if required to add + getUi().getErrorTableModel().addTableModelListener(computeTabValidStateListener); + + } + + @Override + public void selectBean(Gear selectedBean) { + + super.selectBean(selectedBean); + + SwingValidatorMessageTableModel errorTableModel = getUi().getErrorTableModel(); + computeTabValidState(errorTableModel); + + ((GearUI) getUi()).getTabPane().setSelectedIndex(0); + + } + + protected void computeTabValidState(SwingValidatorMessageTableModel errorTableModel) { + + Set<String> errorProperties = new HashSet<String>(); + int rowCount = errorTableModel.getRowCount(); + for (int i = 0; i < rowCount; i++) { + + SwingValidatorMessage row = errorTableModel.getRow(i); + if (NuitonValidatorScope.ERROR.equals(row.getScope())) { + errorProperties.add(row.getField()); + } + } + + boolean generalTabValid = !errorProperties.removeAll(GearUIModel.GENERAL_TAB_PROPERTIES); + boolean gearCaracteristicTabValid = !errorProperties.removeAll(GearUIModel.GEAR_CARACTERISTIC_TAB_PROPERTIES); + + GearUIModel model = (GearUIModel) getModel(); + model.setGeneralTabValid(generalTabValid); + model.setGearCaracteristicTabValid(gearCaracteristicTabValid); + + } +} \ No newline at end of file diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUIModel.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUIModel.java new file mode 100644 index 0000000..96682f2 --- /dev/null +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/ref/impl/GearUIModel.java @@ -0,0 +1,70 @@ +package fr.ird.observe.ui.content.ref.impl; + +import com.google.common.collect.ImmutableSet; +import fr.ird.observe.entities.referentiel.Gear; +import fr.ird.observe.ui.content.ref.ContentReferenceUIModel; + +import java.util.Set; + +/** + * Created on 3/23/15. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 3.16 + */ +public class GearUIModel extends ContentReferenceUIModel<Gear> { + + private static final long serialVersionUID = 1L; + + public static final String PROPERTY_GENERAL_TAB_VALID = "generalTabValid"; + + public static final String PROPERTY_GEAR_CARACTERISTIC_TAB_VALID = "gearCaracteristicTabValid"; + + public static final Set<String> GENERAL_TAB_PROPERTIES = + ImmutableSet.<String>builder().add(Gear.PROPERTY_URI, + Gear.PROPERTY_CODE, + Gear.PROPERTY_STATUS, + Gear.PROPERTY_NEED_COMMENT, + Gear.PROPERTY_LABEL1, + Gear.PROPERTY_LABEL2, + Gear.PROPERTY_LABEL3, + Gear.PROPERTY_LABEL4, + Gear.PROPERTY_LABEL5, + Gear.PROPERTY_LABEL6, + Gear.PROPERTY_LABEL7, + Gear.PROPERTY_LABEL8).build(); + + public static final Set<String> GEAR_CARACTERISTIC_TAB_PROPERTIES = + ImmutableSet.<String>builder().add(Gear.PROPERTY_GEAR_CARACTERISTIC).build(); + + protected boolean generalTabValid; + + protected boolean gearCaracteristicTabValid; + + public GearUIModel() { + super(Gear.class, + new String[]{Gear.PROPERTY_GEAR_CARACTERISTIC}, + new String[]{Gear.PROPERTY_GEAR_CARACTERISTIC + SUFFIX_SELECTED}); + } + + public boolean isGearCaracteristicTabValid() { + return gearCaracteristicTabValid; + } + + public void setGearCaracteristicTabValid(boolean gearCaracteristicTabValid) { + Object oldValue = isGearCaracteristicTabValid(); + this.gearCaracteristicTabValid = gearCaracteristicTabValid; + firePropertyChange(PROPERTY_GEAR_CARACTERISTIC_TAB_VALID, oldValue, gearCaracteristicTabValid); + } + + public boolean isGeneralTabValid() { + return generalTabValid; + } + + public void setGeneralTabValid(boolean generalTabValid) { + Object oldValue = isGeneralTabValid(); + this.generalTabValid = generalTabValid; + firePropertyChange(PROPERTY_GENERAL_TAB_VALID, oldValue, generalTabValid); + } + +} \ No newline at end of file diff --git a/observe-swing/src/main/resources/i18n/observe-swing_en_GB.properties b/observe-swing/src/main/resources/i18n/observe-swing_en_GB.properties index 92d874b..d9c0ea4 100644 --- a/observe-swing/src/main/resources/i18n/observe-swing_en_GB.properties +++ b/observe-swing/src/main/resources/i18n/observe-swing_en_GB.properties @@ -147,6 +147,21 @@ observe.action.fpaZone.delete.tip=Delete the selected FPA zone observe.action.fpaZone.detail.tip=View details about the selected FPA zone observe.action.fpaZone.modify.tip=Edit the selected FPA zone observe.action.fpaZone.save.tip=Save modifications +observe.action.gear.create.tip=Create an gear +observe.action.gear.delete.tip=Delete the selected gear +observe.action.gear.detail.tip=View details about the selected gear +observe.action.gear.modify.tip=Edit the selected gear +observe.action.gear.save.tip=Save modifications +observe.action.gearCaracteristic.create.tip=Create an gear caracteristic +observe.action.gearCaracteristic.delete.tip=Delete the selected gear caracteristic +observe.action.gearCaracteristic.detail.tip=View details about the selected gear caracteristic +observe.action.gearCaracteristic.modify.tip=Edit the selected gear caracteristic +observe.action.gearCaracteristic.save.tip=Save modifications +observe.action.gearCaracteristicType.create.tip=Create an gear caracteristic type +observe.action.gearCaracteristicType.delete.tip=Delete the selected gear caracteristic type +observe.action.gearCaracteristicType.detail.tip=View details about the selected gear caracteristic type +observe.action.gearCaracteristicType.modify.tip=Edit the selected gear caracteristic type +observe.action.gearCaracteristicType.save.tip=Save modifications observe.action.goDown=Down... observe.action.goDown.tip=Go down in navigation tree observe.action.goUp=Up... @@ -749,7 +764,9 @@ observe.common.flagCountry= observe.common.floatingObject.unsaved=New DCP observe.common.formsUrl= observe.common.gaugeLabel= -observe.common.gearType= +observe.common.gear=Gear +observe.common.gearCaracteristic=Gear caracteristic +observe.common.gearType=Gear caracteristic type observe.common.generateReport= observe.common.global.progression.description= observe.common.heureobservation= @@ -1032,6 +1049,13 @@ observe.floatlinesComposition.table.lineType.tip=Line type observe.floatlinesComposition.table.proportion=Proportion observe.floatlinesComposition.table.proportion.tip=Proportion observe.floatlinesComposition.title=Floatines +observe.gear.availableGearCaracteristic=Available caracteristics +observe.gear.gearCaracteristic= +observe.gear.gearCaracteristicType= +observe.gear.selectedGearCaracteristic=Selected caracteristics +observe.gear.tab.gearCaracteristic=Caracteristics of the gear +observe.gear.tab.general=General caracteristics +observe.gear.unit= observe.harbour.coordinates= observe.harbour.locode= observe.harbour.name= @@ -1072,6 +1096,9 @@ observe.list.country= observe.list.detectionMode= observe.list.encounterType= observe.list.fpaZone= +observe.list.gear= +observe.list.gearCaracteristic= +observe.list.gearCaracteristicType= observe.list.harbour= observe.list.healthness= observe.list.hookPosition= @@ -1846,6 +1873,9 @@ observe.title.content.country= observe.title.content.detectionModes= observe.title.content.encounterTypes= observe.title.content.fpaZones= +observe.title.content.gearCaracteristicTypes= +observe.title.content.gearCaracteristics= +observe.title.content.gears= observe.title.content.harbours= observe.title.content.healthnesss= observe.title.content.hookPositions= diff --git a/observe-swing/src/main/resources/i18n/observe-swing_es_ES.properties b/observe-swing/src/main/resources/i18n/observe-swing_es_ES.properties index 4d5d44b..fb64e19 100644 --- a/observe-swing/src/main/resources/i18n/observe-swing_es_ES.properties +++ b/observe-swing/src/main/resources/i18n/observe-swing_es_ES.properties @@ -147,6 +147,21 @@ observe.action.fpaZone.delete.tip= observe.action.fpaZone.detail.tip= observe.action.fpaZone.modify.tip= observe.action.fpaZone.save.tip= +observe.action.gear.create.tip= +observe.action.gear.delete.tip= +observe.action.gear.detail.tip= +observe.action.gear.modify.tip= +observe.action.gear.save.tip= +observe.action.gearCaracteristic.create.tip= +observe.action.gearCaracteristic.delete.tip= +observe.action.gearCaracteristic.detail.tip= +observe.action.gearCaracteristic.modify.tip= +observe.action.gearCaracteristic.save.tip= +observe.action.gearCaracteristicType.create.tip= +observe.action.gearCaracteristicType.delete.tip= +observe.action.gearCaracteristicType.detail.tip= +observe.action.gearCaracteristicType.modify.tip= +observe.action.gearCaracteristicType.save.tip= observe.action.goDown=Descender hacia ... observe.action.goDown.tip=Descender hacia etapas porteriores observe.action.goUp=Ascender hacia... @@ -749,6 +764,7 @@ observe.common.flagCountry=Badera observe.common.floatingObject.unsaved=Nuevo DCP observe.common.formsUrl=URL de los formularios observe.common.gaugeLabel=Texto «Capacidad» +observe.common.gearCaracteristic= observe.common.gearType= observe.common.generateReport=Generar un informe de validación observe.common.global.progression.description=Progresión global @@ -1032,6 +1048,13 @@ observe.floatlinesComposition.table.lineType.tip= observe.floatlinesComposition.table.proportion= observe.floatlinesComposition.table.proportion.tip= observe.floatlinesComposition.title= +observe.gear.availableGearCaracteristic= +observe.gear.gearCaracteristic= +observe.gear.gearCaracteristicType= +observe.gear.selectedGearCaracteristic= +observe.gear.tab.gearCaracteristic= +observe.gear.tab.general= +observe.gear.unit= observe.harbour.coordinates= observe.harbour.locode= observe.harbour.name= @@ -1072,6 +1095,9 @@ observe.list.country=Paíises registrados observe.list.detectionMode=Modos de detección registradas observe.list.encounterType= observe.list.fpaZone= +observe.list.gear= +observe.list.gearCaracteristic= +observe.list.gearCaracteristicType= observe.list.harbour= observe.list.healthness= observe.list.hookPosition= @@ -1846,6 +1872,9 @@ observe.title.content.country= observe.title.content.detectionModes= observe.title.content.encounterTypes= observe.title.content.fpaZones= +observe.title.content.gearCaracteristicTypes= +observe.title.content.gearCaracteristics= +observe.title.content.gears= observe.title.content.harbours= observe.title.content.healthnesss= observe.title.content.hookPositions= diff --git a/observe-swing/src/main/resources/i18n/observe-swing_fr_FR.properties b/observe-swing/src/main/resources/i18n/observe-swing_fr_FR.properties index 975b607..53d04b2 100644 --- a/observe-swing/src/main/resources/i18n/observe-swing_fr_FR.properties +++ b/observe-swing/src/main/resources/i18n/observe-swing_fr_FR.properties @@ -147,6 +147,21 @@ observe.action.fpaZone.delete.tip=Supprimer la zone FPA sélectionnée observe.action.fpaZone.detail.tip=Voir les détails de la zone FPA sélectionnée observe.action.fpaZone.modify.tip=Modifier la zone FPA sélectionnée observe.action.fpaZone.save.tip=Sauver les modifications de la zone FPA +observe.action.gear.create.tip=Créer un nouvel équipment +observe.action.gear.delete.tip=Supprimer l'équipment sélectionné +observe.action.gear.detail.tip=Voir les détails de l'équipment sélectionné +observe.action.gear.modify.tip=Modifier l'équipment sélectionné +observe.action.gear.save.tip=Sauver les modifications de l'équipment +observe.action.gearCaracteristic.create.tip=Créer une nouvelle caractéristique +observe.action.gearCaracteristic.delete.tip=Supprimer la caractéristique sélectionnée +observe.action.gearCaracteristic.detail.tip=Voir les détails de la caractéristique sélectionnée +observe.action.gearCaracteristic.modify.tip=Modifier la caractéristique sélectionnée +observe.action.gearCaracteristic.save.tip=Sauver les modifications de la caractéristique +observe.action.gearCaracteristicType.create.tip=Créer un nouveau type de caractéristique +observe.action.gearCaracteristicType.delete.tip=Supprimer le type de caractéristique sélectionné +observe.action.gearCaracteristicType.detail.tip=Voir les détails du type de caractéristique sélectionné +observe.action.gearCaracteristicType.modify.tip=Modifier le type de caractéristique sélectionné +observe.action.gearCaracteristicType.save.tip=Sauver les modifications du type de caractéristique observe.action.goDown=Descendre vers ... observe.action.goDown.tip=Descendre dans la navigation observe.action.goUp=Remonter vers ... @@ -182,12 +197,12 @@ observe.action.goto.selected.maree=Accéder à la marée observe.action.goto.selected.maree.tip=Accéder à la marée sélectionnée observe.action.goto.selected.route=Accéder à la route observe.action.goto.selected.route.tip=Accéder à la route sélectionnée -observe.action.harbour.create.tip= -observe.action.harbour.delete.tip= -observe.action.harbour.detail.tip= -observe.action.harbour.modify.tip= -observe.action.harbour.save.tip= -observe.action.healthness.create.tip=Créer un nouveal état de santé +observe.action.harbour.create.tip=Créer un nouveau port +observe.action.harbour.delete.tip=Supprimer le port sélectionné +observe.action.harbour.detail.tip=Voir les détails du port sélectionné +observe.action.harbour.modify.tip=Modifier le port sélectionné +observe.action.harbour.save.tip=Sauver les modifications du port +observe.action.healthness.create.tip=Créer un nouveau état de santé observe.action.healthness.delete.tip=Supprimer l'état de santé sélectionné observe.action.healthness.detail.tip=Voir les détails de l'état de santé sélectionné observe.action.healthness.modify.tip=Modifier l'état de santé sélectionné @@ -749,6 +764,7 @@ observe.common.flagCountry=Pavillon observe.common.floatingObject.unsaved=Nouveau DCP observe.common.formsUrl=URL des formulaires observe.common.gaugeLabel=Libellé jauge +observe.common.gearCaracteristic=Caractétistique d'un équipement observe.common.gearType=Type d'engin observe.common.generateReport=Générer un rapport de validation observe.common.global.progression.description=Progression globale @@ -1032,6 +1048,13 @@ observe.floatlinesComposition.table.lineType.tip=Type observe.floatlinesComposition.table.proportion=Proportion observe.floatlinesComposition.table.proportion.tip=Proportion observe.floatlinesComposition.title=Composition des orins +observe.gear.availableGearCaracteristic=Caractéristiques disponibles +observe.gear.gearCaracteristic=Caractéristiques +observe.gear.gearCaracteristicType=Type de caractéristique +observe.gear.selectedGearCaracteristic=Caractéristiques utilisées +observe.gear.tab.gearCaracteristic=Caractéristiques de l'équipement +observe.gear.tab.general=Caractéristiques générales +observe.gear.unit=Unité observe.harbour.coordinates=Nom observe.harbour.locode=Locode observe.harbour.name=Nom @@ -1072,6 +1095,9 @@ observe.list.country=Liste des pays enregistrés observe.list.detectionMode=Liste des modes de détection enregistrés observe.list.encounterType=Liste des types de rencontre enregistrés observe.list.fpaZone=Liste des zones FPA enregistrées +observe.list.gear=Liste des équipements enregistrées +observe.list.gearCaracteristic=Liste des caractéristiques d'équipement enregistrées +observe.list.gearCaracteristicType=Liste des types de caractéristique enregistrés observe.list.harbour=Liste des ports enregistrés observe.list.healthness=Liste des états de santé enregistrés observe.list.hookPosition=Liste des positions d'hameçon enregistrées @@ -1846,6 +1872,9 @@ observe.title.content.country=Gestion des pays observe.title.content.detectionModes=Gestion des modes de détection observe.title.content.encounterTypes=Gestion des types de rencontre observe.title.content.fpaZones=Gestion des zones FPA +observe.title.content.gearCaracteristicTypes=Gestion des types de caractéristiques +observe.title.content.gearCaracteristics=Gestion des caractéristiques d'équipement +observe.title.content.gears=Gestion des équipements observe.title.content.harbours=GEstion des ports observe.title.content.healthnesss=Gestion des états de santé observe.title.content.hookPositions=Gestion des positions d'hameçon diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-create-error-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-create-error-validation.xml new file mode 100644 index 0000000..7bf463a --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-create-error-validation.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="code"> + + <!-- clef unique sur le code --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">code</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.code.uniqueKey##${code}</message> + </field-validator> + + </field> + + <field name="uri"> + + <!-- clef unique sur l'uri --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">uri</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.uri.uniqueKey##${uri}</message> + </field-validator> + </field> + + <field name="label1"> + <!-- pas de libelle 1 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label1</message> + </field-validator> + </field> + + <field name="label2"> + <!-- pas de libelle 2 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label2</message> + </field-validator> + </field> + + <field name="label3"> + <!-- pas de libelle 3 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label3</message> + </field-validator> + </field> + +</validators> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-create-warning-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-create-warning-validation.xml new file mode 100644 index 0000000..fddb53e --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-create-warning-validation.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="status"> + <!-- objet desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ enabled ]]> + </param> + <message>validator.referentiel.status.desactivated</message> + </field-validator> + </field> + + <field name="uri"> + <!-- pas d'uri selectionne --> + <field-validator type="requiredstring" short-circuit="true"> + <message>validator.referentiel.null.uri</message> + </field-validator> + </field> + + <field name="label1"> + + <!-- libelle 1 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label1 == null || label1.empty || label1 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label1</message> + </field-validator> + </field> + + <field name="label3"> + <!-- libelle 3 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label3 == null || label3.empty || label3 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label3</message> + </field-validator> + </field> + +</validators> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-update-error-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-update-error-validation.xml new file mode 100644 index 0000000..7bf463a --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-update-error-validation.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="code"> + + <!-- clef unique sur le code --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">code</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.code.uniqueKey##${code}</message> + </field-validator> + + </field> + + <field name="uri"> + + <!-- clef unique sur l'uri --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">uri</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.uri.uniqueKey##${uri}</message> + </field-validator> + </field> + + <field name="label1"> + <!-- pas de libelle 1 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label1</message> + </field-validator> + </field> + + <field name="label2"> + <!-- pas de libelle 2 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label2</message> + </field-validator> + </field> + + <field name="label3"> + <!-- pas de libelle 3 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label3</message> + </field-validator> + </field> + +</validators> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-update-warning-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-update-warning-validation.xml new file mode 100644 index 0000000..fddb53e --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/Gear-n1-update-warning-validation.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="status"> + <!-- objet desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ enabled ]]> + </param> + <message>validator.referentiel.status.desactivated</message> + </field-validator> + </field> + + <field name="uri"> + <!-- pas d'uri selectionne --> + <field-validator type="requiredstring" short-circuit="true"> + <message>validator.referentiel.null.uri</message> + </field-validator> + </field> + + <field name="label1"> + + <!-- libelle 1 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label1 == null || label1.empty || label1 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label1</message> + </field-validator> + </field> + + <field name="label3"> + <!-- libelle 3 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label3 == null || label3.empty || label3 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label3</message> + </field-validator> + </field> + +</validators> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-create-error-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-create-error-validation.xml new file mode 100644 index 0000000..f340882 --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-create-error-validation.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="code"> + + <!-- clef unique sur le code --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">code</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.code.uniqueKey##${code}</message> + </field-validator> + + </field> + + <field name="uri"> + + <!-- clef unique sur l'uri --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">uri</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.uri.uniqueKey##${uri}</message> + </field-validator> + </field> + + <field name="gearCaracteristicType"> + + <!-- pas de gearCaracteristicType renseigne --> + <field-validator type="required" short-circuit="true"> + <message>validator.gearCaracteristic.required.gearCaracteristicType</message> + </field-validator> + + <!-- gearCaracteristicType desactivee --> + <field-validator type="fieldexpression"> + <param name="expression"><![CDATA[ disabled || gearCaracteristicType.enabled ]]> + </param> + <message>validator.gearCaracteristic.desactivated.gearCaracteristicType</message> + </field-validator> + </field> + + <field name="label1"> + <!-- pas de libelle 1 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label1</message> + </field-validator> + </field> + + <field name="label2"> + <!-- pas de libelle 2 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label2</message> + </field-validator> + </field> + + <field name="label3"> + <!-- pas de libelle 3 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label3</message> + </field-validator> + </field> + +</validators> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-create-warning-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-create-warning-validation.xml new file mode 100644 index 0000000..fddb53e --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-create-warning-validation.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="status"> + <!-- objet desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ enabled ]]> + </param> + <message>validator.referentiel.status.desactivated</message> + </field-validator> + </field> + + <field name="uri"> + <!-- pas d'uri selectionne --> + <field-validator type="requiredstring" short-circuit="true"> + <message>validator.referentiel.null.uri</message> + </field-validator> + </field> + + <field name="label1"> + + <!-- libelle 1 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label1 == null || label1.empty || label1 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label1</message> + </field-validator> + </field> + + <field name="label3"> + <!-- libelle 3 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label3 == null || label3.empty || label3 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label3</message> + </field-validator> + </field> + +</validators> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-update-error-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-update-error-validation.xml new file mode 100644 index 0000000..f340882 --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-update-error-validation.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="code"> + + <!-- clef unique sur le code --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">code</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.code.uniqueKey##${code}</message> + </field-validator> + + </field> + + <field name="uri"> + + <!-- clef unique sur l'uri --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">uri</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.uri.uniqueKey##${uri}</message> + </field-validator> + </field> + + <field name="gearCaracteristicType"> + + <!-- pas de gearCaracteristicType renseigne --> + <field-validator type="required" short-circuit="true"> + <message>validator.gearCaracteristic.required.gearCaracteristicType</message> + </field-validator> + + <!-- gearCaracteristicType desactivee --> + <field-validator type="fieldexpression"> + <param name="expression"><![CDATA[ disabled || gearCaracteristicType.enabled ]]> + </param> + <message>validator.gearCaracteristic.desactivated.gearCaracteristicType</message> + </field-validator> + </field> + + <field name="label1"> + <!-- pas de libelle 1 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label1</message> + </field-validator> + </field> + + <field name="label2"> + <!-- pas de libelle 2 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label2</message> + </field-validator> + </field> + + <field name="label3"> + <!-- pas de libelle 3 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label3</message> + </field-validator> + </field> + +</validators> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-update-warning-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-update-warning-validation.xml new file mode 100644 index 0000000..fddb53e --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristic-n1-update-warning-validation.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="status"> + <!-- objet desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ enabled ]]> + </param> + <message>validator.referentiel.status.desactivated</message> + </field-validator> + </field> + + <field name="uri"> + <!-- pas d'uri selectionne --> + <field-validator type="requiredstring" short-circuit="true"> + <message>validator.referentiel.null.uri</message> + </field-validator> + </field> + + <field name="label1"> + + <!-- libelle 1 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label1 == null || label1.empty || label1 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label1</message> + </field-validator> + </field> + + <field name="label3"> + <!-- libelle 3 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label3 == null || label3.empty || label3 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label3</message> + </field-validator> + </field> + +</validators> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-create-error-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-create-error-validation.xml new file mode 100644 index 0000000..7bf463a --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-create-error-validation.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="code"> + + <!-- clef unique sur le code --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">code</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.code.uniqueKey##${code}</message> + </field-validator> + + </field> + + <field name="uri"> + + <!-- clef unique sur l'uri --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">uri</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.uri.uniqueKey##${uri}</message> + </field-validator> + </field> + + <field name="label1"> + <!-- pas de libelle 1 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label1</message> + </field-validator> + </field> + + <field name="label2"> + <!-- pas de libelle 2 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label2</message> + </field-validator> + </field> + + <field name="label3"> + <!-- pas de libelle 3 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label3</message> + </field-validator> + </field> + +</validators> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-create-warning-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-create-warning-validation.xml new file mode 100644 index 0000000..fddb53e --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-create-warning-validation.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="status"> + <!-- objet desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ enabled ]]> + </param> + <message>validator.referentiel.status.desactivated</message> + </field-validator> + </field> + + <field name="uri"> + <!-- pas d'uri selectionne --> + <field-validator type="requiredstring" short-circuit="true"> + <message>validator.referentiel.null.uri</message> + </field-validator> + </field> + + <field name="label1"> + + <!-- libelle 1 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label1 == null || label1.empty || label1 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label1</message> + </field-validator> + </field> + + <field name="label3"> + <!-- libelle 3 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label3 == null || label3.empty || label3 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label3</message> + </field-validator> + </field> + +</validators> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-update-error-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-update-error-validation.xml new file mode 100644 index 0000000..7bf463a --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-update-error-validation.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="code"> + + <!-- clef unique sur le code --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">code</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.code.uniqueKey##${code}</message> + </field-validator> + + </field> + + <field name="uri"> + + <!-- clef unique sur l'uri --> + <field-validator type="collectionUniqueKey" short-circuit="true"> + <param name="collectionFieldName">editingReferentielList</param> + <param name="keys">uri</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.referentiel.invalid.uri.uniqueKey##${uri}</message> + </field-validator> + </field> + + <field name="label1"> + <!-- pas de libelle 1 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label1</message> + </field-validator> + </field> + + <field name="label2"> + <!-- pas de libelle 2 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label2</message> + </field-validator> + </field> + + <field name="label3"> + <!-- pas de libelle 3 renseigne --> + <field-validator type="requiredstring"> + <message>validator.referentiel.required.label3</message> + </field-validator> + </field> + +</validators> diff --git a/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-update-warning-validation.xml b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-update-warning-validation.xml new file mode 100644 index 0000000..fddb53e --- /dev/null +++ b/observe-validation/src/main/resources/fr/ird/observe/entities/referentiel/GearCaracteristicType-n1-update-warning-validation.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + 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% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="status"> + <!-- objet desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ enabled ]]> + </param> + <message>validator.referentiel.status.desactivated</message> + </field-validator> + </field> + + <field name="uri"> + <!-- pas d'uri selectionne --> + <field-validator type="requiredstring" short-circuit="true"> + <message>validator.referentiel.null.uri</message> + </field-validator> + </field> + + <field name="label1"> + + <!-- libelle 1 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label1 == null || label1.empty || label1 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label1</message> + </field-validator> + </field> + + <field name="label3"> + <!-- libelle 3 non traduit (egal a label2) --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ label3 == null || label3.empty || label3 != label2 ]]> + </param> + <message>validator.referentiel.untranslated.label3</message> + </field-validator> + </field> + +</validators> 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 b052275..b449fbf 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 @@ -113,6 +113,8 @@ validator.floatlinesComposition.desactivated.lineType= validator.floatlinesComposition.required.length= validator.floatlinesComposition.required.lineType= validator.floatlinesComposition.required.proportion= +validator.gearCaracteristic.desactivated.gearCaracteristicType= +validator.gearCaracteristic.required.gearCaracteristicType= validator.harbour.desactivated.country= validator.harbour.null.latitude= validator.harbour.null.locode= 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 93e5c58..051d68f 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 @@ -113,6 +113,8 @@ validator.floatlinesComposition.desactivated.lineType= validator.floatlinesComposition.required.length= validator.floatlinesComposition.required.lineType= validator.floatlinesComposition.required.proportion= +validator.gearCaracteristic.desactivated.gearCaracteristicType= +validator.gearCaracteristic.required.gearCaracteristicType= validator.harbour.desactivated.country= validator.harbour.null.latitude= validator.harbour.null.locode= 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 7ab75d9..4de32e4 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 @@ -113,6 +113,8 @@ validator.floatlinesComposition.desactivated.lineType=Le type sélectionnée est validator.floatlinesComposition.required.length=Proportion non renseignée. validator.floatlinesComposition.required.lineType=La sélection d'un type est obligatoire. validator.floatlinesComposition.required.proportion=Proportion non renseignée. +validator.gearCaracteristic.desactivated.gearCaracteristicType=Le type sélectionnée est désactivée. +validator.gearCaracteristic.required.gearCaracteristicType=Le type sélectionnée est obligatoire. validator.harbour.desactivated.country=Le pays sélectionné est désactivé. validator.harbour.null.latitude=La latitude n'est pas renseignée. validator.harbour.null.locode=Le locode n'est pas renseigné. diff --git a/observe-validation/src/test/java/fr/ird/observe/validation/BeanValidatorDetectorTest.java b/observe-validation/src/test/java/fr/ird/observe/validation/BeanValidatorDetectorTest.java index 5e4c4e2..707ed05 100644 --- a/observe-validation/src/test/java/fr/ird/observe/validation/BeanValidatorDetectorTest.java +++ b/observe-validation/src/test/java/fr/ird/observe/validation/BeanValidatorDetectorTest.java @@ -38,6 +38,9 @@ import fr.ird.observe.entities.longline.Tdr; import fr.ird.observe.entities.longline.TripLongline; import fr.ird.observe.entities.referentiel.Country; import fr.ird.observe.entities.referentiel.FpaZone; +import fr.ird.observe.entities.referentiel.Gear; +import fr.ird.observe.entities.referentiel.GearCaracteristic; +import fr.ird.observe.entities.referentiel.GearCaracteristicType; import fr.ird.observe.entities.referentiel.Harbour; import fr.ird.observe.entities.referentiel.LengthWeightParameter; import fr.ird.observe.entities.referentiel.Ocean; @@ -151,7 +154,7 @@ public class BeanValidatorDetectorTest extends AbstractValidatorDetectorTest { SortedSet<NuitonValidator<?>> validators = detectValidators(ALL_TYPES); assertFalse(validators.isEmpty()); - assertEquals(166, validators.size()); + assertEquals(172, validators.size()); } @@ -175,6 +178,9 @@ public class BeanValidatorDetectorTest extends AbstractValidatorDetectorTest { EncounterType.class, FloatingObject.class, FpaZone.class, + Gear.class, + GearCaracteristic.class, + GearCaracteristicType.class, Harbour.class, Healthness.class, HookPosition.class, @@ -255,6 +261,9 @@ public class BeanValidatorDetectorTest extends AbstractValidatorDetectorTest { FloatingObject.class, FloatlinesComposition.class, FpaZone.class, + Gear.class, + GearCaracteristic.class, + GearCaracteristicType.class, Harbour.class, Healthness.class, HookPosition.class, -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.