Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
da908f05
by Tony Chemit at 2023-06-13T14:40:51+02:00
-
bf6b3e5c
by Tony Chemit at 2023-06-13T14:54:36+02:00
20 changed files:
- core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/BatchDto-create-error-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/BatchDto-update-error-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/SurveyPartDto-create-error-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/SurveyPartDto-update-error-validation.xml
- core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/Batch/validation-create.json
- core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/Batch/validation-update.json
- core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/SurveyPart/validation-create.json
- core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/localmarket/SurveyPart/validation-update.json
- model/src/main/models/Observe/dto/attribute/boundNumber.properties
- model/src/main/models/Observe/dto/attribute/positiveNumber.properties
- model/src/main/models/Observe/dto/attribute/strictlyPositiveNumber.properties
- server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-create-error.xml
- server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-create.json
- server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-update-error.xml
- server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/Batch/validation-update.json
- server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-create-error.xml
- server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-create.json
- server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-update-error.xml
- server/runner/src/main/webResources/doc/api/public/data/ps/localmarket/SurveyPart/validation-update.json
Changes:
| ... | ... | @@ -9074,8 +9074,8 @@ |
| 9074 | 9074 | {
|
| 9075 | 9075 | "name": "weight",
|
| 9076 | 9076 | "comments": [
|
| 9077 | - "0.0 <= weight <= 5.0 except if !countOrWeightValid",
|
|
| 9078 | - "weight is a positive number",
|
|
| 9077 | + "0.0001 <= weight <= 100.0 except if !countOrWeightValid",
|
|
| 9078 | + "weight is a strictly positive number",
|
|
| 9079 | 9079 | "weight is mandatory except if countOrWeightValid"
|
| 9080 | 9080 | ]
|
| 9081 | 9081 | }
|
| ... | ... | @@ -9173,8 +9173,8 @@ |
| 9173 | 9173 | {
|
| 9174 | 9174 | "name": "weight",
|
| 9175 | 9175 | "comments": [
|
| 9176 | - "0.0 <= weight <= 5.0 except if !countOrWeightValid",
|
|
| 9177 | - "weight is a positive number",
|
|
| 9176 | + "0.0001 <= weight <= 100.0 except if !countOrWeightValid",
|
|
| 9177 | + "weight is a strictly positive number",
|
|
| 9178 | 9178 | "weight is mandatory except if countOrWeightValid"
|
| 9179 | 9179 | ]
|
| 9180 | 9180 | }
|
| ... | ... | @@ -9787,10 +9787,10 @@ |
| 9787 | 9787 | {
|
| 9788 | 9788 | "name": "proportion",
|
| 9789 | 9789 | "comments": [
|
| 9790 | + "0.0 <= proportion <= 100.0",
|
|
| 9790 | 9791 | "proportion is a proportion",
|
| 9791 | 9792 | "proportion is a strictly positive number",
|
| 9792 | - "proportion is mandatory except if dataEmpty",
|
|
| 9793 | - "proportion=0.0 <= proportion <= 100.0"
|
|
| 9793 | + "proportion is mandatory except if dataEmpty"
|
|
| 9794 | 9794 | ]
|
| 9795 | 9795 | },
|
| 9796 | 9796 | {
|
| ... | ... | @@ -9836,10 +9836,10 @@ |
| 9836 | 9836 | {
|
| 9837 | 9837 | "name": "proportion",
|
| 9838 | 9838 | "comments": [
|
| 9839 | + "0.0 <= proportion <= 100.0",
|
|
| 9839 | 9840 | "proportion is a proportion",
|
| 9840 | 9841 | "proportion is a strictly positive number",
|
| 9841 | - "proportion is mandatory except if dataEmpty",
|
|
| 9842 | - "proportion=0.0 <= proportion <= 100.0"
|
|
| 9842 | + "proportion is mandatory except if dataEmpty"
|
|
| 9843 | 9843 | ]
|
| 9844 | 9844 | },
|
| 9845 | 9845 | {
|
| ... | ... | @@ -110,16 +110,17 @@ |
| 110 | 110 | <message>observe.data.ps.localmarket.Batch.weight.validation.required</message>
|
| 111 | 111 | </field-validator>
|
| 112 | 112 | |
| 113 | - <!-- weight is a positive number -->
|
|
| 113 | + <!-- weight is a strictly positive number -->
|
|
| 114 | 114 | <field-validator type="positiveNumber">
|
| 115 | + <param name="strict">true</param>
|
|
| 115 | 116 | <message/>
|
| 116 | 117 | </field-validator>
|
| 117 | 118 | |
| 118 | - <!-- 0.0 <= weight <= 5.0 except if !countOrWeightValid -->
|
|
| 119 | + <!-- 0.0001 <= weight <= 100.0 except if !countOrWeightValid -->
|
|
| 119 | 120 | <field-validator type="boundNumber">
|
| 120 | 121 | <param name="skip"><![CDATA[ !countOrWeightValid ]]></param>
|
| 121 | - <param name="min">0.0</param>
|
|
| 122 | - <param name="max">5.0</param>
|
|
| 122 | + <param name="min">0.0001</param>
|
|
| 123 | + <param name="max">100.0</param>
|
|
| 123 | 124 | <message/>
|
| 124 | 125 | </field-validator>
|
| 125 | 126 | </field>
|
| ... | ... | @@ -110,16 +110,17 @@ |
| 110 | 110 | <message>observe.data.ps.localmarket.Batch.weight.validation.required</message>
|
| 111 | 111 | </field-validator>
|
| 112 | 112 | |
| 113 | - <!-- weight is a positive number -->
|
|
| 113 | + <!-- weight is a strictly positive number -->
|
|
| 114 | 114 | <field-validator type="positiveNumber">
|
| 115 | + <param name="strict">true</param>
|
|
| 115 | 116 | <message/>
|
| 116 | 117 | </field-validator>
|
| 117 | 118 | |
| 118 | - <!-- 0.0 <= weight <= 5.0 except if !countOrWeightValid -->
|
|
| 119 | + <!-- 0.0001 <= weight <= 100.0 except if !countOrWeightValid -->
|
|
| 119 | 120 | <field-validator type="boundNumber">
|
| 120 | 121 | <param name="skip"><![CDATA[ !countOrWeightValid ]]></param>
|
| 121 | - <param name="min">0.0</param>
|
|
| 122 | - <param name="max">5.0</param>
|
|
| 122 | + <param name="min">0.0001</param>
|
|
| 123 | + <param name="max">100.0</param>
|
|
| 123 | 124 | <message/>
|
| 124 | 125 | </field-validator>
|
| 125 | 126 | </field>
|
| ... | ... | @@ -49,9 +49,9 @@ |
| 49 | 49 | <message/>
|
| 50 | 50 | </field-validator>
|
| 51 | 51 | |
| 52 | - <!-- proportion=0.0 <= proportion <= 100.0 -->
|
|
| 52 | + <!-- 0.0 <= proportion <= 100.0 -->
|
|
| 53 | 53 | <field-validator type="boundNumber">
|
| 54 | - <param name="min">proportion=0.0</param>
|
|
| 54 | + <param name="min">0.0</param>
|
|
| 55 | 55 | <param name="max">100.0</param>
|
| 56 | 56 | <message/>
|
| 57 | 57 | </field-validator>
|
| ... | ... | @@ -49,9 +49,9 @@ |
| 49 | 49 | <message/>
|
| 50 | 50 | </field-validator>
|
| 51 | 51 | |
| 52 | - <!-- proportion=0.0 <= proportion <= 100.0 -->
|
|
| 52 | + <!-- 0.0 <= proportion <= 100.0 -->
|
|
| 53 | 53 | <field-validator type="boundNumber">
|
| 54 | - <param name="min">proportion=0.0</param>
|
|
| 54 | + <param name="min">0.0</param>
|
|
| 55 | 55 | <param name="max">100.0</param>
|
| 56 | 56 | <message/>
|
| 57 | 57 | </field-validator>
|
| ... | ... | @@ -58,8 +58,8 @@ |
| 58 | 58 | },
|
| 59 | 59 | "weight": {
|
| 60 | 60 | "errors": [
|
| 61 | - "0.0 <= weight <= 5.0 except if !countOrWeightValid",
|
|
| 62 | - "weight is a positive number",
|
|
| 61 | + "0.0001 <= weight <= 100.0 except if !countOrWeightValid",
|
|
| 62 | + "weight is a strictly positive number",
|
|
| 63 | 63 | "weight is mandatory except if countOrWeightValid"
|
| 64 | 64 | ]
|
| 65 | 65 | }
|
| ... | ... | @@ -58,8 +58,8 @@ |
| 58 | 58 | },
|
| 59 | 59 | "weight": {
|
| 60 | 60 | "errors": [
|
| 61 | - "0.0 <= weight <= 5.0 except if !countOrWeightValid",
|
|
| 62 | - "weight is a positive number",
|
|
| 61 | + "0.0001 <= weight <= 100.0 except if !countOrWeightValid",
|
|
| 62 | + "weight is a strictly positive number",
|
|
| 63 | 63 | "weight is mandatory except if countOrWeightValid"
|
| 64 | 64 | ]
|
| 65 | 65 | }
|
| ... | ... | @@ -6,10 +6,10 @@ |
| 6 | 6 | },
|
| 7 | 7 | "proportion": {
|
| 8 | 8 | "errors": [
|
| 9 | + "0.0 <= proportion <= 100.0",
|
|
| 9 | 10 | "proportion is a proportion",
|
| 10 | 11 | "proportion is a strictly positive number",
|
| 11 | - "proportion is mandatory except if dataEmpty",
|
|
| 12 | - "proportion=0.0 <= proportion <= 100.0"
|
|
| 12 | + "proportion is mandatory except if dataEmpty"
|
|
| 13 | 13 | ],
|
| 14 | 14 | "warnings": [
|
| 15 | 15 | "the hole data is empty"
|
| ... | ... | @@ -6,10 +6,10 @@ |
| 6 | 6 | },
|
| 7 | 7 | "proportion": {
|
| 8 | 8 | "errors": [
|
| 9 | + "0.0 <= proportion <= 100.0",
|
|
| 9 | 10 | "proportion is a proportion",
|
| 10 | 11 | "proportion is a strictly positive number",
|
| 11 | - "proportion is mandatory except if dataEmpty",
|
|
| 12 | - "proportion=0.0 <= proportion <= 100.0"
|
|
| 12 | + "proportion is mandatory except if dataEmpty"
|
|
| 13 | 13 | ],
|
| 14 | 14 | "warnings": [
|
| 15 | 15 | "the hole data is empty"
|
| ... | ... | @@ -61,8 +61,8 @@ data.ps.common.Trip.attribute.landingTotalWeight=0.0:2000.0:!targetWellsSampling |
| 61 | 61 | data.ps.common.Trip.attribute.localMarketTotalWeight=0.0:1500.0:!localmarketWellsSamplingEnabled && !localmarketSurveySamplingEnabled
|
| 62 | 62 | data.ps.common.Trip.attribute.timeAtSea=10:2400:!logbookEnabled
|
| 63 | 63 | data.ps.landing.Landing.attribute.weight=0.0:600.0
|
| 64 | -data.ps.localmarket.Batch.attribute.weight=0.0:5.0:!countOrWeightValid
|
|
| 65 | -data.ps.localmarket.SurveyPart.attribute.proportion=proportion=0.0:100.0
|
|
| 64 | +data.ps.localmarket.Batch.attribute.weight=0.0001:100.0:!countOrWeightValid
|
|
| 65 | +data.ps.localmarket.SurveyPart.attribute.proportion=0.0:100.0
|
|
| 66 | 66 | data.ps.logbook.Activity.attribute.currentDirection=0:359
|
| 67 | 67 | data.ps.logbook.Activity.attribute.currentSpeed=0.0:40.0
|
| 68 | 68 | data.ps.logbook.Activity.attribute.setCount=0:8:!setEnabled
|
| ... | ... | @@ -111,7 +111,6 @@ data.ps.common.Trip.attribute.localMarketTotalWeight=true |
| 111 | 111 | data.ps.common.Trip.attribute.loch=true
|
| 112 | 112 | data.ps.common.Trip.attribute.timeAtSea=true
|
| 113 | 113 | data.ps.localmarket.Batch.attribute.count=true
|
| 114 | -data.ps.localmarket.Batch.attribute.weight=true
|
|
| 115 | 114 | data.ps.logbook.Activity.attribute.currentDirection=true
|
| 116 | 115 | data.ps.logbook.Activity.attribute.currentSpeed=true
|
| 117 | 116 | data.ps.logbook.Activity.attribute.setCount=true
|
| ... | ... | @@ -25,6 +25,7 @@ data.ll.logbook.Activity.attribute.seaSurfaceTemperature=true |
| 25 | 25 | data.ll.logbook.Catch.attribute.depredatedProportion=true
|
| 26 | 26 | data.ll.observation.Activity.attribute.seaSurfaceTemperature=true
|
| 27 | 27 | data.ll.observation.Set.attribute.basketsPerSectionCount=true
|
| 28 | +data.ps.localmarket.Batch.attribute.weight=true
|
|
| 28 | 29 | data.ps.localmarket.SampleSpeciesMeasure.attribute.count=true
|
| 29 | 30 | data.ps.localmarket.SampleSpeciesMeasure.attribute.sizeClass=true
|
| 30 | 31 | data.ps.localmarket.Survey.attribute.number=true
|
| ... | ... | @@ -110,16 +110,17 @@ |
| 110 | 110 | <message>observe.data.ps.localmarket.Batch.weight.validation.required</message>
|
| 111 | 111 | </field-validator>
|
| 112 | 112 | |
| 113 | - <!-- weight is a positive number -->
|
|
| 113 | + <!-- weight is a strictly positive number -->
|
|
| 114 | 114 | <field-validator type="positiveNumber">
|
| 115 | + <param name="strict">true</param>
|
|
| 115 | 116 | <message/>
|
| 116 | 117 | </field-validator>
|
| 117 | 118 | |
| 118 | - <!-- 0.0 <= weight <= 5.0 except if !countOrWeightValid -->
|
|
| 119 | + <!-- 0.0001 <= weight <= 100.0 except if !countOrWeightValid -->
|
|
| 119 | 120 | <field-validator type="boundNumber">
|
| 120 | 121 | <param name="skip"><![CDATA[ !countOrWeightValid ]]></param>
|
| 121 | - <param name="min">0.0</param>
|
|
| 122 | - <param name="max">5.0</param>
|
|
| 122 | + <param name="min">0.0001</param>
|
|
| 123 | + <param name="max">100.0</param>
|
|
| 123 | 124 | <message/>
|
| 124 | 125 | </field-validator>
|
| 125 | 126 | </field>
|
| ... | ... | @@ -58,8 +58,8 @@ |
| 58 | 58 | },
|
| 59 | 59 | "weight": {
|
| 60 | 60 | "errors": [
|
| 61 | - "0.0 <= weight <= 5.0 except if !countOrWeightValid",
|
|
| 62 | - "weight is a positive number",
|
|
| 61 | + "0.0001 <= weight <= 100.0 except if !countOrWeightValid",
|
|
| 62 | + "weight is a strictly positive number",
|
|
| 63 | 63 | "weight is mandatory except if countOrWeightValid"
|
| 64 | 64 | ]
|
| 65 | 65 | }
|
| ... | ... | @@ -110,16 +110,17 @@ |
| 110 | 110 | <message>observe.data.ps.localmarket.Batch.weight.validation.required</message>
|
| 111 | 111 | </field-validator>
|
| 112 | 112 | |
| 113 | - <!-- weight is a positive number -->
|
|
| 113 | + <!-- weight is a strictly positive number -->
|
|
| 114 | 114 | <field-validator type="positiveNumber">
|
| 115 | + <param name="strict">true</param>
|
|
| 115 | 116 | <message/>
|
| 116 | 117 | </field-validator>
|
| 117 | 118 | |
| 118 | - <!-- 0.0 <= weight <= 5.0 except if !countOrWeightValid -->
|
|
| 119 | + <!-- 0.0001 <= weight <= 100.0 except if !countOrWeightValid -->
|
|
| 119 | 120 | <field-validator type="boundNumber">
|
| 120 | 121 | <param name="skip"><![CDATA[ !countOrWeightValid ]]></param>
|
| 121 | - <param name="min">0.0</param>
|
|
| 122 | - <param name="max">5.0</param>
|
|
| 122 | + <param name="min">0.0001</param>
|
|
| 123 | + <param name="max">100.0</param>
|
|
| 123 | 124 | <message/>
|
| 124 | 125 | </field-validator>
|
| 125 | 126 | </field>
|
| ... | ... | @@ -58,8 +58,8 @@ |
| 58 | 58 | },
|
| 59 | 59 | "weight": {
|
| 60 | 60 | "errors": [
|
| 61 | - "0.0 <= weight <= 5.0 except if !countOrWeightValid",
|
|
| 62 | - "weight is a positive number",
|
|
| 61 | + "0.0001 <= weight <= 100.0 except if !countOrWeightValid",
|
|
| 62 | + "weight is a strictly positive number",
|
|
| 63 | 63 | "weight is mandatory except if countOrWeightValid"
|
| 64 | 64 | ]
|
| 65 | 65 | }
|
| ... | ... | @@ -49,9 +49,9 @@ |
| 49 | 49 | <message/>
|
| 50 | 50 | </field-validator>
|
| 51 | 51 | |
| 52 | - <!-- proportion=0.0 <= proportion <= 100.0 -->
|
|
| 52 | + <!-- 0.0 <= proportion <= 100.0 -->
|
|
| 53 | 53 | <field-validator type="boundNumber">
|
| 54 | - <param name="min">proportion=0.0</param>
|
|
| 54 | + <param name="min">0.0</param>
|
|
| 55 | 55 | <param name="max">100.0</param>
|
| 56 | 56 | <message/>
|
| 57 | 57 | </field-validator>
|
| ... | ... | @@ -6,10 +6,10 @@ |
| 6 | 6 | },
|
| 7 | 7 | "proportion": {
|
| 8 | 8 | "errors": [
|
| 9 | + "0.0 <= proportion <= 100.0",
|
|
| 9 | 10 | "proportion is a proportion",
|
| 10 | 11 | "proportion is a strictly positive number",
|
| 11 | - "proportion is mandatory except if dataEmpty",
|
|
| 12 | - "proportion=0.0 <= proportion <= 100.0"
|
|
| 12 | + "proportion is mandatory except if dataEmpty"
|
|
| 13 | 13 | ],
|
| 14 | 14 | "warnings": [
|
| 15 | 15 | "the hole data is empty"
|
| ... | ... | @@ -49,9 +49,9 @@ |
| 49 | 49 | <message/>
|
| 50 | 50 | </field-validator>
|
| 51 | 51 | |
| 52 | - <!-- proportion=0.0 <= proportion <= 100.0 -->
|
|
| 52 | + <!-- 0.0 <= proportion <= 100.0 -->
|
|
| 53 | 53 | <field-validator type="boundNumber">
|
| 54 | - <param name="min">proportion=0.0</param>
|
|
| 54 | + <param name="min">0.0</param>
|
|
| 55 | 55 | <param name="max">100.0</param>
|
| 56 | 56 | <message/>
|
| 57 | 57 | </field-validator>
|
| ... | ... | @@ -6,10 +6,10 @@ |
| 6 | 6 | },
|
| 7 | 7 | "proportion": {
|
| 8 | 8 | "errors": [
|
| 9 | + "0.0 <= proportion <= 100.0",
|
|
| 9 | 10 | "proportion is a proportion",
|
| 10 | 11 | "proportion is a strictly positive number",
|
| 11 | - "proportion is mandatory except if dataEmpty",
|
|
| 12 | - "proportion=0.0 <= proportion <= 100.0"
|
|
| 12 | + "proportion is mandatory except if dataEmpty"
|
|
| 13 | 13 | ],
|
| 14 | 14 | "warnings": [
|
| 15 | 15 | "the hole data is empty"
|