Author: bleny Date: 2010-11-23 14:59:18 +0000 (Tue, 23 Nov 2010) New Revision: 798 Log: update file header + fix contacts CSV imports (data reliability was missing) Modified: trunk/src/site/rst/obsdeb.rst trunk/wao-business/src/main/java/fr/ifremer/wao/bean/DataReliability.java trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalIndicatorValue.java trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalSynthesisParametersImpl.java trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalSynthesisResultImpl.java trunk/wao-business/src/main/java/fr/ifremer/wao/entity/DCFFiveCodeImpl.java trunk/wao-business/src/main/java/fr/ifremer/wao/entity/IndicatorImpl.java trunk/wao-business/src/main/java/fr/ifremer/wao/entity/IndicatorLevelImpl.java trunk/wao-business/src/main/java/fr/ifremer/wao/io/csv/WaoCsvHeader.java trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceContactImpl.java trunk/wao-business/src/test/java/fr/ifremer/wao/WaoMigrationCallBackTest.java trunk/wao-business/src/test/java/fr/ifremer/wao/service/ServiceContactInternalTest.java trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/components/IndicatorLevels.java trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/IndicatorsHistory.java trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java trunk/wao-ui/src/main/webapp/css/cartography.css trunk/wao-ui/src/main/webapp/css/synthesis-print.css Modified: trunk/src/site/rst/obsdeb.rst =================================================================== --- trunk/src/site/rst/obsdeb.rst 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/src/site/rst/obsdeb.rst 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +.. - +.. * #%L +.. * Wao +.. * %% +.. * Copyright (C) 2009 - 2010 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% +.. - ==================================== OBSDEB : Observation au débarquement ==================================== Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/bean/DataReliability.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/bean/DataReliability.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/bean/DataReliability.java 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +/* + * #%L + * Wao :: Business + * %% + * Copyright (C) 2009 - 2010 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.bean; import static org.nuiton.i18n.I18n._; Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalIndicatorValue.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalIndicatorValue.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalIndicatorValue.java 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +/* + * #%L + * Wao :: Business + * %% + * Copyright (C) 2009 - 2010 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.bean; import static org.nuiton.i18n.I18n._; Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalSynthesisParametersImpl.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalSynthesisParametersImpl.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalSynthesisParametersImpl.java 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +/* + * #%L + * Wao :: Business + * %% + * Copyright (C) 2009 - 2010 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.bean; import fr.ifremer.wao.entity.Indicator; Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalSynthesisResultImpl.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalSynthesisResultImpl.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/bean/GlobalSynthesisResultImpl.java 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +/* + * #%L + * Wao :: Business + * %% + * Copyright (C) 2009 - 2010 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.bean; import fr.ifremer.wao.entity.Indicator; Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/entity/DCFFiveCodeImpl.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/entity/DCFFiveCodeImpl.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/entity/DCFFiveCodeImpl.java 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +/* + * #%L + * Wao :: Business + * %% + * Copyright (C) 2009 - 2010 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._; Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/entity/IndicatorImpl.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/entity/IndicatorImpl.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/entity/IndicatorImpl.java 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +/* + * #%L + * Wao :: Business + * %% + * Copyright (C) 2009 - 2010 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 fr.ifremer.wao.bean.SynthesisId; Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/entity/IndicatorLevelImpl.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/entity/IndicatorLevelImpl.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/entity/IndicatorLevelImpl.java 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +/* + * #%L + * Wao :: Business + * %% + * Copyright (C) 2009 - 2010 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 org.slf4j.Logger; Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/io/csv/WaoCsvHeader.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/io/csv/WaoCsvHeader.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/io/csv/WaoCsvHeader.java 2010-11-23 14:59:18 UTC (rev 798) @@ -331,11 +331,9 @@ /** Contact company validation **/ CONT_SOCIETE_VALID(31), /** Contact program validation **/ - CONT_PROGRAM_VALID(32); -// /** Contact company comment **/ -// CONT_COMMENT_SOCIETE(33), -// /** Contact program comment **/ -// CONT_COMMENT_PROGRAM(34); + CONT_PROGRAM_VALID(32), + /** Data reliability **/ + CONT_DATA_RELIABILITY(33); private int contactHeader; @@ -364,8 +362,8 @@ } public static int getTotalHeaders() { - // CONT_PROGRAM_VALID is the last column - return CONT_PROGRAM_VALID.forContactCsv() + 1; + // CONT_DATA_RELIABILITY is the last column + return CONT_DATA_RELIABILITY.forContactCsv() + 1; } public static String formatValidation(Boolean validation) { Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceContactImpl.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceContactImpl.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceContactImpl.java 2010-11-23 14:59:18 UTC (rev 798) @@ -434,6 +434,8 @@ CONTACT.formatValidation(contact.getValidationCompany())); export.record(CONTACT.CONT_PROGRAM_VALID, CONTACT.formatValidation(contact.getValidationProgram())); + export.record(CONTACT.CONT_DATA_RELIABILITY, + String.valueOf(contact.getDataReliabilityOrdinal())); // Observer part WaoUser observer = contact.getObserver(); @@ -694,6 +696,9 @@ contactCode, createDateCsv); contact.setTopiaCreateDate(createDate); + + contact.setDataReliabilityOrdinal( + ImportHelper.readInt(reader, CONTACT.CONT_DATA_RELIABILITY)); } /** Modified: trunk/wao-business/src/test/java/fr/ifremer/wao/WaoMigrationCallBackTest.java =================================================================== --- trunk/wao-business/src/test/java/fr/ifremer/wao/WaoMigrationCallBackTest.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-business/src/test/java/fr/ifremer/wao/WaoMigrationCallBackTest.java 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +/* + * #%L + * Wao :: Business + * %% + * Copyright (C) 2009 - 2010 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; import fr.ifremer.wao.entity.DCFFiveCode; Modified: trunk/wao-business/src/test/java/fr/ifremer/wao/service/ServiceContactInternalTest.java =================================================================== --- trunk/wao-business/src/test/java/fr/ifremer/wao/service/ServiceContactInternalTest.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-business/src/test/java/fr/ifremer/wao/service/ServiceContactInternalTest.java 2010-11-23 14:59:18 UTC (rev 798) @@ -574,6 +574,8 @@ String comment = "Commentaire sur le contact\nAutre ligne"; when(reader.get(CONTACT.CONT_COMMENT.name())). thenReturn(comment); + when(reader.get(CONTACT.CONT_DATA_RELIABILITY.name())). + thenReturn("0"); when(creator.getCompany()).thenReturn(company); when(creator.isAdmin()).thenReturn(false); Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/components/IndicatorLevels.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/components/IndicatorLevels.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/components/IndicatorLevels.java 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +/* + * #%L + * Wao :: Web Interface + * %% + * Copyright (C) 2009 - 2010 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.ui.components; import fr.ifremer.wao.entity.Indicator; Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/IndicatorsHistory.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/IndicatorsHistory.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/IndicatorsHistory.java 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +/* + * #%L + * Wao :: Web Interface + * %% + * Copyright (C) 2009 - 2010 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.ui.pages; import fr.ifremer.wao.bean.UserRole; Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java 2010-11-23 14:59:18 UTC (rev 798) @@ -354,10 +354,11 @@ // remove column with number of boats with 0 invalid boarding, we // don't want it to be showed in the graph. - getBoardingResult().getInvalidBoarding().remove(String.valueOf(0)); + // getBoardingResult().getInvalidBoarding().remove(String.valueOf(0)); + // put invalid first to get red color + data.put("Nombre de navires ayant effectués x embarquements invalides", getBoardingResult().getInvalidBoarding()); data.put("Nombre de navires ayant effectués x embarquements", getBoardingResult().getBoardings()); - data.put("Nombre de navires ayant effectués x embarquements invalides", getBoardingResult().getInvalidBoarding()); String title = "Sollicitations des navires depuis le " + getDateFormat().format(getFilter().getPeriod().getFromDate()); Modified: trunk/wao-ui/src/main/webapp/css/cartography.css =================================================================== --- trunk/wao-ui/src/main/webapp/css/cartography.css 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-ui/src/main/webapp/css/cartography.css 2010-11-23 14:59:18 UTC (rev 798) @@ -8,12 +8,12 @@ * 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% @@ -86,4 +86,4 @@ #so-footer a:hover { color: white !important; -} \ No newline at end of file +} Modified: trunk/wao-ui/src/main/webapp/css/synthesis-print.css =================================================================== --- trunk/wao-ui/src/main/webapp/css/synthesis-print.css 2010-11-22 14:45:55 UTC (rev 797) +++ trunk/wao-ui/src/main/webapp/css/synthesis-print.css 2010-11-23 14:59:18 UTC (rev 798) @@ -1,3 +1,23 @@ +/* + * #%L + * Wao :: Web Interface + * %% + * Copyright (C) 2009 - 2010 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% + */ * {