Wao-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
July 2014
- 3 participants
- 82 discussions
r2175 - in trunk/wao-persistence/src/main: java/fr/ifremer/wao/entity resources/db/migration xmi
by bleny@users.forge.codelutin.com 29 Jul '14
by bleny@users.forge.codelutin.com 29 Jul '14
29 Jul '14
Author: bleny
Date: 2014-07-29 12:33:20 +0200 (Tue, 29 Jul 2014)
New Revision: 2175
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2175
Log:
refs #4481 remove fields from contact (denormalisation)
Modified:
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java
trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql
trunk/wao-persistence/src/main/xmi/wao-model.zargo
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java 2014-07-29 10:23:26 UTC (rev 2174)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java 2014-07-29 10:33:20 UTC (rev 2175)
@@ -89,15 +89,10 @@
@Override
public ObsProgram getObsProgram() {
- return ObsProgram.valueOf(getObsProgramOrdinal());
+ return getSampleRow().getObsProgram();
}
@Override
- public void setObsProgram(ObsProgram obsProgram) {
- setObsProgramOrdinal(obsProgram.ordinal());
- }
-
- @Override
public SamplingStrategy getSamplingStrategy() {
return SamplingStrategy.valueOf(getSamplingStrategyOrdinal());
}
@@ -107,12 +102,6 @@
setSamplingStrategyOrdinal(samplingStrategy.ordinal());
}
- @Override
- public void setSampleRow(SampleRow sampleRow) {
- super.setSampleRow(sampleRow);
- setObsProgram(sampleRow.getObsProgram());
- }
-
/** Value is still used but it's no longer written, it's now computed
* from the size of observers. */
protected void updateNbObservers() {
Modified: trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql
===================================================================
--- trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql 2014-07-29 10:23:26 UTC (rev 2174)
+++ trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql 2014-07-29 10:33:20 UTC (rev 2175)
@@ -47,3 +47,9 @@
DROP TABLE fleet;
ALTER TABLE boat DROP COLUMN boatgroup;
DROP TABLE boatgroup;
+
+-- Suppression de quelques dénormalisations
+
+ALTER TABLE contact DROP COLUMN tidenbdays;
+ALTER TABLE contact DROP COLUMN obsprogramordinal;
+
Modified: trunk/wao-persistence/src/main/xmi/wao-model.zargo
===================================================================
(Binary files differ)
1
0
29 Jul '14
Author: bleny
Date: 2014-07-29 12:23:26 +0200 (Tue, 29 Jul 2014)
New Revision: 2174
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2174
Log:
refs #4481 remove obsdeb referentials
Removed:
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatGroupImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatGroups.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FleetImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Fleets.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsDebCodeImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsDebCodes.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObservationType.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialDivisionImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialDivisionTopiaDao.java
trunk/wao-persistence/src/main/resources/obsDebCodes.csv
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatGroupImportModel.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCode.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCodesImportModel.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialDivisionImportModel.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ObsDebCodeParserFormatter.java
trunk/wao-services/src/test/resources/import/strates.csv
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatGroupsAction.java
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportObsdebCodesAction.java
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportTerrestrialDivisionsAction.java
Modified:
trunk/wao-persistence/src/main/java/fr/ifremer/wao/ContactsFilter.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SynthesisId.java
trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql
trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties
trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties
trunk/wao-persistence/src/main/xmi/wao-model.zargo
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsFilterValues.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/WaoServiceSupport.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java
trunk/wao-services/src/main/resources/i18n/wao-services_en_GB.properties
trunk/wao-services/src/main/resources/i18n/wao-services_fr_FR.properties
trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java
trunk/wao-services/src/test/resources/import/navires.csv
trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoJspActionSupport.java
trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties
trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties
trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp
trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/ContactsFilter.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/ContactsFilter.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/ContactsFilter.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -24,7 +24,6 @@
import com.google.common.collect.Sets;
import fr.ifremer.wao.entity.ContactState;
import fr.ifremer.wao.entity.DataReliability;
-import fr.ifremer.wao.entity.ObservationType;
import fr.ifremer.wao.entity.ObservedDataControl;
import fr.ifremer.wao.entity.SamplingStrategy;
import org.apache.commons.collections4.CollectionUtils;
@@ -69,8 +68,6 @@
protected Set<SamplingStrategy> actualSamplingStrategies;
- protected Set<ObservationType> observationTypes;
-
protected Set<ObservedDataControl> observedDataControls;
protected Set<String> observerIds;
@@ -160,14 +157,6 @@
this.actualSamplingStrategies = actualSamplingStrategies;
}
- public Set<ObservationType> getObservationTypes() {
- return observationTypes;
- }
-
- public void setObservationTypes(Set<ObservationType> observationTypes) {
- this.observationTypes = observationTypes;
- }
-
public Set<ObservedDataControl> getObservedDataControls() {
return observedDataControls;
}
@@ -296,7 +285,6 @@
|| CollectionUtils.isNotEmpty(contactStates)
|| CollectionUtils.isNotEmpty(dataReliabilities)
|| CollectionUtils.isNotEmpty(actualSamplingStrategies)
- || CollectionUtils.isNotEmpty(observationTypes)
|| CollectionUtils.isNotEmpty(observedDataControls)
|| CollectionUtils.isNotEmpty(observerIds)
|| CollectionUtils.isNotEmpty(terrestrialLocationIds)
@@ -330,7 +318,6 @@
&& WaoUtils.isEqualCollection(contactStates, that.contactStates)
&& WaoUtils.isEqualCollection(dataReliabilities, that.dataReliabilities)
&& WaoUtils.isEqualCollection(actualSamplingStrategies, that.actualSamplingStrategies)
- && WaoUtils.isEqualCollection(observationTypes, that.observationTypes)
&& WaoUtils.isEqualCollection(observedDataControls, that.observedDataControls)
&& WaoUtils.isEqualCollection(observerIds, that.observerIds)
&& WaoUtils.isEqualCollection(terrestrialLocationIds, that.terrestrialLocationIds)
@@ -358,7 +345,6 @@
hashCode = 31 * hashCode + WaoUtils.collectionHashcode(contactStates);
hashCode = 31 * hashCode + WaoUtils.collectionHashcode(dataReliabilities);
hashCode = 31 * hashCode + WaoUtils.collectionHashcode(actualSamplingStrategies);
- hashCode = 31 * hashCode + WaoUtils.collectionHashcode(observationTypes);
hashCode = 31 * hashCode + WaoUtils.collectionHashcode(observedDataControls);
hashCode = 31 * hashCode + WaoUtils.collectionHashcode(observerIds);
hashCode = 31 * hashCode + WaoUtils.collectionHashcode(terrestrialLocationIds);
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatGroupImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatGroupImpl.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatGroupImpl.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,38 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2011 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.entity;
-
-public class BoatGroupImpl extends BoatGroupAbstract {
-
- @Override
- public String getDescription() {
- return getCode() + " - " + getCommune() + " - " + getSector() + " - "
- + getStaffSizeGroup() + " - " + getLengthGroup();
- }
-
- @Override
- public String toString() {
- return getDescription();
- }
-}
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatGroups.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatGroups.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatGroups.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,39 +0,0 @@
-package fr.ifremer.wao.entity;
-
-/*
- * #%L
- * Wao :: Persistence
- * %%
- * Copyright (C) 2009 - 2014 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import com.google.common.base.Function;
-
-public class BoatGroups {
-
- public static Function<BoatGroup, String> getCode() {
- return new GetCode();
- }
-
- protected static class GetCode implements Function<BoatGroup, String> {
-
- @Override
- public String apply(BoatGroup input) {
- return input.getCode();
- }
- }
-}
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -156,24 +156,6 @@
}
@Override
- public ObservationType getObservationType() {
- ObservationType observationType = null;
- if (getObservationTypeOrdinal() != null) {
- observationType = ObservationType.valueOf(getObservationTypeOrdinal());
- }
- return observationType;
- }
-
- @Override
- public void setObservationType(ObservationType observationType) {
- if (observationType == null) {
- setObservationTypeOrdinal(null);
- } else {
- setObservationTypeOrdinal(observationType.ordinal());
- }
- }
-
- @Override
public List<WaoUser> getAllObservers() {
List<WaoUser> allObservers = new LinkedList<>();
if (getMainObserver() != null) {
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FleetImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FleetImpl.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FleetImpl.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,36 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2011 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.entity;
-
-public class FleetImpl extends FleetAbstract {
-
- @Override
- public String getDescription() {
- String description = String.format("%s - %s - %s",
- getFleetName(),
- getSubFleetName(),
- getSubSubFleetName());
- return description;
- }
-}
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Fleets.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Fleets.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Fleets.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,39 +0,0 @@
-package fr.ifremer.wao.entity;
-
-/*
- * #%L
- * Wao :: Persistence
- * %%
- * Copyright (C) 2009 - 2014 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import com.google.common.base.Function;
-
-public class Fleets {
-
- public static Function<Fleet, String> getCode() {
- return new GetCode();
- }
-
- protected static class GetCode implements Function<Fleet, String> {
-
- @Override
- public String apply(Fleet input) {
- return input.getCode();
- }
- }
-}
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsDebCodeImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsDebCodeImpl.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsDebCodeImpl.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,60 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2011 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.entity;
-
-
-public class ObsDebCodeImpl extends ObsDebCodeAbstract {
-
- /** The label to be used when printing this code, it depends on the
- * region, so setLabel must be called before using this field
- */
- protected String label;
-
- @Override
- public void setLabel(TerrestrialLocation region) {
- ObsDebCodeDetails obsDebCodeDetailsForRegion = null;
- for (ObsDebCodeDetails obsDebCodeDetails : getObsDebCodeDetails()) {
- boolean match = obsDebCodeDetails.getRegion().getRegionIfremerCode()
- .equals(region.getRegionIfremerCode());
- if (match) {
- obsDebCodeDetailsForRegion = obsDebCodeDetails;
- }
- }
- if (obsDebCodeDetailsForRegion == null) {
- label = null;
- } else {
- label = obsDebCodeDetailsForRegion.getLabel();
- }
- }
-
- @Override
- public String getDescription() {
- return getCode() + (label == null ? "" : " - " + label);
- }
-
- @Override
- public String toString() {
- return getDescription();
- }
-}
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsDebCodes.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsDebCodes.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsDebCodes.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,40 +0,0 @@
-package fr.ifremer.wao.entity;
-
-/*
- * #%L
- * Wao :: Persistence
- * %%
- * Copyright (C) 2009 - 2014 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import com.google.common.base.Function;
-
-public class ObsDebCodes {
-
- public static Function<ObsDebCode, String> getCode() {
- return new GetCode();
- }
-
- protected static class GetCode implements Function<ObsDebCode, String> {
-
- @Override
- public String apply(ObsDebCode input) {
- return input.getCode();
- }
- }
-
-}
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObservationType.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObservationType.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObservationType.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,68 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2011 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.entity;
-
-import static org.nuiton.i18n.I18n.n;
-
-/**
- * In ObsDeb, an observation done may be of different type, when
- * the observer create a contact, he must provide the type of observation.
- *
- * @author bleny
- */
-public enum ObservationType implements I18nAble{
-
- /** Information obtained by observation on the field work */
- FIELD_WORK_OBSERVATION(n("ObservationType.FIELD_WORK_OBSERVATION")),
-
- /** Information obtained by asking someone on the field work */
- FIELD_WORK_SURVEY(n("ObservationType.FIELD_WORK_SURVEY")),
-
- /** Information obtained by calling someone by phone */
- PHONE_CALL(n("ObservationType.PHONE_CALL"));
-
- protected String i18nKey;
-
- ObservationType(String i18nKey) {
- this.i18nKey = i18nKey;
- }
-
- public static ObservationType valueOf(Integer observationTypeOrdinal) {
- for (ObservationType observationType : values()) {
- if (observationType.ordinal() == observationTypeOrdinal) {
- return observationType;
- }
- }
- throw new IllegalArgumentException("ordinal " + observationTypeOrdinal);
- }
-
- public boolean isFieldWorkObservation() {
- return this == ObservationType.FIELD_WORK_OBSERVATION;
- }
-
- @Override
- public String getI18nKey() {
- return i18nKey;
- }
-}
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -213,34 +213,6 @@
}
@Override
- public void setObservationType(ObservationType observationType) {
- if (observationType == null) {
- setObservationTypeOrdinal(null);
- } else {
- setObservationTypeOrdinal(observationType.ordinal());
- }
- }
-
- @Override
- public ObservationType getObservationType() {
- ObservationType observationType = null;
- if (getObservationTypeOrdinal() != null) {
- observationType = ObservationType.valueOf(getObservationTypeOrdinal());
- }
- return observationType;
- }
-
- @Override
- public boolean isPhoneCall() {
- return ObservationType.PHONE_CALL.equals(getObservationType());
- }
-
- @Override
- public boolean isFieldWorkObservation() {
- return ObservationType.FIELD_WORK_OBSERVATION.equals(getObservationType());
- }
-
- @Override
public void setTerrestrialLocation(TerrestrialLocation terrestrialLocation) {
clearTerrestrialLocations();
addTerrestrialLocations(terrestrialLocation);
@@ -270,11 +242,7 @@
@Override
public String toString() {
StringBuffer stringBuffer = new StringBuffer();
- stringBuffer.append(getCode()).append(" (").append(getObsProgram());
- if (getObservationType() != null) {
- stringBuffer.append(", ").append(getObservationType().toString());
- }
- stringBuffer.append(")");
+ stringBuffer.append(getCode()).append(" (").append(getObsProgram()).append(")");
return stringBuffer.toString();
}
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -35,7 +35,6 @@
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
-import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -398,77 +397,6 @@
}
}
- protected void compareObservers() {
- Collection<WaoUser> oldObservers;
-
- if (oldRow == null) {
- oldObservers = Collections.emptyList();
- } else {
- oldObservers = oldRow.getObservers();
- }
-
- Collection<WaoUser> newObservers = newRow.getObservers();
- if (newObservers == null) {
- newObservers = Collections.emptyList();
- }
-
- List<String> removedObservers = new LinkedList<>();
- List<String> addedObservers = new LinkedList<>();
-
- for (WaoUser oldObserver : oldObservers) {
- if ( ! newObservers.contains(oldObserver)) {
- removedObservers.add(oldObserver.getFullName());
- }
- }
-
- for (WaoUser newObserver : newObservers) {
- if ( ! oldObservers.contains(newObserver)) {
- addedObservers.add(newObserver.getFullName());
- }
- }
-
- if (oldRow == null) {
- if ( ! newObservers.isEmpty()) {
- addChange("Les observateurs sont " + StringUtils.join(newObservers, ", "));
- }
- } else {
- if ( ! removedObservers.isEmpty()) {
- addChange("Les observateurs dissociés de la ligne sont " + StringUtils.join(removedObservers, ", "));
- }
- if ( ! addedObservers.isEmpty()) {
- addChange("Les observateurs associés à la ligne sont " + StringUtils.join(addedObservers, ", "));
- }
- }
- }
-
- protected void compareObservationUnits() {
- if (oldRow == null || oldRow.getObservationUnit() == null) {
- addChange("L'unité d'observation associée est " + newRow.getObservationUnit().getDescription());
- } else if ( ! newRow.getObservationUnit().equals(oldRow.getObservationUnit())) {
- addChange("L'unité d'observation passe de '" + oldRow.getObservationUnit().getDescription()
- + " à " + newRow.getObservationUnit().getDescription());
- }
- }
-
- protected void compareBoats() {
- if (oldRow == null || oldRow.getBoat() == null) {
- addChange("Le navire associé est " + newRow.getBoat().getDescription());
- } else if ( ! newRow.getBoat().equals(oldRow.getBoat())) {
- addChange("Le navire associé passe de " + oldRow.getBoat().getDescription()
- + " à " + newRow.getBoat().getDescription());
- }
- }
-
- protected void compareBlankRows() {
- if (oldRow == null || oldRow.isBlankRow() != newRow.isBlankRow()) {
- if (newRow.isBlankRow()) {
- addChange("La ligne devient réalisée sans contacts");
- } else {
- addChange("La ligne devient n'est plus réalisée sans contacts");
- }
- }
- }
-
/** Compare a sample row before and after its modifications and generate
* a differences summary and save it by setting log text.
*/
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -150,7 +150,6 @@
sampleRow.sizedCF5Code();
sampleRow.sizeElligibleBoat();
sampleRow.sizeFishingZone();
- sampleRow.sizeObservers();
sampleRow.sizeSampleMonth();
sampleRow.sizeTerrestrialLocations();
topiaHibernateSupport.getHibernateSession().evict(sampleRow);
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SynthesisId.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SynthesisId.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SynthesisId.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -50,14 +50,8 @@
IND_ALLEGRO_REACTIVITY(n("SynthesisId.IND_ALLEGRO_REACTIVITY")),
/** */
- IND_DATA_RELIABILITY(n("SynthesisId.IND_DATA_RELIABILITY")),
+ IND_DATA_RELIABILITY(n("SynthesisId.IND_DATA_RELIABILITY"));
- /** ObsDeb, number of observations per hour of the day */
- OBSERVATION_HOUR(n("SynthesisId.OBSERVATION_HOUR")),
-
- /** ObsDeb, number of distinct boats observed by month */
- DISTINCT_BOATS_COUNTS(n("SynthesisId.DISTINCT_BOATS_COUNTS"));
-
/** An i18n key to make enumeration printable in logs and UI. */
protected String i18nKey;
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialDivisionImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialDivisionImpl.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialDivisionImpl.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,50 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2011 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.entity;
-
-public class TerrestrialDivisionImpl extends TerrestrialDivisionAbstract {
-
- @Override
- public boolean isObservationUnit() {
- return getCode() == null && getPort() == null;
- }
-
- @Override
- public String getDescription() {
- String description;
- if (isObservationUnit()) {
- description = getRegionIfremer().getRegionIfremerCode() + "-" +
- getObservationUnitCode() + " " + getObservationUnitName();
- } else {
- description = getPort().getPortName();
- }
- return description;
- }
-
- @Override
- public String toString() {
- return getDescription();
- }
-
-}
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialDivisionTopiaDao.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialDivisionTopiaDao.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialDivisionTopiaDao.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,35 +0,0 @@
-package fr.ifremer.wao.entity;
-
-/*
- * #%L
- * Wao :: Persistence
- * %%
- * Copyright (C) 2009 - 2014 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import java.util.Collections;
-
-public class TerrestrialDivisionTopiaDao extends AbstractTerrestrialDivisionTopiaDao<TerrestrialDivision> {
-
- public long countDistinctTerrestrialDivision() {
- String hql = " select distinct td.code"
- + " " + newFromClause("td")
- + " where td.code is not null";
- return count(hql, Collections.<String, Object>emptyMap());
- }
-
-}
Modified: trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql
===================================================================
--- trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql 2014-07-29 10:23:26 UTC (rev 2174)
@@ -38,9 +38,12 @@
ALTER TABLE contact DROP COLUMN landingdate;
ALTER TABLE contact DROP COLUMN observationtypeordinal;
--- Suprresion des référentiels obsolètes
+-- Suppresion des référentiels obsolètes
DROP TABLE terrestrialDivision;
DROP TABLE obsdebcodedetails;
DROP TABLE obsdebcode;
-
+ALTER TABLE boat DROP COLUMN fleet;
+DROP TABLE fleet;
+ALTER TABLE boat DROP COLUMN boatgroup;
+DROP TABLE boatgroup;
Modified: trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties
===================================================================
--- trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties 2014-07-29 10:23:26 UTC (rev 2174)
@@ -23,7 +23,6 @@
LocationType.DISTRICT=District
LocationType.PORT=Port
LocationType.REGION=Region
-ObsProgram.OBSDEB=ObsDeb
ObsProgram.OBSMER=ObsMer
ObsProgram.OBSVENTE=ObsVente
ObservationType.FIELD_WORK_OBSERVATION=Field work observation
@@ -119,7 +118,6 @@
fr.ifremer.wao.entity.FishingGearDCF.TMS=Shrimp trawls
fr.ifremer.wao.entity.FishingGearDCF.TX=Other trawls (not specified)
fr.ifremer.wao.entity.FishingZone=Fishing zones
-fr.ifremer.wao.entity.ObsDebCode=ObsDeb codes
fr.ifremer.wao.entity.TargetSpeciesDCF.=Not specified
fr.ifremer.wao.entity.TargetSpeciesDCF.ALG=Algae
fr.ifremer.wao.entity.TargetSpeciesDCF.ANA=Espèces anadromes
Modified: trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties
===================================================================
--- trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties 2014-07-29 10:23:26 UTC (rev 2174)
@@ -23,7 +23,6 @@
LocationType.DISTRICT=Quartier maritime
LocationType.PORT=Port
LocationType.REGION=Région Ifremer
-ObsProgram.OBSDEB=ObsDeb
ObsProgram.OBSMER=ObsMer
ObsProgram.OBSVENTE=ObsVente
ObservationType.FIELD_WORK_OBSERVATION=Observation de terrain
@@ -119,7 +118,6 @@
fr.ifremer.wao.entity.FishingGearDCF.TMS=Chalut pélagique à crevettes
fr.ifremer.wao.entity.FishingGearDCF.TX=Autre chalut (non spécifié)
fr.ifremer.wao.entity.FishingZone=Zones de pêche
-fr.ifremer.wao.entity.ObsDebCode=Codes métiers ObsDeb
fr.ifremer.wao.entity.TargetSpeciesDCF.=Non spécifié
fr.ifremer.wao.entity.TargetSpeciesDCF.ALG=Algues
fr.ifremer.wao.entity.TargetSpeciesDCF.ANA=Espèces anadromes
Deleted: trunk/wao-persistence/src/main/resources/obsDebCodes.csv
===================================================================
--- trunk/wao-persistence/src/main/resources/obsDebCodes.csv 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-persistence/src/main/resources/obsDebCodes.csv 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,677 +0,0 @@
-CODE;NOM;REGION_IFREMER
-DCL_LP;DCP Lignes et Palangres à grands pélagiques;GA
-DCL_LP;DCP Lignes et Palangres à grands pélagiques;MA
-DHB_PA;Drague à main embarquée à palourdes;LR
-DHB_PA;Drague à main embarquée à palourdes;PA
-DHBMSX;Dragues à main embarquées à Moules (divers);LR
-DHBMSX;Dragues à main embarquées à Moules (divers);PA
-DHBWOR;Dragues à main embarquées à Vers marins;LR
-DHBWOR;Dragues à main embarquées à Vers marins;PA
-DHSDON;Dragues à main à partir du rivage à Donax (= Tellines, Flions, Olives);LR
-DHSDON;Dragues à main à partir du rivage à Donax (= Tellines, Flions, Olives);PA
-DRB_DC;Drague à divers coquillages;LR
-DRB_DC;Drague à divers coquillages;PA
-DRB_PA;Drague à palourdes;LR
-DRB_PA;Drague à palourdes;PA
-DRB_RE;Dragues remorquées par un bateau à Murex, Rochers;LR
-DRB_RE;Dragues remorquées par un bateau à Murex, Rochers;PA
-DRBECH;Dragues remorquées par un bateau à Oursins, Echinodermes;LR
-DRBECH;Dragues remorquées par un bateau à Oursins, Echinodermes;PA
-DRBINV;Drague à divers invertébrés aquatiques;LR
-DRBINV;Drague à divers invertébrés aquatiques;PA
-DRBMSX;Dragues remorquées par un bateau à Moules (divers);LR
-DRBMSX;Dragues remorquées par un bateau à Moules (divers);PA
-DRBOST;Dragues remorquées par un bateau à Huîtres (divers);LR
-DRBOST;Dragues remorquées par un bateau à Huîtres (divers);PA
-FDV_GC;Apnée à Araignée, Tourteau, Homard;CO
-FDV_PA;Plongée en apnée à palourdes;LR
-FDV_PA;Plongée en apnée à palourdes;PA
-FDV_RE;Apnée à Murex, Rochers;LR
-FDV_RE;Apnée à Murex, Rochers;PA
-FDVCON;Apnée à Strombes (= Lambis) (divers);CO
-FDVCON;Apnée à Strombes (= Lambis) (divers);GA
-FDVCON;Apnée à Strombes (= Lambis) (divers);MA
-FDVCRW;Apnée à Langoustes (divers);GA
-FDVCRW;Apnée à Langoustes (divers);MA
-FDVDON;Apnée à Donax (= Tellines, Flions, Olives);LR
-FDVDON;Apnée à Donax (= Tellines, Flions, Olives);PA
-FDVECH;Apnée à Oursins, Echinodermes;CO
-FDVECH;Apnée à Oursins, Echinodermes;GA
-FDVECH;Apnée à Oursins, Echinodermes;MA
-FDVECH;Apnée à Oursins, Echinodermes;LR
-FDVECH;Apnée à Oursins, Echinodermes;PA
-FDVHLT;Apnée à Ormeau;LR
-FDVHLT;Apnée à Ormeau;PA
-FDVINV;Plongée en apnée à divers invertébrés aquatiques;GA
-FDVINV;Plongée en apnée à divers invertébrés aquatiques;MA
-FDVINV;Plongée en apnée à divers invertébrés aquatiques;LR
-FDVINV;Plongée en apnée à divers invertébrés aquatiques;PA
-FDVKUI;Apnée à Troque des Antilles (= Burgo);GA
-FDVKUI;Apnée à Troque des Antilles (= Burgo);MA
-FDVMSX;Apnée à Moules (divers);LR
-FDVMSX;Apnée à Moules (divers);PA
-FDVMZZ;Apnée à Poissons;GA
-FDVMZZ;Apnée à Poissons;MA
-FDVMZZ;Apnée à Poissons;LR
-FDVMZZ;Apnée à Poissons;PA
-FDVOST;Apnée à Huîtres (divers);LR
-FDVOST;Apnée à Huîtres (divers);PA
-FDVSSG;Apnée à Violet;LR
-FDVSSG;Apnée à Violet;PA
-FOO_PA;Pêche à pied à palourdes;LR
-FOO_PA;Pêche à pied à palourdes;PA
-FOO_SL;Pêche à pied à Salicorne;GY
-FOOECH;Pêche à pied à Oursins, Echinodermes;LR
-FOOECH;Pêche à pied à Oursins, Echinodermes;PA
-FOOINV;Pêche à pied à divers invertébrés aquatiques;LR
-FOOINV;Pêche à pied à divers invertébrés aquatiques;PA
-FOOLPZ;Pêche à pied à Patelles (divers);GY
-FOOMSX;Pêche à pied à Moules (divers);LR
-FOOMSX;Pêche à pied à Moules (divers);PA
-FOORSQ;Pêche à pied à Crabe Cirique;GA
-FOORSQ;Pêche à pied à Crabe Cirique;MA
-FOOSWX;Pêche à pied à Algues;LR
-FOOSWX;Pêche à pied à Algues;PA
-FPO_GC;Nasses/Casiers à Araignée, Tourteau, Homard;CO
-FPO_GC;Nasses/Casiers à Araignée, Tourteau, Homard;LR
-FPO_GC;Nasses/Casiers à Araignée, Tourteau, Homard;PA
-FPO_GI;Nasses/Casiers à Girelles (divers);CO
-FPO_GI;Nasses/Casiers à Girelles (divers);LR
-FPO_GI;Nasses/Casiers à Girelles (divers);PA
-FPOARA;Nasses/Casiers à Crevette rouge;LR
-FPOARA;Nasses/Casiers à Crevette rouge;PA
-FPOCOE;Nasses/Casiers à Congre;GA
-FPOCOE;Nasses/Casiers à Congre;MA
-FPOCOE;Nasses/Casiers à Congre;LR
-FPOCOE;Nasses/Casiers à Congre;PA
-FPOCPR;Nasses/Casiers à Bouquet commun;CO
-FPOCRW;Nasses/Casiers à Langoustes (divers);CO
-FPOCRW;Nasses/Casiers à Langoustes (divers);GA
-FPOCRW;Nasses/Casiers à Langoustes (divers);MA
-FPOCRW;Nasses/Casiers à Langoustes (divers);LR
-FPOCRW;Nasses/Casiers à Langoustes (divers);PA
-FPOCRW;Nasses/Casiers à Langoustes (divers);RU
-FPODCP;Nasses/Casiers à Crevettes (divers);GA
-FPODCP;Nasses/Casiers à Crevettes (divers);MA
-FPODCP;Nasses/Casiers à Crevettes (divers);LR
-FPODCP;Nasses/Casiers à Crevettes (divers);PA
-FPODCP;Nasses/Casiers à Crevettes (divers);RU
-FPOELX;Nasses/Casiers à Anguilles, Civelle;LR
-FPOELX;Nasses/Casiers à Anguilles, Civelle;PA
-FPOIAX;Nasses/Casiers à Seiches (divers);LR
-FPOIAX;Nasses/Casiers à Seiches (divers);PA
-FPOLBS;Nasses/Casiers à Homards (divers);LR
-FPOLBS;Nasses/Casiers à Homards (divers);PA
-FPOMZZ;Nasses/Casiers à Poissons;GA
-FPOMZZ;Nasses/Casiers à Poissons;MA
-FPOMZZ;Nasses/Casiers à Poissons;LR
-FPOMZZ;Nasses/Casiers à Poissons;PA
-FPONEP;Nasses/Casiers à Langoustine commune;GA
-FPONEP;Nasses/Casiers à Langoustine commune;MA
-FPONEP;Nasses/Casiers à Langoustine commune;LR
-FPONEP;Nasses/Casiers à Langoustine commune;PA
-FPONU1;Nasses/Casiers à Bernard l'ermite;LR
-FPONU1;Nasses/Casiers à Bernard l'ermite;PA
-FPOOCT;Nasses/Casiers à Poulpes, Pieuvres, Elédones;GA
-FPOOCT;Nasses/Casiers à Poulpes, Pieuvres, Elédones;MA
-FPOOCT;Nasses/Casiers à Poulpes, Pieuvres, Elédones;LR
-FPOOCT;Nasses/Casiers à Poulpes, Pieuvres, Elédones;PA
-FPORSQ;Nasses/Casiers à Crabe Cirique;GA
-FPORSQ;Nasses/Casiers à Crabe Cirique;MA
-FPOSNX;Nasses/Casiers à Vivaneaux (divers);GA
-FPOSNX;Nasses/Casiers à Vivaneaux (divers);MA
-FPOSWM;Nasses/Casiers à Petits crustacés;LR
-FPOSWM;Nasses/Casiers à Petits crustacés;PA
-FSNMZZ;Barrières chinoises, Filets à l'étalage à Poissons;LR
-FSNMZZ;Barrières chinoises, Filets à l'étalage à Poissons;PA
-FSNSBG;Barrières chinoises, Filets à l'étalage à Dorade royale;CO
-FWRMZZ;Barrages, Parcs, Bordigues à Poissons;LR
-FWRMZZ;Barrages, Parcs, Bordigues à Poissons;PA
-FWRSBG;Barrages, Parcs, Bordigues à Dorade royale;CO
-FWRSBG;Barrages, Parcs, Bordigues à Dorade royale;LR
-FWRSBG;Barrages, Parcs, Bordigues à Dorade royale;PA
-FY_ELX;Capéchades, Trabaques à Anguilles, Civelle;LR
-FY_ELX;Capéchades, Trabaques à Anguilles, Civelle;PA
-FY_MZZ;Capéchades, Trabaques à Poissons;LR
-FY_MZZ;Capéchades, Trabaques à Poissons;PA
-FYKCOE;Verveux, Tésures à Congre;LR
-FYKCOE;Verveux, Tésures à Congre;PA
-FYKELX;Verveux, Tésures à Anguilles, Civelle;LR
-FYKELX;Verveux, Tésures à Anguilles, Civelle;PA
-FYKMZZ;Verveux, Tésures à Poissons;LR
-FYKMZZ;Verveux, Tésures à Poissons;PA
-GENMZZ;Filets maillants et emmêlants à Poissons;LR
-GENMZZ;Filets maillants et emmêlants à Poissons;PA
-GENSBX;Filets maillants et emmêlants à Dorades, Sparidés;LR
-GENSBX;Filets maillants et emmêlants à Dorades, Sparidés;PA
-GNCBEN;Filets maillants encerclants à Orphies, Aiguilles;GA
-GNCBEN;Filets maillants encerclants à Orphies, Aiguilles;MA
-GNCBIS;Filets maillants encerclants à Sélar coulisou (= Koulirou);GA
-GNCBIS;Filets maillants encerclants à Sélar coulisou (= Koulirou);MA
-GNCBSS;Filets maillants encerclants à Bar commun;GA
-GNCBSS;Filets maillants encerclants à Bar commun;MA
-GNCBSS;Filets maillants encerclants à Bar commun;LR
-GNCBSS;Filets maillants encerclants à Bar commun;PA
-GNCCLP;Filets maillants encerclants à Sardines, Sardinelles, Harengules;GA
-GNCCLP;Filets maillants encerclants à Sardines, Sardinelles, Harengules;MA
-GNCHAX;Filets maillants encerclants à Demi-becs (divers) (= Balarou);GA
-GNCHAX;Filets maillants encerclants à Demi-becs (divers) (= Balarou);MA
-GNCMUL;Filets maillants encerclants à Mulets (divers);GA
-GNCMUL;Filets maillants encerclants à Mulets (divers);MA
-GNCMUL;Filets maillants encerclants à Mulets (divers);LR
-GNCMUL;Filets maillants encerclants à Mulets (divers);PA
-GNCMZZ;Filets maillants encerclants à Poissons;GA
-GNCMZZ;Filets maillants encerclants à Poissons;MA
-GNCMZZ;Filets maillants encerclants à Poissons;LR
-GNCMZZ;Filets maillants encerclants à Poissons;PA
-GNCSBG;Filets maillants encerclants à Dorade royale;CO
-GNCSBG;Filets maillants encerclants à Dorade royale;LR
-GNCSBG;Filets maillants encerclants à Dorade royale;PA
-GNCSBX;Filets maillants encerclants à Dorades, Sparidés;CO
-GNCSBX;Filets maillants encerclants à Dorades, Sparidés;LR
-GNCSBX;Filets maillants encerclants à Dorades, Sparidés;PA
-GNCSIL;Filets maillants encerclants à Athérines (divers);CO
-GNCSIL;Filets maillants encerclants à Athérines (divers);LR
-GNCSIL;Filets maillants encerclants à Athérines (divers);PA
-GND_BT;Filets maillants dérivants à Bonites (divers);LR
-GND_BT;Filets maillants dérivants à Bonites (divers);PA
-GNDBFT;Filets maillants dérivants à Thon rouge;LR
-GNDBFT;Filets maillants dérivants à Thon rouge;PA
-GNDDGX;Filets maillants dérivants à Squales (divers);GY
-GNDFLY;Filets maillants dérivants à Poissons volants (divers);GA
-GNDFLY;Filets maillants dérivants à Poissons volants (divers);MA
-GNDHAX;Filets maillants dérivants à Demi-becs (divers) (= Balarou);GA
-GNDHAX;Filets maillants dérivants à Demi-becs (divers) (= Balarou);MA
-GNDMUL;Filets maillants dérivants à Mulets (divers);LR
-GNDMUL;Filets maillants dérivants à Mulets (divers);PA
-GNDMUM;Filets maillants dérivants à Rougets (divers);LR
-GNDMUM;Filets maillants dérivants à Rougets (divers);PA
-GNDMZZ;Filets maillants dérivants à Poissons;GA
-GNDMZZ;Filets maillants dérivants à Poissons;GY
-GNDMZZ;Filets maillants dérivants à Poissons;MA
-GNDMZZ;Filets maillants dérivants à Poissons;LR
-GNDMZZ;Filets maillants dérivants à Poissons;PA
-GNDPIL;Filets maillants dérivants à Sardine commune;LR
-GNDPIL;Filets maillants dérivants à Sardine commune;PA
-GNDTUN;Filets maillants dérivants à Thons (divers);LR
-GNDTUN;Filets maillants dérivants à Thons (divers);PA
-GNDTUN;Filets maillants dérivants à Thons (divers);RU
-GNMZZ;Filets maillants à Poissons;GA
-GNMZZ;Filets maillants à Poissons;GY
-GNMZZ;Filets maillants à Poissons;MA
-GNMZZ;Filets maillants à Poissons;LR
-GNMZZ;Filets maillants à Poissons;PA
-GNS_BT;Filets maillants calés à Bonites (divers);LR
-GNS_BT;Filets maillants calés à Bonites (divers);PA
-GNS_EP;Filets maillants calés à Eperlans (divers);LR
-GNS_EP;Filets maillants calés à Eperlans (divers);PA
-GNS_GC;Filets maillants calés à Araignée, Tourteau, Homard;CO
-GNSBFT;Filets maillants calés à Thon rouge;LR
-GNSBFT;Filets maillants calés à Thon rouge;PA
-GNSBLF;Filets maillants calés à Thon à nageoires noires;GA
-GNSBLF;Filets maillants calés à Thon à nageoires noires;MA
-GNSBSS;Filets maillants calés à Bar commun;LR
-GNSBSS;Filets maillants calés à Bar commun;PA
-GNSCGX;Filets maillants calés à Carangues (divers);GA
-GNSCGX;Filets maillants calés à Carangues (divers);MA
-GNSCGX;Filets maillants calés à Carangues (divers);LR
-GNSCGX;Filets maillants calés à Carangues (divers);PA
-GNSCGX;Filets maillants calés à Carangues (divers);RU
-GNSCOD;Filets maillants calés à Morue (= Cabillaud);CO
-GNSCON;Filets maillants calés à Strombes (= Lambis) (divers);GA
-GNSCON;Filets maillants calés à Strombes (= Lambis) (divers);MA
-GNSCRW;Filets maillants calés à Langoustes (divers);GA
-GNSCRW;Filets maillants calés à Langoustes (divers);MA
-GNSCRW;Filets maillants calés à Langoustes (divers);LR
-GNSCRW;Filets maillants calés à Langoustes (divers);PA
-GNSCRW;Filets maillants calés à Langoustes (divers);RU
-GNSHKX;Filets maillants calés à Merlus (divers);CO
-GNSHKX;Filets maillants calés à Merlus (divers);LR
-GNSHKX;Filets maillants calés à Merlus (divers);PA
-GNSIAX;Filets maillants calés à Seiches (divers);LR
-GNSIAX;Filets maillants calés à Seiches (divers);PA
-GNSJOD;Filets maillants calés à Saint-Pierre;GY
-GNSJOD;Filets maillants calés à Saint-Pierre;LR
-GNSJOD;Filets maillants calés à Saint-Pierre;PA
-GNSMAX;Filets maillants calés à Maquereaux (divers);GA
-GNSMAX;Filets maillants calés à Maquereaux (divers);MA
-GNSMAX;Filets maillants calés à Maquereaux (divers);LR
-GNSMAX;Filets maillants calés à Maquereaux (divers);PA
-GNSMUL;Filets maillants calés à Mulets (divers);GA
-GNSMUL;Filets maillants calés à Mulets (divers);GY
-GNSMUL;Filets maillants calés à Mulets (divers);MA
-GNSMUL;Filets maillants calés à Mulets (divers);LR
-GNSMUL;Filets maillants calés à Mulets (divers);PA
-GNSMUM;Filets maillants calés à Rougets (divers);CO
-GNSMUM;Filets maillants calés à Rougets (divers);GA
-GNSMUM;Filets maillants calés à Rougets (divers);MA
-GNSMUM;Filets maillants calés à Rougets (divers);LR
-GNSMUM;Filets maillants calés à Rougets (divers);PA
-GNSMZZ;Filets maillants calés à Poissons;CO
-GNSMZZ;Filets maillants calés à Poissons;GA
-GNSMZZ;Filets maillants calés à Poissons;GY
-GNSMZZ;Filets maillants calés à Poissons;MA
-GNSMZZ;Filets maillants calés à Poissons;LR
-GNSMZZ;Filets maillants calés à Poissons;PA
-GNSMZZ;Filets maillants calés à Poissons;RU
-GNSPIL;Filets maillants calés à Sardine commune;LR
-GNSPIL;Filets maillants calés à Sardine commune;PA
-GNSPWT;Filets maillants calés à Poissons perroquets (divers);GA
-GNSPWT;Filets maillants calés à Poissons perroquets (divers);MA
-GNSPWT;Filets maillants calés à Poissons perroquets (divers);RU
-GNSRAJ;Filets maillants calés à Raies (divers);GA
-GNSRAJ;Filets maillants calés à Raies (divers);MA
-GNSSBG;Filets maillants calés à Dorade royale;CO
-GNSSBG;Filets maillants calés à Dorade royale;LR
-GNSSBG;Filets maillants calés à Dorade royale;PA
-GNSSBX;Filets maillants calés à Dorades, Sparidés;CO
-GNSSBX;Filets maillants calés à Dorades, Sparidés;LR
-GNSSBX;Filets maillants calés à Dorades, Sparidés;PA
-GNSSNX;Filets maillants calés à Vivaneaux (divers);GA
-GNSSNX;Filets maillants calés à Vivaneaux (divers);MA
-GNSSOX;Filets maillants calés à Soles (divers);LR
-GNSSOX;Filets maillants calés à Soles (divers);PA
-GNSSOX;Filets maillants calés à Soles (divers);RU
-GNSSWM;Filets maillants calés à Petits crustacés;LR
-GNSSWM;Filets maillants calés à Petits crustacés;PA
-GNSTUR;Filets maillants calés à Turbot;LR
-GNSTUR;Filets maillants calés à Turbot;PA
-GTN_BT;Trémails et filets maillants combinés à Bonites (divers);LR
-GTN_BT;Trémails et filets maillants combinés à Bonites (divers);PA
-GTNBSS;Trémails et filets maillants combinés à Bar commun;LR
-GTNBSS;Trémails et filets maillants combinés à Bar commun;PA
-GTNMZZ;Trémails et filets maillants combinés à Poissons;CO
-GTNMZZ;Trémails et filets maillants combinés à Poissons;LR
-GTNMZZ;Trémails et filets maillants combinés à Poissons;PA
-GTNSBG;Trémails et filets maillants combinés à Dorade royale;LR
-GTNSBG;Trémails et filets maillants combinés à Dorade royale;PA
-GTNSBX;Trémails et filets maillants combinés à Dorades, Sparidés;LR
-GTNSBX;Trémails et filets maillants combinés à Dorades, Sparidés;PA
-GTNSCO;Trémails et filets maillants combinés à Rascasses (divers);LR
-GTNSCO;Trémails et filets maillants combinés à Rascasses (divers);PA
-GTR_GC;Trémails à Araignée, Tourteau, Homard;LR
-GTR_GC;Trémails à Araignée, Tourteau, Homard;PA
-GTR_RE;Trémails à Murex, Rochers;LR
-GTR_RE;Trémails à Murex, Rochers;PA
-GTRBSS;Trémails à Bar commun;LR
-GTRBSS;Trémails à Bar commun;PA
-GTRCON;Trémails à Strombes (= Lambis) (divers);GA
-GTRCON;Trémails à Strombes (= Lambis) (divers);MA
-GTRCRW;Trémails à Langoustes (divers);CO
-GTRCRW;Trémails à Langoustes (divers);GA
-GTRCRW;Trémails à Langoustes (divers);MA
-GTRCRW;Trémails à Langoustes (divers);LR
-GTRCRW;Trémails à Langoustes (divers);PA
-GTRDGX;Trémails à Squales (divers);GA
-GTRDGX;Trémails à Squales (divers);MA
-GTRFLX;Trémails à Poissons plats;LR
-GTRFLX;Trémails à Poissons plats;PA
-GTRHKX;Trémails à Merlus (divers);LR
-GTRHKX;Trémails à Merlus (divers);PA
-GTRIAX;Trémails à Seiches (divers);CO
-GTRIAX;Trémails à Seiches (divers);LR
-GTRIAX;Trémails à Seiches (divers);PA
-GTRLBS;Trémails à Homards (divers);LR
-GTRLBS;Trémails à Homards (divers);PA
-GTRLOS;Trémails à Cigales (divers);LR
-GTRLOS;Trémails à Cigales (divers);PA
-GTRMNZ;Trémails à Baudroies (= Lottes) (divers);CO
-GTRMNZ;Trémails à Baudroies (= Lottes) (divers);GA
-GTRMNZ;Trémails à Baudroies (= Lottes) (divers);MA
-GTRMNZ;Trémails à Baudroies (= Lottes) (divers);LR
-GTRMNZ;Trémails à Baudroies (= Lottes) (divers);PA
-GTRMUL;Trémails à Mulets (divers);LR
-GTRMUL;Trémails à Mulets (divers);PA
-GTRMUM;Trémails à Rougets (divers);CO
-GTRMUM;Trémails à Rougets (divers);LR
-GTRMUM;Trémails à Rougets (divers);PA
-GTRMZZ;Trémails à Poissons;CO
-GTRMZZ;Trémails à Poissons;GA
-GTRMZZ;Trémails à Poissons;GY
-GTRMZZ;Trémails à Poissons;MA
-GTRMZZ;Trémails à Poissons;LR
-GTRMZZ;Trémails à Poissons;PA
-GTRRAJ;Trémails à Raies (divers);CO
-GTRRAJ;Trémails à Raies (divers);GA
-GTRRAJ;Trémails à Raies (divers);MA
-GTRRAJ;Trémails à Raies (divers);LR
-GTRRAJ;Trémails à Raies (divers);PA
-GTRSBG;Trémails à Dorade royale;LR
-GTRSBG;Trémails à Dorade royale;PA
-GTRSBX;Trémails à Dorades, Sparidés;CO
-GTRSBX;Trémails à Dorades, Sparidés;GA
-GTRSBX;Trémails à Dorades, Sparidés;GY
-GTRSBX;Trémails à Dorades, Sparidés;MA
-GTRSBX;Trémails à Dorades, Sparidés;LR
-GTRSBX;Trémails à Dorades, Sparidés;PA
-GTRSCO;Trémails à Rascasses (divers);CO
-GTRSCO;Trémails à Rascasses (divers);LR
-GTRSCO;Trémails à Rascasses (divers);PA
-GTRSOX;Trémails à Soles (divers);CO
-GTRSOX;Trémails à Soles (divers);LR
-GTRSOX;Trémails à Soles (divers);PA
-GTRSOX;Trémails à Soles (divers);RU
-GTRTUR;Trémails à Turbot;LR
-GTRTUR;Trémails à Turbot;PA
-HESPIL;Haveneaux, Épuisettes, Salabardes à Sardine commune;LR
-HESPIL;Haveneaux, Épuisettes, Salabardes à Sardine commune;PA
-INA;Inactif;GY
-LAANE;Lamparo à Anchois commun;LR
-LAANE;Lamparo à Anchois commun;PA
-LH_GA;Lignes de traîne, Lignes à main à Gadidés (divers);LR
-LH_GA;Lignes de traîne, Lignes à main à Gadidés (divers);PA
-LHBFT;Lignes de traîne, Lignes à main à Thon rouge;LR
-LHBFT;Lignes de traîne, Lignes à main à Thon rouge;PA
-LHBSS;Lignes de traîne, Lignes à main à Bar commun;LR
-LHBSS;Lignes de traîne, Lignes à main à Bar commun;PA
-LHM_DF;Lignes et lignes avec cannes mécanisées à Poissons de fond (benthiques);RU
-LHMZZ;Lignes de traîne, Lignes à main à Poissons;GA
-LHMZZ;Lignes de traîne, Lignes à main à Poissons;MA
-LHMZZ;Lignes de traîne, Lignes à main à Poissons;LR
-LHMZZ;Lignes de traîne, Lignes à main à Poissons;PA
-LHP_DF;Lignes et lignes avec cannes à main à Poissons de fond (benthiques);GA
-LHP_DF;Lignes et lignes avec cannes à main à Poissons de fond (benthiques);MA
-LHP_DF;Lignes et lignes avec cannes à main à Poissons de fond (benthiques);RU
-LHP_LP;Lignes et lignes avec cannes à main à Grands pélagiques;CO
-LHP_LP;Lignes et lignes avec cannes à main à Grands pélagiques;GA
-LHP_LP;Lignes et lignes avec cannes à main à Grands pélagiques;MA
-LHP_LP;Lignes et lignes avec cannes à main à Grands pélagiques;LR
-LHP_LP;Lignes et lignes avec cannes à main à Grands pélagiques;PA
-LHP_LP;Lignes et lignes avec cannes à main à Grands pélagiques;RU
-LHP_MS;Lignes et lignes avec cannes à main à Mérous (divers);GY
-LHP_SP;Lignes et lignes avec cannes à main à Petits pélagiques;GA
-LHP_SP;Lignes et lignes avec cannes à main à Petits pélagiques;MA
-LHP_SP;Lignes et lignes avec cannes à main à Petits pélagiques;LR
-LHP_SP;Lignes et lignes avec cannes à main à Petits pélagiques;PA
-LHP_SP;Lignes et lignes avec cannes à main à Petits pélagiques;RU
-LHPBEN;Lignes et lignes avec cannes à main à Orphies, Aiguilles;GA
-LHPBEN;Lignes et lignes avec cannes à main à Orphies, Aiguilles;MA
-LHPBFT;Lignes et lignes avec cannes à main à Thon rouge;LR
-LHPBFT;Lignes et lignes avec cannes à main à Thon rouge;PA
-LHPBSS;Lignes et lignes avec cannes à main à Bar commun;GA
-LHPBSS;Lignes et lignes avec cannes à main à Bar commun;MA
-LHPBSS;Lignes et lignes avec cannes à main à Bar commun;LR
-LHPBSS;Lignes et lignes avec cannes à main à Bar commun;PA
-LHPDOX;Lignes et lignes avec cannes à main à Dorades Coryphènes (divers);CO
-LHPMAX;Lignes et lignes avec cannes à main à Maquereaux (divers);GY
-LHPMZZ;Lignes et lignes avec cannes à main à Poissons;GA
-LHPMZZ;Lignes et lignes avec cannes à main à Poissons;MA
-LHPMZZ;Lignes et lignes avec cannes à main à Poissons;LR
-LHPMZZ;Lignes et lignes avec cannes à main à Poissons;PA
-LHPOCT;Lignes et lignes avec cannes à main à Poulpes, Pieuvres, Elédones;LR
-LHPOCT;Lignes et lignes avec cannes à main à Poulpes, Pieuvres, Elédones;PA
-LHPPOL;Lignes et lignes avec cannes à main à Lieu jaune;LR
-LHPPOL;Lignes et lignes avec cannes à main à Lieu jaune;PA
-LHPSNX;Lignes et lignes avec cannes à main à Vivaneaux (divers);GA
-LHPSNX;Lignes et lignes avec cannes à main à Vivaneaux (divers);MA
-LHPSNY;Lignes et lignes avec cannes à main à Vivaneau à queue jaune;GA
-LHPSNY;Lignes et lignes avec cannes à main à Vivaneau à queue jaune;MA
-LHPSQU;Lignes et lignes avec cannes à main à Calmars, Encornets;LR
-LHPSQU;Lignes et lignes avec cannes à main à Calmars, Encornets;PA
-LHPSQU;Lignes et lignes avec cannes à main à Calmars, Encornets;RU
-LHPTUN;Lignes et lignes avec cannes à main à Thons (divers);GA
-LHPTUN;Lignes et lignes avec cannes à main à Thons (divers);MA
-LHPTUN;Lignes et lignes avec cannes à main à Thons (divers);LR
-LHPTUN;Lignes et lignes avec cannes à main à Thons (divers);PA
-LHSBR;Lignes de traîne, Lignes à main à Pageot rose (= Dorade rose);LR
-LHSBR;Lignes de traîne, Lignes à main à Pageot rose (= Dorade rose);PA
-LHTUN;Lignes de traîne, Lignes à main à Thons (divers);LR
-LHTUN;Lignes de traîne, Lignes à main à Thons (divers);PA
-LLBSS;Palangres diverses (non spécifiées) à Bar commun;CO
-LLBSS;Palangres diverses (non spécifiées) à Bar commun;LR
-LLBSS;Palangres diverses (non spécifiées) à Bar commun;PA
-LLD_GA;Palangres dérivantes à Gadidés (divers);GY
-LLDBFT;Palangres dérivantes à Thon rouge;CO
-LLDBFT;Palangres dérivantes à Thon rouge;LR
-LLDBFT;Palangres dérivantes à Thon rouge;PA
-LLDBSS;Palangres dérivantes à Bar commun;LR
-LLDBSS;Palangres dérivantes à Bar commun;PA
-LLDHKX;Palangres dérivantes à Merlus (divers);LR
-LLDHKX;Palangres dérivantes à Merlus (divers);PA
-LLDMZZ;Palangres dérivantes à Poissons;GA
-LLDMZZ;Palangres dérivantes à Poissons;MA
-LLDMZZ;Palangres dérivantes à Poissons;LR
-LLDMZZ;Palangres dérivantes à Poissons;PA
-LLDSBX;Palangres dérivantes à Dorades, Sparidés;LR
-LLDSBX;Palangres dérivantes à Dorades, Sparidés;PA
-LLDSWO;Palangres dérivantes à Espadon;LR
-LLDSWO;Palangres dérivantes à Espadon;PA
-LLDSWO;Palangres dérivantes à Espadon;RU
-LLDTUN;Palangres dérivantes à Thons (divers);LR
-LLDTUN;Palangres dérivantes à Thons (divers);PA
-LLFBSS;Palangres calées flottantes à Bar commun;CO
-LLFBSS;Palangres calées flottantes à Bar commun;LR
-LLFBSS;Palangres calées flottantes à Bar commun;PA
-LLFMZZ;Palangres calées flottantes à Poissons;LR
-LLFMZZ;Palangres calées flottantes à Poissons;PA
-LLFSBG;Palangres calées flottantes à Dorade royale;LR
-LLFSBG;Palangres calées flottantes à Dorade royale;PA
-LLMZZ;Palangres diverses (non spécifiées) à Poissons;CO
-LLMZZ;Palangres diverses (non spécifiées) à Poissons;LR
-LLMZZ;Palangres diverses (non spécifiées) à Poissons;PA
-LLMZZ;Palangres diverses (non spécifiées) à Poissons;RU
-LLS_DF;Palangres de fond (calées) à Poissons de fond (benthiques);GA
-LLS_DF;Palangres de fond (calées) à Poissons de fond (benthiques);MA
-LLS_DF;Palangres de fond (calées) à Poissons de fond (benthiques);RU
-LLS_GA;Palangres de fond (calées) à Gadidés (divers);CO
-LLS_GA;Palangres de fond (calées) à Gadidés (divers);GY
-LLS_MS;Palangres de fond (calées) à Mérous (divers);LR
-LLS_MS;Palangres de fond (calées) à Mérous (divers);PA
-LLSBSS;Palangres de fond (calées) à Bar commun;LR
-LLSBSS;Palangres de fond (calées) à Bar commun;PA
-LLSBX;Palangres diverses (non spécifiées) à Dorades, Sparidés;LR
-LLSBX;Palangres diverses (non spécifiées) à Dorades, Sparidés;PA
-LLSCOE;Palangres de fond (calées) à Congre;LR
-LLSCOE;Palangres de fond (calées) à Congre;PA
-LLSCUT;Palangres de fond (calées) à Sabres (divers);LR
-LLSCUT;Palangres de fond (calées) à Sabres (divers);PA
-LLSDGX;Palangres de fond (calées) à Squales (divers);GA
-LLSDGX;Palangres de fond (calées) à Squales (divers);MA
-LLSDGX;Palangres de fond (calées) à Squales (divers);LR
-LLSDGX;Palangres de fond (calées) à Squales (divers);PA
-LLSEBS;Palangres de fond (calées) à Mochong (= Brème noire);RU
-LLSELX;Palangres de fond (calées) à Anguilles, Civelle;LR
-LLSELX;Palangres de fond (calées) à Anguilles, Civelle;PA
-LLSHKX;Palangres de fond (calées) à Merlus (divers);LR
-LLSHKX;Palangres de fond (calées) à Merlus (divers);PA
-LLSMZZ;Palangres de fond (calées) à Poissons;CO
-LLSMZZ;Palangres de fond (calées) à Poissons;GA
-LLSMZZ;Palangres de fond (calées) à Poissons;MA
-LLSMZZ;Palangres de fond (calées) à Poissons;LR
-LLSMZZ;Palangres de fond (calées) à Poissons;PA
-LLSMZZ;Palangres de fond (calées) à Poissons;RU
-LLSRAJ;Palangres de fond (calées) à Raies (divers);GA
-LLSRAJ;Palangres de fond (calées) à Raies (divers);MA
-LLSSBG;Palangres de fond (calées) à Dorade royale;LR
-LLSSBG;Palangres de fond (calées) à Dorade royale;PA
-LLSSBR;Palangres de fond (calées) à Pageot rose (= Dorade rose);LR
-LLSSBR;Palangres de fond (calées) à Pageot rose (= Dorade rose);PA
-LLSSBX;Palangres de fond (calées) à Dorades, Sparidés;LR
-LLSSBX;Palangres de fond (calées) à Dorades, Sparidés;PA
-LLSSNX;Palangres de fond (calées) à Vivaneaux (divers);CO
-LLSSNX;Palangres de fond (calées) à Vivaneaux (divers);GA
-LLSSNX;Palangres de fond (calées) à Vivaneaux (divers);GY
-LLSSNX;Palangres de fond (calées) à Vivaneaux (divers);MA
-LLSSNX;Palangres de fond (calées) à Vivaneaux (divers);RU
-LLSSNY;Palangres de fond (calées) à Vivaneau à queue jaune;GA
-LLSSNY;Palangres de fond (calées) à Vivaneau à queue jaune;MA
-LNBMZZ;Filets soulevés manœuvrés du bateau à Poissons;LR
-LNBMZZ;Filets soulevés manœuvrés du bateau à Poissons;PA
-LNPRAQ;Filets soulevés portatifs (Balances) à Crabe Girafe;RU
-LNSELX;Filet soulevé fixe manoeuvré du rivage à Anguilles, Civelle;LR
-LNSELX;Filet soulevé fixe manoeuvré du rivage à Anguilles, Civelle;PA
-LNSMUL;Filet soulevé fixe manoeuvré du rivage à Mulets;LR
-LNSMUL;Filet soulevé fixe manoeuvré du rivage à Mulets;PA
-LNSMZZ;Filet soulevé fixe manoeuvré du rivage à Divers poissons;LR
-LNSMZZ;Filet soulevé fixe manoeuvré du rivage à Divers poissons;PA
-LSPBSS;Lignes calées (avec ou sans canne) à Bar commun;LR
-LSPBSS;Lignes calées (avec ou sans canne) à Bar commun;PA
-LTF_LP;Lignes traînantes de fond à Grands pélagiques;GA
-LTF_LP;Lignes traînantes de fond à Grands pélagiques;MA
-LTL_BT;Lignes de traîne à Bonites (divers);GA
-LTL_BT;Lignes de traîne à Bonites (divers);MA
-LTL_BT;Lignes de traîne à Bonites (divers);LR
-LTL_BT;Lignes de traîne à Bonites (divers);PA
-LTL_LP;Lignes de traîne à Grands pélagiques;GA
-LTL_LP;Lignes de traîne à Grands pélagiques;MA
-LTL_LP;Lignes de traîne à Grands pélagiques;RU
-LTL_SP;Lignes de traîne à Petits pélagiques;GA
-LTL_SP;Lignes de traîne à Petits pélagiques;MA
-LTL_SP;Lignes de traîne à Petits pélagiques;RU
-LTLBFT;Lignes de traîne à Thon rouge;LR
-LTLBFT;Lignes de traîne à Thon rouge;PA
-LTLBSS;Lignes de traîne à Bar commun;LR
-LTLBSS;Lignes de traîne à Bar commun;PA
-LTLKGX;Lignes de traîne à Thazards (divers);GA
-LTLKGX;Lignes de traîne à Thazards (divers);MA
-LTLMAX;Lignes de traîne à Maquereaux (divers);CO
-LTLMZZ;Lignes de traîne à Poissons;GA
-LTLMZZ;Lignes de traîne à Poissons;MA
-LTLMZZ;Lignes de traîne à Poissons;LR
-LTLMZZ;Lignes de traîne à Poissons;PA
-LTLSWO;Lignes de traîne à Espadon;LR
-LTLSWO;Lignes de traîne à Espadon;PA
-LTP_LP;Lignes de traîne profondes à Grands pélagiques;GA
-LTP_LP;Lignes de traîne profondes à Grands pélagiques;MA
-LTS_LP;Lignes de traîne de surface à Grands pélagiques;GA
-LTS_LP;Lignes de traîne de surface à Grands pélagiques;GY
-LTS_LP;Lignes de traîne de surface à Grands pélagiques;MA
-LVD_LP;Palangres verticales dérivantes à Grands pélagiques;RU
-LX_LP;Lignes et palangres (non spécifiées) à Grands pélagiques;LR
-LX_LP;Lignes et palangres (non spécifiées) à Grands pélagiques;PA
-MIL_LP;Miquelon Lignes et palangres à Grands pélagiques;GA
-MIL_LP;Miquelon Lignes et palangres à Grands pélagiques;MA
-OTB_EP;Chaluts de fond à panneaux (1 Navire) à Eperlans (divers);CO
-OTB_GA;Chaluts de fond à panneaux (1 Navire) à Gadidés (divers);CO
-OTBANE;Chaluts de fond à panneaux (1 Navire) à Anchois commun;LR
-OTBANE;Chaluts de fond à panneaux (1 Navire) à Anchois commun;PA
-OTBBSS;Chaluts de fond à panneaux (1 Navire) à Bar commun;LR
-OTBBSS;Chaluts de fond à panneaux (1 Navire) à Bar commun;PA
-OTBDCP;Chaluts de fond à panneaux (1 Navire) à Crevettes (divers);LR
-OTBDCP;Chaluts de fond à panneaux (1 Navire) à Crevettes (divers);PA
-OTBHKX;Chaluts de fond à panneaux (1 Navire) à Merlus (divers);LR
-OTBHKX;Chaluts de fond à panneaux (1 Navire) à Merlus (divers);PA
-OTBMGR;Chaluts de fond à panneaux (1 Navire) à Maigre;CO
-OTBMNZ;Chaluts de fond à panneaux (1 Navire) à Baudroies (= Lottes) (divers);CO
-OTBMNZ;Chaluts de fond à panneaux (1 Navire) à Baudroies (= Lottes) (divers);LR
-OTBMNZ;Chaluts de fond à panneaux (1 Navire) à Baudroies (= Lottes) (divers);PA
-OTBMUM;Chaluts de fond à panneaux (1 Navire) à Rougets (divers);LR
-OTBMUM;Chaluts de fond à panneaux (1 Navire) à Rougets (divers);PA
-OTBMZZ;Chaluts de fond à panneaux (1 Navire) à Poissons;LR
-OTBMZZ;Chaluts de fond à panneaux (1 Navire) à Poissons;PA
-OTBNEP;Chaluts de fond à panneaux (1 Navire) à Langoustine commune;LR
-OTBNEP;Chaluts de fond à panneaux (1 Navire) à Langoustine commune;PA
-OTBSBG;Chaluts de fond à panneaux (1 Navire) à Dorade royale;LR
-OTBSBG;Chaluts de fond à panneaux (1 Navire) à Dorade royale;PA
-OTBSBX;Chaluts de fond à panneaux (1 Navire) à Dorades, Sparidés;LR
-OTBSBX;Chaluts de fond à panneaux (1 Navire) à Dorades, Sparidés;PA
-OTBSOX;Chaluts de fond à panneaux (1 Navire) à Soles (divers);LR
-OTBSOX;Chaluts de fond à panneaux (1 Navire) à Soles (divers);PA
-OTBSQU;Chaluts de fond à panneaux (1 Navire) à Calmars, Encornets;LR
-OTBSQU;Chaluts de fond à panneaux (1 Navire) à Calmars, Encornets;PA
-OTMANE;Chaluts pélagiques à panneaux (1 Navire) à Anchois commun;LR
-OTMANE;Chaluts pélagiques à panneaux (1 Navire) à Anchois commun;PA
-OTMHKX;Chaluts pélagiques à panneaux (1 Navire) à Merlus (divers);LR
-OTMHKX;Chaluts pélagiques à panneaux (1 Navire) à Merlus (divers);PA
-OTMMZZ;Chaluts pélagiques à panneaux (1 Navire) à Poissons;LR
-OTMMZZ;Chaluts pélagiques à panneaux (1 Navire) à Poissons;PA
-OTMMZZ;Chaluts pélagiques à panneaux (1 Navire) à Poissons;RU
-OTMPIL;Chaluts pélagiques à panneaux (1 Navire) à Sardine commune;LR
-OTMPIL;Chaluts pélagiques à panneaux (1 Navire) à Sardine commune;PA
-OTTMZZ;Chaluts jumeaux à Poissons;LR
-OTTMZZ;Chaluts jumeaux à Poissons;PA
-PRE_LP;Charter de pêche récréative (lignes et palangres) à Grands pélagiques;GA
-PRE_LP;Charter de pêche récréative (lignes et palangres) à Grands pélagiques;MA
-PRE_LP;Charter de pêche récréative (lignes et palangres) à Grands pélagiques;LR
-PRE_LP;Charter de pêche récréative (lignes et palangres) à Grands pélagiques;PA
-PRE_LP;Charter de pêche récréative (lignes et palangres) à Grands pélagiques;RU
-PREBFT;Charter de pêche récréative (lignes et palangres) à Thon rouge;LR
-PREBFT;Charter de pêche récréative (lignes et palangres) à Thon rouge;PA
-PREMZZ;Charter de pêche récréative (lignes et palangres) à Poissons;GA
-PREMZZ;Charter de pêche récréative (lignes et palangres) à Poissons;MA
-PREMZZ;Charter de pêche récréative (lignes et palangres) à Poissons;LR
-PREMZZ;Charter de pêche récréative (lignes et palangres) à Poissons;PA
-PS_BT;Sennes tournantes coulissantes à Bonites (divers);GA
-PS_BT;Sennes tournantes coulissantes à Bonites (divers);MA
-PS_BT;Sennes tournantes coulissantes à Bonites (divers);LR
-PS_BT;Sennes tournantes coulissantes à Bonites (divers);PA
-PS_LP;Sennes tournantes coulissantes à Grands pélagiques;CO
-PS_LP;Sennes tournantes coulissantes à Grands pélagiques;GA
-PS_LP;Sennes tournantes coulissantes à Grands pélagiques;MA
-PSANE;Sennes tournantes coulissantes à Anchois commun;CO
-PSANE;Sennes tournantes coulissantes à Anchois commun;LR
-PSANE;Sennes tournantes coulissantes à Anchois commun;PA
-PSBFT;Sennes tournantes coulissantes à Thon rouge;LR
-PSBFT;Sennes tournantes coulissantes à Thon rouge;PA
-PSHER;Sennes tournantes coulissantes à Hareng commun;CO
-PSJAX;Sennes tournantes coulissantes à Chinchards (divers);LR
-PSJAX;Sennes tournantes coulissantes à Chinchards (divers);PA
-PSMZZ;Sennes tournantes coulissantes à Poissons;GA
-PSMZZ;Sennes tournantes coulissantes à Poissons;MA
-PSMZZ;Sennes tournantes coulissantes à Poissons;LR
-PSMZZ;Sennes tournantes coulissantes à Poissons;PA
-PSPIL;Sennes tournantes coulissantes à Sardine commune;LR
-PSPIL;Sennes tournantes coulissantes à Sardine commune;PA
-PSSBG;Sennes tournantes coulissantes à Dorade royale;LR
-PSSBG;Sennes tournantes coulissantes à Dorade royale;PA
-PSSBX;Sennes tournantes coulissantes à Dorades, Sparidés;CO
-PSSBX;Sennes tournantes coulissantes à Dorades, Sparidés;LR
-PSSBX;Sennes tournantes coulissantes à Dorades, Sparidés;PA
-PSSNY;Sennes tournantes coulissantes à Vivaneau à queue jaune;GA
-PSSNY;Sennes tournantes coulissantes à Vivaneau à queue jaune;MA
-PSTUN;Sennes tournantes coulissantes à Thons (divers);CO
-PSTUN;Sennes tournantes coulissantes à Thons (divers);GA
-PSTUN;Sennes tournantes coulissantes à Thons (divers);MA
-PSTUN;Sennes tournantes coulissantes à Thons (divers);LR
-PSTUN;Sennes tournantes coulissantes à Thons (divers);PA
-PTBHKE;Chaluts de fond (2 Navires) à Merlu européen;CO
-PTMTUN;Chaluts pélagiques (2 Navires) à Thons (divers);CO
-SB_BT;Sennes de plage à Bonites (divers);GA
-SB_BT;Sennes de plage à Bonites (divers);MA
-SB_SP;Sennes de plage à Petits pélagiques;GA
-SB_SP;Sennes de plage à Petits pélagiques;MA
-SB_SP;Sennes de plage à Petits pélagiques;LR
-SB_SP;Sennes de plage à Petits pélagiques;PA
-SB_SP;Sennes de plage à Petits pélagiques;RU
-SBBEN;Sennes de plage à Orphies, Aiguilles;GA
-SBBEN;Sennes de plage à Orphies, Aiguilles;MA
-SBBIS;Sennes de plage à Sélar coulisou (= Koulirou);GA
-SBBIS;Sennes de plage à Sélar coulisou (= Koulirou);GY
-SBBIS;Sennes de plage à Sélar coulisou (= Koulirou);MA
-SBGOX;Sennes de plage à Capucins nains (divers);RU
-SBHAX;Sennes de plage à Demi-becs (divers) (= Balarou);GA
-SBHAX;Sennes de plage à Demi-becs (divers) (= Balarou);MA
-SBIYL;Sennes de plage à Bichique;RU
-SBMZZ;Sennes de plage à Poissons;GA
-SBMZZ;Sennes de plage à Poissons;MA
-SBMZZ;Sennes de plage à Poissons;LR
-SBMZZ;Sennes de plage à Poissons;PA
-SBMZZ;Sennes de plage à Poissons;RU
-SBPIL;Sennes de plage à Sardine commune;LR
-SBPIL;Sennes de plage à Sardine commune;PA
-SDV_PA;Plongée avec bouteilles à palourdes;LR
-SDV_PA;Plongée avec bouteilles à palourdes;PA
-SDVCOR;Plongée sous-marine à Coraux;LR
-SDVCOR;Plongée sous-marine à Coraux;PA
-SDVDON;Plongée sous-marine à Donax (= Tellines, Flions, Olives);CO
-SDVECH;Plongée sous-marine à Oursins, Echinodermes;LR
-SDVECH;Plongée sous-marine à Oursins, Echinodermes;PA
-SDVINV;Plongée avec bouteilles à divers invertébrés aquatiques;LR
-SDVINV;Plongée avec bouteilles à divers invertébrés aquatiques;PA
-SDVMSX;Plongée sous-marine à Moules (divers);LR
-SDVMSX;Plongée sous-marine à Moules (divers);PA
-SDVMZZ;Plongée sous-marine à Poissons;LR
-SDVMZZ;Plongée sous-marine à Poissons;PA
-SDVSSG;Plongée sous-marine à Violet;LR
-SDVSSG;Plongée sous-marine à Violet;PA
-SVMZZ;Sennes halée à bord à Poissons;LR
-SVMZZ;Sennes halée à bord à Poissons;PA
-TBB_CJ;Chalut à perche à coquilles Saint Jacques;CO
-TBB_CJ;Chalut à perche à coquilles Saint Jacques;LR
-TBB_CJ;Chalut à perche à coquilles Saint Jacques;PA
-TBBMZZ;Chaluts à perche à Poissons;LR
-TBBMZZ;Chaluts à perche à Poissons;PA
-TBBQSC;Chaluts à perche à Pétoncle blanc (= Vanneau);CO
-TBBSQU;Chaluts à perche à Calmars, Encornets;CO
-TMBMZZ;Gangui à panneaux à Poissons;LR
-TMBMZZ;Gangui à panneaux à Poissons;PA
Modified: trunk/wao-persistence/src/main/xmi/wao-model.zargo
===================================================================
(Binary files differ)
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsFilterValues.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsFilterValues.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsFilterValues.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -25,7 +25,6 @@
import fr.ifremer.wao.BoatsFilter;
import fr.ifremer.wao.entity.Boat;
import fr.ifremer.wao.entity.ElligibleBoat;
-import fr.ifremer.wao.entity.Fleet;
import fr.ifremer.wao.entity.ObsProgram;
import fr.ifremer.wao.entity.SampleRow;
import fr.ifremer.wao.entity.ShipOwner;
@@ -56,8 +55,6 @@
protected SortedSet<FilterOption> portsOfRegistry = new TreeSet<>();
- protected SortedSet<FilterOption> fleets = new TreeSet<>();
-
protected SortedSet<FilterOption> boats = new TreeSet<>();
protected Set<String> boatIds = new HashSet<>();
@@ -103,13 +100,6 @@
);
}
- Fleet fleet = boat.getFleet();
- if (fleet != null) {
- fleets.add(FilterOption.forValueAndLabel(
- fleet.getTopiaId(),
- fleet.getDescription()));
- }
-
for (ElligibleBoat elligibleBoat : boat.getElligibleBoat()) {
SampleRow sampleRow = elligibleBoat.getSampleRow();
if (elligibleBoat.isBoatElligible()) {
@@ -135,10 +125,6 @@
return portsOfRegistry;
}
- public SortedSet<FilterOption> getFleets() {
- return fleets;
- }
-
public SortedSet<FilterOption> getBoats() {
return boats;
}
@@ -163,10 +149,6 @@
this.portsOfRegistry = portsOfRegistry;
}
- public void setFleets(SortedSet<FilterOption> fleets) {
- this.fleets = fleets;
- }
-
public BoatsFilterValues getCopyWithSingleProperty(String propertyName) {
// FIXME brendan 20/05/14 null is a design fail :-(
BoatsFilterValues copy = new BoatsFilterValues(locale, elligibleForSampleRowsFilterValues.getObsProgram(), null);
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -28,7 +28,6 @@
import fr.ifremer.wao.entity.ContactStateMotif;
import fr.ifremer.wao.entity.DataReliability;
import fr.ifremer.wao.entity.ObsProgram;
-import fr.ifremer.wao.entity.ObservationType;
import fr.ifremer.wao.entity.ObservedDataControl;
import fr.ifremer.wao.entity.SampleRow;
import fr.ifremer.wao.entity.SamplingStrategy;
@@ -67,8 +66,6 @@
protected SortedSet<FilterOption> actualSamplingStrategies = new TreeSet<>();
- protected SortedSet<FilterOption> observationTypes = new TreeSet<>();
-
protected SortedSet<FilterOption> observedDataControls = new TreeSet<>();
protected SortedSet<FilterOption> observers = new TreeSet<>();
@@ -113,11 +110,6 @@
actualSamplingStrategies.add(FilterOption.forEnum(locale, samplingStrategy));
}
- ObservationType observationType = contact.getObservationType();
- if (observationType != null) {
- observationTypes.add(FilterOption.forEnum(locale, observationType));
- }
-
ObservedDataControl observedDataControl = contact.getObservedDataControl();
if (observedDataControl == null) {
observedDataControls.add(FilterOption.forValueAndLabel("", l(locale, "wao.business.observedDataControl.undefined")));
@@ -185,10 +177,6 @@
return actualSamplingStrategies;
}
- public SortedSet<FilterOption> getObservationTypes() {
- return observationTypes;
- }
-
public SortedSet<FilterOption> getObservedDataControls() {
return observedDataControls;
}
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/WaoServiceSupport.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/WaoServiceSupport.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/WaoServiceSupport.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -23,7 +23,6 @@
import fr.ifremer.wao.WaoApplicationConfig;
import fr.ifremer.wao.WaoTopiaPersistenceContext;
-import fr.ifremer.wao.entity.BoatGroupTopiaDao;
import fr.ifremer.wao.entity.BoatInfosTopiaDao;
import fr.ifremer.wao.entity.BoatTopiaDao;
import fr.ifremer.wao.entity.CompanyTopiaDao;
@@ -33,13 +32,10 @@
import fr.ifremer.wao.entity.ElligibleBoatTopiaDao;
import fr.ifremer.wao.entity.FishingGearDCFTopiaDao;
import fr.ifremer.wao.entity.FishingZoneTopiaDao;
-import fr.ifremer.wao.entity.FleetTopiaDao;
import fr.ifremer.wao.entity.IndicatorLevelTopiaDao;
import fr.ifremer.wao.entity.IndicatorLogTopiaDao;
import fr.ifremer.wao.entity.IndicatorTopiaDao;
import fr.ifremer.wao.entity.NewsTopiaDao;
-import fr.ifremer.wao.entity.ObsDebCodeDetailsTopiaDao;
-import fr.ifremer.wao.entity.ObsDebCodeTopiaDao;
import fr.ifremer.wao.entity.ProfessionTopiaDao;
import fr.ifremer.wao.entity.ReferentialMetaTopiaDao;
import fr.ifremer.wao.entity.SampleMonthTopiaDao;
@@ -47,7 +43,6 @@
import fr.ifremer.wao.entity.SampleRowTopiaDao;
import fr.ifremer.wao.entity.ShipOwnerTopiaDao;
import fr.ifremer.wao.entity.TargetSpeciesDCFTopiaDao;
-import fr.ifremer.wao.entity.TerrestrialDivisionTopiaDao;
import fr.ifremer.wao.entity.TerrestrialLocationTopiaDao;
import fr.ifremer.wao.entity.UserProfileTopiaDao;
import fr.ifremer.wao.entity.WaoUserTopiaDao;
@@ -119,10 +114,6 @@
return getPersistenceContext().getBoatDao();
}
- protected BoatGroupTopiaDao getBoatGroupDao() {
- return getPersistenceContext().getBoatGroupDao();
- }
-
protected BoatInfosTopiaDao getBoatInfosDao() {
return getPersistenceContext().getBoatInfosDao();
}
@@ -155,10 +146,6 @@
return getPersistenceContext().getFishingZoneDao();
}
- protected FleetTopiaDao getFleetDao() {
- return getPersistenceContext().getFleetDao();
- }
-
protected IndicatorTopiaDao getIndicatorDao() {
return getPersistenceContext().getIndicatorDao();
}
@@ -175,14 +162,6 @@
return getPersistenceContext().getNewsDao();
}
- protected ObsDebCodeTopiaDao getObsDebCodeDao() {
- return getPersistenceContext().getObsDebCodeDao();
- }
-
- protected ObsDebCodeDetailsTopiaDao getObsDebCodeDetailsDao() {
- return getPersistenceContext().getObsDebCodeDetailsDao();
- }
-
protected ProfessionTopiaDao getProfessionDao() {
return getPersistenceContext().getProfessionDao();
}
@@ -211,10 +190,6 @@
return getPersistenceContext().getTargetSpeciesDCFDao();
}
- protected TerrestrialDivisionTopiaDao getTerrestrialDivisionDao() {
- return getPersistenceContext().getTerrestrialDivisionDao();
- }
-
protected TerrestrialLocationTopiaDao getTerrestrialLocationDao() {
return getPersistenceContext().getTerrestrialLocationDao();
}
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -30,8 +30,6 @@
import com.google.common.collect.ImmutableSet;
import fr.ifremer.wao.WaoTechnicalException;
import fr.ifremer.wao.entity.Boat;
-import fr.ifremer.wao.entity.BoatGroup;
-import fr.ifremer.wao.entity.BoatGroupTopiaDao;
import fr.ifremer.wao.entity.BoatTopiaDao;
import fr.ifremer.wao.entity.ContactState;
import fr.ifremer.wao.entity.ContactStateMotif;
@@ -42,15 +40,7 @@
import fr.ifremer.wao.entity.FishingGearDCFTopiaDao;
import fr.ifremer.wao.entity.FishingZone;
import fr.ifremer.wao.entity.FishingZoneTopiaDao;
-import fr.ifremer.wao.entity.Fleet;
-import fr.ifremer.wao.entity.FleetTopiaDao;
import fr.ifremer.wao.entity.LocationType;
-import fr.ifremer.wao.entity.ObsDebCode;
-import fr.ifremer.wao.entity.ObsDebCodeDetails;
-import fr.ifremer.wao.entity.ObsDebCodeDetailsImpl;
-import fr.ifremer.wao.entity.ObsDebCodeDetailsTopiaDao;
-import fr.ifremer.wao.entity.ObsDebCodeImpl;
-import fr.ifremer.wao.entity.ObsDebCodeTopiaDao;
import fr.ifremer.wao.entity.ObsProgram;
import fr.ifremer.wao.entity.ReferentialMeta;
import fr.ifremer.wao.entity.ReferentialMetaImpl;
@@ -61,21 +51,14 @@
import fr.ifremer.wao.entity.ShipOwnerTopiaDao;
import fr.ifremer.wao.entity.TargetSpeciesDCF;
import fr.ifremer.wao.entity.TargetSpeciesDCFTopiaDao;
-import fr.ifremer.wao.entity.TerrestrialDivision;
-import fr.ifremer.wao.entity.TerrestrialDivisionImpl;
-import fr.ifremer.wao.entity.TerrestrialDivisionTopiaDao;
import fr.ifremer.wao.entity.TerrestrialLocation;
import fr.ifremer.wao.entity.TerrestrialLocationImpl;
import fr.ifremer.wao.entity.TerrestrialLocationTopiaDao;
import fr.ifremer.wao.services.service.ImportErrorException;
import fr.ifremer.wao.services.service.WaoServiceSupport;
-import fr.ifremer.wao.services.service.csv.BoatGroupImportModel;
import fr.ifremer.wao.services.service.csv.BoatImportExportModel;
import fr.ifremer.wao.services.service.csv.ContactStateMotivesImportModel;
import fr.ifremer.wao.services.service.csv.FishingZoneImportModel;
-import fr.ifremer.wao.services.service.csv.RawObsDebCode;
-import fr.ifremer.wao.services.service.csv.RawObsDebCodesImportModel;
-import fr.ifremer.wao.services.service.csv.TerrestrialDivisionImportModel;
import fr.ifremer.wao.services.service.csv.TerrestrialLocationImportModel;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
@@ -134,14 +117,6 @@
TerrestrialLocation.class.getName(),
Boat.class.getName()));
- perProgramReferential.put(ObsProgram.OBSDEB, Arrays.asList(
- FishingZone.class.getName(),
- TerrestrialLocation.class.getName(),
- TerrestrialDivision.class.getName(),
- ObsDebCode.class.getName(),
- Boat.class.getName(),
- BoatGroup.class.getName()));
-
PER_PROGRAM_REFERENTIAL = Collections.unmodifiableMap(perProgramReferential);
}
@@ -480,93 +455,6 @@
}
- public void importTerrestrialDivisions(InputStream input) throws ImportErrorException {
-
- TerrestrialLocationTopiaDao terrestrialLocationDao = getPersistenceContext().getTerrestrialLocationDao();
-
- // let's find all ports in terrestrial location reference
- List<TerrestrialLocation> ports = terrestrialLocationDao.forLocationTypeEquals(LocationType.PORT).findAll();
- List<TerrestrialLocation> regions = terrestrialLocationDao.forLocationTypeEquals(LocationType.REGION).findAll();
-
- if (log.isDebugEnabled()) {
- log.debug(ports.size() + " ports, " + regions.size() + " regions");
- }
-
- // the import itself
- ImportModel<TerrestrialDivision> importModel = new TerrestrialDivisionImportModel(getLocale(), ports, regions);
- Import<TerrestrialDivision> terrestrialDivisionImport = Import.newImport(importModel, input);
-
- TerrestrialDivisionTopiaDao dao = getPersistenceContext().getTerrestrialDivisionDao();
-
- Binder<TerrestrialDivision, TerrestrialDivision> terrestrialDivisionBinder = BinderFactory.newBinder(TerrestrialDivision.class);
-
- try {
- for (TerrestrialDivision terrestrialDivision : terrestrialDivisionImport) {
-
- TerrestrialDivision existingTerrestrialDivision = dao.forCodeEquals(terrestrialDivision.getCode()).findUniqueOrNull();
- if (existingTerrestrialDivision == null) {
- // add as new
- dao.create(terrestrialDivision);
- } else {
- // update the old one
- terrestrialDivisionBinder.copyExcluding(terrestrialDivision, existingTerrestrialDivision,
- TopiaEntity.PROPERTY_TOPIA_ID, TopiaEntity.PROPERTY_TOPIA_CREATE_DATE, TopiaEntity.PROPERTY_TOPIA_VERSION);
- dao.update(existingTerrestrialDivision);
- }
-
- TerrestrialDivision observationUnit = new TerrestrialDivisionImpl();
- terrestrialDivisionBinder.copyExcluding(
- terrestrialDivision, observationUnit,
- TopiaEntity.PROPERTY_TOPIA_ID, TopiaEntity.PROPERTY_TOPIA_CREATE_DATE,
- TopiaEntity.PROPERTY_TOPIA_VERSION,
- TerrestrialDivision.PROPERTY_CODE,
- TerrestrialDivision.PROPERTY_PORT);
-
- TerrestrialDivision existingObservationUnit = dao.forProperties(
- TerrestrialDivision.PROPERTY_CODE, observationUnit.getCode(),
- TerrestrialDivision.PROPERTY_PORT, observationUnit.getPort(),
- TerrestrialDivision.PROPERTY_REGION_IFREMER, observationUnit.getRegionIfremer(),
- TerrestrialDivision.PROPERTY_OBSERVATION_UNIT_CODE, observationUnit.getObservationUnitCode()).findUniqueOrNull();
-
- if (existingObservationUnit == null) {
- dao.create(observationUnit);
- } else {
- terrestrialDivisionBinder.copyExcluding(
- observationUnit, existingObservationUnit, TopiaEntity.PROPERTY_TOPIA_ID,
- TopiaEntity.PROPERTY_TOPIA_CREATE_DATE, TopiaEntity.PROPERTY_TOPIA_VERSION);
- dao.update(existingObservationUnit);
- }
-
- }
- } catch (ImportRuntimeException e) {
- throw new ImportErrorException(e);
- }
-
- if (log.isDebugEnabled()) {
- log.debug(dao.count() + " terrestrial divisions in database");
- }
-
- updateReferentialMeta(TerrestrialDivision.class.getName());
-
- commit();
-
- }
-
- public List<TerrestrialDivision> getAllObservationUnits() {
-
- TerrestrialDivisionTopiaDao dao = getPersistenceContext().getTerrestrialDivisionDao();
-
- // having code null make TerrestrialDivision.isObservationUnit
- List<TerrestrialDivision> observationUnits = dao.forCodeEquals(null).findAll();
-
- if (log.isDebugEnabled()) {
- log.debug("will return " + observationUnits.size() + " observation units");
- }
-
- return observationUnits;
-
- }
-
/**
* @param region may be null, and all ports will be returned
* @return all the ports that are in a region
@@ -592,65 +480,6 @@
}
- public void importObsDebCodes(InputStream input) throws ImportErrorException {
-
- TerrestrialLocationTopiaDao terrestrialLocationDao =
- getPersistenceContext().getTerrestrialLocationDao();
-
- List<TerrestrialLocation> allRegions =
- terrestrialLocationDao.forLocationTypeEquals(LocationType.REGION).findAll();
-
- ObsDebCodeTopiaDao dao = getPersistenceContext().getObsDebCodeDao();
- ObsDebCodeDetailsTopiaDao obsDebCodeDetailsDAO = getPersistenceContext().getObsDebCodeDetailsDao();
-
- ImportModel<RawObsDebCode> model = new RawObsDebCodesImportModel(getLocale(), allRegions);
- Import<RawObsDebCode> rawObsDebCodeImport = Import.newImport(model, input);
-
- // start reading the CSV file line by line
- try {
- for (RawObsDebCode rawObsDebCode : rawObsDebCodeImport) {
-
- // try to find an already existing entity to update
- // or create one
- ObsDebCode existingCode = dao.forCodeEquals(rawObsDebCode.getCode()).findUniqueOrNull();
- if (existingCode == null) {
- existingCode = new ObsDebCodeImpl();
- existingCode.setCode(rawObsDebCode.getCode());
- existingCode = dao.create(existingCode);
- }
- ObsDebCodeDetails existingDetails = null;
- if (existingCode.getObsDebCodeDetails() != null) {
- for (ObsDebCodeDetails obsDebCodeDetails : existingCode.getObsDebCodeDetails()) {
- if (rawObsDebCode.getRegion().getRegionIfremerCode().equals(obsDebCodeDetails.getRegion().getRegionIfremerCode())) {
- existingDetails = obsDebCodeDetails;
- }
- }
- }
-
- if (existingDetails == null) {
- existingDetails = new ObsDebCodeDetailsImpl();
- existingDetails.setLabel(rawObsDebCode.getLabel());
- existingDetails.setRegion(rawObsDebCode.getRegion());
- existingCode.addObsDebCodeDetails(existingDetails);
- obsDebCodeDetailsDAO.create(existingDetails);
- } else {
- existingDetails.setLabel(rawObsDebCode.getLabel());
- obsDebCodeDetailsDAO.update(existingDetails);
- }
-
- dao.update(existingCode);
-
- }
- } catch (ImportRuntimeException e) {
- throw new ImportErrorException(e);
- }
-
- updateReferentialMeta(ObsDebCode.class.getName());
-
- commit();
-
- }
-
protected void initialDCF5CodesImport() {
FishingGearDCFTopiaDao fishingGearDCFDao = getPersistenceContext().getFishingGearDCFDao();
@@ -791,7 +620,6 @@
InputStream input = null;
TerrestrialLocationTopiaDao terrestrialLocationDao = getPersistenceContext().getTerrestrialLocationDao();
- ObsDebCodeTopiaDao obsDebCodeDao = getPersistenceContext().getObsDebCodeDao();
ContactStateMotifTopiaDao contactStateMotifDao = getPersistenceContext().getContactStateMotifDao();
if (terrestrialLocationDao.count() == 0) {
@@ -805,17 +633,6 @@
}
}
- if (obsDebCodeDao.count() == 0) {
- try {
- input = getClass().getResourceAsStream("/obsDebCodes.csv");
- importObsDebCodes(input);
- } catch (ImportErrorException e) {
- throw new WaoTechnicalException(e);
- } finally {
- IOUtils.closeQuietly(input);
- }
- }
-
if (contactStateMotifDao.count() == 0) {
try {
input = getClass().getResourceAsStream("/motifs.csv");
@@ -851,19 +668,9 @@
throw new IllegalArgumentException("il faut passer le FQN d'une classe d'entité");
}
- long count;
+ TopiaDao<? extends TopiaEntity> dao = getPersistenceContext().getDao((Class<? extends TopiaEntity>) entityClass);
+ long count = dao.count();
- if (TerrestrialDivision.class.equals(entityClass)) {
- // Pour les stratification géographique, on compte le nombre de strate
- // (on ne compte pas les unités d'observations, etc qui prennent
- // des lignes en base)
- TerrestrialDivisionTopiaDao dao = getPersistenceContext().getTerrestrialDivisionDao();
- count = dao.countDistinctTerrestrialDivision();
- } else {
- TopiaDao<? extends TopiaEntity> dao = getPersistenceContext().getDao((Class<? extends TopiaEntity>) entityClass);
- count = dao.count();
- }
-
ReferentialMetaTopiaDao referentialMetaDao = getPersistenceContext().getReferentialMetaDao();
ReferentialMeta referentialMeta = referentialMetaDao.forEntityClassFqnEquals(entityClassFqn).findUniqueOrNull();
if (referentialMeta == null) {
@@ -914,17 +721,12 @@
// Getting some DAOs
BoatTopiaDao boatDao = getPersistenceContext().getBoatDao();
ShipOwnerTopiaDao shipOwnerDao = getPersistenceContext().getShipOwnerDao();
- FleetTopiaDao fleetDao = getPersistenceContext().getFleetDao();
// load data that will be linked to the boat
Map<String, ShipOwner> shipOwners = new HashMap<>();
for (ShipOwner shipOwner : shipOwnerDao.findAll()) {
shipOwners.put(shipOwner.getCode(), shipOwner);
}
- Map<String, Fleet> fleets = new HashMap<>();
- for (Fleet fleet : fleetDao.findAll()) {
- fleets.put(fleet.getCode(), fleet);
- }
// now iterating over the lines of the CSV
try {
@@ -943,19 +745,6 @@
}
boat.setShipOwner(shipOwner);
- // secondly, find and reuse fleet
- String fleetCode = boat.getFleet().getCode();
- if (fleetCode == null) {
- boat.setFleet(null);
- } else {
- Fleet fleet = fleets.get(fleetCode);
- if (fleet == null) {
- fleet = fleetDao.create(boat.getFleet());
- fleets.put(fleetCode, fleet);
- }
- boat.setFleet(fleet);
- }
-
// now boat object is ready
Boat existingBoat = boatDao.forImmatriculationEquals(boat.getImmatriculation()).findUniqueOrNull();
if (existingBoat == null) {
@@ -969,7 +758,6 @@
existingBoat.setShipOwner(boat.getShipOwner());
existingBoat.setDistrict(boat.getDistrict());
existingBoat.setPortOfRegistry(boat.getPortOfRegistry());
- existingBoat.setFleet(boat.getFleet());
boatDao.update(existingBoat);
}
@@ -986,60 +774,6 @@
}
- public void importBoatGroups(InputStream input) throws ImportErrorException {
- // Building the model, providing ports
- BoatGroupImportModel model = new BoatGroupImportModel(getLocale());
- Import<Boat> boatImport = Import.newImport(model, input);
-
- // Getting some DAOs
- BoatTopiaDao boatDao = getPersistenceContext().getBoatDao();
- BoatGroupTopiaDao boatGroupDao = getPersistenceContext().getBoatGroupDao();
-
- Map<String, BoatGroup> boatGroups = new HashMap<>();
- for (BoatGroup boatGroup : boatGroupDao.findAll()) {
- boatGroups.put(boatGroup.getCode(), boatGroup);
- }
-
- // now iterating over the lines of the CSV
- try {
- for (Boat boat : boatImport) {
-
- // fourth, the group
- String boatGroupCode = boat.getBoatGroup().getCode();
- if (boatGroupCode == null) {
- boat.setBoatGroup(null);
- } else {
- BoatGroup boatGroup = boatGroups.get(boatGroupCode);
- if (boatGroup == null) {
- boatGroup = boatGroupDao.create(boat.getBoatGroup());
- boatGroups.put(boatGroupCode, boatGroup);
- }
- boat.setBoatGroup(boatGroup);
- }
-
- // now boat object is ready
- Boat existingBoat = boatDao.forImmatriculationEquals(boat.getImmatriculation()).findUniqueOrNull();
- if (existingBoat == null) {
- throw new ImportRuntimeException(I18n.t("wao.import.contact.failure.wrongBoat", String.valueOf(boat.getImmatriculation())));
- } else {
- // copy new values in found entity and save changes
- existingBoat.setBoatGroup(boat.getBoatGroup());
- boatDao.update(existingBoat);
- }
-
- }
- } catch (ImportRuntimeException e) {
- throw new ImportErrorException(e);
- }
-
- updateReferentialMeta(Boat.class.getName());
-
- commit();
-
- serviceContext.getBoatsFilterValuesCache().invalidateAll();
-
- }
-
public List<Boat> getBoatsFromImmatriculations(String joinedImmatriculations) throws UnknownBoatImmatriculationsException {
Iterable<String> splitImmatriculations = BOAT_IMMATRICULATIONS_SPLITTER.split(joinedImmatriculations);
Deleted: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatGroupImportModel.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatGroupImportModel.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatGroupImportModel.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,173 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2011 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.services.service.csv;
-
-import fr.ifremer.wao.entity.Boat;
-import fr.ifremer.wao.entity.BoatGroupImpl;
-import fr.ifremer.wao.entity.BoatImpl;
-import fr.ifremer.wao.services.service.csv.operations.BoatImmatriculationParserFormatter;
-import org.apache.commons.lang3.StringUtils;
-import org.nuiton.csv.ImportModel;
-import org.nuiton.csv.ImportableColumn;
-import org.nuiton.csv.ModelBuilder;
-import org.nuiton.csv.ValueGetterSetter;
-
-import java.util.List;
-import java.util.Locale;
-
-public class BoatGroupImportModel implements ImportModel<Boat> {
-
- protected ModelBuilder<Boat> modelBuilder;
-
- protected final Locale locale;
-
- public BoatGroupImportModel(Locale locale) {
- this.locale = locale;
- }
-
- protected void buildModel() {
- modelBuilder = new ModelBuilder<>();
- modelBuilder.newColumnForImportExport(
- "NAVIRE_IMMATRICULATION",
- Boat.PROPERTY_IMMATRICULATION,
- new BoatImmatriculationParserFormatter(locale));
-
- // boat group
- modelBuilder.newColumnForImportExport(
- "STRATE_CODE",
- new ValueGetterSetter<Boat, String>() {
- @Override
- public String get(Boat boat) throws Exception {
- String boatGroupCode = "";
- if (boat.getBoatGroup() != null) {
- boatGroupCode = boat.getBoatGroup().getCode();
- }
- return boatGroupCode;
- }
-
- @Override
- public void set(Boat boat, String code) throws Exception {
- if (StringUtils.isNotBlank(code)) {
- boat.getBoatGroup().setCode(code);
- }
- }
- });
-
- modelBuilder.newColumnForImportExport(
- "STRATE_CLASSE_LONGUEUR",
- new ValueGetterSetter<Boat, String>() {
- @Override
- public String get(Boat boat) throws Exception {
- String value = "";
- if (boat.getBoatGroup() != null) {
- value = boat.getBoatGroup().getLengthGroup();
- }
- return value;
- }
-
- @Override
- public void set(Boat boat, String value) throws Exception {
- boat.getBoatGroup().setLengthGroup(value);
- }
- });
- modelBuilder.newColumnForImportExport(
- "STRATE_CLASSE_EFFECTIF",
- new ValueGetterSetter<Boat, String>() {
- @Override
- public String get(Boat boat) throws Exception {
- String value = "";
- if (boat.getBoatGroup() != null) {
- value = boat.getBoatGroup().getStaffSizeGroup();
- }
- return value;
- }
-
- @Override
- public void set(Boat boat, String value) throws Exception {
- boat.getBoatGroup().setStaffSizeGroup(value);
- }
- });
- modelBuilder.newColumnForImportExport(
- "STRATE_COMMUNE",
- new ValueGetterSetter<Boat, String>() {
- @Override
- public String get(Boat boat) throws Exception {
- String value = "";
- if (boat.getBoatGroup() != null) {
- value = boat.getBoatGroup().getCommune();
- }
- return value;
- }
-
- @Override
- public void set(Boat boat, String value) throws Exception {
- boat.getBoatGroup().setCommune(value);
- }
- });
- modelBuilder.newColumnForImportExport(
- "STRATE_SECTEUR_GEOGRAPHIQUE",
- new ValueGetterSetter<Boat, String>() {
- @Override
- public String get(Boat boat) throws Exception {
- String value = "";
- if (boat.getBoatGroup() != null) {
- value = boat.getBoatGroup().getSector();
- }
- return value;
- }
-
- @Override
- public void set(Boat boat, String value) throws Exception {
- boat.getBoatGroup().setSector(value);
- }
- });
-
- }
-
- @Override
- public char getSeparator() {
- return ';';
- }
-
- @Override
- public void pushCsvHeaderNames(List<String> headerNames) {
- // nothing to do
- }
-
- @Override
- public Boat newEmptyInstance() {
- Boat emptyInstance = new BoatImpl();
- emptyInstance.setBoatGroup(new BoatGroupImpl());
- return emptyInstance;
- }
-
- @Override
- public Iterable<ImportableColumn<Boat, Object>> getColumnsForImport() {
- if (modelBuilder == null) {
- buildModel();
- }
- return (Iterable) modelBuilder.getColumnsForImport();
- }
-
-}
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -25,13 +25,11 @@
import fr.ifremer.wao.entity.Boat;
import fr.ifremer.wao.entity.BoatImpl;
-import fr.ifremer.wao.entity.FleetImpl;
import fr.ifremer.wao.entity.ShipOwnerImpl;
import fr.ifremer.wao.entity.TerrestrialLocation;
import fr.ifremer.wao.services.service.csv.operations.BoatImmatriculationParserFormatter;
import fr.ifremer.wao.services.service.csv.operations.DistrictParserFormatter;
import fr.ifremer.wao.services.service.csv.operations.PortParserFormatter;
-import org.apache.commons.lang3.StringUtils;
import org.nuiton.csv.Common;
import org.nuiton.csv.ExportableColumn;
import org.nuiton.csv.ImportExportModel;
@@ -148,88 +146,7 @@
Boat.PROPERTY_PORT_OF_REGISTRY,
new PortParserFormatter(locale, ports, true));
- // fleet
- modelBuilder.newColumnForImportExport(
- "FLOTILLE_CODE",
- new ValueGetterSetter<Boat, String>() {
- @Override
- public String get(Boat boat) throws Exception {
- String fleetCode = "";
- if (boat.getFleet() != null) {
- fleetCode = boat.getFleet().getCode();
- }
- return fleetCode;
- }
- @Override
- public void set(Boat boat, String code) throws Exception {
- if (StringUtils.isNotBlank(code)) {
- boat.getFleet().setCode(code);
- }
- }
- }
- );
-
- modelBuilder.newColumnForImportExport(
- "FLOTILLE_NOM",
- new ValueGetterSetter<Boat, String>() {
- @Override
- public String get(Boat boat) throws Exception {
- String fleetName = "";
- if (boat.getFleet() != null) {
- fleetName = boat.getFleet().getFleetName();
- }
- return fleetName;
- }
-
- @Override
- public void set(Boat boat, String name) throws Exception {
- if (StringUtils.isNotBlank(name)) {
- boat.getFleet().setFleetName(name);
- }
- }
- }
- );
-
- modelBuilder.newColumnForImportExport(
- "SOUS_FLOTILLE_NOM",
- new ValueGetterSetter<Boat, String>() {
- @Override
- public String get(Boat boat) throws Exception {
- String subFleetName = "";
- if (boat.getFleet() != null) {
- subFleetName = boat.getFleet().getSubFleetName();
- }
- return subFleetName;
- }
-
- @Override
- public void set(Boat boat, String subFleetName) throws Exception {
- boat.getFleet().setSubFleetName(subFleetName);
- }
- }
- );
-
- modelBuilder.newColumnForImportExport(
- "SOUS_SOUS_FLOTILLE_NOM",
- new ValueGetterSetter<Boat, String>() {
- @Override
- public String get(Boat boat) throws Exception {
- String subSubFleetName = "";
- if (boat.getFleet() != null) {
- subSubFleetName =
- boat.getFleet().getSubSubFleetName();
- }
- return subSubFleetName;
- }
-
- @Override
- public void set(Boat boat, String subSubFleetName) throws Exception {
- boat.getFleet().setSubSubFleetName(subSubFleetName);
- }
- }
- );
-
}
@Override
@@ -246,7 +163,6 @@
public Boat newEmptyInstance() {
Boat emptyInstance = new BoatImpl();
emptyInstance.setShipOwner(new ShipOwnerImpl());
- emptyInstance.setFleet(new FleetImpl());
return emptyInstance;
}
Deleted: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCode.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCode.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCode.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,67 +0,0 @@
-package fr.ifremer.wao.services.service.csv;
-
-/*
- * #%L
- * Wao :: Services
- * %%
- * Copyright (C) 2009 - 2014 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import fr.ifremer.wao.entity.TerrestrialLocation;
-
-/**
- * Représente une ligne de fichier CSV du référentiel des codes ObsDeb.
- */
-public class RawObsDebCode {
-
- public static final String PROPERTY_CODE = "code";
-
- public static final String PROPERTY_LABEL = "label";
-
- public static final String PROPERTY_REGION = "region";
-
- protected String code;
-
- protected String label;
-
- protected TerrestrialLocation region;
-
- public String getCode() {
- return code;
- }
-
- public void setCode(String code) {
- this.code = code;
- }
-
- public String getLabel() {
- return label;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
- public TerrestrialLocation getRegion() {
- return region;
- }
-
- public void setRegion(TerrestrialLocation region) {
- this.region = region;
- }
-
-}
Deleted: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCodesImportModel.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCodesImportModel.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCodesImportModel.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,81 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2011 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.services.service.csv;
-
-
-import fr.ifremer.wao.entity.TerrestrialLocation;
-import fr.ifremer.wao.services.service.csv.operations.RegionParserFormatter;
-import org.nuiton.csv.ImportModel;
-import org.nuiton.csv.ImportableColumn;
-import org.nuiton.csv.ModelBuilder;
-
-import java.util.List;
-import java.util.Locale;
-
-public class RawObsDebCodesImportModel implements ImportModel<RawObsDebCode> {
-
- protected final Locale locale;
-
- protected ModelBuilder<RawObsDebCode> modelBuilder;
-
- protected RegionParserFormatter regionParser;
-
- public RawObsDebCodesImportModel(Locale locale, List<TerrestrialLocation> allRegions) {
- this.locale = locale;
- regionParser = new RegionParserFormatter(this.locale, allRegions);
- }
-
- @Override
- public char getSeparator() {
- return ';';
- }
-
- @Override
- public void pushCsvHeaderNames(List<String> headerNames) {
- // nothing to do
- }
-
- @Override
- public RawObsDebCode newEmptyInstance() {
- RawObsDebCode newObsDebCode = new RawObsDebCode();
- return newObsDebCode;
- }
-
- protected void buildModel() {
- modelBuilder = new ModelBuilder<>();
- modelBuilder.newMandatoryColumn("CODE", RawObsDebCode.PROPERTY_CODE);
- modelBuilder.newMandatoryColumn("NOM", RawObsDebCode.PROPERTY_LABEL);
- modelBuilder.newMandatoryColumn("REGION_IFREMER",
- RawObsDebCode.PROPERTY_REGION,
- regionParser);
- }
-
- @Override
- public Iterable<ImportableColumn<RawObsDebCode, Object>> getColumnsForImport() {
- if (modelBuilder == null) {
- buildModel();
- }
- return (Iterable) modelBuilder.getColumnsForImport();
- }
-}
Deleted: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialDivisionImportModel.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialDivisionImportModel.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialDivisionImportModel.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,112 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2011 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.services.service.csv;
-
-import fr.ifremer.wao.entity.TerrestrialDivision;
-import fr.ifremer.wao.entity.TerrestrialDivisionImpl;
-import fr.ifremer.wao.entity.TerrestrialLocation;
-import fr.ifremer.wao.services.service.csv.operations.PortParserFormatter;
-import fr.ifremer.wao.services.service.csv.operations.RegionParserFormatter;
-import org.apache.commons.lang3.StringUtils;
-import org.nuiton.csv.ImportModel;
-import org.nuiton.csv.ImportableColumn;
-import org.nuiton.csv.ModelBuilder;
-import org.nuiton.csv.ValueParser;
-
-import java.util.List;
-import java.util.Locale;
-
-public class TerrestrialDivisionImportModel implements ImportModel<TerrestrialDivision> {
-
- protected final Locale locale;
-
- /** all valid {@link fr.ifremer.wao.entity.TerrestrialLocation#getRegionIfremerCode()} values.
- * for validation purpose only */
- protected List<TerrestrialLocation> regions;
-
- protected List<TerrestrialLocation> ports;
-
- public TerrestrialDivisionImportModel(Locale locale, List<TerrestrialLocation> ports,
- List<TerrestrialLocation> regions) {
- this.locale = locale;
- this.ports = ports;
- this.regions = regions;
- }
-
- @Override
- public char getSeparator() {
- return ';';
- }
-
- @Override
- public void pushCsvHeaderNames(List<String> headerNames) {
- // nothing to do
- }
-
- @Override
- public TerrestrialDivision newEmptyInstance() {
- return new TerrestrialDivisionImpl();
- }
-
- @Override
- public Iterable<ImportableColumn<TerrestrialDivision, Object>> getColumnsForImport() {
-
- ModelBuilder<TerrestrialDivision> modelBuilder = new ModelBuilder<>();
-
- modelBuilder.newMandatoryColumn(
- "ID_STRATE",
- TerrestrialDivision.PROPERTY_CODE,
- new ValueParser<String>() {
- /** null if string is empty */
- @Override
- public String parse(String code) {
- if (StringUtils.isEmpty(code)) {
- throw new IllegalArgumentException("Il manque un code ID_STRATE");
- }
- return code;
- }
- });
- modelBuilder.newMandatoryColumn(
- "REGION_IFREMER_COD",
- TerrestrialDivision.PROPERTY_REGION_IFREMER,
- new RegionParserFormatter(locale, regions));
- modelBuilder.newIgnoredColumn("REGION_IFREMER_LIB");
- modelBuilder.newMandatoryColumn("ZONE_COMPETENCE_COD", TerrestrialDivision.PROPERTY_SKILL_ZONE_CODE);
- modelBuilder.newMandatoryColumn("ZONE_COMPETENCE_LIB", TerrestrialDivision.PROPERTY_SKILL_ZONE_NAME);
- modelBuilder.newMandatoryColumn("SOUS_POPULATION_COD", TerrestrialDivision.PROPERTY_SUB_POPULATION_CODE);
- modelBuilder.newMandatoryColumn("SOUS_POPULATION_LIB", TerrestrialDivision.PROPERTY_SUB_POPULATION_NAME);
- modelBuilder.newMandatoryColumn("UNITE_OBSERVATION_COD", TerrestrialDivision.PROPERTY_OBSERVATION_UNIT_CODE);
- modelBuilder.newMandatoryColumn("UNITE_OBSERVATION_LIB", TerrestrialDivision.PROPERTY_OBSERVATION_UNIT_NAME);
- modelBuilder.newMandatoryColumn(
- "LIEU_OBSERVATION_COD",
- TerrestrialDivision.PROPERTY_PORT,
- // the value given is a code of a port, let's find and associate
- new PortParserFormatter(locale, ports, false));
- modelBuilder.newIgnoredColumn("LIEU_OBSERVATION_LIB");
- modelBuilder.newIgnoredColumn("DATE_DEBUT");
- modelBuilder.newIgnoredColumn("DATE_FIN");
-
- return (Iterable) modelBuilder.getColumnsForImport();
- }
-}
Deleted: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ObsDebCodeParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ObsDebCodeParserFormatter.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ObsDebCodeParserFormatter.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,75 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2011 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.services.service.csv.operations;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Maps;
-import fr.ifremer.wao.entity.ObsDebCode;
-import fr.ifremer.wao.entity.ObsDebCodes;
-import org.apache.commons.lang3.StringUtils;
-import org.nuiton.csv.ValueParserFormatter;
-import org.nuiton.i18n.I18n;
-
-import java.text.ParseException;
-import java.util.List;
-import java.util.Locale;
-
-public class ObsDebCodeParserFormatter implements ValueParserFormatter<ObsDebCode> {
-
- protected final Locale locale;
-
- protected ImmutableMap<String, ObsDebCode> indexedObsDebCodes;
-
- protected List<ObsDebCode> obsDebCodes;
-
- public ObsDebCodeParserFormatter(Locale locale, List<ObsDebCode> obsDebCodes) {
- this.locale = locale;
- this.obsDebCodes = obsDebCodes;
- }
-
- @Override
- public String format(ObsDebCode obsDebCode) {
- String value = "";
- if (obsDebCode != null) {
- value = obsDebCode.getCode();
- }
- return value;
- }
-
- @Override
- public ObsDebCode parse(String code) throws ParseException {
- if (indexedObsDebCodes == null) {
- indexedObsDebCodes = Maps.uniqueIndex(obsDebCodes, ObsDebCodes.getCode());
- }
- ObsDebCode obsDebCode = null;
- if (StringUtils.isNotBlank(code)) {
- obsDebCode = indexedObsDebCodes.get(code);
- if (obsDebCode == null) {
- throw new IllegalArgumentException
- (I18n.l(locale, "wao.import.failure.wrongObsDebCode", code));
- }
- }
- return obsDebCode;
- }
-}
Modified: trunk/wao-services/src/main/resources/i18n/wao-services_en_GB.properties
===================================================================
--- trunk/wao-services/src/main/resources/i18n/wao-services_en_GB.properties 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/resources/i18n/wao-services_en_GB.properties 2014-07-29 10:23:26 UTC (rev 2174)
@@ -29,8 +29,6 @@
wao.email.addBoatToUserAllegroWallet.contactDone=This demand is for observation expected done between %s and %s
wao.email.addBoatToUserAllegroWallet.contactExpected=This demand is for observation expected on %s
wao.email.addBoatToUserAllegroWallet.subject=%s\: add boat %d to ALLEGRO wallet for user %s
-wao.export.ical.desc=wtih %s
-wao.export.ical.title=ObsDeb Observation
wao.import.boat.failure.invalid.locationCode=The code '%s' is not a valid location code
wao.import.boat.failure.missing.port=The port is required
wao.import.contact.failure.boatMissing=You need to precise the plate number of the boat associated to the contact
@@ -78,7 +76,6 @@
wao.import.failure=Import fail for reason\: %s.
wao.import.failure.invalid.regionCode=The code '%s' is not a valid region code
wao.import.failure.wrongLocationType='%s' is not a valid location type, allowed values are %s
-wao.import.failure.wrongObsDebCode=There is no profession code having code '%s'
wao.import.failure.wrongUser=There is no user with login '%s'
wao.import.failure.wrongValue=Unable to parse value '%S'. Possible values are %s
wao.import.invalid.latitude=a latitude must be contained in range %s. ('%s' argument given)
Modified: trunk/wao-services/src/main/resources/i18n/wao-services_fr_FR.properties
===================================================================
--- trunk/wao-services/src/main/resources/i18n/wao-services_fr_FR.properties 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/main/resources/i18n/wao-services_fr_FR.properties 2014-07-29 10:23:26 UTC (rev 2174)
@@ -29,7 +29,6 @@
wao.email.addBoatToUserAllegroWallet.contactExpected=Cette demande émane de l'observation prévue le %s.
wao.email.addBoatToUserAllegroWallet.subject=%s \: ajout navire %d sur portefeuille ALLEGRO de %s
wao.export.ical.desc=avec %s
-wao.export.ical.title=Observation ObsDeb
wao.import.boat.failure.invalid.locationCode=Le code '%s' n'est pas un code de lieu valide
wao.import.boat.failure.missing.port=Il faut préciser un port
wao.import.contact.failure.boatMissing=Il faut préciser l'immatriculation du navire associé au contact
@@ -75,7 +74,6 @@
wao.import.failure=Une erreur est survenue lors de l'import \: %s.
wao.import.failure.invalid.regionCode=Le code '%s' n'est pas un code de région valide
wao.import.failure.wrongLocationType='%s' n'est pas un type de lieu valide, les valeurs admises sont %s
-wao.import.failure.wrongObsDebCode=Il n'y a pas de code métier ayant pour code '%s'
wao.import.failure.wrongUser=Il n'y a pas d'utilisateur ayant pour identifiant '%s'
wao.import.failure.wrongValue=Valeur '%s' non reconnue. Valeurs possibles \: %s
wao.import.invalid.latitude=La latitude doit être dans l'intervalle %s (valeur actuelle %s)
Modified: trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java
===================================================================
--- trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -96,40 +96,6 @@
}
@Test
- public void testImportTerrestrialDivisions() {
- testImportTerrestrialLocations();
- InputStream input = null;
- try {
- input = getClass().getResourceAsStream("/import/purifiedTerrestrialDivisions.csv");
- service.importTerrestrialDivisions(input);
- } catch (ImportErrorException e) {
- if (log.isDebugEnabled()) {
- log.debug("unexpected exception raised", e);
- }
- Assert.fail("exception should not be raised");
- } finally {
- IOUtils.closeQuietly(input);
- }
- }
-
- @Test
- public void testImportObsDebCodes() {
- testImportTerrestrialLocations();
- InputStream input = null;
- try {
- input = getClass().getResourceAsStream("/obsDebCodes.csv");
- service.importObsDebCodes(input);
- } catch (ImportErrorException e) {
- if (log.isDebugEnabled()) {
- log.debug("unexpected exception raised", e);
- }
- Assert.fail("exception should not be raised");
- } finally {
- IOUtils.closeQuietly(input);
- }
- }
-
- @Test
public void testImportBoats() {
testImportTerrestrialLocations();
InputStream input = null;
@@ -147,23 +113,6 @@
}
@Test
- public void testImportBoatGroups() {
- testImportBoats();
- InputStream input = null;
- try {
- input = getClass().getResourceAsStream("/import/strates.csv");
- service.importBoatGroups(input);
- } catch (ImportErrorException e) {
- if (log.isDebugEnabled()) {
- log.debug("unexpected exception raised", e);
- }
- Assert.fail("exception should not be raised");
- } finally {
- IOUtils.closeQuietly(input);
- }
- }
-
- @Test
public void testGetBoatsByImmatriculations() {
testImportBoats();
try {
Modified: trunk/wao-services/src/test/resources/import/navires.csv
===================================================================
--- trunk/wao-services/src/test/resources/import/navires.csv 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/test/resources/import/navires.csv 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,7 +1,7 @@
-"NAVIRE_IMMATRICULATION";"NAVIRE_NOM";"NAVIRE_LONGUEUR";"NAVIRE_ANNEE";"NAVIRE_EFFECTIF";"QUARTIER_CODE";"ARMATEUR_CODE";"ARMATEUR_NOM";"ARMATEUR_PRENOM";"NAVIRE_ACTIF";"PORT_CODE";"FLOTILLE_CODE";"FLOTILLE_NOM";"SOUS_FLOTILLE_NOM";"SOUS_SOUS_FLOTILLE_NOM"
-273129;"MOISE";7;1992;3;"PV";19771564;"BEURRE ";"JEAN CLAUDE";"Y";"MP3";"FLOTILLE0";"Les colons";"Les colons";"Les colons"
-174258;"SAMOURAI KING";9;1982;3;"PV";19744130;"MARIE";"JEAN PHILIPPE";"Y";"MP6";"FLOTILLE1";"Ma première flotille";"Ma première flotille";"Ma première flotille"
-177474;"MAYFLOWERS";10;1983;3;"DP";19784252;"MOSELLE";"ALAIN RENE";"N";"XSN";"FLOTILLE0";"Les colons";"Les colons";"Les colons"
-174592;"FIFITOU";8;1975;7;"DP";18854131;"POUTRE";"JEAN PIERRE";"Y";"XSN";"FLOTILLE1";"Ma première flotille";"Ma première flotille";"Ma première flotille"
-284595;"A MA LOUTRE";8;1973;9;"FK";"SPR3965";"BECANAUD";"NA";"Y";"LP3";"FLOTILLE1";"Ma première flotille";"Ma première flotille";"Ma première flotille"
-978419;"BISOUNOURS";11;2002;8;"BL";18854131;"POUTRE ";"JEAN PIERRE";"Y";"MP6";;;;
+NAVIRE_IMMATRICULATION;NAVIRE_NOM;NAVIRE_LONGUEUR;NAVIRE_ANNEE;NAVIRE_EFFECTIF;QUARTIER_CODE;ARMATEUR_CODE;ARMATEUR_NOM;ARMATEUR_PRENOM;NAVIRE_ACTIF;PORT_CODE
+273129;MOISE;7;1992;3;PV;19771564;BEURRE ;JEAN CLAUDE;Y;MP3
+174258;SAMOURAI KING;9;1982;3;PV;19744130;MARIE;JEAN PHILIPPE;Y;MP6
+177474;MAYFLOWERS;10;1983;3;DP;19784252;MOSELLE;ALAIN RENE;N;XSN
+174592;FIFITOU;8;1975;7;DP;18854131;POUTRE;JEAN PIERRE;Y;XSN
+284595;A MA LOUTRE;8;1973;9;FK;SPR3965;BECANAUD;NA;Y;LP3
+978419;BISOUNOURS;11;2002;8;BL;18854131;POUTRE ;JEAN PIERRE;Y;MP6
Deleted: trunk/wao-services/src/test/resources/import/strates.csv
===================================================================
--- trunk/wao-services/src/test/resources/import/strates.csv 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-services/src/test/resources/import/strates.csv 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,7 +0,0 @@
-"NAVIRE_IMMATRICULATION";"STRATE_CODE";"STRATE_CLASSE_LONGUEUR";"STRATE_CLASSE_EFFECTIF";"STRATE_COMMUNE";"STRATE_SECTEUR_GEOGRAPHIQUE"
-273129;"STRATE1";"<10 mètres";"< 5 marins";"Ici";"Les bermudes"
-174258;"STRATE1";"<10 mètres";"< 5 marins";"Ailleurs";"Les bermudes"
-177474;"STRATE0";">= 10 mètres";"< 5 marins";"Autre-part";"Les bermudes"
-174592;"STRATE1";"<10 mètres";">= 5 marins";"Loin";"Les bermudes"
-284595;"STRATE2";"<10 mètres";">= 5 marins";"Pas si loin";"Les bermudes"
-978419;;;;;
Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoJspActionSupport.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoJspActionSupport.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoJspActionSupport.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -58,10 +58,6 @@
return getObsProgram().isObsVente();
}
- public boolean isObsDeb() {
- return getObsProgram().isObsDeb();
- }
-
public String getText(Enum<?> enumeration) {
return getText(enumeration.getClass().getSimpleName() + "." + enumeration.name());
}
Deleted: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatGroupsAction.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatGroupsAction.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatGroupsAction.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,42 +0,0 @@
-package fr.ifremer.wao.web.action.administration;
-
-/*
- * #%L
- * Wao :: Web
- * %%
- * Copyright (C) 2009 - 2014 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import fr.ifremer.wao.services.service.ImportErrorException;
-
-import java.io.InputStream;
-
-public class ImportBoatGroupsAction extends AbstractImportReferentialAction {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- protected void importCsv(InputStream csvInputStream) throws ImportErrorException {
- service.importBoatGroups(csvInputStream);
- }
-
- @Override
- protected String getSuccessMessage() {
- return t("wao.import.boatGroups.success");
- }
-
-}
Deleted: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportObsdebCodesAction.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportObsdebCodesAction.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportObsdebCodesAction.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,42 +0,0 @@
-package fr.ifremer.wao.web.action.administration;
-
-/*
- * #%L
- * Wao :: Web
- * %%
- * Copyright (C) 2009 - 2014 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import fr.ifremer.wao.services.service.ImportErrorException;
-
-import java.io.InputStream;
-
-public class ImportObsdebCodesAction extends AbstractImportReferentialAction {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- protected String getSuccessMessage() {
- return t("wao.import.obsDebCodes.success");
- }
-
- @Override
- protected void importCsv(InputStream csvInputStream) throws ImportErrorException {
- service.importObsDebCodes(csvInputStream);
- }
-
-}
Deleted: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportTerrestrialDivisionsAction.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportTerrestrialDivisionsAction.java 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportTerrestrialDivisionsAction.java 2014-07-29 10:23:26 UTC (rev 2174)
@@ -1,41 +0,0 @@
-package fr.ifremer.wao.web.action.administration;
-
-/*
- * #%L
- * Wao :: Web
- * %%
- * Copyright (C) 2009 - 2014 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import fr.ifremer.wao.services.service.ImportErrorException;
-
-import java.io.InputStream;
-
-public class ImportTerrestrialDivisionsAction extends AbstractImportReferentialAction {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- protected String getSuccessMessage() {
- return t("wao.import.terrestrialDivisions.success");
- }
-
- @Override
- public void importCsv(InputStream csvInputStream) throws ImportErrorException {
- service.importTerrestrialDivisions(csvInputStream);
- }
-}
Modified: trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties
===================================================================
--- trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-07-29 10:23:26 UTC (rev 2174)
@@ -13,11 +13,8 @@
wao.import.contactStateMotives.success=Import contact state motives successful
wao.import.fishingZones.prompt=Import fishing zones
wao.import.fishingZones.success=Import fishing zones successful
-wao.import.obsDebCodes.prompt=Import ObsDeb codes
-wao.import.obsDebCodes.success=Import ObsDeb codes successful
wao.import.sampleRow.failure.wrongSampleRowCodeFormat=The sample row code must follow pattern YYYY_P1234 (YYYY is the year with 4 digits, P the program and 1234 the line number)
-wao.import.terrestrialDivisions.prompt=Import ObsDeb terrestrial divisions
-wao.import.terrestrialDivisions.success=Import ObsDeb terrestrial divisions successful
+wao.import.terrestrialDivisions.success=
wao.import.terrestrialLocations.prompt=Import terrestrial locations
wao.import.terrestrialLocations.success=Import terrestrial locations successful
wao.ui.acceptCgu=I've read and accept the terms of use
@@ -215,7 +212,6 @@
wao.ui.field.Contact.mammalsInfo=Scientific names and number of captured species
wao.ui.field.Contact.mammalsObservation=Exceptional observation
wao.ui.field.Contact.nbObservants=Nb Observants
-wao.ui.field.Contact.obsDebCode=Profession
wao.ui.field.Contact.observationTimeInDays=Observation time in days
wao.ui.field.Contact.observationType=Observation type
wao.ui.field.Contact.observedDataControl=Observed Data control
@@ -408,11 +404,9 @@
wao.ui.import.fishingZoneLabel=of fishing zones
wao.ui.import.fullDescription=Import %s (%s format with UTF-8 characters set)
wao.ui.import.longTitle=CSV Import/Export (UTF-8)
-wao.ui.import.obsDebCodesLabel=of the ObsDeb profession codes
wao.ui.import.samplingPlan=Sampling plan import
wao.ui.import.samplingPlan.success=Sampling plan import successful
wao.ui.import.samplingPlanLabel=of the sampling plan
-wao.ui.import.terrestrialDivisionsLabel=of the terrestrial divisions (ObsDeb)
wao.ui.import.terrestrialLocationsLabel=of the terrestrial locations
wao.ui.import.title=Import %s
wao.ui.indicator.andMore=%s and more
Modified: trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties
===================================================================
--- trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-07-29 10:23:26 UTC (rev 2174)
@@ -13,8 +13,6 @@
wao.import.contactStateMotives.success=Import des motifs de refus réalisé avec succès
wao.import.fishingZones.prompt=Import des zones de pêches
wao.import.fishingZones.success=Import des zones de pêches réalisé avec succès
-wao.import.obsDebCodes.prompt=Import des codes ObsDeb
-wao.import.obsDebCodes.success=Import des codes ObsDeb réalisé avec succès
wao.import.sampleRow.failure.wrongSampleRowCodeFormat=Le code de la ligne doit être de la forme AAAA_P1234 (AAAA représentant l'année sur quatre chiffres, P le code du programme (M, V, ou D) et 1234 le numéro de la ligne sur quatre chiffres)
wao.import.terrestrialDivisions.prompt=Import des unités d'observation
wao.import.terrestrialDivisions.success=Import des unités d'observation réalisé avec succès
@@ -215,7 +213,6 @@
wao.ui.field.Contact.mammalsInfo=Noms scientifiques et nombres d'individus des espèces capturées
wao.ui.field.Contact.mammalsObservation=Observation exceptionnelle
wao.ui.field.Contact.nbObservants=Nb obs.
-wao.ui.field.Contact.obsDebCode=Métier
wao.ui.field.Contact.observationTimeInDays=Jours d'observation
wao.ui.field.Contact.observationType=Type d'observation
wao.ui.field.Contact.observedDataControl=Contrôle des données observées
@@ -408,11 +405,9 @@
wao.ui.import.fishingZoneLabel=des zones de pêches
wao.ui.import.fullDescription=Import %s (format %s avec encodage UTF-8)
wao.ui.import.longTitle=Import/Export CSV (UTF-8)
-wao.ui.import.obsDebCodesLabel=des codes métiers ObsDeb
wao.ui.import.samplingPlan=Import du plan d'échantillonnage
wao.ui.import.samplingPlan.success=Import du plan d'échantillonnage réalisé avec succès
wao.ui.import.samplingPlanLabel=du plan d'échantillonnage
-wao.ui.import.terrestrialDivisionsLabel=du référentiel de stratification spatiale (ObsDeb)
wao.ui.import.terrestrialLocationsLabel=des lieux terrestres
wao.ui.import.title=Import %s
wao.ui.indicator.andMore=%s et plus
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp 2014-07-29 10:23:26 UTC (rev 2174)
@@ -101,56 +101,6 @@
</s:form>
</s:if>
- <s:if test="obsDeb">
- <s:form action="import-obsdeb-codes" method="POST" enctype="multipart/form-data">
-
- <fieldset>
- <legend>
- <s:text name="wao.import.obsDebCodes.prompt" />
- </legend>
-
- <s:file name="csvFile" />
-
- <s:submit type="button">
- <i class="icon-upload"></i> Importer
- </s:submit>
- </fieldset>
-
- </s:form>
-
- <s:form action="import-terrestrial-divisions" method="POST" enctype="multipart/form-data">
-
- <fieldset>
- <legend>
- <s:text name="wao.import.terrestrialDivisions.prompt" />
- </legend>
-
- <s:file name="csvFile" />
-
- <s:submit type="button">
- <i class="icon-upload"></i> Importer
- </s:submit>
- </fieldset>
-
- </s:form>
-
- <s:form action="import-boat-groups" method="POST" enctype="multipart/form-data">
-
- <fieldset>
- <legend>
- <s:text name="wao.import.boatGroups.prompt" />
- </legend>
-
- <s:file name="csvFile" />
-
- <s:submit type="button">
- <i class="icon-upload"></i> Importer
- </s:submit>
- </fieldset>
-
- </s:form>
- </s:if>
-
<table class="table table-bordered">
<tr>
<th>
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp 2014-07-29 09:12:24 UTC (rev 2173)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp 2014-07-29 10:23:26 UTC (rev 2174)
@@ -357,19 +357,6 @@
</s:a>
</td>
</tr>
- <tr>
- <th>
- <s:text name="wao.ui.field.Boat.boatGroup"/>
- </th>
- <td>
- <s:if test="boatDetails.boatInfos.boat.boatGroup == null">
- <s:text name="wao.ui.misc.N/A"/>
- </s:if>
- <s:else>
- <s:property value="boatDetails.boatInfos.boat.boatGroup.description"/>
- </s:else>
- </td>
- </tr>
</tbody>
</table>
1
0
r2173 - in trunk: . wao-persistence wao-persistence/src/main/java/fr/ifremer/wao/entity wao-persistence/src/main/resources/db/migration wao-persistence/src/main/xmi wao-services wao-web
by bleny@users.forge.codelutin.com 29 Jul '14
by bleny@users.forge.codelutin.com 29 Jul '14
29 Jul '14
Author: bleny
Date: 2014-07-29 11:12:24 +0200 (Tue, 29 Jul 2014)
New Revision: 2173
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2173
Log:
use conventions for version
Modified:
trunk/pom.xml
trunk/wao-persistence/pom.xml
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsProgram.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java
trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql
trunk/wao-persistence/src/main/xmi/wao-model.zargo
trunk/wao-services/pom.xml
trunk/wao-web/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-07-28 14:08:37 UTC (rev 2172)
+++ trunk/pom.xml 2014-07-29 09:12:24 UTC (rev 2173)
@@ -10,7 +10,7 @@
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.1.SNAPSHOT</version>
+ <version>4.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Wao</name>
Modified: trunk/wao-persistence/pom.xml
===================================================================
--- trunk/wao-persistence/pom.xml 2014-07-28 14:08:37 UTC (rev 2172)
+++ trunk/wao-persistence/pom.xml 2014-07-29 09:12:24 UTC (rev 2173)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.1.SNAPSHOT</version>
+ <version>4.1-SNAPSHOT</version>
</parent>
<artifactId>wao-persistence</artifactId>
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java 2014-07-28 14:08:37 UTC (rev 2172)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java 2014-07-29 09:12:24 UTC (rev 2173)
@@ -50,25 +50,25 @@
public enum ContactState implements I18nAble{
/** Usually, the first step, observer just contacted someone */
- CONTACT_START(n("ContactState.CONTACT_START"), false, false, false, true),
+ CONTACT_START(n("ContactState.CONTACT_START"), false, false, false),
/** Observer has now someone to meet */
- OBSERVATION_EXPECTED(n("ContactState.OBSERVATION_EXPECTED"), false, false, true, true),
+ OBSERVATION_EXPECTED(n("ContactState.OBSERVATION_EXPECTED"), false, false, true),
/** Observation was done, all data have been collected. Everything is fine */
- OBSERVATION_DONE(n("ContactState.OBSERVATION_DONE"), true, false, true, true),
+ OBSERVATION_DONE(n("ContactState.OBSERVATION_DONE"), true, false, true),
/** Observer failed to collect data, weather or any other circumstances made data collection impossible */
- OBSERVATION_CANCELLED(n("ContactState.OBSERVATION_CANCELLED"), true, true, true, false),
+ OBSERVATION_CANCELLED(n("ContactState.OBSERVATION_CANCELLED"), true, true, true),
/** After a contact start, people contacted refused the observation. Observer may try later. */
- CONTACT_REFUSED(n("ContactState.CONTACT_REFUSED"), true ,true, false, true),
+ CONTACT_REFUSED(n("ContactState.CONTACT_REFUSED"), true ,true, false),
/** After a contact refused, people contacted still refuse the observation. Observer may not try later. */
- CONTACT_DEFINITELY_REFUSED(n("ContactState.CONTACT_DEFINITELY_REFUSED"), true, true, false, true),
+ CONTACT_DEFINITELY_REFUSED(n("ContactState.CONTACT_DEFINITELY_REFUSED"), true, true, false),
/** On the work field, observer choose not to get in touch with the people from the boat */
- OBSERVATION_NOT_DONE(n("ContactState.OBSERVATION_NOT_DONE"), true, false, false, true);
+ OBSERVATION_NOT_DONE(n("ContactState.OBSERVATION_NOT_DONE"), true, false, false);
private String i18nKey;
@@ -81,16 +81,12 @@
/** true if this value can be used for a contact of program {@link fr.ifremer.wao.entity.ObsProgram#OBSVENTE} */
protected boolean allowedForObsVente;
- /** true if this value can be used for a contact of program {@link fr.ifremer.wao.entity.ObsProgram#OBSDEB} */
- protected boolean allowedForObsDeb;
-
ContactState(String i18nKey, boolean finalState, boolean unfinishedState,
- boolean allowedForObsVente, boolean allowedForObsDeb) {
+ boolean allowedForObsVente) {
this.i18nKey = i18nKey;
this.finalState = finalState;
this.unfinishedState = unfinishedState;
this.allowedForObsVente = allowedForObsVente;
- this.allowedForObsDeb = allowedForObsDeb;
}
@Override
@@ -128,7 +124,7 @@
} else if (obsProgram == ObsProgram.OBSVENTE) {
allowed = allowedForObsVente;
} else {
- allowed = allowedForObsDeb;
+ throw new IllegalStateException();
}
return allowed;
}
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsProgram.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsProgram.java 2014-07-28 14:08:37 UTC (rev 2172)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsProgram.java 2014-07-29 09:12:24 UTC (rev 2173)
@@ -25,8 +25,7 @@
public enum ObsProgram implements I18nAble {
OBSMER("M", n("ObsProgram.OBSMER")),
- OBSVENTE("V", n("ObsProgram.OBSVENTE")),
- OBSDEB("D", n("ObsProgram.OBSDEB"));
+ OBSVENTE("V", n("ObsProgram.OBSVENTE"));
protected String i18nKey;
@@ -58,10 +57,6 @@
return OBSVENTE == this;
}
- public boolean isObsDeb() {
- return OBSDEB == this;
- }
-
@Override
public String getI18nKey() {
return i18nKey;
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-07-28 14:08:37 UTC (rev 2172)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-07-29 09:12:24 UTC (rev 2173)
@@ -24,7 +24,6 @@
package fr.ifremer.wao.entity;
-import com.google.common.base.Preconditions;
import com.google.common.collect.Iterables;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@@ -258,9 +257,6 @@
@Override
public SampleMonth getSampleMonth(Date date) {
- Preconditions.checkState(
- !getObsProgram().equals(ObsProgram.OBSDEB),
- "opération non prévue pour ObsDeb");
if (isSampleMonthNotEmpty()) {
for (SampleMonth sampleMonth : getSampleMonth()) {
if (sampleMonth.isPeriodDatesContains(date)) {
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java 2014-07-28 14:08:37 UTC (rev 2172)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java 2014-07-29 09:12:24 UTC (rev 2173)
@@ -25,7 +25,6 @@
package fr.ifremer.wao.entity;
import com.google.common.collect.Maps;
-import fr.ifremer.wao.WaoUtils;
import org.apache.commons.lang3.StringUtils;
import org.nuiton.topia.persistence.TopiaEntities;
import org.nuiton.util.DateUtil;
@@ -399,17 +398,6 @@
}
}
- protected void compareDays() {
- if (oldRow == null) {
- addChange("Le jour est " + WaoUtils.formatDate(newRow.getExpectedDate()));
- } else {
- if (DateUtil.getDifferenceInDays(oldRow.getExpectedDate(), newRow.getExpectedDate()) >= 1) {
- addChange("L'observation est déplacée du " + WaoUtils.formatDate(oldRow.getExpectedDate())
- + " au " + WaoUtils.formatDate(newRow.getExpectedDate()));
- }
- }
- }
-
protected void compareObservers() {
Collection<WaoUser> oldObservers;
@@ -525,17 +513,6 @@
compareFishingZones();
compareAverageObservationsCount();
}
- if (ObsProgram.OBSDEB.equals(obsProgram)) {
- compareDays();
- if (newRow.isPhoneCall()) {
- compareBoats();
- compareTerrestrialLocations();
- } else {
- compareObservationUnits();
- }
- compareObservers();
- compareBlankRows();
- }
compareCompanies();
this.oldRow = null;
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java 2014-07-28 14:08:37 UTC (rev 2172)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java 2014-07-29 09:12:24 UTC (rev 2173)
@@ -84,9 +84,6 @@
allowedRoles.add(UserRole.OBSERVER);
if (userRole.equals(UserRole.ADMIN)) {
allowedRoles.add(UserRole.ADMIN);
- if ( ! obsProgram.equals(ObsProgram.OBSDEB)) {
- allowedRoles.add(UserRole.GUEST);
- }
if (obsProgram.equals(ObsProgram.OBSMER)) {
allowedRoles.add(UserRole.PROFESSIONAL);
}
Modified: trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql
===================================================================
--- trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql 2014-07-28 14:08:37 UTC (rev 2172)
+++ trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql 2014-07-29 09:12:24 UTC (rev 2173)
@@ -21,3 +21,26 @@
-- we no longer user topia migration service
drop table tms_version;
+
+-- ménage sur SampleRow
+
+ALTER TABLE samplerow DROP COLUMN expecteddate;
+ALTER TABLE samplerow DROP COLUMN blankrow;
+DROP TABLE observers_samplerow;
+ALTER TABLE samplerow DROP COLUMN boat;
+ALTER TABLE samplerow DROP COLUMN observationunit;
+ALTER TABLE samplerow DROP COLUMN observationtypeordinal;
+ALTER TABLE samplerow DROP COLUMN groupname;
+
+-- ménage sur Contact
+
+ALTER TABLE contact DROP COLUMN obsdebcode;
+ALTER TABLE contact DROP COLUMN landingdate;
+ALTER TABLE contact DROP COLUMN observationtypeordinal;
+
+-- Suprresion des référentiels obsolètes
+
+DROP TABLE terrestrialDivision;
+DROP TABLE obsdebcodedetails;
+DROP TABLE obsdebcode;
+
Modified: trunk/wao-persistence/src/main/xmi/wao-model.zargo
===================================================================
(Binary files differ)
Modified: trunk/wao-services/pom.xml
===================================================================
--- trunk/wao-services/pom.xml 2014-07-28 14:08:37 UTC (rev 2172)
+++ trunk/wao-services/pom.xml 2014-07-29 09:12:24 UTC (rev 2173)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.1.SNAPSHOT</version>
+ <version>4.1-SNAPSHOT</version>
</parent>
<artifactId>wao-services</artifactId>
Modified: trunk/wao-web/pom.xml
===================================================================
--- trunk/wao-web/pom.xml 2014-07-28 14:08:37 UTC (rev 2172)
+++ trunk/wao-web/pom.xml 2014-07-29 09:12:24 UTC (rev 2173)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.1.SNAPSHOT</version>
+ <version>4.1-SNAPSHOT</version>
</parent>
<artifactId>wao-web</artifactId>
1
0
r2172 - in trunk/wao-persistence/src/main: resources xmi
by bleny@users.forge.codelutin.com 28 Jul '14
by bleny@users.forge.codelutin.com 28 Jul '14
28 Jul '14
Author: bleny
Date: 2014-07-28 16:08:37 +0200 (Mon, 28 Jul 2014)
New Revision: 2172
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2172
Log:
set model version to 4.1
Modified:
trunk/wao-persistence/src/main/resources/wao.properties
trunk/wao-persistence/src/main/xmi/wao-model.properties
Modified: trunk/wao-persistence/src/main/resources/wao.properties
===================================================================
--- trunk/wao-persistence/src/main/resources/wao.properties 2014-07-28 13:42:52 UTC (rev 2171)
+++ trunk/wao-persistence/src/main/resources/wao.properties 2014-07-28 14:08:37 UTC (rev 2172)
@@ -39,4 +39,3 @@
topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory
topia.service.migration=org.nuiton.topia.flyway.TopiaFlywayServiceImpl
-topia.service.migration.flyway.initVersion=3.4.1
Modified: trunk/wao-persistence/src/main/xmi/wao-model.properties
===================================================================
--- trunk/wao-persistence/src/main/xmi/wao-model.properties 2014-07-28 13:42:52 UTC (rev 2171)
+++ trunk/wao-persistence/src/main/xmi/wao-model.properties 2014-07-28 14:08:37 UTC (rev 2172)
@@ -21,7 +21,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #L%
###
-model.tagValue.version=4.0
+model.tagValue.version=4.1
# orderBy tagValues
fr.ifremer.wao.entity.SampleRow.attribute.sampleMonth.tagValue.orderBy=periodDate
1
0
Author: bleny
Date: 2014-07-28 15:42:52 +0200 (Mon, 28 Jul 2014)
New Revision: 2171
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2171
Log:
update scm tag for branch
Modified:
branches/wao-4.0.x/pom.xml
Modified: branches/wao-4.0.x/pom.xml
===================================================================
--- branches/wao-4.0.x/pom.xml 2014-07-28 13:40:16 UTC (rev 2170)
+++ branches/wao-4.0.x/pom.xml 2014-07-28 13:42:52 UTC (rev 2171)
@@ -86,9 +86,9 @@
</modules>
<scm>
- <connection>scm:svn:http://svn.codelutin.com/wao/trunk</connection>
- <developerConnection>scm:svn:https://svn.codelutin.com/wao/trunk</developerConnection>
- <url>https://forge.codelutin.com/repositories/browse/wao/trunk</url>
+ <connection>scm:svn:http://svn.codelutin.com/wao/branches/wao-4.0.x</connection>
+ <developerConnection>scm:svn:https://svn.codelutin.com/wao/branches/wao-4.0.x</developerConnection>
+ <url>https://forge.codelutin.com/repositories/browse/wao/branches/wao-4.0.x</url>
</scm>
<properties>
1
0
r2170 - in trunk: . wao-persistence wao-services wao-web
by bleny@users.forge.codelutin.com 28 Jul '14
by bleny@users.forge.codelutin.com 28 Jul '14
28 Jul '14
Author: bleny
Date: 2014-07-28 15:40:16 +0200 (Mon, 28 Jul 2014)
New Revision: 2170
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2170
Log:
set versions to 4.1 according to roadmap
Modified:
trunk/pom.xml
trunk/wao-persistence/pom.xml
trunk/wao-services/pom.xml
trunk/wao-web/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-07-28 13:39:17 UTC (rev 2169)
+++ trunk/pom.xml 2014-07-28 13:40:16 UTC (rev 2170)
@@ -10,7 +10,7 @@
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.5-SNAPSHOT</version>
+ <version>4.1.SNAPSHOT</version>
<packaging>pom</packaging>
<name>Wao</name>
Modified: trunk/wao-persistence/pom.xml
===================================================================
--- trunk/wao-persistence/pom.xml 2014-07-28 13:39:17 UTC (rev 2169)
+++ trunk/wao-persistence/pom.xml 2014-07-28 13:40:16 UTC (rev 2170)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.5-SNAPSHOT</version>
+ <version>4.1.SNAPSHOT</version>
</parent>
<artifactId>wao-persistence</artifactId>
Modified: trunk/wao-services/pom.xml
===================================================================
--- trunk/wao-services/pom.xml 2014-07-28 13:39:17 UTC (rev 2169)
+++ trunk/wao-services/pom.xml 2014-07-28 13:40:16 UTC (rev 2170)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.5-SNAPSHOT</version>
+ <version>4.1.SNAPSHOT</version>
</parent>
<artifactId>wao-services</artifactId>
Modified: trunk/wao-web/pom.xml
===================================================================
--- trunk/wao-web/pom.xml 2014-07-28 13:39:17 UTC (rev 2169)
+++ trunk/wao-web/pom.xml 2014-07-28 13:40:16 UTC (rev 2170)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.5-SNAPSHOT</version>
+ <version>4.1.SNAPSHOT</version>
</parent>
<artifactId>wao-web</artifactId>
1
0
Author: bleny
Date: 2014-07-28 15:39:17 +0200 (Mon, 28 Jul 2014)
New Revision: 2169
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2169
Log:
create of branch for 4.0.x maintenance releases
Added:
branches/wao-4.0.x/
Property changes on: branches/wao-4.0.x
___________________________________________________________________
Added: svn:ignore
+ *.idea
*.iml
target
atlassian-ide-plugin.xml
Added: svn:mergeinfo
+ /branches/wao-4.0-obsvente:2075-2085
1
0
r2168 - in trunk: wao-services/src/main/java/fr/ifremer/wao/services/service wao-web/src/main/webapp/WEB-INF/content
by bleny@users.forge.codelutin.com 24 Jul '14
by bleny@users.forge.codelutin.com 24 Jul '14
24 Jul '14
Author: bleny
Date: 2014-07-24 14:38:06 +0200 (Thu, 24 Jul 2014)
New Revision: 2168
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2168
Log:
clean some code
Modified:
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanService.java
trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java 2014-07-24 09:24:17 UTC (rev 2167)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java 2014-07-24 12:38:06 UTC (rev 2168)
@@ -866,17 +866,16 @@
contact.setCreationDate(serviceContext.getNow());
}
- samplingPlanService.recomputeSampleRowEstimatedAndRealTides(contact.getSampleRow());
-
dao.create(contact);
} else {
- samplingPlanService.recomputeSampleRowEstimatedAndRealTides(contact.getSampleRow());
-
dao.update(contact);
+
}
+ samplingPlanService.recomputeSampleRowEstimatedAndRealTides(contact.getSampleRow());
+
}
protected void updateAllegroWalletIfNecessary(UpdateContactCommand updateContactCommand) {
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanService.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanService.java 2014-07-24 09:24:17 UTC (rev 2167)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanService.java 2014-07-24 12:38:06 UTC (rev 2168)
@@ -199,29 +199,21 @@
Collection<Contact> contacts = getContactDao().forFilter(contactFilter, false).findAll();
- final double minutesPerDay = 24 * 60;
- // Pour calculer le temps passé, on prend pour chaque observation
- // le temps qui a vraiment été passé en mer.
-
- // temps de mer réalisé par ligne du plan = somme [arrondi-supérieur (nb d'heures total de la marée/ 24)]
-
long real = 0;
long estimated = 0;
+
for (Contact contact : contacts) {
Integer observationTimeInDays = contact.getObservationTimeInDays();
if (observationTimeInDays != null) {
-
if (BooleanUtils.isTrue(contact.getValidationCompany())) {
// real observation
real += observationTimeInDays;
}
// estimated observation
estimated += observationTimeInDays;
-
}
-
}
return Pair.of(real, estimated);
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp 2014-07-24 09:24:17 UTC (rev 2167)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp 2014-07-24 12:38:06 UTC (rev 2168)
@@ -361,7 +361,7 @@
<th class="date-time"><s:text name="wao.ui.field.Contact.beginDate"/></th>
<th class="date-time"><s:text name="wao.ui.field.Contact.endDate"/></th>
<s:if test="obsMer">
- <th class="date-time"><s:text name="wao.ui.field.Contact.observationTimeInDays"/></th>
+ <th><s:text name="wao.ui.field.Contact.observationTimeInDays"/></th>
</s:if>
<th class="date"><s:text name="wao.ui.field.Contact.dataInputDate"/></th>
<s:if test="obsMer">
@@ -482,7 +482,7 @@
</s:if>
</td>
<s:if test="obsMer">
- <td>
+ <td class="align-center">
<s:if test="observationTimeInDays != null">
<s:property value="observationTimeInDays"/>
</s:if>
1
0
r2167 - in trunk/wao-web/src/main/webapp/WEB-INF/content: . obsmer obsvente
by bleny@users.forge.codelutin.com 24 Jul '14
by bleny@users.forge.codelutin.com 24 Jul '14
24 Jul '14
Author: bleny
Date: 2014-07-24 11:24:17 +0200 (Thu, 24 Jul 2014)
New Revision: 2167
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2167
Log:
fixes #5506 add missing method in some links
Modified:
trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp
trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
trunk/wao-web/src/main/webapp/WEB-INF/content/obsvente/sampling-plan.jsp
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp 2014-07-24 09:21:11 UTC (rev 2166)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp 2014-07-24 09:24:17 UTC (rev 2167)
@@ -169,7 +169,7 @@
</tbody>
</table>
- <s:url action="contacts" id="viewAssociatedContactsForBoatUrl">
+ <s:url action="contacts!applyFilter" id="viewAssociatedContactsForBoatUrl">
<s:param name="filter.boatFilter.registrationCode" value="boatDetails.boatInfos.boat.immatriculation"/>
<s:param name="filter.sampleRowFilter.companyIds" value="boatDetails.boatInfos.company.topiaId"/>
<s:param name="filter.periodFrom"/>
@@ -345,7 +345,7 @@
<s:text name="wao.ui.field.Boat.shipOwner"/>
</th>
<td class="no-border-top">
- <s:url action="boats" id="shipOwnerBoatsUrl">
+ <s:url action="boats!applyFilter" id="shipOwnerBoatsUrl">
<s:param name="filter.shipOwnerIds" value="boatDetails.boatInfos.boat.shipOwner.topiaId"/>
</s:url>
<s:set name="shipOwnerBoatsTitle">
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-07-24 09:21:11 UTC (rev 2166)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-07-24 09:24:17 UTC (rev 2167)
@@ -470,7 +470,7 @@
</li>
</s:if>
<li>
- <s:url action="sampling-plan" id="sampleRowZoomUrl">
+ <s:url action="sampling-plan!applyFilter" id="sampleRowZoomUrl">
<s:param name="filter.periodFrom" value="%{formatMonth(firstSampleMonthDate)}"/>
<s:param name="filter.periodTo" value="%{formatMonth(lastSampleMonthDate)}"/>
<s:param name="filter.companyIds" value="%{filter.companyIds}"/>
@@ -487,7 +487,7 @@
</li>
<s:if test="authenticatedWaoUser.authorizedToViewBoats && elligibleBoatsProvided">
<li>
- <s:url action="boats" id="viewElligibleBoatsUrl">
+ <s:url action="boats!applyFilter" id="viewElligibleBoatsUrl">
<s:param name="filter.elligibleForSampleRowsFilter.sampleRowCodes" value="code" />
</s:url>
<s:a href="%{viewElligibleBoatsUrl}">
@@ -497,7 +497,7 @@
</s:if>
<s:if test="authenticatedWaoUser.authorizedToViewContacts && sampleRowContactCounts > 0">
<li>
- <s:url action="contacts" id="viewAssociatedContactsUrl">
+ <s:url action="contacts!applyFilter" id="viewAssociatedContactsUrl">
<s:param name="filter.sampleRowFilter.sampleRowCodes" value="code" />
<s:param name="filter.periodFrom" />
<s:param name="filter.periodTo" />
@@ -509,7 +509,7 @@
</s:if>
<s:if test="authenticatedWaoUser.authorizedToCreateContact && newContactCreatable">
<li>
- <s:url action="boats" id="createAssociatedContactUrl">
+ <s:url action="boats!applyFilter" id="createAssociatedContactUrl">
<s:param name="startBoatSelectionForSampleRowId" value="sampleRowId" />
</s:url>
<s:a href="%{createAssociatedContactUrl}">
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsvente/sampling-plan.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsvente/sampling-plan.jsp 2014-07-24 09:21:11 UTC (rev 2166)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsvente/sampling-plan.jsp 2014-07-24 09:24:17 UTC (rev 2167)
@@ -443,7 +443,7 @@
</li>
</s:if>
<li>
- <s:url action="sampling-plan" id="sampleRowZoomUrl">
+ <s:url action="sampling-plan!applyFilter" id="sampleRowZoomUrl">
<s:param name="filter.periodFrom" value="%{formatMonth(firstSampleMonthDate)}"/>
<s:param name="filter.periodTo" value="%{formatMonth(lastSampleMonthDate)}"/>
<s:param name="filter.companyIds" value="%{filter.companyIds}"/>
@@ -460,7 +460,7 @@
</li>
<s:if test="authenticatedWaoUser.authorizedToViewBoats && elligibleBoatsProvided">
<li>
- <s:url action="boats" id="viewElligibleBoatsUrl">
+ <s:url action="boats!applyFilter" id="viewElligibleBoatsUrl">
<s:param name="filter.elligibleForSampleRowsFilter.sampleRowCodes" value="code" />
</s:url>
<s:a href="%{viewElligibleBoatsUrl}">
@@ -470,7 +470,7 @@
</s:if>
<s:if test="authenticatedWaoUser.authorizedToViewContacts && sampleRowContactCounts > 0">
<li>
- <s:url action="contacts" id="viewAssociatedContactsUrl">
+ <s:url action="contacts!applyFilter" id="viewAssociatedContactsUrl">
<s:param name="filter.sampleRowFilter.sampleRowCodes" value="code" />
<s:param name="filter.periodFrom" />
<s:param name="filter.periodTo" />
@@ -482,7 +482,7 @@
</s:if>
<s:if test="authenticatedWaoUser.authorizedToCreateContact && newContactCreatable">
<li>
- <s:url action="boats" id="createAssociatedContactUrl">
+ <s:url action="boats!applyFilter" id="createAssociatedContactUrl">
<s:param name="startBoatSelectionForSampleRowId" value="sampleRowId" />
</s:url>
<s:a href="%{createAssociatedContactUrl}">
1
0
r2166 - trunk/wao-web/src/main/java/fr/ifremer/wao/web
by bleny@users.forge.codelutin.com 24 Jul '14
by bleny@users.forge.codelutin.com 24 Jul '14
24 Jul '14
Author: bleny
Date: 2014-07-24 11:21:11 +0200 (Thu, 24 Jul 2014)
New Revision: 2166
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2166
Log:
add debug logs for locales
Modified:
trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoActionSupport.java
Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoActionSupport.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoActionSupport.java 2014-07-24 09:20:31 UTC (rev 2165)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoActionSupport.java 2014-07-24 09:21:11 UTC (rev 2166)
@@ -22,12 +22,18 @@
*/
import fr.ifremer.wao.WaoApplicationConfig;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.nuiton.web.struts2.BaseAction;
+import java.util.Locale;
+
public class WaoActionSupport extends BaseAction {
private static final long serialVersionUID = 1L;
+ private static final Log log = LogFactory.getLog(WaoActionSupport.class);
+
protected WaoApplicationConfig applicationConfig;
protected WaoSession session;
@@ -51,4 +57,13 @@
public void setFragment(boolean fragment) {
// ignore fragment get parameter: it's managed by sitemesh decorators
}
+
+ @Override
+ public Locale getLocale() {
+ Locale locale = super.getLocale();
+ if (log.isDebugEnabled()) {
+ log.debug("locale is " + locale);
+ }
+ return locale;
+ }
}
1
0