Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
acb9501b
by Tony Chemit at 2022-11-20T11:04:28+01:00
-
bd7079e1
by Tony Chemit at 2022-11-21T14:39:23+01:00
-
6936b80b
by Tony Chemit at 2022-11-21T15:38:12+01:00
-
0bc50204
by Tony Chemit at 2022-11-21T15:38:12+01:00
-
be85552d
by Tony Chemit at 2022-11-21T15:38:12+01:00
-
25a4e7d3
by Tony Chemit at 2022-11-21T16:14:04+01:00
13 changed files:
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/SampleUIHandler.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/SampleUIModelStates.java
- core/api/services/src/main/java/fr/ird/observe/services/service/data/ps/common/TripService.java
- core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/observation/SampleSpi.java
- core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_0.java
- + core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/SampleMeasureRecord.java
- + core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/SampleRecord.java
- core/services/local/src/main/java/fr/ird/observe/services/local/service/data/ps/common/TripServiceLocalSupport.java
- core/services/test/src/main/java/fr/ird/observe/services/service/data/ps/common/TripServiceFixtures.java
- core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/data/ps/common/TripService.properties
- model/src/main/models/Observe/dto/20-data-ps-observation.model
- model/src/main/models/Observe/dto/attribute/unique.properties
- server/core/src/main/filtered-resources/META-INF/mapping-api-client.wm
Changes:
| ... | ... | @@ -28,6 +28,7 @@ import fr.ird.observe.dto.data.ps.observation.SampleMeasureDto; |
| 28 | 28 | import fr.ird.observe.dto.referential.common.SizeMeasureTypeReference;
|
| 29 | 29 | import fr.ird.observe.dto.referential.common.SpeciesReference;
|
| 30 | 30 | import fr.ird.observe.dto.referential.common.WeightMeasureTypeReference;
|
| 31 | +import fr.ird.observe.dto.referential.ps.common.SpeciesFateReference;
|
|
| 31 | 32 | import org.apache.logging.log4j.LogManager;
|
| 32 | 33 | import org.apache.logging.log4j.Logger;
|
| 33 | 34 | import org.nuiton.jaxx.runtime.swing.JAXXButtonGroup;
|
| ... | ... | @@ -36,6 +37,7 @@ import javax.swing.JComponent; |
| 36 | 37 | import javax.swing.event.ChangeEvent;
|
| 37 | 38 | import java.awt.Component;
|
| 38 | 39 | import java.beans.PropertyChangeListener;
|
| 40 | +import java.util.List;
|
|
| 39 | 41 | import java.util.Optional;
|
| 40 | 42 | |
| 41 | 43 | /**
|
| ... | ... | @@ -99,7 +101,7 @@ public class SampleUIHandler extends GeneratedSampleUIHandler { |
| 99 | 101 | onLengthChanged(tableEditBean.getLength(), false);
|
| 100 | 102 | onWeightChanged(tableEditBean.getWeight(), false);
|
| 101 | 103 | |
| 102 | - SampleUIModel sampleModel = getModel();
|
|
| 104 | + SampleUIModelStates states = getModel().getStates();
|
|
| 103 | 105 | |
| 104 | 106 | SpeciesReference species = tableEditBean.getSpecies();
|
| 105 | 107 | log.info(String.format("%s selected species %s", prefix, species));
|
| ... | ... | @@ -113,7 +115,7 @@ public class SampleUIHandler extends GeneratedSampleUIHandler { |
| 113 | 115 | boolean unsetSpecies = true;
|
| 114 | 116 | if (newRow) {
|
| 115 | 117 | // use default mode
|
| 116 | - AcquisitionMode acquisitionMode = sampleModel.getStates().getDefaultAcquisitionMode();
|
|
| 118 | + AcquisitionMode acquisitionMode = states.getDefaultAcquisitionMode();
|
|
| 117 | 119 | if (previousRowBean != null) {
|
| 118 | 120 | //use previous row (species won't be empty)
|
| 119 | 121 | unsetSpecies = false;
|
| ... | ... | @@ -131,8 +133,8 @@ public class SampleUIHandler extends GeneratedSampleUIHandler { |
| 131 | 133 | }
|
| 132 | 134 | |
| 133 | 135 | // get default size measure type
|
| 134 | - defaultSizeMeasureType = sampleModel.getStates().getSpeciesDefaultSizeMeasureType(species);
|
|
| 135 | - defaultWeightMeasureType = sampleModel.getStates().getSpeciesDefaultWeightMeasureType(species);
|
|
| 136 | + defaultSizeMeasureType = states.getSpeciesDefaultSizeMeasureType(species);
|
|
| 137 | + defaultWeightMeasureType = states.getSpeciesDefaultWeightMeasureType(species);
|
|
| 136 | 138 | |
| 137 | 139 | if (unsetSpecies) {
|
| 138 | 140 | // unset species (this will not set again species in widget)
|
| ... | ... | @@ -145,8 +147,8 @@ public class SampleUIHandler extends GeneratedSampleUIHandler { |
| 145 | 147 | updateAcquisitionMode0(AcquisitionMode.valueOf(tableEditBean.getAcquisitionMode()));
|
| 146 | 148 | |
| 147 | 149 | // get default size measure type
|
| 148 | - defaultSizeMeasureType = sampleModel.getStates().getSpeciesDefaultSizeMeasureType(species);
|
|
| 149 | - defaultWeightMeasureType = sampleModel.getStates().getSpeciesDefaultWeightMeasureType(species);
|
|
| 150 | + defaultSizeMeasureType = states.getSpeciesDefaultSizeMeasureType(species);
|
|
| 151 | + defaultWeightMeasureType = states.getSpeciesDefaultWeightMeasureType(species);
|
|
| 150 | 152 | |
| 151 | 153 | species = null;
|
| 152 | 154 | sizeMeasureType = Optional.ofNullable(tableEditBean.getSizeMeasureType());
|
| ... | ... | @@ -154,8 +156,8 @@ public class SampleUIHandler extends GeneratedSampleUIHandler { |
| 154 | 156 | }
|
| 155 | 157 | |
| 156 | 158 | // use default size measure type
|
| 157 | - sampleModel.getStates().setDefaultSizeMeasureType(defaultSizeMeasureType.orElse(null));
|
|
| 158 | - sampleModel.getStates().setDefaultWeightMeasureType(defaultWeightMeasureType.orElse(null));
|
|
| 159 | + states.setDefaultSizeMeasureType(defaultSizeMeasureType.orElse(null));
|
|
| 160 | + states.setDefaultWeightMeasureType(defaultWeightMeasureType.orElse(null));
|
|
| 159 | 161 | |
| 160 | 162 | ui.getSizeMeasureType().setSelectedItem(null);
|
| 161 | 163 | sizeMeasureType.ifPresent(ui.getSizeMeasureType()::setSelectedItem);
|
| ... | ... | @@ -172,16 +174,36 @@ public class SampleUIHandler extends GeneratedSampleUIHandler { |
| 172 | 174 | ui.getSpecies().setSelectedItem(null);
|
| 173 | 175 | ui.getSpecies().setSelectedItem(species);
|
| 174 | 176 | }
|
| 177 | + updateSpeciesFateUniverse(tableEditBean.getSpecies(), tableEditBean.getSpeciesFate());
|
|
| 175 | 178 | }
|
| 176 | 179 | |
| 177 | 180 | protected void onSpeciesChanged(SpeciesReference species) {
|
| 178 | - SampleUIModel model = getModel();
|
|
| 179 | - Optional<SizeMeasureTypeReference> sizeMeasureType = model.getStates().getSpeciesDefaultSizeMeasureType(species);
|
|
| 180 | - Optional<WeightMeasureTypeReference> weightMeasureType = model.getStates().getSpeciesDefaultWeightMeasureType(species);
|
|
| 181 | - model.getStates().setDefaultSizeMeasureType(sizeMeasureType.orElse(null));
|
|
| 182 | - model.getStates().setDefaultWeightMeasureType(weightMeasureType.orElse(null));
|
|
| 181 | + SampleUIModelStates states = getModel().getStates();
|
|
| 182 | + Optional<SizeMeasureTypeReference> sizeMeasureType = states.getSpeciesDefaultSizeMeasureType(species);
|
|
| 183 | + Optional<WeightMeasureTypeReference> weightMeasureType = states.getSpeciesDefaultWeightMeasureType(species);
|
|
| 184 | + states.setDefaultSizeMeasureType(sizeMeasureType.orElse(null));
|
|
| 185 | + states.setDefaultWeightMeasureType(weightMeasureType.orElse(null));
|
|
| 183 | 186 | resetDefaultSizeMeasureType(false);
|
| 184 | 187 | resetDefaultWeightMeasureType(false);
|
| 188 | + updateSpeciesFateUniverse(species, states.getTableEditBean().getSpeciesFate());
|
|
| 189 | + }
|
|
| 190 | + |
|
| 191 | + protected void updateSpeciesFateUniverse(SpeciesReference species, SpeciesFateReference speciesFate) {
|
|
| 192 | + ui.getSpeciesFate().setSelectedItem(null);
|
|
| 193 | + if (species == null) {
|
|
| 194 | + ui.getSpeciesFate().setEnabled(false);
|
|
| 195 | + ui.getSpeciesFate().setData(List.of());
|
|
| 196 | + } else {
|
|
| 197 | + List<SpeciesFateReference> speciesFateReferences = getModel().getStates().getSpeciesFate(species);
|
|
| 198 | + ui.getSpeciesFate().setData(speciesFateReferences);
|
|
| 199 | + ui.getSpeciesFate().setEnabled(true);
|
|
| 200 | + //FIXME Due to none sample migration on speciesFate, we can have some one not present in speciesFateReferences
|
|
| 201 | + //FIXME Need a fix in migration probably
|
|
| 202 | +// if (speciesFate != null && speciesFateReferences.contains(speciesFate)) {
|
|
| 203 | + if (speciesFate != null) {
|
|
| 204 | + ui.getSpeciesFate().setSelectedItem(speciesFate);
|
|
| 205 | + }
|
|
| 206 | + }
|
|
| 185 | 207 | }
|
| 186 | 208 | |
| 187 | 209 | public void resetDefaultSizeMeasureType(boolean force) {
|
| ... | ... | @@ -37,6 +37,10 @@ import fr.ird.observe.services.ObserveServicesProvider; |
| 37 | 37 | import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition;
|
| 38 | 38 | |
| 39 | 39 | import javax.swing.Icon;
|
| 40 | +import java.util.List;
|
|
| 41 | +import java.util.Map;
|
|
| 42 | +import java.util.Set;
|
|
| 43 | +import java.util.stream.Collectors;
|
|
| 40 | 44 | |
| 41 | 45 | import static io.ultreia.java4all.i18n.I18n.n;
|
| 42 | 46 | import static io.ultreia.java4all.i18n.I18n.t;
|
| ... | ... | @@ -51,6 +55,11 @@ public class SampleUIModelStates extends SampleContentTableUIModelStates<SampleD |
| 51 | 55 | private final Icon computedIcon;
|
| 52 | 56 | private final Icon observedIcon;
|
| 53 | 57 | |
| 58 | + /**
|
|
| 59 | + * Dictionary of species fate ids available per species id.
|
|
| 60 | + */
|
|
| 61 | + private Map<String, Set<String>> speciesFateBySpeciesMap;
|
|
| 62 | + |
|
| 54 | 63 | public SampleUIModelStates(GeneratedSampleUIModel model) {
|
| 55 | 64 | super(model, SampleDto.newDto(new java.util.Date()), SampleMeasureDto.newDto(new java.util.Date()), model.getSource().getInitializer().getSelectedId(), model.getSource().getInitializer().getScope().isStandalone());
|
| 56 | 65 | this.computedIcon = UIHelper.getUIManagerActionIcon("data-calcule");
|
| ... | ... | @@ -69,8 +78,10 @@ public class SampleUIModelStates extends SampleContentTableUIModelStates<SampleD |
| 69 | 78 | |
| 70 | 79 | @Override
|
| 71 | 80 | public void onAfterInitAddReferentialFilters(ClientConfig clientConfig, Project observeSelectModel, ObserveServicesProvider servicesProvider, ReferencesCache referenceCache) {
|
| 72 | - referenceCache.addReferentialFilter(SampleMeasureDto.PROPERTY_SPECIES, ReferencesFilterHelper.<SampleDto, SpeciesReference>newSubList(SampleDto::getAvailableSpeciesIds));
|
|
| 73 | - referenceCache.addReferentialFilter(SampleMeasureDto.PROPERTY_SPECIES_FATE, ReferencesFilterHelper.<SampleDto, SpeciesFateReference>newSubList(SampleDto::getAvailableSpeciesFateIds));
|
|
| 81 | + speciesFateBySpeciesMap = servicesProvider.getPsCommonTripService().getPsObservationCatchesSpeciesFateBySpeciesId(observeSelectModel.getPs().getObservationSet().getId());
|
|
| 82 | + referenceCache.addReferentialFilter(SampleMeasureDto.PROPERTY_SPECIES, ReferencesFilterHelper.<SampleDto, SpeciesReference>newSubList(e -> speciesFateBySpeciesMap.keySet()));
|
|
| 83 | + referenceCache.addReferentialFilter(SampleMeasureDto.PROPERTY_SPECIES_FATE, ReferencesFilterHelper.<SampleDto, SpeciesFateReference>newSubList(
|
|
| 84 | + e -> speciesFateBySpeciesMap.values().stream().flatMap(Set::stream).collect(Collectors.toSet())));
|
|
| 74 | 85 | }
|
| 75 | 86 | |
| 76 | 87 | @Override
|
| ... | ... | @@ -92,4 +103,8 @@ public class SampleUIModelStates extends SampleContentTableUIModelStates<SampleD |
| 92 | 103 | return computed ? computedIcon : observedIcon;
|
| 93 | 104 | }
|
| 94 | 105 | |
| 106 | + public List<SpeciesFateReference> getSpeciesFate(SpeciesReference speciesReference) {
|
|
| 107 | + Set<String> availableSpeciesFateIds = speciesFateBySpeciesMap.get(speciesReference.getId());
|
|
| 108 | + return getReferenceCache().<SpeciesFateReference>getReferentialReferenceSet(SampleMeasureDto.PROPERTY_SPECIES_FATE).subSet(availableSpeciesFateIds).collect(Collectors.toList());
|
|
| 109 | + }
|
|
| 95 | 110 | } |
| ... | ... | @@ -35,6 +35,8 @@ import io.ultreia.java4all.http.spi.Nullable; |
| 35 | 35 | import io.ultreia.java4all.http.spi.Service;
|
| 36 | 36 | |
| 37 | 37 | import java.util.List;
|
| 38 | +import java.util.Map;
|
|
| 39 | +import java.util.Set;
|
|
| 38 | 40 | |
| 39 | 41 | /**
|
| 40 | 42 | * Created on 26/07/2021.
|
| ... | ... | @@ -61,6 +63,10 @@ public interface TripService extends TripAwareService { |
| 61 | 63 | @MethodCredential(Permission.READ_DATA)
|
| 62 | 64 | boolean isActivityEndOfSearchFound(String routeId);
|
| 63 | 65 | |
| 66 | + @Get
|
|
| 67 | + @MethodCredential(Permission.READ_DATA)
|
|
| 68 | + Map<String, Set<String>> getPsObservationCatchesSpeciesFateBySpeciesId(String setId);
|
|
| 69 | + |
|
| 64 | 70 | @Get
|
| 65 | 71 | @MethodCredential(Permission.WRITE_DATA)
|
| 66 | 72 | Form<fr.ird.observe.dto.data.ps.observation.FloatingObjectDto> preCreateObservationFloatingObject(String activityId, @Nullable FloatingObjectPreset floatingObjectPreset);
|
| ... | ... | @@ -26,13 +26,13 @@ import fr.ird.observe.dto.data.ps.observation.SampleDto; |
| 26 | 26 | import fr.ird.observe.dto.db.ConcurrentModificationException;
|
| 27 | 27 | import fr.ird.observe.dto.form.Form;
|
| 28 | 28 | import fr.ird.observe.dto.result.SaveResultDto;
|
| 29 | -import fr.ird.observe.entities.referential.common.Species;
|
|
| 30 | 29 | import fr.ird.observe.entities.referential.ps.common.SpeciesFate;
|
| 31 | 30 | import fr.ird.observe.spi.result.AddEntityToUpdateStep;
|
| 32 | 31 | import fr.ird.observe.spi.service.ServiceContext;
|
| 33 | 32 | |
| 34 | -import java.util.Objects;
|
|
| 35 | -import java.util.stream.Collectors;
|
|
| 33 | +import java.util.Map;
|
|
| 34 | +import java.util.TreeMap;
|
|
| 35 | +import java.util.TreeSet;
|
|
| 36 | 36 | |
| 37 | 37 | public class SampleSpi extends GeneratedSampleSpi {
|
| 38 | 38 | |
| ... | ... | @@ -45,8 +45,6 @@ public class SampleSpi extends GeneratedSampleSpi { |
| 45 | 45 | SampleDto dto = form.getObject();
|
| 46 | 46 | // always use the set id, //FIXME See why ?
|
| 47 | 47 | dto.setId(id);
|
| 48 | - dto.setAvailableSpeciesIds(parent.getCatches().stream().map(Catch::getSpecies).map(Species::getTopiaId).collect(Collectors.toSet()));
|
|
| 49 | - dto.setAvailableSpeciesFateIds(parent.getCatches().stream().map(Catch::getSpeciesFate).filter(Objects::nonNull).map(SpeciesFate::getTopiaId).collect(Collectors.toSet()));
|
|
| 50 | 48 | return form;
|
| 51 | 49 | }
|
| 52 | 50 | |
| ... | ... | @@ -64,7 +62,7 @@ public class SampleSpi extends GeneratedSampleSpi { |
| 64 | 62 | Sample.SPI.getDao(context).initId(entity);
|
| 65 | 63 | parent.addSample(entity);
|
| 66 | 64 | }
|
| 67 | - SampleMeasure.SPI.initId(context,entity.getSampleMeasure());
|
|
| 65 | + SampleMeasure.SPI.initId(context, entity.getSampleMeasure());
|
|
| 68 | 66 | context.getTopiaPersistenceContext().flush();
|
| 69 | 67 | AddEntityToUpdateStep saveHelper = newSaveHelper(context)
|
| 70 | 68 | .update(this, entity);
|
| ... | ... | @@ -74,6 +72,17 @@ public class SampleSpi extends GeneratedSampleSpi { |
| 74 | 72 | .build(entity);
|
| 75 | 73 | }
|
| 76 | 74 | |
| 75 | + public Map<String, java.util.Set<String>> getCatchesSpeciesFateBySpeciesId(ServiceContext context, String id) {
|
|
| 76 | + Set parent = Set.loadEntity(context, id);
|
|
| 77 | + Map<String, java.util.Set<String>> result = new TreeMap<>();
|
|
| 78 | + parent.getCatches().stream().filter(c -> c.getSpeciesFate() != null).forEach(aCatch -> {
|
|
| 79 | + String speciesId = aCatch.getSpecies().getId();
|
|
| 80 | + SpeciesFate speciesFate = aCatch.getSpeciesFate();
|
|
| 81 | + result.computeIfAbsent(speciesId, e -> new TreeSet<>()).add(speciesFate.getId());
|
|
| 82 | + });
|
|
| 83 | + return result;
|
|
| 84 | + }
|
|
| 85 | + |
|
| 77 | 86 | protected Sample loadSampleFormEntity(ServiceContext context, Set parent) {
|
| 78 | 87 | if (parent.isSampleEmpty()) {
|
| 79 | 88 | return Sample.newEntity(context.now());
|
| ... | ... | @@ -23,8 +23,6 @@ package fr.ird.observe.spi.migration.v9; |
| 23 | 23 | */
|
| 24 | 24 | |
| 25 | 25 | import com.google.auto.service.AutoService;
|
| 26 | -import fr.ird.observe.dto.StringCleaner;
|
|
| 27 | -import fr.ird.observe.persistence.SqlHelper;
|
|
| 28 | 26 | import fr.ird.observe.spi.migration.ByMajorMigrationVersionResource;
|
| 29 | 27 | import io.ultreia.java4all.util.Version;
|
| 30 | 28 | import io.ultreia.java4all.util.sql.SqlQuery;
|
| ... | ... | @@ -36,8 +34,6 @@ import org.nuiton.topia.service.migration.resources.MigrationVersionResourceExec |
| 36 | 34 | |
| 37 | 35 | import java.sql.PreparedStatement;
|
| 38 | 36 | import java.sql.ResultSet;
|
| 39 | -import java.sql.SQLException;
|
|
| 40 | -import java.sql.Timestamp;
|
|
| 41 | 37 | import java.util.LinkedHashSet;
|
| 42 | 38 | import java.util.List;
|
| 43 | 39 | import java.util.Map;
|
| ... | ... | @@ -61,6 +57,11 @@ public class DataSourceMigrationForVersion_9_0 extends ByMajorMigrationVersionRe |
| 61 | 57 | public static final String INFORMATION_SOURCE_U = "fr.ird.referential.ps.observation.InformationSource#1464000000000#03";
|
| 62 | 58 | public static final String SPECIES_FATE_5 = "fr.ird.referential.ps.common.SpeciesFate#1239832683619#0.6250731662108877";
|
| 63 | 59 | public static final String SPECIES_FATE_6 = "fr.ird.referential.ps.common.SpeciesFate#1239832683619#0.5722739932065866";
|
| 60 | + public static final Set<String> SMALL_SPECIES_TO_SPECIES_FATE_6 =
|
|
| 61 | + Set.of("fr.ird.referential.common.Species#1239832685476#0.5618871286604711", //ALB
|
|
| 62 | + "fr.ird.referential.common.Species#1239832685475#0.13349466123905152", //BET
|
|
| 63 | + "fr.ird.referential.common.Species#1239832685474#0.975344121171992", //SKJ
|
|
| 64 | + "fr.ird.referential.common.Species#1239832685474#0.8943253454598569"); //YFT
|
|
| 64 | 65 | public static final String SPECIES_FATE_15 = "fr.ird.referential.ps.common.SpeciesFate#1464000000000#15";
|
| 65 | 66 | |
| 66 | 67 | public DataSourceMigrationForVersion_9_0() {
|
| ... | ... | @@ -163,6 +164,7 @@ public class DataSourceMigrationForVersion_9_0 extends ByMajorMigrationVersionRe |
| 163 | 164 | executor.addScript("03_2", "migrate-table-ps_observation_catch_well");
|
| 164 | 165 | |
| 165 | 166 | // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2436
|
| 167 | + // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2539
|
|
| 166 | 168 | migrateSample(executor);
|
| 167 | 169 | }
|
| 168 | 170 | |
| ... | ... | @@ -283,319 +285,40 @@ public class DataSourceMigrationForVersion_9_0 extends ByMajorMigrationVersionRe |
| 283 | 285 | });
|
| 284 | 286 | }
|
| 285 | 287 | |
| 286 | - static class Sample {
|
|
| 287 | - String topiaId;
|
|
| 288 | - long topiaVersion;
|
|
| 289 | - Timestamp topiaCreateDate;
|
|
| 290 | - Timestamp lastUpdateDate;
|
|
| 291 | - String homeId;
|
|
| 292 | - String comment;
|
|
| 293 | - String set;
|
|
| 294 | - |
|
| 295 | - public Sample(ResultSet resultSet) throws SQLException {
|
|
| 296 | - this.topiaId = resultSet.getString(1);
|
|
| 297 | - this.topiaVersion = resultSet.getLong(2);
|
|
| 298 | - this.topiaCreateDate = resultSet.getTimestamp(3);
|
|
| 299 | - this.homeId = resultSet.getString(4);
|
|
| 300 | - this.comment = resultSet.getString(5);
|
|
| 301 | - this.set = resultSet.getString(6);
|
|
| 302 | - this.lastUpdateDate = resultSet.getTimestamp(7);
|
|
| 303 | - }
|
|
| 304 | - |
|
| 305 | - public void addHomeId(String homeId) {
|
|
| 306 | - if (homeId == null) {
|
|
| 307 | - return;
|
|
| 308 | - }
|
|
| 309 | - if (this.homeId == null) {
|
|
| 310 | - this.homeId = homeId;
|
|
| 311 | - return;
|
|
| 312 | - }
|
|
| 313 | - this.homeId += " - " + homeId;
|
|
| 314 | - }
|
|
| 315 | - |
|
| 316 | - public void addComment(String comment) {
|
|
| 317 | - if (comment == null) {
|
|
| 318 | - return;
|
|
| 319 | - }
|
|
| 320 | - if (this.comment == null) {
|
|
| 321 | - this.comment = comment;
|
|
| 322 | - return;
|
|
| 323 | - }
|
|
| 324 | - this.comment += " \n " + comment;
|
|
| 325 | - }
|
|
| 326 | - |
|
| 327 | - }
|
|
| 328 | - |
|
| 329 | - |
|
| 330 | - static class SampleMeasure {
|
|
| 331 | - String topiaId;
|
|
| 332 | - long topiaVersion;
|
|
| 333 | - Timestamp topiaCreateDate;
|
|
| 334 | - Timestamp lastUpdateDate;
|
|
| 335 | - String homeId;
|
|
| 336 | - Float length;
|
|
| 337 | - Boolean isLengthComputed;
|
|
| 338 | - String picturesReferences;
|
|
| 339 | - Float weight;
|
|
| 340 | - Boolean isWeightComputed;
|
|
| 341 | - int count;
|
|
| 342 | - int acquisitionMode;
|
|
| 343 | - String species;
|
|
| 344 | - String sample;
|
|
| 345 | - String sex;
|
|
| 346 | - String sizeMeasureType;
|
|
| 347 | - String weightMeasureType;
|
|
| 348 | - String tagNumber;
|
|
| 349 | - String speciesFate;
|
|
| 350 | - int sample_idx;
|
|
| 351 | - String lengthMeasureMethod;
|
|
| 352 | - String weightMeasureMethod;
|
|
| 353 | - |
|
| 354 | - public SampleMeasure(ResultSet resultSet) throws SQLException {
|
|
| 355 | - this.topiaId = resultSet.getString(1);
|
|
| 356 | - this.topiaVersion = resultSet.getLong(2);
|
|
| 357 | - this.topiaCreateDate = resultSet.getTimestamp(3);
|
|
| 358 | - this.homeId = resultSet.getString(4);
|
|
| 359 | - this.length = resultSet.getFloat(5);
|
|
| 360 | - this.isLengthComputed = resultSet.getBoolean(6);
|
|
| 361 | - this.picturesReferences = resultSet.getString(7);
|
|
| 362 | - this.weight = resultSet.getFloat(8);
|
|
| 363 | - this.isWeightComputed = resultSet.getBoolean(9);
|
|
| 364 | - this.count = resultSet.getInt(10);
|
|
| 365 | - this.acquisitionMode = resultSet.getInt(11);
|
|
| 366 | - this.species = resultSet.getString(12);
|
|
| 367 | - this.sample = resultSet.getString(13);
|
|
| 368 | - this.sex = resultSet.getString(14);
|
|
| 369 | - this.lastUpdateDate = resultSet.getTimestamp(15);
|
|
| 370 | - this.sizeMeasureType = resultSet.getString(16);
|
|
| 371 | - this.weightMeasureType = resultSet.getString(17);
|
|
| 372 | - this.tagNumber = resultSet.getString(18);
|
|
| 373 | - this.speciesFate = resultSet.getString(19);
|
|
| 374 | - this.sample_idx = resultSet.getInt(20);
|
|
| 375 | - this.lengthMeasureMethod = resultSet.getString(21);
|
|
| 376 | - this.weightMeasureMethod = resultSet.getString(22);
|
|
| 377 | - // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2503
|
|
| 378 | - if (acquisitionMode == 0 && weight != null && !isWeightComputed) {
|
|
| 379 | - isWeightComputed = true;
|
|
| 380 | - }
|
|
| 381 | - }
|
|
| 382 | - |
|
| 383 | - }
|
|
| 384 | 288 | |
| 385 | 289 | private void migrateSample(MigrationVersionResourceExecutor executor) {
|
| 386 | 290 | |
| 387 | - Map<String, Sample> setToSampleMap = new TreeMap<>();
|
|
| 291 | + Map<String, SampleRecord> setToSampleMap = new TreeMap<>();
|
|
| 388 | 292 | Map<String, String> sampleMapping = new TreeMap<>();
|
| 389 | 293 | |
| 390 | - addSample(executor, setToSampleMap, sampleMapping, "SELECT REPLACE(topiaId, '.NonTargetSample', '.Sample'), topiaVersion, topiaCreateDate, homeId, comment, set, lastUpdateDate FROM ps_observation.nontargetsample order by set, topiaId");
|
|
| 391 | - |
|
| 392 | - addSample(executor, setToSampleMap, sampleMapping, "SELECT REPLACE(topiaId, '.TargetSample', '.Sample'), topiaVersion, topiaCreateDate, homeId, comment, set, lastUpdateDate FROM ps_observation.targetsample order by set, topiaId");
|
|
| 294 | + executor.doSqlWork(connection -> {
|
|
| 295 | + SampleRecord.addNonTargetSample(connection, setToSampleMap, sampleMapping);
|
|
| 296 | + SampleRecord.addTargetSample(connection, setToSampleMap, sampleMapping);
|
|
| 297 | + });
|
|
| 393 | 298 | |
| 394 | 299 | Function<String, String> stringFormat = executor.commentFormat();
|
| 395 | - for (Sample sample : setToSampleMap.values()) {
|
|
| 396 | - executor.writeSql(String.format("INSERT INTO ps_observation.Sample(topiaId, topiaVersion, topiaCreateDate, homeId, comment, set, lastUpdateDate) VALUES('%s', %s, '%s'::timestamp, %s, %s, '%s', '%s'::timestamp);",
|
|
| 397 | - sample.topiaId,
|
|
| 398 | - sample.topiaVersion,
|
|
| 399 | - sample.topiaCreateDate,
|
|
| 400 | - SqlHelper.escapeString(StringCleaner.ALL.apply(sample.homeId)),
|
|
| 401 | - stringFormat.apply(sample.comment),
|
|
| 402 | - sample.set,
|
|
| 403 | - sample.lastUpdateDate
|
|
| 404 | - ));
|
|
| 300 | + for (SampleRecord sample : setToSampleMap.values()) {
|
|
| 301 | + executor.writeSql(sample.toSampleSql(stringFormat));
|
|
| 405 | 302 | }
|
| 406 | 303 | |
| 407 | 304 | migrateSampleMeasure(executor, sampleMapping);
|
| 408 | 305 | }
|
| 409 | 306 | |
| 410 | 307 | private void migrateSampleMeasure(MigrationVersionResourceExecutor executor, Map<String, String> sampleMapping) {
|
| 411 | - // nonTargetSampleMeasure
|
|
| 412 | - addSampleMeasure(executor, sampleMapping, "SELECT " +
|
|
| 413 | - "REPLACE(topiaId, '.NonTargetLength', '.SampleMeasure'), " +
|
|
| 414 | - "topiaVersion + 1, " +
|
|
| 415 | - "topiaCreateDate, " +
|
|
| 416 | - "homeId, " +
|
|
| 417 | - "length, " +
|
|
| 418 | - "isLengthComputed, " +
|
|
| 419 | - "picturesReferences, " +
|
|
| 420 | - "weight, " +
|
|
| 421 | - "isWeightComputed, " +
|
|
| 422 | - "count, " +
|
|
| 423 | - "acquisitionMode, " +
|
|
| 424 | - "species, " +
|
|
| 425 | - "REPLACE(nonTargetSample, '.NonTargetSample', '.Sample'), " +
|
|
| 426 | - "sex, " +
|
|
| 427 | - "lastUpdateDate, " +
|
|
| 428 | - "sizeMeasureType, " +
|
|
| 429 | - "weightMeasureType, " +
|
|
| 430 | - "tagNumber, " +
|
|
| 431 | - "speciesFate, " +
|
|
| 432 | - "nonTargetSample_idx, " +
|
|
| 433 | - "lengthMeasureMethod, " +
|
|
| 434 | - "weightMeasureMethod " +
|
|
| 435 | - "FROM ps_observation.NonTargetLength");
|
|
| 436 | - |
|
| 437 | - // discardedTargetSampleMeasure
|
|
| 438 | - addSampleMeasure(executor, sampleMapping, "SELECT " +
|
|
| 439 | - "REPLACE(tl.topiaId, '.TargetLength', '.SampleMeasure'), " +
|
|
| 440 | - "tl.topiaVersion + 1, " +
|
|
| 441 | - "tl.topiaCreateDate, " +
|
|
| 442 | - "tl.homeId, " +
|
|
| 443 | - "tl.length, " +
|
|
| 444 | - "tl.isLengthComputed, " +
|
|
| 445 | - "NULL, " +
|
|
| 446 | - "tl.weight, " +
|
|
| 447 | - "tl.isWeightComputed, " +
|
|
| 448 | - "tl.count, " +
|
|
| 449 | - "tl.acquisitionMode, " +
|
|
| 450 | - "tl.species, " +
|
|
| 451 | - "REPLACE(tl.targetSample, '.TargetSample', '.Sample'), " +
|
|
| 452 | - "'fr.ird.referential.common.Sex#1239832686121#0.0', " +
|
|
| 453 | - "tl.lastUpdateDate, " +
|
|
| 454 | - "tl.sizeMeasureType, " +
|
|
| 455 | - "tl.weightMeasureType, " +
|
|
| 456 | - "tl.tagNumber, " +
|
|
| 457 | - "'fr.ird.referential.ps.common.SpeciesFate#1239832683619#0.6250731662108877', " +
|
|
| 458 | - "-tl.targetsample_idx, " +
|
|
| 459 | - "tl.lengthMeasureMethod, " +
|
|
| 460 | - "tl.weightMeasureMethod " +
|
|
| 461 | - "FROM ps_observation.TargetSample ts " +
|
|
| 462 | - "INNER JOIN ps_observation.TargetLength tl ON (tl.targetSample=ts.topiaId) " +
|
|
| 463 | - "WHERE ts.discarded");
|
|
| 464 | - |
|
| 465 | - // notDiscardedTargetSampleMeasure
|
|
| 466 | - addSampleMeasure(executor, sampleMapping, "SELECT " +
|
|
| 467 | - "REPLACE(tl.topiaId, '.TargetLength', '.SampleMeasure'), " +
|
|
| 468 | - "tl.topiaVersion + 1, " +
|
|
| 469 | - "tl.topiaCreateDate, " +
|
|
| 470 | - "tl.homeId, " +
|
|
| 471 | - "tl.length, " +
|
|
| 472 | - "tl.isLengthComputed, " +
|
|
| 473 | - "NULL, " +
|
|
| 474 | - "tl.weight, " +
|
|
| 475 | - "tl.isWeightComputed, " +
|
|
| 476 | - "tl.count, " +
|
|
| 477 | - "tl.acquisitionMode, " +
|
|
| 478 | - "tl.species, " +
|
|
| 479 | - "REPLACE(tl.targetSample, '.TargetSample', '.Sample'), " +
|
|
| 480 | - "'fr.ird.referential.common.Sex#1239832686121#0.0', " +
|
|
| 481 | - "tl.lastUpdateDate, " +
|
|
| 482 | - "tl.sizeMeasureType, " +
|
|
| 483 | - "tl.weightMeasureType, " +
|
|
| 484 | - "tl.tagNumber, " +
|
|
| 485 | - "'fr.ird.referential.ps.common.SpeciesFate#1239832683619#0.5722739932065866', " +
|
|
| 486 | - "-tl.targetsample_idx, " +
|
|
| 487 | - "tl.lengthMeasureMethod, " +
|
|
| 488 | - "tl.weightMeasureMethod " +
|
|
| 489 | - "FROM ps_observation.TargetSample ts " +
|
|
| 490 | - "INNER JOIN ps_observation.TargetLength tl ON (tl.targetSample=ts.topiaId) " +
|
|
| 491 | - "WHERE NOT ts.discarded");
|
|
| 492 | - }
|
|
| 493 | - |
|
| 494 | - private void addSample(MigrationVersionResourceExecutor executor, Map<String, Sample> setToSampleMap, Map<String, String> sampleMapping, String query) {
|
|
| 495 | - List<Sample> targetSample = executor.findMultipleResult(SqlQuery.wrap(query, Sample::new));
|
|
| 496 | - for (Sample sample : targetSample) {
|
|
| 497 | - Sample existingSample = setToSampleMap.get(sample.set);
|
|
| 498 | - if (existingSample == null) {
|
|
| 499 | - // new sample
|
|
| 500 | - setToSampleMap.put(sample.set, sample);
|
|
| 501 | - } else {
|
|
| 502 | - // add to sample mapping
|
|
| 503 | - sampleMapping.put(sample.topiaId, existingSample.topiaId);
|
|
| 504 | - // update homeId
|
|
| 505 | - existingSample.addHomeId(sample.homeId);
|
|
| 506 | - // update comment
|
|
| 507 | - existingSample.addComment(sample.comment);
|
|
| 508 | - }
|
|
| 509 | - }
|
|
| 510 | - }
|
|
| 511 | - |
|
| 512 | - private void addSampleMeasure(MigrationVersionResourceExecutor executor, Map<String, String> sampleMapping, String query) {
|
|
| 513 | - List<SampleMeasure> sampleMeasureList = executor.findMultipleResult(SqlQuery.wrap(query, SampleMeasure::new));
|
|
| 514 | - for (SampleMeasure sampleMeasure : sampleMeasureList) {
|
|
| 515 | - String sampleId = sampleMapping.get(sampleMeasure.sample);
|
|
| 516 | - if (sampleId == null) {
|
|
| 517 | - sampleId = sampleMeasure.sample;
|
|
| 518 | - }
|
|
| 519 | - executor.writeSql(String.format("INSERT INTO ps_observation.SampleMeasure(" +
|
|
| 520 | - " topiaId," +
|
|
| 521 | - " topiaVersion," +
|
|
| 522 | - " topiaCreateDate," +
|
|
| 523 | - " homeId," +
|
|
| 524 | - " length," +
|
|
| 525 | - " isLengthComputed," +
|
|
| 526 | - " picturesReferences," +
|
|
| 527 | - " weight," +
|
|
| 528 | - " isWeightComputed," +
|
|
| 529 | - " count," +
|
|
| 530 | - " acquisitionMode," +
|
|
| 531 | - " species," +
|
|
| 532 | - " sample," +
|
|
| 533 | - " sex," +
|
|
| 534 | - " lastUpdateDate," +
|
|
| 535 | - " sizeMeasureType," +
|
|
| 536 | - " weightMeasureType," +
|
|
| 537 | - " tagNumber," +
|
|
| 538 | - " speciesFate," +
|
|
| 539 | - " sample_idx," +
|
|
| 540 | - " lengthMeasureMethod," +
|
|
| 541 | - " weightMeasureMethod)" +
|
|
| 542 | - " VALUES(" +
|
|
| 543 | - "'%s', " +
|
|
| 544 | - "%s, " +
|
|
| 545 | - "'%s'::timestamp, " +
|
|
| 546 | - "%s, " +
|
|
| 547 | - "%s, " +
|
|
| 548 | - "%s, " +
|
|
| 549 | - "%s, " +
|
|
| 550 | - "%s, " +
|
|
| 551 | - "%s, " +
|
|
| 552 | - "%s, " +
|
|
| 553 | - "%s, " +
|
|
| 554 | - "%s, " +
|
|
| 555 | - "'%s', " +
|
|
| 556 | - "%s, " +
|
|
| 557 | - "'%s'::timestamp, " +
|
|
| 558 | - "%s, " +
|
|
| 559 | - "%s, " +
|
|
| 560 | - "%s, " +
|
|
| 561 | - "%s, " +
|
|
| 562 | - "%s, " +
|
|
| 563 | - "%s, " +
|
|
| 564 | - "%s " +
|
|
| 565 | - ");",
|
|
| 566 | - sampleMeasure.topiaId,
|
|
| 567 | - sampleMeasure.topiaVersion,
|
|
| 568 | - sampleMeasure.topiaCreateDate,
|
|
| 569 | - SqlHelper.escapeString(sampleMeasure.homeId == null ? null : sampleMeasure.homeId.replaceAll("'", "")),
|
|
| 570 | - sampleMeasure.length,
|
|
| 571 | - sampleMeasure.isLengthComputed,
|
|
| 572 | - SqlHelper.escapeString(sampleMeasure.picturesReferences == null ? null : sampleMeasure.picturesReferences.replaceAll("'", "")),
|
|
| 573 | - sampleMeasure.weight,
|
|
| 574 | - sampleMeasure.isWeightComputed,
|
|
| 575 | - sampleMeasure.count,
|
|
| 576 | - sampleMeasure.acquisitionMode,
|
|
| 577 | - SqlHelper.escapeString(sampleMeasure.species),
|
|
| 578 | - sampleId,
|
|
| 579 | - SqlHelper.escapeString(sampleMeasure.sex),
|
|
| 580 | - sampleMeasure.lastUpdateDate,
|
|
| 581 | - SqlHelper.escapeString(sampleMeasure.sizeMeasureType),
|
|
| 582 | - SqlHelper.escapeString(sampleMeasure.weightMeasureType),
|
|
| 583 | - SqlHelper.escapeString(sampleMeasure.tagNumber),
|
|
| 584 | - SqlHelper.escapeString(sampleMeasure.speciesFate),
|
|
| 585 | - sampleMeasure.sample_idx,
|
|
| 586 | - SqlHelper.escapeString(sampleMeasure.lengthMeasureMethod),
|
|
| 587 | - SqlHelper.escapeString(sampleMeasure.weightMeasureMethod)
|
|
| 588 | - ));
|
|
| 589 | - }
|
|
| 308 | + executor.doSqlWork(connection -> {
|
|
| 309 | + SampleMeasureRecord.addNonTargetSampleMeasure(connection, executor, sampleMapping);
|
|
| 310 | + SampleMeasureRecord.addDiscardedTargetSampleMeasure(connection, executor, sampleMapping);
|
|
| 311 | + SampleMeasureRecord.addNotDiscardedTargetSampleMeasure(connection, executor, sampleMapping);
|
|
| 312 | + });
|
|
| 590 | 313 | }
|
| 591 | 314 | |
| 592 | 315 | @Override
|
| 593 | 316 | public void generateFinalizeSqlScript(MigrationVersionResourceExecutor executor) {
|
| 594 | 317 | long stringFixedCount = new FixStringHelper(executor).execute();
|
| 318 | + long commentFixedCount = new FixCommentHelper(executor).execute();
|
|
| 595 | 319 | if (stringFixedCount > 0) {
|
| 596 | 320 | log.warn(String.format("Fix %s string rows(s).", stringFixedCount));
|
| 597 | 321 | }
|
| 598 | - long commentFixedCount = new FixCommentHelper(executor).execute();
|
|
| 599 | 322 | if (commentFixedCount > 0) {
|
| 600 | 323 | log.warn(String.format("Fix %s comment rows(s).", commentFixedCount));
|
| 601 | 324 | }
|
| 1 | +package fr.ird.observe.spi.migration.v9;
|
|
| 2 | + |
|
| 3 | +/*-
|
|
| 4 | + * #%L
|
|
| 5 | + * ObServe Core :: Persistence :: Resources
|
|
| 6 | + * %%
|
|
| 7 | + * Copyright (C) 2008 - 2022 IRD, Ultreia.io
|
|
| 8 | + * %%
|
|
| 9 | + * This program is free software: you can redistribute it and/or modify
|
|
| 10 | + * it under the terms of the GNU General Public License as
|
|
| 11 | + * published by the Free Software Foundation, either version 3 of the
|
|
| 12 | + * License, or (at your option) any later version.
|
|
| 13 | + *
|
|
| 14 | + * This program is distributed in the hope that it will be useful,
|
|
| 15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 17 | + * GNU General Public License for more details.
|
|
| 18 | + *
|
|
| 19 | + * You should have received a copy of the GNU General Public
|
|
| 20 | + * License along with this program. If not, see
|
|
| 21 | + * <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 22 | + * #L%
|
|
| 23 | + */
|
|
| 24 | + |
|
| 25 | +import fr.ird.observe.persistence.SqlHelper;
|
|
| 26 | +import org.nuiton.topia.service.migration.resources.MigrationVersionResourceExecutor;
|
|
| 27 | + |
|
| 28 | +import java.sql.Connection;
|
|
| 29 | +import java.sql.PreparedStatement;
|
|
| 30 | +import java.sql.ResultSet;
|
|
| 31 | +import java.sql.SQLException;
|
|
| 32 | +import java.sql.Timestamp;
|
|
| 33 | +import java.util.Map;
|
|
| 34 | +import java.util.function.Function;
|
|
| 35 | + |
|
| 36 | +/**
|
|
| 37 | + * Created on 20/11/2022.
|
|
| 38 | + *
|
|
| 39 | + * @author Tony Chemit - dev@tchemit.fr
|
|
| 40 | + * @since 9.0.18
|
|
| 41 | + */
|
|
| 42 | +class SampleMeasureRecord {
|
|
| 43 | + |
|
| 44 | + static void addNonTargetSampleMeasure(Connection connection, MigrationVersionResourceExecutor executor, Map<String, String> sampleMapping) throws SQLException {
|
|
| 45 | + addSampleMeasure(connection, executor, sampleMapping, "SELECT " +
|
|
| 46 | + "REPLACE(topiaId, '.NonTargetLength', '.SampleMeasure'), " +
|
|
| 47 | + "topiaVersion + 1, " +
|
|
| 48 | + "topiaCreateDate, " +
|
|
| 49 | + "homeId, " +
|
|
| 50 | + "length, " +
|
|
| 51 | + "isLengthComputed, " +
|
|
| 52 | + "picturesReferences, " +
|
|
| 53 | + "weight, " +
|
|
| 54 | + "isWeightComputed, " +
|
|
| 55 | + "count, " +
|
|
| 56 | + "acquisitionMode, " +
|
|
| 57 | + "species, " +
|
|
| 58 | + "REPLACE(nonTargetSample, '.NonTargetSample', '.Sample'), " +
|
|
| 59 | + "sex, " +
|
|
| 60 | + "lastUpdateDate, " +
|
|
| 61 | + "sizeMeasureType, " +
|
|
| 62 | + "weightMeasureType, " +
|
|
| 63 | + "tagNumber, " +
|
|
| 64 | + "speciesFate, " +
|
|
| 65 | + "nonTargetSample_idx, " +
|
|
| 66 | + "lengthMeasureMethod, " +
|
|
| 67 | + "weightMeasureMethod " +
|
|
| 68 | + "FROM ps_observation.NonTargetLength",
|
|
| 69 | + SampleMeasureRecord::toNonTargetSpeciesFate);
|
|
| 70 | + }
|
|
| 71 | + |
|
| 72 | + static void addDiscardedTargetSampleMeasure(Connection connection, MigrationVersionResourceExecutor executor, Map<String, String> sampleMapping) throws SQLException {
|
|
| 73 | + addSampleMeasure(connection, executor, sampleMapping, "SELECT " +
|
|
| 74 | + "REPLACE(tl.topiaId, '.TargetLength', '.SampleMeasure'), " +
|
|
| 75 | + "tl.topiaVersion + 1, " +
|
|
| 76 | + "tl.topiaCreateDate, " +
|
|
| 77 | + "tl.homeId, " +
|
|
| 78 | + "tl.length, " +
|
|
| 79 | + "tl.isLengthComputed, " +
|
|
| 80 | + "NULL, " +
|
|
| 81 | + "tl.weight, " +
|
|
| 82 | + "tl.isWeightComputed, " +
|
|
| 83 | + "tl.count, " +
|
|
| 84 | + "tl.acquisitionMode, " +
|
|
| 85 | + "tl.species, " +
|
|
| 86 | + "REPLACE(tl.targetSample, '.TargetSample', '.Sample'), " +
|
|
| 87 | + "'fr.ird.referential.common.Sex#1239832686121#0.0', " +
|
|
| 88 | + "tl.lastUpdateDate, " +
|
|
| 89 | + "tl.sizeMeasureType, " +
|
|
| 90 | + "tl.weightMeasureType, " +
|
|
| 91 | + "tl.tagNumber, " +
|
|
| 92 | + "'fr.ird.referential.ps.common.SpeciesFate#1239832683619#0.6250731662108877', " +
|
|
| 93 | + "-tl.targetSample_idx, " +
|
|
| 94 | + "tl.lengthMeasureMethod, " +
|
|
| 95 | + "tl.weightMeasureMethod " +
|
|
| 96 | + "FROM ps_observation.TargetSample ts " +
|
|
| 97 | + "INNER JOIN ps_observation.TargetLength tl ON (tl.targetSample=ts.topiaId) " +
|
|
| 98 | + "WHERE ts.discarded",
|
|
| 99 | + SampleMeasureRecord::toDiscardedTargetSpeciesFate);
|
|
| 100 | + }
|
|
| 101 | + |
|
| 102 | + static void addNotDiscardedTargetSampleMeasure(Connection connection, MigrationVersionResourceExecutor executor, Map<String, String> sampleMapping) throws SQLException {
|
|
| 103 | + addSampleMeasure(connection, executor, sampleMapping, "SELECT " +
|
|
| 104 | + "REPLACE(tl.topiaId, '.TargetLength', '.SampleMeasure'), " +
|
|
| 105 | + "tl.topiaVersion + 1, " +
|
|
| 106 | + "tl.topiaCreateDate, " +
|
|
| 107 | + "tl.homeId, " +
|
|
| 108 | + "tl.length, " +
|
|
| 109 | + "tl.isLengthComputed, " +
|
|
| 110 | + "NULL, " +
|
|
| 111 | + "tl.weight, " +
|
|
| 112 | + "tl.isWeightComputed, " +
|
|
| 113 | + "tl.count, " +
|
|
| 114 | + "tl.acquisitionMode, " +
|
|
| 115 | + "tl.species, " +
|
|
| 116 | + "REPLACE(tl.targetSample, '.TargetSample', '.Sample'), " +
|
|
| 117 | + "'fr.ird.referential.common.Sex#1239832686121#0.0', " +
|
|
| 118 | + "tl.lastUpdateDate, " +
|
|
| 119 | + "tl.sizeMeasureType, " +
|
|
| 120 | + "tl.weightMeasureType, " +
|
|
| 121 | + "tl.tagNumber, " +
|
|
| 122 | + "'fr.ird.referential.ps.common.SpeciesFate#1239832683619#0.5722739932065866', " +
|
|
| 123 | + "-tl.targetSample_idx, " +
|
|
| 124 | + "tl.lengthMeasureMethod, " +
|
|
| 125 | + "tl.weightMeasureMethod " +
|
|
| 126 | + "FROM ps_observation.TargetSample ts " +
|
|
| 127 | + "INNER JOIN ps_observation.TargetLength tl ON (tl.targetSample=ts.topiaId) " +
|
|
| 128 | + "WHERE NOT ts.discarded",
|
|
| 129 | + SampleMeasureRecord::toNotDiscardedTargetSpeciesFate);
|
|
| 130 | + }
|
|
| 131 | + |
|
| 132 | + static void addSampleMeasure(Connection connection, MigrationVersionResourceExecutor executor, Map<String, String> sampleMapping, String query, Function<SampleMeasureRecord, String> speciesFateSupplier) throws SQLException {
|
|
| 133 | + |
|
| 134 | + try (PreparedStatement statement = connection.prepareStatement(query)) {
|
|
| 135 | + try (ResultSet resultSet = statement.executeQuery()) {
|
|
| 136 | + while (resultSet.next()) {
|
|
| 137 | + SampleMeasureRecord sampleMeasure = new SampleMeasureRecord(resultSet);
|
|
| 138 | + String sampleId = sampleMapping.get(sampleMeasure.sample);
|
|
| 139 | + if (sampleId == null) {
|
|
| 140 | + sampleId = sampleMeasure.sample;
|
|
| 141 | + }
|
|
| 142 | + executor.writeSql(sampleMeasure.toSampleMeasureSql(sampleId, speciesFateSupplier));
|
|
| 143 | + }
|
|
| 144 | + }
|
|
| 145 | + }
|
|
| 146 | + }
|
|
| 147 | + |
|
| 148 | + String topiaId;
|
|
| 149 | + long topiaVersion;
|
|
| 150 | + Timestamp topiaCreateDate;
|
|
| 151 | + Timestamp lastUpdateDate;
|
|
| 152 | + String homeId;
|
|
| 153 | + Float length;
|
|
| 154 | + Boolean isLengthComputed;
|
|
| 155 | + String picturesReferences;
|
|
| 156 | + Float weight;
|
|
| 157 | + Boolean isWeightComputed;
|
|
| 158 | + int count;
|
|
| 159 | + int acquisitionMode;
|
|
| 160 | + String species;
|
|
| 161 | + String sample;
|
|
| 162 | + String sex;
|
|
| 163 | + String sizeMeasureType;
|
|
| 164 | + String weightMeasureType;
|
|
| 165 | + String tagNumber;
|
|
| 166 | + String speciesFate;
|
|
| 167 | + int sample_idx;
|
|
| 168 | + String lengthMeasureMethod;
|
|
| 169 | + String weightMeasureMethod;
|
|
| 170 | + |
|
| 171 | + |
|
| 172 | + private String toNonTargetSpeciesFate() {
|
|
| 173 | + if (speciesFate == null) {
|
|
| 174 | + return null;
|
|
| 175 | + }
|
|
| 176 | + if (DataSourceMigrationForVersion_9_0.SPECIES_FATE_6.equals(speciesFate)) {
|
|
| 177 | + // like for non target catches always change from speciesFate 6 to 15
|
|
| 178 | + speciesFate = DataSourceMigrationForVersion_9_0.SPECIES_FATE_15;
|
|
| 179 | + }
|
|
| 180 | + return speciesFate;
|
|
| 181 | + }
|
|
| 182 | + |
|
| 183 | + private String toDiscardedTargetSpeciesFate() {
|
|
| 184 | + // Discarded target species use always speciesFate 5 (and we have it from the sql query)
|
|
| 185 | + return speciesFate;
|
|
| 186 | + |
|
| 187 | + }
|
|
| 188 | + |
|
| 189 | + private String toNotDiscardedTargetSpeciesFate() {
|
|
| 190 | + // by default we use in sql query speciesFate = 6
|
|
| 191 | + // for small species, they are always with speciesFate = 15
|
|
| 192 | + |
|
| 193 | + if (!DataSourceMigrationForVersion_9_0.SMALL_SPECIES_TO_SPECIES_FATE_6.contains(species)) {
|
|
| 194 | + speciesFate = DataSourceMigrationForVersion_9_0.SPECIES_FATE_15;
|
|
| 195 | + }
|
|
| 196 | + return speciesFate;
|
|
| 197 | + }
|
|
| 198 | + |
|
| 199 | + public SampleMeasureRecord(ResultSet resultSet) throws SQLException {
|
|
| 200 | + this.topiaId = resultSet.getString(1);
|
|
| 201 | + this.topiaVersion = resultSet.getLong(2);
|
|
| 202 | + this.topiaCreateDate = resultSet.getTimestamp(3);
|
|
| 203 | + this.homeId = resultSet.getString(4);
|
|
| 204 | + this.length = resultSet.getFloat(5);
|
|
| 205 | + this.isLengthComputed = resultSet.getBoolean(6);
|
|
| 206 | + this.picturesReferences = resultSet.getString(7);
|
|
| 207 | + this.weight = resultSet.getFloat(8);
|
|
| 208 | + this.isWeightComputed = resultSet.getBoolean(9);
|
|
| 209 | + this.count = resultSet.getInt(10);
|
|
| 210 | + this.acquisitionMode = resultSet.getInt(11);
|
|
| 211 | + this.species = resultSet.getString(12);
|
|
| 212 | + this.sample = resultSet.getString(13);
|
|
| 213 | + this.sex = resultSet.getString(14);
|
|
| 214 | + this.lastUpdateDate = resultSet.getTimestamp(15);
|
|
| 215 | + this.sizeMeasureType = resultSet.getString(16);
|
|
| 216 | + this.weightMeasureType = resultSet.getString(17);
|
|
| 217 | + this.tagNumber = resultSet.getString(18);
|
|
| 218 | + this.speciesFate = resultSet.getString(19);
|
|
| 219 | + this.sample_idx = resultSet.getInt(20);
|
|
| 220 | + this.lengthMeasureMethod = resultSet.getString(21);
|
|
| 221 | + this.weightMeasureMethod = resultSet.getString(22);
|
|
| 222 | + // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2503
|
|
| 223 | + if (acquisitionMode == 0 && weight != null && !isWeightComputed) {
|
|
| 224 | + isWeightComputed = true;
|
|
| 225 | + }
|
|
| 226 | + }
|
|
| 227 | + |
|
| 228 | + String toSampleMeasureSql(String sampleId, Function<SampleMeasureRecord, String> speciesFateSupplier) {
|
|
| 229 | + return String.format("INSERT INTO ps_observation.SampleMeasure(" +
|
|
| 230 | + " topiaId," +
|
|
| 231 | + " topiaVersion," +
|
|
| 232 | + " topiaCreateDate," +
|
|
| 233 | + " homeId," +
|
|
| 234 | + " length," +
|
|
| 235 | + " isLengthComputed," +
|
|
| 236 | + " picturesReferences," +
|
|
| 237 | + " weight," +
|
|
| 238 | + " isWeightComputed," +
|
|
| 239 | + " count," +
|
|
| 240 | + " acquisitionMode," +
|
|
| 241 | + " species," +
|
|
| 242 | + " sample," +
|
|
| 243 | + " sex," +
|
|
| 244 | + " lastUpdateDate," +
|
|
| 245 | + " sizeMeasureType," +
|
|
| 246 | + " weightMeasureType," +
|
|
| 247 | + " tagNumber," +
|
|
| 248 | + " speciesFate," +
|
|
| 249 | + " sample_idx," +
|
|
| 250 | + " lengthMeasureMethod," +
|
|
| 251 | + " weightMeasureMethod)" +
|
|
| 252 | + " VALUES(" +
|
|
| 253 | + "'%s', " +
|
|
| 254 | + "%s, " +
|
|
| 255 | + "'%s'::timestamp, " +
|
|
| 256 | + "%s, " +
|
|
| 257 | + "%s, " +
|
|
| 258 | + "%s, " +
|
|
| 259 | + "%s, " +
|
|
| 260 | + "%s, " +
|
|
| 261 | + "%s, " +
|
|
| 262 | + "%s, " +
|
|
| 263 | + "%s, " +
|
|
| 264 | + "%s, " +
|
|
| 265 | + "'%s', " +
|
|
| 266 | + "%s, " +
|
|
| 267 | + "'%s'::timestamp, " +
|
|
| 268 | + "%s, " +
|
|
| 269 | + "%s, " +
|
|
| 270 | + "%s, " +
|
|
| 271 | + "%s, " +
|
|
| 272 | + "%s, " +
|
|
| 273 | + "%s, " +
|
|
| 274 | + "%s " +
|
|
| 275 | + ");",
|
|
| 276 | + topiaId,
|
|
| 277 | + topiaVersion,
|
|
| 278 | + topiaCreateDate,
|
|
| 279 | + SqlHelper.escapeString(homeId == null ? null : homeId.replaceAll("'", "")),
|
|
| 280 | + length,
|
|
| 281 | + isLengthComputed,
|
|
| 282 | + SqlHelper.escapeString(picturesReferences == null ? null : picturesReferences.replaceAll("'", "")),
|
|
| 283 | + weight,
|
|
| 284 | + isWeightComputed,
|
|
| 285 | + count,
|
|
| 286 | + acquisitionMode,
|
|
| 287 | + SqlHelper.escapeString(species),
|
|
| 288 | + sampleId,
|
|
| 289 | + SqlHelper.escapeString(sex),
|
|
| 290 | + lastUpdateDate,
|
|
| 291 | + SqlHelper.escapeString(sizeMeasureType),
|
|
| 292 | + SqlHelper.escapeString(weightMeasureType),
|
|
| 293 | + SqlHelper.escapeString(tagNumber),
|
|
| 294 | + SqlHelper.escapeString(speciesFateSupplier.apply(this)),
|
|
| 295 | + sample_idx,
|
|
| 296 | + SqlHelper.escapeString(lengthMeasureMethod),
|
|
| 297 | + SqlHelper.escapeString(weightMeasureMethod)
|
|
| 298 | + );
|
|
| 299 | + }
|
|
| 300 | + |
|
| 301 | +} |
| 1 | +package fr.ird.observe.spi.migration.v9;
|
|
| 2 | + |
|
| 3 | +/*-
|
|
| 4 | + * #%L
|
|
| 5 | + * ObServe Core :: Persistence :: Resources
|
|
| 6 | + * %%
|
|
| 7 | + * Copyright (C) 2008 - 2022 IRD, Ultreia.io
|
|
| 8 | + * %%
|
|
| 9 | + * This program is free software: you can redistribute it and/or modify
|
|
| 10 | + * it under the terms of the GNU General Public License as
|
|
| 11 | + * published by the Free Software Foundation, either version 3 of the
|
|
| 12 | + * License, or (at your option) any later version.
|
|
| 13 | + *
|
|
| 14 | + * This program is distributed in the hope that it will be useful,
|
|
| 15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 17 | + * GNU General Public License for more details.
|
|
| 18 | + *
|
|
| 19 | + * You should have received a copy of the GNU General Public
|
|
| 20 | + * License along with this program. If not, see
|
|
| 21 | + * <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 22 | + * #L%
|
|
| 23 | + */
|
|
| 24 | + |
|
| 25 | +import fr.ird.observe.dto.StringCleaner;
|
|
| 26 | +import fr.ird.observe.persistence.SqlHelper;
|
|
| 27 | + |
|
| 28 | +import java.sql.Connection;
|
|
| 29 | +import java.sql.PreparedStatement;
|
|
| 30 | +import java.sql.ResultSet;
|
|
| 31 | +import java.sql.SQLException;
|
|
| 32 | +import java.sql.Timestamp;
|
|
| 33 | +import java.util.Map;
|
|
| 34 | +import java.util.function.Function;
|
|
| 35 | + |
|
| 36 | +/**
|
|
| 37 | + * Created on 20/11/2022.
|
|
| 38 | + *
|
|
| 39 | + * @author Tony Chemit - dev@tchemit.fr
|
|
| 40 | + * @since 9.0.18
|
|
| 41 | + */
|
|
| 42 | +class SampleRecord {
|
|
| 43 | + final String topiaId;
|
|
| 44 | + final long topiaVersion;
|
|
| 45 | + final Timestamp topiaCreateDate;
|
|
| 46 | + final Timestamp lastUpdateDate;
|
|
| 47 | + final boolean nonTarget;
|
|
| 48 | + String homeId;
|
|
| 49 | + String comment;
|
|
| 50 | + String set;
|
|
| 51 | + |
|
| 52 | + static void addNonTargetSample(Connection connection, Map<String, SampleRecord> setToSampleMap, Map<String, String> sampleMapping) throws SQLException {
|
|
| 53 | + |
|
| 54 | + try (PreparedStatement statement = connection.prepareStatement(
|
|
| 55 | + "SELECT " +
|
|
| 56 | + "REPLACE(topiaId, '.NonTargetSample', '.Sample'), " +
|
|
| 57 | + "topiaVersion, " +
|
|
| 58 | + "topiaCreateDate, " +
|
|
| 59 | + "homeId, " +
|
|
| 60 | + "comment, " +
|
|
| 61 | + "set, " +
|
|
| 62 | + "lastUpdateDate " +
|
|
| 63 | + "FROM ps_observation.nontargetsample " +
|
|
| 64 | + "ORDER BY set, topiaId")) {
|
|
| 65 | + addSample(statement, setToSampleMap, sampleMapping, true);
|
|
| 66 | + }
|
|
| 67 | + }
|
|
| 68 | + |
|
| 69 | + |
|
| 70 | + static void addTargetSample(Connection connection, Map<String, SampleRecord> setToSampleMap, Map<String, String> sampleMapping) throws SQLException {
|
|
| 71 | + try (PreparedStatement statement = connection.prepareStatement(
|
|
| 72 | + "SELECT " +
|
|
| 73 | + "REPLACE(topiaId, '.TargetSample', '.Sample'), " +
|
|
| 74 | + "topiaVersion, " +
|
|
| 75 | + "topiaCreateDate, " +
|
|
| 76 | + "homeId, " +
|
|
| 77 | + "comment, " +
|
|
| 78 | + "set, " +
|
|
| 79 | + "lastUpdateDate " +
|
|
| 80 | + "FROM ps_observation.targetsample " +
|
|
| 81 | + "ORDER BY set, topiaId")) {
|
|
| 82 | + addSample(statement, setToSampleMap, sampleMapping, false);
|
|
| 83 | + }
|
|
| 84 | + }
|
|
| 85 | + |
|
| 86 | + static void addSample(PreparedStatement statement, Map<String, SampleRecord> setToSampleMap, Map<String, String> sampleMapping, boolean nonTarget) throws SQLException {
|
|
| 87 | + try (ResultSet resultSet = statement.executeQuery()) {
|
|
| 88 | + while (resultSet.next()) {
|
|
| 89 | + SampleRecord sample = new SampleRecord(resultSet, nonTarget);
|
|
| 90 | + SampleRecord existingSample = setToSampleMap.get(sample.set);
|
|
| 91 | + if (existingSample == null) {
|
|
| 92 | + // new sample
|
|
| 93 | + setToSampleMap.put(sample.set, sample);
|
|
| 94 | + } else {
|
|
| 95 | + // add to sample mapping
|
|
| 96 | + sampleMapping.put(sample.topiaId, existingSample.topiaId);
|
|
| 97 | + // update homeId
|
|
| 98 | + existingSample.addHomeId(sample.homeId);
|
|
| 99 | + // update comment
|
|
| 100 | + existingSample.addComment(sample.comment);
|
|
| 101 | + }
|
|
| 102 | + }
|
|
| 103 | + }
|
|
| 104 | + }
|
|
| 105 | + |
|
| 106 | + public SampleRecord(ResultSet resultSet, boolean nonTarget) throws SQLException {
|
|
| 107 | + this.topiaId = resultSet.getString(1);
|
|
| 108 | + this.topiaVersion = resultSet.getLong(2);
|
|
| 109 | + this.topiaCreateDate = resultSet.getTimestamp(3);
|
|
| 110 | + this.homeId = resultSet.getString(4);
|
|
| 111 | + this.comment = resultSet.getString(5);
|
|
| 112 | + this.set = resultSet.getString(6);
|
|
| 113 | + this.lastUpdateDate = resultSet.getTimestamp(7);
|
|
| 114 | + this.nonTarget = nonTarget;
|
|
| 115 | + }
|
|
| 116 | + |
|
| 117 | + public String toSampleSql(Function<String, String> commentFormat) {
|
|
| 118 | + return String.format("INSERT INTO ps_observation.Sample(topiaId, topiaVersion, topiaCreateDate, homeId, comment, set, lastUpdateDate) VALUES('%s', %s, '%s'::timestamp, %s, %s, '%s', '%s'::timestamp);",
|
|
| 119 | + topiaId,
|
|
| 120 | + topiaVersion,
|
|
| 121 | + topiaCreateDate,
|
|
| 122 | + SqlHelper.escapeString(StringCleaner.ALL.apply(homeId)),
|
|
| 123 | + commentFormat.apply(comment),
|
|
| 124 | + set,
|
|
| 125 | + lastUpdateDate);
|
|
| 126 | + }
|
|
| 127 | + |
|
| 128 | + public void addHomeId(String homeId) {
|
|
| 129 | + if (homeId == null) {
|
|
| 130 | + return;
|
|
| 131 | + }
|
|
| 132 | + if (this.homeId == null) {
|
|
| 133 | + this.homeId = homeId;
|
|
| 134 | + return;
|
|
| 135 | + }
|
|
| 136 | + this.homeId += " - " + homeId;
|
|
| 137 | + }
|
|
| 138 | + |
|
| 139 | + public void addComment(String comment) {
|
|
| 140 | + if (comment == null) {
|
|
| 141 | + return;
|
|
| 142 | + }
|
|
| 143 | + if (this.comment == null) {
|
|
| 144 | + this.comment = comment;
|
|
| 145 | + return;
|
|
| 146 | + }
|
|
| 147 | + this.comment += " \n " + comment;
|
|
| 148 | + }
|
|
| 149 | + |
|
| 150 | +} |
| ... | ... | @@ -38,6 +38,8 @@ import fr.ird.observe.services.service.data.ps.common.TripService; |
| 38 | 38 | import java.util.Date;
|
| 39 | 39 | import java.util.LinkedHashSet;
|
| 40 | 40 | import java.util.List;
|
| 41 | +import java.util.Map;
|
|
| 42 | +import java.util.Set;
|
|
| 41 | 43 | |
| 42 | 44 | /**
|
| 43 | 45 | * Created on 26/07/2021.
|
| ... | ... | @@ -87,6 +89,11 @@ public abstract class TripServiceLocalSupport extends ObserveServiceLocal implem |
| 87 | 89 | return Trip.SPI.isActivityEndOfSearchFound(this, routeId);
|
| 88 | 90 | }
|
| 89 | 91 | |
| 92 | + @Override
|
|
| 93 | + public Map<String, Set<String>> getPsObservationCatchesSpeciesFateBySpeciesId(String setId) {
|
|
| 94 | + return fr.ird.observe.entities.data.ps.observation.Sample.SPI.getCatchesSpeciesFateBySpeciesId(this, setId);
|
|
| 95 | + }
|
|
| 96 | + |
|
| 90 | 97 | @Override
|
| 91 | 98 | public Form<fr.ird.observe.dto.data.ps.observation.FloatingObjectDto> preCreateObservationFloatingObject(String activityId, FloatingObjectPreset floatingObjectPreset) {
|
| 92 | 99 | return fr.ird.observe.entities.data.ps.observation.FloatingObject.SPI.preCreate(this, floatingObjectPreset);
|
| ... | ... | @@ -39,7 +39,9 @@ import fr.ird.observe.services.service.data.EditableServiceFixtures; |
| 39 | 39 | import fr.ird.observe.services.service.data.RootOpenableServiceFixtures;
|
| 40 | 40 | import org.junit.Assert;
|
| 41 | 41 | |
| 42 | +import java.util.Map;
|
|
| 42 | 43 | import java.util.Set;
|
| 44 | +import java.util.stream.Collectors;
|
|
| 43 | 45 | |
| 44 | 46 | public class TripServiceFixtures extends GeneratedTripServiceFixtures {
|
| 45 | 47 | |
| ... | ... | @@ -67,6 +69,15 @@ public class TripServiceFixtures extends GeneratedTripServiceFixtures { |
| 67 | 69 | // }
|
| 68 | 70 | |
| 69 | 71 | |
| 72 | + @Override
|
|
| 73 | + public void getPsObservationCatchesSpeciesFateBySpeciesId(ObserveServicesProvider servicesProvider, TripService service) {
|
|
| 74 | + String setId = getProperty("getPsObservationCatchesSpeciesFateBySpeciesId.setId");
|
|
| 75 | + Map<String, Set<String>> actual = service.getPsObservationCatchesSpeciesFateBySpeciesId(setId);
|
|
| 76 | + Assert.assertNotNull(actual);
|
|
| 77 | + Assert.assertEquals(getIntegerProperty("getPsObservationCatchesSpeciesFateBySpeciesId.speciesCount"), actual.size());
|
|
| 78 | + Assert.assertEquals(getIntegerProperty("getPsObservationCatchesSpeciesFateBySpeciesId.speciesFateCount"), actual.values().stream().flatMap(Set::stream).collect(Collectors.toSet()).size());
|
|
| 79 | + }
|
|
| 80 | + |
|
| 70 | 81 | @Override
|
| 71 | 82 | public void getAllTripIds(ObserveServicesProvider servicesProvider, TripService service) {
|
| 72 | 83 | Set<String> actual = service.getAllTripIds();
|
| ... | ... | @@ -25,6 +25,7 @@ defaultNewParentId=${REFERENTIAL_PS_COMMON_PROGRAM_MOVE} |
| 25 | 25 | defaultParentId=${REFERENTIAL_PS_COMMON_PROGRAM}
|
| 26 | 26 | defaultProgramId=${REFERENTIAL_PS_COMMON_PROGRAM}
|
| 27 | 27 | defaultRouteId=FIXME
|
| 28 | +defaultSetId=${PS_OBSERVATION_SET}
|
|
| 28 | 29 | defaultSpeciesListId=fr.ird.referential.common.SpeciesList#1239832675370#0.1
|
| 29 | 30 | defaultTripId=${PS_COMMON_TRIP}
|
| 30 | 31 | defaultVesselId=fr.ird.referential.common.Vessel#1239832679425#0.9136908731720471
|
| ... | ... | @@ -43,6 +44,9 @@ getMatchingTripsVesselWithinDateRange.vesselId=${defaultVesselId} |
| 43 | 44 | getParentBrothers.count=16
|
| 44 | 45 | getParentBrothers.parentId=${defaultParentId}
|
| 45 | 46 | getParentBrothers.programId=${defaultProgramId}
|
| 47 | +getPsObservationCatchesSpeciesFateBySpeciesId.setId=${defaultSetId}
|
|
| 48 | +getPsObservationCatchesSpeciesFateBySpeciesId.speciesCount=6
|
|
| 49 | +getPsObservationCatchesSpeciesFateBySpeciesId.speciesFateCount=4
|
|
| 46 | 50 | getSpeciesByListAndTrip.count=14
|
| 47 | 51 | getSpeciesByListAndTrip.speciesListId=${defaultSpeciesListId}
|
| 48 | 52 | getSpeciesByListAndTrip.tripId=${defaultTripId}
|
| ... | ... | @@ -158,8 +158,6 @@ informationSource {*:0..1} referential.ps.observation.InformationSourceReference |
| 158 | 158 | data.ps.observation.Sample > data.Container
|
| 159 | 159 | sampleMeasure + {*} data.ps.observation.SampleMeasure
|
| 160 | 160 | speciesFate {*:*} referential.ps.common.SpeciesFateReference
|
| 161 | -availableSpeciesIds + {*} String
|
|
| 162 | -availableSpeciesFateIds + {*} String
|
|
| 163 | 161 | |
| 164 | 162 | data.ps.observation.SetCatch > data.Container
|
| 165 | 163 | catches {*} data.ps.observation.Catch
|
| ... | ... | @@ -38,8 +38,6 @@ data.ps.localmarket.TripBatch.attribute.localmarketSurvey=true |
| 38 | 38 | data.ps.logbook.Route.attribute.activity=true
|
| 39 | 39 | data.ps.observation.Activity.attribute.nonTargetCatchSpecies=true
|
| 40 | 40 | data.ps.observation.Route.attribute.activity=true
|
| 41 | -data.ps.observation.Sample.attribute.availableSpeciesFateIds=true
|
|
| 42 | -data.ps.observation.Sample.attribute.availableSpeciesIds=true
|
|
| 43 | 41 | data.ps.observation.SetNonTargetCatchRelease.attribute.availableSpeciesIds=true
|
| 44 | 42 | referential.Referential.attribute.homeId=true
|
| 45 | 43 | referential.Referential.attribute.uri=true
|
| ... | ... | @@ -16,151 +16,152 @@ |
| 16 | 16 | # Do not remove the next line, it is used to generate the following actions.
|
| 17 | 17 | # →→→ Generated dynamic mapping
|
| 18 | 18 | |
| 19 | -GET /AnonymousService/applySecurity AnonymousServiceRestApi.applySecurity
|
|
| 20 | -GET /AnonymousService/checkCanConnect AnonymousServiceRestApi.checkCanConnect
|
|
| 21 | -GET /AnonymousService/checkCanConnectOrBeEmpty AnonymousServiceRestApi.checkCanConnectOrBeEmpty
|
|
| 22 | -POST /AnonymousService/createEmpty AnonymousServiceRestApi.createEmpty
|
|
| 23 | -POST /AnonymousService/createFromDump AnonymousServiceRestApi.createFromDump
|
|
| 24 | -POST /AnonymousService/createFromImport AnonymousServiceRestApi.createFromImport
|
|
| 25 | -GET /AnonymousService/generateHomeId AnonymousServiceRestApi.generateHomeId
|
|
| 26 | -GET /AnonymousService/getAvailableDatabaseNames AnonymousServiceRestApi.getAvailableDatabaseNames
|
|
| 27 | -GET /AnonymousService/getModelVersion AnonymousServiceRestApi.getModelVersion
|
|
| 28 | -GET /AnonymousService/getServerVersion AnonymousServiceRestApi.getServerVersion
|
|
| 29 | -GET /AnonymousService/getUsers AnonymousServiceRestApi.getUsers
|
|
| 30 | -GET /AnonymousService/migrateData AnonymousServiceRestApi.migrateData
|
|
| 31 | -GET /AnonymousService/open AnonymousServiceRestApi.open
|
|
| 32 | -GET /DataSourceService/backup DataSourceServiceRestApi.backup
|
|
| 33 | -GET /DataSourceService/close DataSourceServiceRestApi.close
|
|
| 34 | -POST /DataSourceService/executeSqlScript DataSourceServiceRestApi.executeSqlScript
|
|
| 35 | -GET /DataSourceService/getLastUpdateDate DataSourceServiceRestApi.getLastUpdateDate
|
|
| 36 | -GET /DataSourceService/isIdValid DataSourceServiceRestApi.isIdValid
|
|
| 37 | -POST /DataSourceService/produceAddSqlScript DataSourceServiceRestApi.produceAddSqlScript
|
|
| 38 | -POST /DataSourceService/produceCreateSqlScript DataSourceServiceRestApi.produceCreateSqlScript
|
|
| 39 | -POST /DataSourceService/produceDeleteSqlScript DataSourceServiceRestApi.produceDeleteSqlScript
|
|
| 40 | -POST /DataSourceService/produceMoveSqlScript DataSourceServiceRestApi.produceMoveSqlScript
|
|
| 41 | -POST /DataSourceService/retainExistingIds DataSourceServiceRestApi.retainExistingIds
|
|
| 42 | -GET /NavigationService/getGroupByDtoSet NavigationServiceRestApi.getGroupByDtoSet
|
|
| 43 | -GET /NavigationService/getNavigation NavigationServiceRestApi.getNavigation
|
|
| 44 | -GET /NavigationService/loadNavigationPath NavigationServiceRestApi.loadNavigationPath
|
|
| 45 | -GET /NavigationService/loadNavigationRoot NavigationServiceRestApi.loadNavigationRoot
|
|
| 46 | -GET /NavigationService/loadSelectionRoot NavigationServiceRestApi.loadSelectionRoot
|
|
| 47 | -GET /ReferenceService/createData ReferenceServiceRestApi.createData
|
|
| 48 | -GET /ReferenceService/createReferential ReferenceServiceRestApi.createReferential
|
|
| 49 | -GET /ReferenceService/loadData ReferenceServiceRestApi.loadData
|
|
| 50 | -GET /ReferenceService/loadReferential ReferenceServiceRestApi.loadReferential
|
|
| 51 | -POST /ReportService/executeReport ReportServiceRestApi.executeReport
|
|
| 52 | -POST /ReportService/populateVariables ReportServiceRestApi.populateVariables
|
|
| 53 | -GET /UsageService/countMandatoryData UsageServiceRestApi.countMandatoryData
|
|
| 54 | -GET /UsageService/countOptionalData UsageServiceRestApi.countOptionalData
|
|
| 55 | -GET /UsageService/countReferential UsageServiceRestApi.countReferential
|
|
| 56 | -POST /UsageService/findMandatoryData UsageServiceRestApi.findMandatoryData
|
|
| 57 | -POST /UsageService/findOptionalData UsageServiceRestApi.findOptionalData
|
|
| 58 | -POST /UsageService/findReferential UsageServiceRestApi.findReferential
|
|
| 59 | -POST /ValidateService/validateData ValidateServiceRestApi.validateData
|
|
| 60 | -POST /ValidateService/validateReferential ValidateServiceRestApi.validateReferential
|
|
| 61 | -POST /api/DataEntityService/create api.DataEntityServiceRestApi.create
|
|
| 62 | -DELETE /api/DataEntityService/delete api.DataEntityServiceRestApi.delete
|
|
| 63 | -GET /api/DataEntityService/generateId api.DataEntityServiceRestApi.generateId
|
|
| 64 | -GET /api/DataEntityService/getOne api.DataEntityServiceRestApi.getOne
|
|
| 65 | -GET /api/DataEntityService/getSome api.DataEntityServiceRestApi.getSome
|
|
| 66 | -POST /api/DataEntityService/update api.DataEntityServiceRestApi.update
|
|
| 67 | -POST /api/ReferentialEntityService/create api.ReferentialEntityServiceRestApi.create
|
|
| 68 | -DELETE /api/ReferentialEntityService/delete api.ReferentialEntityServiceRestApi.delete
|
|
| 69 | -GET /api/ReferentialEntityService/generateId api.ReferentialEntityServiceRestApi.generateId
|
|
| 70 | -GET /api/ReferentialEntityService/getAll api.ReferentialEntityServiceRestApi.getAll
|
|
| 71 | -GET /api/ReferentialEntityService/getByModule api.ReferentialEntityServiceRestApi.getByModule
|
|
| 72 | -GET /api/ReferentialEntityService/getByPackage api.ReferentialEntityServiceRestApi.getByPackage
|
|
| 73 | -GET /api/ReferentialEntityService/getOne api.ReferentialEntityServiceRestApi.getOne
|
|
| 74 | -GET /api/ReferentialEntityService/getSome api.ReferentialEntityServiceRestApi.getSome
|
|
| 75 | -PUT /api/ReferentialEntityService/update api.ReferentialEntityServiceRestApi.update
|
|
| 76 | -GET /api/SqlService/select api.SqlServiceRestApi.select
|
|
| 77 | -GET /data/ContainerService/loadForm data.ContainerServiceRestApi.loadForm
|
|
| 78 | -POST /data/ContainerService/save data.ContainerServiceRestApi.save
|
|
| 79 | -GET /data/DataFileService/getDataFile data.DataFileServiceRestApi.getDataFile
|
|
| 80 | -POST /data/DataManagementService/deleteData data.DataManagementServiceRestApi.deleteData
|
|
| 81 | -POST /data/DataManagementService/exportData data.DataManagementServiceRestApi.exportData
|
|
| 82 | -POST /data/DataManagementService/importData data.DataManagementServiceRestApi.importData
|
|
| 83 | -DELETE /data/EditableService/delete data.EditableServiceRestApi.delete
|
|
| 84 | -GET /data/EditableService/exists data.EditableServiceRestApi.exists
|
|
| 85 | -GET /data/EditableService/loadDto data.EditableServiceRestApi.loadDto
|
|
| 86 | -GET /data/EditableService/loadForm data.EditableServiceRestApi.loadForm
|
|
| 87 | -GET /data/EditableService/preCreate data.EditableServiceRestApi.preCreate
|
|
| 88 | -POST /data/EditableService/save data.EditableServiceRestApi.save
|
|
| 89 | -DELETE /data/OpenableService/delete data.OpenableServiceRestApi.delete
|
|
| 90 | -GET /data/OpenableService/exists data.OpenableServiceRestApi.exists
|
|
| 91 | -GET /data/OpenableService/getBrothers data.OpenableServiceRestApi.getBrothers
|
|
| 92 | -GET /data/OpenableService/getBrothersFromParent data.OpenableServiceRestApi.getBrothersFromParent
|
|
| 93 | -GET /data/OpenableService/getChildren data.OpenableServiceRestApi.getChildren
|
|
| 94 | -GET /data/OpenableService/getChildrenUpdate data.OpenableServiceRestApi.getChildrenUpdate
|
|
| 95 | -POST /data/OpenableService/getMandatoryDependencies data.OpenableServiceRestApi.getMandatoryDependencies
|
|
| 96 | -POST /data/OpenableService/getMandatoryDependenciesCount data.OpenableServiceRestApi.getMandatoryDependenciesCount
|
|
| 97 | -POST /data/OpenableService/getOptionalDependencies data.OpenableServiceRestApi.getOptionalDependencies
|
|
| 98 | -POST /data/OpenableService/getOptionalDependenciesCount data.OpenableServiceRestApi.getOptionalDependenciesCount
|
|
| 99 | -GET /data/OpenableService/loadDto data.OpenableServiceRestApi.loadDto
|
|
| 100 | -GET /data/OpenableService/loadForm data.OpenableServiceRestApi.loadForm
|
|
| 101 | -POST /data/OpenableService/move data.OpenableServiceRestApi.move
|
|
| 102 | -GET /data/OpenableService/preCreate data.OpenableServiceRestApi.preCreate
|
|
| 103 | -POST /data/OpenableService/save data.OpenableServiceRestApi.save
|
|
| 104 | -POST /data/RootOpenableService/computeMissingReferential data.RootOpenableServiceRestApi.computeMissingReferential
|
|
| 105 | -DELETE /data/RootOpenableService/delete data.RootOpenableServiceRestApi.delete
|
|
| 106 | -DELETE /data/RootOpenableService/deleteLayout data.RootOpenableServiceRestApi.deleteLayout
|
|
| 107 | -GET /data/RootOpenableService/exists data.RootOpenableServiceRestApi.exists
|
|
| 108 | -GET /data/RootOpenableService/getBrothers data.RootOpenableServiceRestApi.getBrothers
|
|
| 109 | -GET /data/RootOpenableService/getChildren data.RootOpenableServiceRestApi.getChildren
|
|
| 110 | -GET /data/RootOpenableService/getChildrenUpdate data.RootOpenableServiceRestApi.getChildrenUpdate
|
|
| 111 | -GET /data/RootOpenableService/getGroupByDtoValue data.RootOpenableServiceRestApi.getGroupByDtoValue
|
|
| 112 | -GET /data/RootOpenableService/getGroupByValue data.RootOpenableServiceRestApi.getGroupByValue
|
|
| 113 | -GET /data/RootOpenableService/loadDto data.RootOpenableServiceRestApi.loadDto
|
|
| 114 | -GET /data/RootOpenableService/loadForm data.RootOpenableServiceRestApi.loadForm
|
|
| 115 | -POST /data/RootOpenableService/moveLayout data.RootOpenableServiceRestApi.moveLayout
|
|
| 116 | -GET /data/RootOpenableService/preCreate data.RootOpenableServiceRestApi.preCreate
|
|
| 117 | -POST /data/RootOpenableService/save data.RootOpenableServiceRestApi.save
|
|
| 118 | -GET /data/SimpleService/loadForm data.SimpleServiceRestApi.loadForm
|
|
| 119 | -POST /data/SimpleService/save data.SimpleServiceRestApi.save
|
|
| 120 | -POST /data/ll/ActivityPairingService/applyPairing data.ll.ActivityPairingServiceRestApi.applyPairing
|
|
| 121 | -POST /data/ll/ActivityPairingService/computePairing data.ll.ActivityPairingServiceRestApi.computePairing
|
|
| 122 | -GET /data/ll/common/TripService/getAllTripIds data.ll.common.TripServiceRestApi.getAllTripIds
|
|
| 123 | -GET /data/ll/common/TripService/getLogbookCatchSpeciesIds data.ll.common.TripServiceRestApi.getLogbookCatchSpeciesIds
|
|
| 124 | -GET /data/ll/common/TripService/getMatchingTripsVesselWithinDateRange data.ll.common.TripServiceRestApi.getMatchingTripsVesselWithinDateRange
|
|
| 125 | -GET /data/ll/common/TripService/getSampleActivityParentCandidate data.ll.common.TripServiceRestApi.getSampleActivityParentCandidate
|
|
| 126 | -GET /data/ll/common/TripService/getSpeciesByListAndTrip data.ll.common.TripServiceRestApi.getSpeciesByListAndTrip
|
|
| 127 | -GET /data/ll/common/TripService/getTripMap data.ll.common.TripServiceRestApi.getTripMap
|
|
| 128 | -GET /data/ll/common/TripService/loadBranchlineForm data.ll.common.TripServiceRestApi.loadBranchlineForm
|
|
| 129 | -POST /data/ll/common/TripService/moveActivitySample data.ll.common.TripServiceRestApi.moveActivitySample
|
|
| 130 | -POST /data/ll/common/TripService/saveAndCopyProperties data.ll.common.TripServiceRestApi.saveAndCopyProperties
|
|
| 131 | -POST /data/ll/common/TripService/saveBranchline data.ll.common.TripServiceRestApi.saveBranchline
|
|
| 132 | -POST /data/ps/ActivityPairingService/applyPairing data.ps.ActivityPairingServiceRestApi.applyPairing
|
|
| 133 | -POST /data/ps/ActivityPairingService/computePairing data.ps.ActivityPairingServiceRestApi.computePairing
|
|
| 134 | -GET /data/ps/AvdthService/importData data.ps.AvdthServiceRestApi.importData
|
|
| 135 | -POST /data/ps/ConsolidateDataService/consolidateLocalmarketBatch data.ps.ConsolidateDataServiceRestApi.consolidateLocalmarketBatch
|
|
| 136 | -POST /data/ps/ConsolidateDataService/consolidateTrip data.ps.ConsolidateDataServiceRestApi.consolidateTrip
|
|
| 137 | -GET /data/ps/ConsolidateDataService/newSimplifiedObjectTypeManager data.ps.ConsolidateDataServiceRestApi.newSimplifiedObjectTypeManager
|
|
| 138 | -GET /data/ps/common/TripService/getAllTripIds data.ps.common.TripServiceRestApi.getAllTripIds
|
|
| 139 | -GET /data/ps/common/TripService/getLogbookWellPlanActivities data.ps.common.TripServiceRestApi.getLogbookWellPlanActivities
|
|
| 140 | -GET /data/ps/common/TripService/getMatchingTripsVesselWithinDateRange data.ps.common.TripServiceRestApi.getMatchingTripsVesselWithinDateRange
|
|
| 141 | -GET /data/ps/common/TripService/getSpeciesByListAndTrip data.ps.common.TripServiceRestApi.getSpeciesByListAndTrip
|
|
| 142 | -GET /data/ps/common/TripService/getTripMap data.ps.common.TripServiceRestApi.getTripMap
|
|
| 143 | -GET /data/ps/common/TripService/isActivityEndOfSearchFound data.ps.common.TripServiceRestApi.isActivityEndOfSearchFound
|
|
| 144 | -GET /data/ps/common/TripService/loadLocalmarketForm data.ps.common.TripServiceRestApi.loadLocalmarketForm
|
|
| 145 | -GET /data/ps/common/TripService/loadLogbookForm data.ps.common.TripServiceRestApi.loadLogbookForm
|
|
| 146 | -GET /data/ps/common/TripService/preCreateLogbookFloatingObject data.ps.common.TripServiceRestApi.preCreateLogbookFloatingObject
|
|
| 147 | -GET /data/ps/common/TripService/preCreateObservationFloatingObject data.ps.common.TripServiceRestApi.preCreateObservationFloatingObject
|
|
| 148 | -POST /referential/ReferentialService/changeId referential.ReferentialServiceRestApi.changeId
|
|
| 149 | -DELETE /referential/ReferentialService/delete referential.ReferentialServiceRestApi.delete
|
|
| 150 | -GET /referential/ReferentialService/exists referential.ReferentialServiceRestApi.exists
|
|
| 151 | -GET /referential/ReferentialService/getEnabledReferentialLabelSet referential.ReferentialServiceRestApi.getEnabledReferentialLabelSet
|
|
| 152 | -GET /referential/ReferentialService/getReferenceSet referential.ReferentialServiceRestApi.getReferenceSet
|
|
| 153 | -POST /referential/ReferentialService/getReferentialIds referential.ReferentialServiceRestApi.getReferentialIds
|
|
| 154 | -GET /referential/ReferentialService/getReferentialReferenceSets referential.ReferentialServiceRestApi.getReferentialReferenceSets
|
|
| 155 | -POST /referential/ReferentialService/insertMissingReferential referential.ReferentialServiceRestApi.insertMissingReferential
|
|
| 156 | -GET /referential/ReferentialService/loadDto referential.ReferentialServiceRestApi.loadDto
|
|
| 157 | -POST /referential/ReferentialService/loadDtoList referential.ReferentialServiceRestApi.loadDtoList
|
|
| 158 | -GET /referential/ReferentialService/loadForm referential.ReferentialServiceRestApi.loadForm
|
|
| 159 | -GET /referential/ReferentialService/loadIds referential.ReferentialServiceRestApi.loadIds
|
|
| 160 | -GET /referential/ReferentialService/preCreate referential.ReferentialServiceRestApi.preCreate
|
|
| 161 | -POST /referential/ReferentialService/replaceReference referential.ReferentialServiceRestApi.replaceReference
|
|
| 162 | -POST /referential/ReferentialService/save referential.ReferentialServiceRestApi.save
|
|
| 163 | -POST /referential/SynchronizeService/applySql referential.SynchronizeServiceRestApi.applySql
|
|
| 164 | -POST /referential/SynchronizeService/filterIdsUsed referential.SynchronizeServiceRestApi.filterIdsUsed
|
|
| 165 | -POST /referential/SynchronizeService/getReferentialToDelete referential.SynchronizeServiceRestApi.getReferentialToDelete
|
|
| 166 | -POST /referential/SynchronizeService/produceSqlResult referential.SynchronizeServiceRestApi.produceSqlResult |
|
| 19 | +GET /AnonymousService/applySecurity AnonymousServiceRestApi.applySecurity
|
|
| 20 | +GET /AnonymousService/checkCanConnect AnonymousServiceRestApi.checkCanConnect
|
|
| 21 | +GET /AnonymousService/checkCanConnectOrBeEmpty AnonymousServiceRestApi.checkCanConnectOrBeEmpty
|
|
| 22 | +POST /AnonymousService/createEmpty AnonymousServiceRestApi.createEmpty
|
|
| 23 | +POST /AnonymousService/createFromDump AnonymousServiceRestApi.createFromDump
|
|
| 24 | +POST /AnonymousService/createFromImport AnonymousServiceRestApi.createFromImport
|
|
| 25 | +GET /AnonymousService/generateHomeId AnonymousServiceRestApi.generateHomeId
|
|
| 26 | +GET /AnonymousService/getAvailableDatabaseNames AnonymousServiceRestApi.getAvailableDatabaseNames
|
|
| 27 | +GET /AnonymousService/getModelVersion AnonymousServiceRestApi.getModelVersion
|
|
| 28 | +GET /AnonymousService/getServerVersion AnonymousServiceRestApi.getServerVersion
|
|
| 29 | +GET /AnonymousService/getUsers AnonymousServiceRestApi.getUsers
|
|
| 30 | +GET /AnonymousService/migrateData AnonymousServiceRestApi.migrateData
|
|
| 31 | +GET /AnonymousService/open AnonymousServiceRestApi.open
|
|
| 32 | +GET /DataSourceService/backup DataSourceServiceRestApi.backup
|
|
| 33 | +GET /DataSourceService/close DataSourceServiceRestApi.close
|
|
| 34 | +POST /DataSourceService/executeSqlScript DataSourceServiceRestApi.executeSqlScript
|
|
| 35 | +GET /DataSourceService/getLastUpdateDate DataSourceServiceRestApi.getLastUpdateDate
|
|
| 36 | +GET /DataSourceService/isIdValid DataSourceServiceRestApi.isIdValid
|
|
| 37 | +POST /DataSourceService/produceAddSqlScript DataSourceServiceRestApi.produceAddSqlScript
|
|
| 38 | +POST /DataSourceService/produceCreateSqlScript DataSourceServiceRestApi.produceCreateSqlScript
|
|
| 39 | +POST /DataSourceService/produceDeleteSqlScript DataSourceServiceRestApi.produceDeleteSqlScript
|
|
| 40 | +POST /DataSourceService/produceMoveSqlScript DataSourceServiceRestApi.produceMoveSqlScript
|
|
| 41 | +POST /DataSourceService/retainExistingIds DataSourceServiceRestApi.retainExistingIds
|
|
| 42 | +GET /NavigationService/getGroupByDtoSet NavigationServiceRestApi.getGroupByDtoSet
|
|
| 43 | +GET /NavigationService/getNavigation NavigationServiceRestApi.getNavigation
|
|
| 44 | +GET /NavigationService/loadNavigationPath NavigationServiceRestApi.loadNavigationPath
|
|
| 45 | +GET /NavigationService/loadNavigationRoot NavigationServiceRestApi.loadNavigationRoot
|
|
| 46 | +GET /NavigationService/loadSelectionRoot NavigationServiceRestApi.loadSelectionRoot
|
|
| 47 | +GET /ReferenceService/createData ReferenceServiceRestApi.createData
|
|
| 48 | +GET /ReferenceService/createReferential ReferenceServiceRestApi.createReferential
|
|
| 49 | +GET /ReferenceService/loadData ReferenceServiceRestApi.loadData
|
|
| 50 | +GET /ReferenceService/loadReferential ReferenceServiceRestApi.loadReferential
|
|
| 51 | +POST /ReportService/executeReport ReportServiceRestApi.executeReport
|
|
| 52 | +POST /ReportService/populateVariables ReportServiceRestApi.populateVariables
|
|
| 53 | +GET /UsageService/countMandatoryData UsageServiceRestApi.countMandatoryData
|
|
| 54 | +GET /UsageService/countOptionalData UsageServiceRestApi.countOptionalData
|
|
| 55 | +GET /UsageService/countReferential UsageServiceRestApi.countReferential
|
|
| 56 | +POST /UsageService/findMandatoryData UsageServiceRestApi.findMandatoryData
|
|
| 57 | +POST /UsageService/findOptionalData UsageServiceRestApi.findOptionalData
|
|
| 58 | +POST /UsageService/findReferential UsageServiceRestApi.findReferential
|
|
| 59 | +POST /ValidateService/validateData ValidateServiceRestApi.validateData
|
|
| 60 | +POST /ValidateService/validateReferential ValidateServiceRestApi.validateReferential
|
|
| 61 | +POST /api/DataEntityService/create api.DataEntityServiceRestApi.create
|
|
| 62 | +DELETE /api/DataEntityService/delete api.DataEntityServiceRestApi.delete
|
|
| 63 | +GET /api/DataEntityService/generateId api.DataEntityServiceRestApi.generateId
|
|
| 64 | +GET /api/DataEntityService/getOne api.DataEntityServiceRestApi.getOne
|
|
| 65 | +GET /api/DataEntityService/getSome api.DataEntityServiceRestApi.getSome
|
|
| 66 | +POST /api/DataEntityService/update api.DataEntityServiceRestApi.update
|
|
| 67 | +POST /api/ReferentialEntityService/create api.ReferentialEntityServiceRestApi.create
|
|
| 68 | +DELETE /api/ReferentialEntityService/delete api.ReferentialEntityServiceRestApi.delete
|
|
| 69 | +GET /api/ReferentialEntityService/generateId api.ReferentialEntityServiceRestApi.generateId
|
|
| 70 | +GET /api/ReferentialEntityService/getAll api.ReferentialEntityServiceRestApi.getAll
|
|
| 71 | +GET /api/ReferentialEntityService/getByModule api.ReferentialEntityServiceRestApi.getByModule
|
|
| 72 | +GET /api/ReferentialEntityService/getByPackage api.ReferentialEntityServiceRestApi.getByPackage
|
|
| 73 | +GET /api/ReferentialEntityService/getOne api.ReferentialEntityServiceRestApi.getOne
|
|
| 74 | +GET /api/ReferentialEntityService/getSome api.ReferentialEntityServiceRestApi.getSome
|
|
| 75 | +PUT /api/ReferentialEntityService/update api.ReferentialEntityServiceRestApi.update
|
|
| 76 | +GET /api/SqlService/select api.SqlServiceRestApi.select
|
|
| 77 | +GET /data/ContainerService/loadForm data.ContainerServiceRestApi.loadForm
|
|
| 78 | +POST /data/ContainerService/save data.ContainerServiceRestApi.save
|
|
| 79 | +GET /data/DataFileService/getDataFile data.DataFileServiceRestApi.getDataFile
|
|
| 80 | +POST /data/DataManagementService/deleteData data.DataManagementServiceRestApi.deleteData
|
|
| 81 | +POST /data/DataManagementService/exportData data.DataManagementServiceRestApi.exportData
|
|
| 82 | +POST /data/DataManagementService/importData data.DataManagementServiceRestApi.importData
|
|
| 83 | +DELETE /data/EditableService/delete data.EditableServiceRestApi.delete
|
|
| 84 | +GET /data/EditableService/exists data.EditableServiceRestApi.exists
|
|
| 85 | +GET /data/EditableService/loadDto data.EditableServiceRestApi.loadDto
|
|
| 86 | +GET /data/EditableService/loadForm data.EditableServiceRestApi.loadForm
|
|
| 87 | +GET /data/EditableService/preCreate data.EditableServiceRestApi.preCreate
|
|
| 88 | +POST /data/EditableService/save data.EditableServiceRestApi.save
|
|
| 89 | +DELETE /data/OpenableService/delete data.OpenableServiceRestApi.delete
|
|
| 90 | +GET /data/OpenableService/exists data.OpenableServiceRestApi.exists
|
|
| 91 | +GET /data/OpenableService/getBrothers data.OpenableServiceRestApi.getBrothers
|
|
| 92 | +GET /data/OpenableService/getBrothersFromParent data.OpenableServiceRestApi.getBrothersFromParent
|
|
| 93 | +GET /data/OpenableService/getChildren data.OpenableServiceRestApi.getChildren
|
|
| 94 | +GET /data/OpenableService/getChildrenUpdate data.OpenableServiceRestApi.getChildrenUpdate
|
|
| 95 | +POST /data/OpenableService/getMandatoryDependencies data.OpenableServiceRestApi.getMandatoryDependencies
|
|
| 96 | +POST /data/OpenableService/getMandatoryDependenciesCount data.OpenableServiceRestApi.getMandatoryDependenciesCount
|
|
| 97 | +POST /data/OpenableService/getOptionalDependencies data.OpenableServiceRestApi.getOptionalDependencies
|
|
| 98 | +POST /data/OpenableService/getOptionalDependenciesCount data.OpenableServiceRestApi.getOptionalDependenciesCount
|
|
| 99 | +GET /data/OpenableService/loadDto data.OpenableServiceRestApi.loadDto
|
|
| 100 | +GET /data/OpenableService/loadForm data.OpenableServiceRestApi.loadForm
|
|
| 101 | +POST /data/OpenableService/move data.OpenableServiceRestApi.move
|
|
| 102 | +GET /data/OpenableService/preCreate data.OpenableServiceRestApi.preCreate
|
|
| 103 | +POST /data/OpenableService/save data.OpenableServiceRestApi.save
|
|
| 104 | +POST /data/RootOpenableService/computeMissingReferential data.RootOpenableServiceRestApi.computeMissingReferential
|
|
| 105 | +DELETE /data/RootOpenableService/delete data.RootOpenableServiceRestApi.delete
|
|
| 106 | +DELETE /data/RootOpenableService/deleteLayout data.RootOpenableServiceRestApi.deleteLayout
|
|
| 107 | +GET /data/RootOpenableService/exists data.RootOpenableServiceRestApi.exists
|
|
| 108 | +GET /data/RootOpenableService/getBrothers data.RootOpenableServiceRestApi.getBrothers
|
|
| 109 | +GET /data/RootOpenableService/getChildren data.RootOpenableServiceRestApi.getChildren
|
|
| 110 | +GET /data/RootOpenableService/getChildrenUpdate data.RootOpenableServiceRestApi.getChildrenUpdate
|
|
| 111 | +GET /data/RootOpenableService/getGroupByDtoValue data.RootOpenableServiceRestApi.getGroupByDtoValue
|
|
| 112 | +GET /data/RootOpenableService/getGroupByValue data.RootOpenableServiceRestApi.getGroupByValue
|
|
| 113 | +GET /data/RootOpenableService/loadDto data.RootOpenableServiceRestApi.loadDto
|
|
| 114 | +GET /data/RootOpenableService/loadForm data.RootOpenableServiceRestApi.loadForm
|
|
| 115 | +POST /data/RootOpenableService/moveLayout data.RootOpenableServiceRestApi.moveLayout
|
|
| 116 | +GET /data/RootOpenableService/preCreate data.RootOpenableServiceRestApi.preCreate
|
|
| 117 | +POST /data/RootOpenableService/save data.RootOpenableServiceRestApi.save
|
|
| 118 | +GET /data/SimpleService/loadForm data.SimpleServiceRestApi.loadForm
|
|
| 119 | +POST /data/SimpleService/save data.SimpleServiceRestApi.save
|
|
| 120 | +POST /data/ll/ActivityPairingService/applyPairing data.ll.ActivityPairingServiceRestApi.applyPairing
|
|
| 121 | +POST /data/ll/ActivityPairingService/computePairing data.ll.ActivityPairingServiceRestApi.computePairing
|
|
| 122 | +GET /data/ll/common/TripService/getAllTripIds data.ll.common.TripServiceRestApi.getAllTripIds
|
|
| 123 | +GET /data/ll/common/TripService/getLogbookCatchSpeciesIds data.ll.common.TripServiceRestApi.getLogbookCatchSpeciesIds
|
|
| 124 | +GET /data/ll/common/TripService/getMatchingTripsVesselWithinDateRange data.ll.common.TripServiceRestApi.getMatchingTripsVesselWithinDateRange
|
|
| 125 | +GET /data/ll/common/TripService/getSampleActivityParentCandidate data.ll.common.TripServiceRestApi.getSampleActivityParentCandidate
|
|
| 126 | +GET /data/ll/common/TripService/getSpeciesByListAndTrip data.ll.common.TripServiceRestApi.getSpeciesByListAndTrip
|
|
| 127 | +GET /data/ll/common/TripService/getTripMap data.ll.common.TripServiceRestApi.getTripMap
|
|
| 128 | +GET /data/ll/common/TripService/loadBranchlineForm data.ll.common.TripServiceRestApi.loadBranchlineForm
|
|
| 129 | +POST /data/ll/common/TripService/moveActivitySample data.ll.common.TripServiceRestApi.moveActivitySample
|
|
| 130 | +POST /data/ll/common/TripService/saveAndCopyProperties data.ll.common.TripServiceRestApi.saveAndCopyProperties
|
|
| 131 | +POST /data/ll/common/TripService/saveBranchline data.ll.common.TripServiceRestApi.saveBranchline
|
|
| 132 | +POST /data/ps/ActivityPairingService/applyPairing data.ps.ActivityPairingServiceRestApi.applyPairing
|
|
| 133 | +POST /data/ps/ActivityPairingService/computePairing data.ps.ActivityPairingServiceRestApi.computePairing
|
|
| 134 | +GET /data/ps/AvdthService/importData data.ps.AvdthServiceRestApi.importData
|
|
| 135 | +POST /data/ps/ConsolidateDataService/consolidateLocalmarketBatch data.ps.ConsolidateDataServiceRestApi.consolidateLocalmarketBatch
|
|
| 136 | +POST /data/ps/ConsolidateDataService/consolidateTrip data.ps.ConsolidateDataServiceRestApi.consolidateTrip
|
|
| 137 | +GET /data/ps/ConsolidateDataService/newSimplifiedObjectTypeManager data.ps.ConsolidateDataServiceRestApi.newSimplifiedObjectTypeManager
|
|
| 138 | +GET /data/ps/common/TripService/getAllTripIds data.ps.common.TripServiceRestApi.getAllTripIds
|
|
| 139 | +GET /data/ps/common/TripService/getLogbookWellPlanActivities data.ps.common.TripServiceRestApi.getLogbookWellPlanActivities
|
|
| 140 | +GET /data/ps/common/TripService/getMatchingTripsVesselWithinDateRange data.ps.common.TripServiceRestApi.getMatchingTripsVesselWithinDateRange
|
|
| 141 | +GET /data/ps/common/TripService/getPsObservationCatchesSpeciesFateBySpeciesId data.ps.common.TripServiceRestApi.getPsObservationCatchesSpeciesFateBySpeciesId
|
|
| 142 | +GET /data/ps/common/TripService/getSpeciesByListAndTrip data.ps.common.TripServiceRestApi.getSpeciesByListAndTrip
|
|
| 143 | +GET /data/ps/common/TripService/getTripMap data.ps.common.TripServiceRestApi.getTripMap
|
|
| 144 | +GET /data/ps/common/TripService/isActivityEndOfSearchFound data.ps.common.TripServiceRestApi.isActivityEndOfSearchFound
|
|
| 145 | +GET /data/ps/common/TripService/loadLocalmarketForm data.ps.common.TripServiceRestApi.loadLocalmarketForm
|
|
| 146 | +GET /data/ps/common/TripService/loadLogbookForm data.ps.common.TripServiceRestApi.loadLogbookForm
|
|
| 147 | +GET /data/ps/common/TripService/preCreateLogbookFloatingObject data.ps.common.TripServiceRestApi.preCreateLogbookFloatingObject
|
|
| 148 | +GET /data/ps/common/TripService/preCreateObservationFloatingObject data.ps.common.TripServiceRestApi.preCreateObservationFloatingObject
|
|
| 149 | +POST /referential/ReferentialService/changeId referential.ReferentialServiceRestApi.changeId
|
|
| 150 | +DELETE /referential/ReferentialService/delete referential.ReferentialServiceRestApi.delete
|
|
| 151 | +GET /referential/ReferentialService/exists referential.ReferentialServiceRestApi.exists
|
|
| 152 | +GET /referential/ReferentialService/getEnabledReferentialLabelSet referential.ReferentialServiceRestApi.getEnabledReferentialLabelSet
|
|
| 153 | +GET /referential/ReferentialService/getReferenceSet referential.ReferentialServiceRestApi.getReferenceSet
|
|
| 154 | +POST /referential/ReferentialService/getReferentialIds referential.ReferentialServiceRestApi.getReferentialIds
|
|
| 155 | +GET /referential/ReferentialService/getReferentialReferenceSets referential.ReferentialServiceRestApi.getReferentialReferenceSets
|
|
| 156 | +POST /referential/ReferentialService/insertMissingReferential referential.ReferentialServiceRestApi.insertMissingReferential
|
|
| 157 | +GET /referential/ReferentialService/loadDto referential.ReferentialServiceRestApi.loadDto
|
|
| 158 | +POST /referential/ReferentialService/loadDtoList referential.ReferentialServiceRestApi.loadDtoList
|
|
| 159 | +GET /referential/ReferentialService/loadForm referential.ReferentialServiceRestApi.loadForm
|
|
| 160 | +GET /referential/ReferentialService/loadIds referential.ReferentialServiceRestApi.loadIds
|
|
| 161 | +GET /referential/ReferentialService/preCreate referential.ReferentialServiceRestApi.preCreate
|
|
| 162 | +POST /referential/ReferentialService/replaceReference referential.ReferentialServiceRestApi.replaceReference
|
|
| 163 | +POST /referential/ReferentialService/save referential.ReferentialServiceRestApi.save
|
|
| 164 | +POST /referential/SynchronizeService/applySql referential.SynchronizeServiceRestApi.applySql
|
|
| 165 | +POST /referential/SynchronizeService/filterIdsUsed referential.SynchronizeServiceRestApi.filterIdsUsed
|
|
| 166 | +POST /referential/SynchronizeService/getReferentialToDelete referential.SynchronizeServiceRestApi.getReferentialToDelete
|
|
| 167 | +POST /referential/SynchronizeService/produceSqlResult referential.SynchronizeServiceRestApi.produceSqlResult |