Coser-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
December 2010
- 2 participants
- 139 discussions
Author: tchemit
Date: 2010-12-30 20:22:46 +0000 (Thu, 30 Dec 2010)
New Revision: 453
Log:
use JAXX 2.2.4 and his new jaxx-validator module
Modified:
trunk/coser-ui/pom.xml
trunk/pom.xml
Modified: trunk/coser-ui/pom.xml
===================================================================
--- trunk/coser-ui/pom.xml 2010-12-24 16:41:39 UTC (rev 452)
+++ trunk/coser-ui/pom.xml 2010-12-30 20:22:46 UTC (rev 453)
@@ -67,6 +67,10 @@
</dependency>
<dependency>
<groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-validator</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.nuiton.jaxx</groupId>
<artifactId>jaxx-widgets</artifactId>
</dependency>
<dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-12-24 16:41:39 UTC (rev 452)
+++ trunk/pom.xml 2010-12-30 20:22:46 UTC (rev 453)
@@ -140,6 +140,13 @@
<artifactId>jaxx-runtime</artifactId>
<version>${jaxx.version}</version>
<scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-validator</artifactId>
+ <version>${jaxx.version}</version>
+ <scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.opensymphony</groupId>
@@ -291,7 +298,7 @@
<license.organizationName>Ifremer, Codelutin</license.organizationName>
<!-- Versions -->
- <jaxx.version>2.2.4-SNAPSHOT</jaxx.version>
+ <jaxx.version>2.2.4</jaxx.version>
<i18n.version>2.0.1</i18n.version>
<struts.version>2.2.1.1</struts.version>
</properties>
1
0
24 Dec '10
Author: chatellier
Date: 2010-12-24 16:41:39 +0000 (Fri, 24 Dec 2010)
New Revision: 452
Log:
Fix dependency used to compile
Modified:
trunk/coser-business/pom.xml
trunk/pom.xml
Modified: trunk/coser-business/pom.xml
===================================================================
--- trunk/coser-business/pom.xml 2010-12-24 16:41:21 UTC (rev 451)
+++ trunk/coser-business/pom.xml 2010-12-24 16:41:39 UTC (rev 452)
@@ -60,6 +60,10 @@
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-12-24 16:41:21 UTC (rev 451)
+++ trunk/pom.xml 2010-12-24 16:41:39 UTC (rev 452)
@@ -85,9 +85,16 @@
<version>1.2</version>
<scope>compile</scope>
</dependency>
-
+
<dependency>
<groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore</artifactId>
+ <version>4.1</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1-beta1</version>
<scope>compile</scope>
1
0
r451 - in trunk: coser-business/src/main/java/fr/ifremer/coser coser-ui/src/main/java/fr/ifremer/coser/ui/option coser-ui/src/main/java/fr/ifremer/coser/ui/project coser-ui/src/main/java/fr/ifremer/coser/ui/result src/site/rst/devel
by chatellier@users.labs.libre-entreprise.org 24 Dec '10
by chatellier@users.labs.libre-entreprise.org 24 Dec '10
24 Dec '10
Author: chatellier
Date: 2010-12-24 16:41:21 +0000 (Fri, 24 Dec 2010)
New Revision: 451
Log:
Fix headers
Modified:
trunk/coser-business/src/main/java/fr/ifremer/coser/CoserClassLoader.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultTreeModel.java
trunk/src/site/rst/devel/struts.rst
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserClassLoader.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/CoserClassLoader.java 2010-12-24 16:29:46 UTC (rev 450)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/CoserClassLoader.java 2010-12-24 16:41:21 UTC (rev 451)
@@ -6,18 +6,18 @@
* Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as
+ * it under the terms of the GNU Lesser 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.
+ * GNU General Lesser Public License for more details.
*
- * You should have received a copy of the GNU General Public
+ * You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
* #L%
*/
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java 2010-12-24 16:29:46 UTC (rev 450)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java 2010-12-24 16:41:21 UTC (rev 451)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
@@ -90,4 +88,4 @@
l.getGlassPane().setLayout(new FlowLayout());
l.getGlassPane().remove(copyToDiskButton);
}
-}
\ No newline at end of file
+}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java 2010-12-24 16:29:46 UTC (rev 450)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java 2010-12-24 16:41:21 UTC (rev 451)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeModel.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeModel.java 2010-12-24 16:29:46 UTC (rev 450)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeModel.java 2010-12-24 16:41:21 UTC (rev 451)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java 2010-12-24 16:29:46 UTC (rev 450)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java 2010-12-24 16:41:21 UTC (rev 451)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java 2010-12-24 16:29:46 UTC (rev 450)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java 2010-12-24 16:41:21 UTC (rev 451)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java 2010-12-24 16:29:46 UTC (rev 450)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java 2010-12-24 16:41:21 UTC (rev 451)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultRenderer.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultRenderer.java 2010-12-24 16:29:46 UTC (rev 450)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultRenderer.java 2010-12-24 16:41:21 UTC (rev 451)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultTreeModel.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultTreeModel.java 2010-12-24 16:29:46 UTC (rev 450)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultTreeModel.java 2010-12-24 16:41:21 UTC (rev 451)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/src/site/rst/devel/struts.rst
===================================================================
--- trunk/src/site/rst/devel/struts.rst 2010-12-24 16:29:46 UTC (rev 450)
+++ trunk/src/site/rst/devel/struts.rst 2010-12-24 16:41:21 UTC (rev 451)
@@ -1,3 +1,27 @@
+.. -
+.. * #%L
+.. * Coser
+.. *
+.. * $Id$
+.. * $HeadURL$
+.. * %%
+.. * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+.. * %%
+.. * This program is free software: you can redistribute it and/or modify
+.. * it under the terms of the GNU Lesser 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 Lesser Public License for more details.
+.. *
+.. * You should have received a copy of the GNU General Lesser Public
+.. * License along with this program. If not, see
+.. * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+.. * #L%
+.. -
Struts 2
========
1
0
r450 - in trunk/coser-ui/src/main: java/fr/ifremer/coser/ui java/fr/ifremer/coser/ui/maps java/fr/ifremer/coser/ui/option resources/i18n
by chatellier@users.labs.libre-entreprise.org 24 Dec '10
by chatellier@users.labs.libre-entreprise.org 24 Dec '10
24 Dec '10
Author: chatellier
Date: 2010-12-24 16:29:46 +0000 (Fri, 24 Dec 2010)
New Revision: 450
Log:
Ajout d'une interface d'edition des fichiers de validation
Added:
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorDialog.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java
Removed:
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ValidatorDialog.jaxx
Modified:
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java
trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties
trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-12-24 16:28:42 UTC (rev 449)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-12-24 16:29:46 UTC (rev 450)
@@ -45,6 +45,7 @@
import jaxx.runtime.swing.editor.config.ConfigUI;
import jaxx.runtime.swing.editor.config.ConfigUIHelper;
+import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.widget.SwingSession;
@@ -60,6 +61,9 @@
import fr.ifremer.coser.ui.common.CommonHandler;
import fr.ifremer.coser.ui.control.ControlHandler;
import fr.ifremer.coser.ui.control.ControlView;
+import fr.ifremer.coser.ui.option.NoCopiedLayerUI;
+import fr.ifremer.coser.ui.option.OptionHandler;
+import fr.ifremer.coser.ui.option.ValidatorDialog;
import fr.ifremer.coser.ui.project.ProjectCreationView;
import fr.ifremer.coser.ui.project.ProjectEditView;
import fr.ifremer.coser.ui.project.ProjectHandler;
@@ -213,11 +217,16 @@
* l'utilisateur.
*/
public void showValidatorsConfiguration() {
+ CoserConfig config = view.getContextValue(CoserConfig.class);
ValidatorDialog validatorDialog = new ValidatorDialog(view);
- URL sample = Catch.class.getResource("Catch-error-validation.xml");
- File sampleFile = new File(sample.getFile());
- validatorDialog.getValidationEditor().open(sampleFile);
- validatorDialog.setLocationRelativeTo(null);
+ validatorDialog.setHandler(new OptionHandler());
+
+ // layer si non copié
+ if (!config.getValidatorsDirectory().isDirectory()) {
+ validatorDialog.getNoCopiedToDiskLayer().setUI(new NoCopiedLayerUI(validatorDialog));
+ }
+
+ validatorDialog.setLocationRelativeTo(view);
validatorDialog.setVisible(true);
}
Deleted: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ValidatorDialog.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ValidatorDialog.jaxx 2010-12-24 16:28:42 UTC (rev 449)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ValidatorDialog.jaxx 2010-12-24 16:29:46 UTC (rev 450)
@@ -1,70 +0,0 @@
-<!--
- #%L
- Coser :: UI
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/gpl-3.0.html>.
- #L%
- -->
-<JDialog title="coser.ui.validators.title">
- <Table>
- <row>
- <cell columns="4" fill="horizontal">
- <JLabel font-style="italic" text="coser.ui.validators.description" />
- </cell>
- </row>
- <row>
- <cell fill="horizontal">
- <JLabel text="coser.ui.validators.validators" />
- </cell>
- <cell>
- <JLabel text="coser.ui.validators.entity" />
- </cell>
- <cell weightx="1" fill="horizontal" columns="2">
- <JComboBox />
- </cell>
- </row>
- <row>
- <cell fill="both" weightx="1" weighty="1">
- <JScrollPane>
- <JList />
- </JScrollPane>
- </cell>
- <cell weightx="2" weighty="1" fill="both" columns="3">
- <org.nuiton.widget.editor.Editor id="validationEditor" />
- </cell>
- </row>
- <row>
- <cell fill="horizontal">
- <JButton text="coser.ui.validators.newValidator" />
- </cell>
- <cell fill="horizontal">
- <JButton text="coser.ui.validators.deleteValidator" />
- </cell>
- </row>
- <row>
- <cell columns="4" anchor="east" insets="0">
- <JPanel>
- <JButton text="coser.ui.validators.cancel" onActionPerformed="dispose()"/>
- <JButton text="coser.ui.validators.valid" onActionPerformed="dispose()"/>
- </JPanel>
- </cell>
- </row>
- </Table>
-</JDialog>
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java 2010-12-24 16:28:42 UTC (rev 449)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java 2010-12-24 16:29:46 UTC (rev 450)
@@ -38,7 +38,6 @@
import com.bbn.openmap.layer.GraticuleLayer;
import com.bbn.openmap.layer.shape.ShapeLayer;
import com.bbn.openmap.omGraphics.DrawingAttributes;
-import com.bbn.openmap.plugin.esri.EsriLayer;
import fr.ifremer.coser.bean.Project;
@@ -56,7 +55,7 @@
/** serialVersionUID. */
private static final long serialVersionUID = 3134624721243512358L;
- private static Log log = LogFactory.getLog(CoserMap.class);
+ private static final Log log = LogFactory.getLog(CoserMap.class);
protected LayerHandler layerHandler = new LayerHandler();
Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java (rev 0)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java 2010-12-24 16:29:46 UTC (rev 450)
@@ -0,0 +1,93 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package fr.ifremer.coser.ui.option;
+
+import java.awt.Color;
+import java.awt.FlowLayout;
+import java.awt.Graphics2D;
+import java.awt.GridBagLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JComponent;
+
+import org.jdesktop.jxlayer.JXLayer;
+import org.jdesktop.jxlayer.plaf.ext.LockableUI;
+
+/**
+ * Layer transparent.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class NoCopiedLayerUI extends LockableUI implements ActionListener {
+
+ protected ValidatorDialog view;
+ protected JButton copyToDiskButton;
+
+ public NoCopiedLayerUI(ValidatorDialog view) {
+ this.view = view;
+ setLocked(true);
+ copyToDiskButton = new JButton("Copy to disk");
+ copyToDiskButton.addActionListener(this);
+ }
+
+ /*
+ * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+ */
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ view.getHandler().copyDefaultValidators(view);
+ }
+
+ @Override
+ protected void paintLayer(Graphics2D g2, JXLayer<JComponent> l) {
+ super.paintLayer(g2, l);
+ g2.setColor(new Color(150, 150, 150, 128));
+ g2.fillRect(0, 0, l.getWidth(), l.getHeight());
+ }
+
+ @Override
+ public void installUI(JComponent c) {
+ super.installUI(c);
+ JXLayer<JComponent> l = (JXLayer<JComponent>) c;
+ l.getGlassPane().setLayout(new GridBagLayout());
+ l.getGlassPane().add(copyToDiskButton);
+ //copyToDiskButton.setCursor(Cursor.getDefaultCursor());
+ }
+
+ @Override
+ public void uninstallUI(JComponent c) {
+ super.uninstallUI(c);
+ JXLayer<JComponent> l = (JXLayer<JComponent>) c;
+ l.getGlassPane().setLayout(new FlowLayout());
+ l.getGlassPane().remove(copyToDiskButton);
+ }
+}
\ No newline at end of file
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java (rev 0)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java 2010-12-24 16:29:46 UTC (rev 450)
@@ -0,0 +1,160 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package fr.ifremer.coser.ui.option;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.List;
+
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+import javax.swing.plaf.PanelUI;
+import javax.swing.tree.TreePath;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jdesktop.jxlayer.plaf.BufferedLayerUI;
+import org.nuiton.util.Resource;
+
+import fr.ifremer.coser.CoserConfig;
+import fr.ifremer.coser.CoserConstants.Category;
+import fr.ifremer.coser.CoserConstants.ValidationLevel;
+import fr.ifremer.coser.data.Catch;
+import fr.ifremer.coser.ui.common.CommonHandler;
+
+/**
+ * Handler for options.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class OptionHandler extends CommonHandler {
+
+ private static final Log log = LogFactory.getLog(OptionHandler.class);
+
+ /**
+ * Appelé par le layer pour copier les validateurs par defaut sur
+ * le disque de l'utilisateur. Les copies depuis le classpath (dossier
+ * "validators" vers le dossier défini par l'utilisateur.
+ *
+ * @param view view
+ */
+ public void copyDefaultValidators(ValidatorDialog view) {
+ CoserConfig config = view.getContextValue(CoserConfig.class);
+ File validatorsDir = config.getValidatorsDirectory();
+ validatorsDir.mkdirs();
+
+ // ne match que dans coser
+ List<URL> urls = Resource.getURLs(".*/validators/fr/ifremer/coser/.+\\.xml");
+ for (URL url : urls) {
+ String path = url.getPath();
+ String lastPath = path.substring(path.indexOf("/validators/") + "/validators/".length());
+ String folderPath = lastPath.substring(0, lastPath.lastIndexOf('/'));
+ String name = lastPath.substring(lastPath.lastIndexOf('/') + 1);
+
+ File validatorDirectory = new File(validatorsDir, folderPath);
+ validatorDirectory.mkdirs();
+ File validatorFile = new File(validatorDirectory, name);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Coping resources " + url + " to " + validatorFile.getAbsolutePath());
+ }
+ try {
+ FileUtils.copyURLToFile(url, validatorFile);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ // remove bloking layer
+ //view.getNoCopiedToDiskLayer().setUI(null);
+ // FIXME gros hack, j'arrive pas a enlever le layer
+ view.dispose();
+ ValidatorDialog newView = new ValidatorDialog(view);
+ newView.setHandler(this);
+ newView.setLocationRelativeTo(view);
+ newView.setVisible(true);
+ }
+
+ /**
+ * Control selected in tree.
+ *
+ * Dans ce cas, les fichiers sur disque existent, et on ne doit
+ * editer que ceux là, sinon enregistrer un fichier dans le classpath
+ * ca risque pas de fonctionner.
+ *
+ * @param view view
+ */
+ public void selectValidator(ValidatorDialog view) {
+
+ TreePath selectedPath = view.getValidatorsTree().getSelectionPath();
+ if (selectedPath != null) {
+ Object[] path = selectedPath.getPath();
+
+ CoserConfig config = view.getContextValue(CoserConfig.class);
+ File validatorsDir = config.getValidatorsDirectory();
+
+ // si la selection est un sous context d'une categorie
+ if (path.length == 3) {
+ Category category = (Category)path[1];
+ ValidationLevel level = (ValidationLevel)path[2];
+
+ String sPackage = Catch.class.getPackage().getName();
+
+ String validatorResource = sPackage.replace('.', '/') + "/";
+ // c'est le meme nom actuellement
+ // au lower case et capitalize pret ;)
+ // CATCH = Catch
+ validatorResource += StringUtils.capitalize(category.toString().toLowerCase());
+ validatorResource += "-" + level.getXWorkContext() + "-validation.xml";
+
+ File validatorFile = new File(validatorsDir, validatorResource);
+
+ // look for resources in class path
+ if (log.isDebugEnabled()) {
+ log.debug("Looking for validator : " + validatorFile.getAbsoluteFile());
+ }
+
+ if (validatorFile.isFile()) {
+ view.getValidationEditor().open(validatorFile);
+ }
+ else {
+ view.getValidationEditor().close();
+ }
+ view.getValidationEditor().validate();
+ view.getValidationEditor().repaint();
+ }
+ }
+ }
+
+
+}
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Copied: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorDialog.jaxx (from rev 300, trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ValidatorDialog.jaxx)
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorDialog.jaxx (rev 0)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorDialog.jaxx 2010-12-24 16:29:46 UTC (rev 450)
@@ -0,0 +1,64 @@
+<!--
+ #%L
+ Coser :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
+<JDialog title="coser.ui.validators.title">
+ <OptionHandler id="handler" javaBean="null" />
+ <org.jdesktop.jxlayer.JXLayer id="noCopiedToDiskLayer">
+ <Table>
+ <row>
+ <cell columns="2" fill="horizontal">
+ <JLabel font-style="italic" text="coser.ui.validators.description" />
+ </cell>
+ </row>
+ <row>
+ <cell fill="horizontal">
+ <JLabel text="coser.ui.validators.validators" />
+ </cell>
+ <cell fill="horizontal">
+ <JLabel text="coser.ui.validators.content" />
+ </cell>
+ </row>
+ <row>
+ <cell fill="both" weightx="1" weighty="1">
+ <JScrollPane>
+ <ValidatorsTreeModel id="validatorsTreeModel" />
+ <JTree id="validatorsTree" model="{validatorsTreeModel}" cellRenderer="{new ValidatorsTreeRenderer()}"
+ showsRootHandles="true" rootVisible="false"
+ onValueChanged="getHandler().selectValidator(this)" />
+ </JScrollPane>
+ </cell>
+ <cell weightx="2" weighty="1" fill="both">
+ <org.nuiton.widget.editor.Editor id="validationEditor" />
+ </cell>
+ </row>
+ <row>
+ <cell columns="2" anchor="east" insets="0">
+ <JPanel>
+ <JButton text="coser.ui.validators.valid" onActionPerformed="dispose()"/>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
+ </org.jdesktop.jxlayer.JXLayer>
+</JDialog>
Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeModel.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeModel.java (rev 0)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeModel.java 2010-12-24 16:29:46 UTC (rev 450)
@@ -0,0 +1,161 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package fr.ifremer.coser.ui.option;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.event.TreeModelListener;
+import javax.swing.tree.TreeModel;
+import javax.swing.tree.TreePath;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.jdesktop.swingx.tree.TreeModelSupport;
+
+import fr.ifremer.coser.CoserConstants.Category;
+import fr.ifremer.coser.CoserConstants.ValidationLevel;
+
+/**
+ * Validators tree model.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class ValidatorsTreeModel implements TreeModel {
+
+ protected TreeModelSupport support;
+
+ protected Category[] dataCategory;
+
+ public ValidatorsTreeModel() {
+ support = new TreeModelSupport(this);
+
+ // les categories contiennent des données non liés aux données
+ List<Category> dataCategories = new ArrayList<Category>();
+ for (Category category : Category.values()) {
+ if (category.isDataCategory()) {
+ dataCategories.add(category);
+ }
+ }
+ dataCategory = dataCategories.toArray(new Category[dataCategories.size()]);
+ }
+
+ /*
+ * @see javax.swing.tree.TreeModel#getRoot()
+ */
+ @Override
+ public Object getRoot() {
+ return 1L;
+ }
+
+ /*
+ * @see javax.swing.tree.TreeModel#getChild(java.lang.Object, int)
+ */
+ @Override
+ public Object getChild(Object parent, int index) {
+
+ Object child = null;
+
+ if (parent == getRoot()) {
+ child = dataCategory[index];
+ }
+ else if (parent instanceof Category) {
+ child = ValidationLevel.values()[index];
+ }
+
+ return child;
+ }
+
+ /*
+ * @see javax.swing.tree.TreeModel#getChildCount(java.lang.Object)
+ */
+ @Override
+ public int getChildCount(Object parent) {
+
+ int result = 0;
+
+ if (parent == getRoot()) {
+ result = dataCategory.length;
+ }
+ else if (parent instanceof Category) {
+ result = ValidationLevel.values().length;
+ }
+
+ return result;
+ }
+
+ /*
+ * @see javax.swing.tree.TreeModel#isLeaf(java.lang.Object)
+ */
+ @Override
+ public boolean isLeaf(Object node) {
+ return getChildCount(node) == 0;
+ }
+
+ /*
+ * @see javax.swing.tree.TreeModel#valueForPathChanged(javax.swing.tree.TreePath, java.lang.Object)
+ */
+ @Override
+ public void valueForPathChanged(TreePath path, Object newValue) {
+
+ }
+
+ /*
+ * @see javax.swing.tree.TreeModel#getIndexOfChild(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int getIndexOfChild(Object parent, Object child) {
+ int result = -1;
+
+ if (parent == getRoot()) {
+ result = ArrayUtils.indexOf(dataCategory, child);
+ }
+ else if (parent instanceof Category) {
+ result = ArrayUtils.indexOf(ValidationLevel.values(), child);
+ }
+
+ return result;
+ }
+
+ /*
+ * @see javax.swing.tree.TreeModel#addTreeModelListener(javax.swing.event.TreeModelListener)
+ */
+ @Override
+ public void addTreeModelListener(TreeModelListener l) {
+ support.addTreeModelListener(l);
+ }
+
+ /*
+ * @see javax.swing.tree.TreeModel#removeTreeModelListener(javax.swing.event.TreeModelListener)
+ */
+ @Override
+ public void removeTreeModelListener(TreeModelListener l) {
+ support.addTreeModelListener(l);
+ }
+}
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java (rev 0)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java 2010-12-24 16:29:46 UTC (rev 450)
@@ -0,0 +1,73 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package fr.ifremer.coser.ui.option;
+
+import static org.nuiton.i18n.I18n._;
+
+import java.awt.Component;
+
+import javax.swing.JTree;
+import javax.swing.tree.DefaultTreeCellRenderer;
+
+import fr.ifremer.coser.CoserConstants.Category;
+import fr.ifremer.coser.CoserConstants.ValidationLevel;
+
+/**
+ * Renderer pour l'arbre des navigateurs.
+ *
+ * Affiche les noms explicites à la place des Category et ValidationLevel.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class ValidatorsTreeRenderer extends DefaultTreeCellRenderer {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -2211918491839391988L;
+
+ @Override
+ public Component getTreeCellRendererComponent(JTree tree, Object value,
+ boolean sel, boolean expanded, boolean leaf, int row,
+ boolean hasFocus) {
+
+ Object stringValue = value;
+
+ if (value instanceof Category) {
+ stringValue = _(((Category)value).getTranslationKey());
+ }
+ else if (value instanceof ValidationLevel) {
+ // en attendant mieux
+ stringValue = _(((ValidationLevel)value).getXWorkContext());
+ }
+ return super.getTreeCellRendererComponent(tree, stringValue, sel, expanded, leaf,
+ row, hasFocus);
+ }
+
+
+}
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties
===================================================================
--- trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2010-12-24 16:28:42 UTC (rev 449)
+++ trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2010-12-24 16:29:46 UTC (rev 450)
@@ -219,11 +219,8 @@
coser.ui.uploadresult.selected=\u2026
coser.ui.uploadresult.title=Results publication
coser.ui.uploadresult.upload=Send results
-coser.ui.validators.cancel=Cancel
-coser.ui.validators.deleteValidator=Delete
+coser.ui.validators.content=Content \:
coser.ui.validators.description=Application must be restarted after validators modification.
-coser.ui.validators.entity=Entity
-coser.ui.validators.newValidator=New Validator
-coser.ui.validators.title=Validators
+coser.ui.validators.title=Controls
coser.ui.validators.valid=Valid
coser.ui.validators.validators=Validators \:
Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties
===================================================================
--- trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2010-12-24 16:28:42 UTC (rev 449)
+++ trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2010-12-24 16:29:46 UTC (rev 450)
@@ -219,11 +219,8 @@
coser.ui.uploadresult.selected=\u2026
coser.ui.uploadresult.title=Publication des r\u00E9sultats
coser.ui.uploadresult.upload=Envoyer les r\u00E9sultats
-coser.ui.validators.cancel=Annuler
-coser.ui.validators.deleteValidator=Supprimer
+coser.ui.validators.content=Contenu \:
coser.ui.validators.description=L'application doit \u00EAtre red\u00E9marr\u00E9e apr\u00E8s la modification des validateurs.
-coser.ui.validators.entity=Entit\u00E9
-coser.ui.validators.newValidator=Nouveau validateur
-coser.ui.validators.title=Validateurs
+coser.ui.validators.title=Contr\u00F4les
coser.ui.validators.valid=Valider
coser.ui.validators.validators=Validateurs \:
1
0
r449 - in trunk: coser-business/src/main/java/fr/ifremer/coser coser-business/src/main/resources coser-business/src/main/resources/validators coser-business/src/main/resources/validators/fr/ifremer/coser coser-business/src/main/resources/validators/fr/ifremer/coser/data coser-business/src/test/java/fr/ifremer/coser/services coser-ui/src/main/java/fr/ifremer/coser
by chatellier@users.labs.libre-entreprise.org 24 Dec '10
by chatellier@users.labs.libre-entreprise.org 24 Dec '10
24 Dec '10
Author: chatellier
Date: 2010-12-24 16:28:42 +0000 (Fri, 24 Dec 2010)
New Revision: 449
Log:
Retrait des fichier de validation du classpath.
Ajout d'un classloader pour les retrouver.
Added:
trunk/coser-business/src/main/java/fr/ifremer/coser/CoserClassLoader.java
trunk/coser-business/src/main/resources/validators/
trunk/coser-business/src/main/resources/validators/fr/
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Catch-error-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-error-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-fatal-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Length-error-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Strata-error-validation.xml
Removed:
trunk/coser-business/src/main/resources/fr/
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/bean/
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Catch-error-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-error-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-fatal-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Length-error-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Strata-error-validation.xml
trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserClassLoader.java
Modified:
trunk/coser-business/src/test/java/fr/ifremer/coser/services/CoserTestAbstract.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java
Copied: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserClassLoader.java (from rev 207, trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserClassLoader.java)
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/CoserClassLoader.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/CoserClassLoader.java 2010-12-24 16:28:42 UTC (rev 449)
@@ -0,0 +1,92 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+package fr.ifremer.coser;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Coser class loader.
+ *
+ * Used to load custom xwork validation file.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class CoserClassLoader extends ClassLoader {
+
+ private static final Log log = LogFactory.getLog(CoserClassLoader.class);
+
+ protected File validatorsDirectory;
+
+ public CoserClassLoader(ClassLoader parent) {
+ super(parent);
+ }
+
+ public void setValidatorsDirectory(File validatorsDirectory) {
+ this.validatorsDirectory = validatorsDirectory;
+ }
+
+ @Override
+ public URL getResource(String name) {
+
+ URL result = null;
+
+ if (name.matches("/fr/ifremer/coser/.+\\.xml")) {
+
+ // cherche sur le disque
+ File valFile = new File(validatorsDirectory, name);
+ if (valFile.isFile()) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("Locating resources " + name + " to " + valFile.getAbsolutePath());
+ }
+
+ try {
+ result = valFile.toURI().toURL();
+ } catch (MalformedURLException ex) {
+ throw new RuntimeException("Can't get validator url", ex);
+ }
+ }
+
+ // cherche dans le classpath
+ if (result == null) {
+ result = super.getResource("validators" + name);
+ }
+ }
+
+ // sinon, recherche par default
+ if (result == null) {
+ result = super.getResource(name);
+ }
+ return result;
+ }
+}
Deleted: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Catch-error-validation.xml
===================================================================
--- trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Catch-error-validation.xml 2010-11-10 17:31:36 UTC (rev 207)
+++ trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Catch-error-validation.xml 2010-12-24 16:28:42 UTC (rev 449)
@@ -1,69 +0,0 @@
-<!--
- #%L
- Coser :: UI
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser 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 Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-<validators>
- <field name="survey">
- <field-validator type="requiredstring">
- <param name="trim">true</param>
- <message>You must enter a campagne name.</message>
- </field-validator>
- </field>
- <field name="year">
- <field-validator type="regex">
- <param name="expression">[0-9]{4}</param>
- <message>year is not valid</message>
- </field-validator>
- </field>
- <field name="haul">
- <field-validator type="requiredstring">
- <param name="trim">true</param>
- <message>You must enter a trait name.</message>
- </field-validator>
- </field>
- <field name="species">
- <field-validator type="requiredstring">
- <param name="trim">true</param>
- <message>You must enter a espece name.</message>
- </field-validator>
- </field>
- <field name="numberAsString">
- <field-validator type="checkDouble">
- <param name="notAvailable">NA</param>
- <message>Number attribute is not a valid double</message>
- </field-validator>
- </field>
- <field name="weightAsString">
- <field-validator type="checkDouble">
- <param name="notAvailable">NA</param>
- <message>Weight attribute is not a valid double</message>
- </field-validator>
- </field>
- <validator type="coserExpression">
- <param name="expression"><![CDATA[ (weight > 0 && number > 0) || weight == 0]]></param>
- <message><![CDATA[coser.business.control.error.noCatchNumberWithWeight]]></message>
- </validator>
-</validators>
\ No newline at end of file
Copied: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Catch-error-validation.xml (from rev 448, trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Catch-error-validation.xml)
===================================================================
--- trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Catch-error-validation.xml (rev 0)
+++ trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Catch-error-validation.xml 2010-12-24 16:28:42 UTC (rev 449)
@@ -0,0 +1,70 @@
+<!--
+ #%L
+ Coser :: Business
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser 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 Lesser Public License for more details.
+
+ You should have received a copy of the GNU General Lesser Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ #L%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+ <field name="survey">
+ <field-validator type="requiredstring">
+ <param name="trim">true</param>
+ <message>Missing survey name</message>
+ </field-validator>
+ </field>
+ <field name="year">
+ <field-validator type="regex">
+ <param name="expression">[0-9]{4}(\.[0-9]{1,2})?</param>
+ <message>year is not valid (4 digits.2 digits)</message>
+ </field-validator>
+ </field>
+ <field name="haul">
+ <field-validator type="regex">
+ <param name="expression">[0-9a-z]+</param>
+ <param name="caseSensitive">false</param>
+ <message>haul name is not valid</message>
+ </field-validator>
+ </field>
+ <field name="species">
+ <field-validator type="requiredstring">
+ <param name="trim">true</param>
+ <message>Missing species name</message>
+ </field-validator>
+ </field>
+ <field name="numberAsString">
+ <field-validator type="checkDouble">
+ <param name="notAvailable">NA</param>
+ <message>number attribute is not a valid double</message>
+ </field-validator>
+ </field>
+ <field name="weightAsString">
+ <field-validator type="checkDouble">
+ <param name="notAvailable">NA</param>
+ <message>weight attribute is not a valid double</message>
+ </field-validator>
+ </field>
+ <validator type="coserExpression">
+ <param name="expression"><![CDATA[ (weight > 0 && number > 0) || weight == 0]]></param>
+ <message>coser.business.control.error.noCatchNumberWithWeight</message>
+ </validator>
+</validators>
\ No newline at end of file
Deleted: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-error-validation.xml
===================================================================
--- trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Haul-error-validation.xml 2010-11-10 17:31:36 UTC (rev 207)
+++ trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-error-validation.xml 2010-12-24 16:28:42 UTC (rev 449)
@@ -1,75 +0,0 @@
-<!--
- #%L
- Coser :: Business
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser 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 Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-<validators>
- <field name="survey">
- <field-validator type="requiredstring">
- <message>You must enter a survey name.</message>
- </field-validator>
- </field>
- <field name="year">
- <field-validator type="regex">
- <param name="expression">[0-9]{4}</param>
- <message>year is not valid</message>
- </field-validator>
- </field>
- <field name="haul">
- <field-validator type="requiredstring">
- <message>You must enter a haul name.</message>
- </field-validator>
- </field>
- <field name="month">
- <field-validator type="requiredstring">
- <message>You must enter a month name.</message>
- </field-validator>
- </field>
- <field name="stratum">
- <field-validator type="requiredstring">
- <message>You must enter a stratum name.</message>
- </field-validator>
- </field>
- <field name="sweptSurface">
- <field-validator type="checkDouble" short-circuit="true">
- <message>sweptSurface attribute is not a valid double</message>
- </field-validator>
- </field>
- <field name="lat">
- <field-validator type="checkDouble" short-circuit="true">
- <message>lat attribute is not a valid double</message>
- </field-validator>
- </field>
- <field name="long">
- <field-validator type="checkDouble" short-circuit="true">
- <message>long attribute is not a valid double</message>
- </field-validator>
- </field>
- <field name="depth">
- <field-validator type="checkDouble" short-circuit="true">
- <message>Depth attribute is not a valid double</message>
- </field-validator>
- </field>
-</validators>
\ No newline at end of file
Copied: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-error-validation.xml (from rev 410, trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Haul-error-validation.xml)
===================================================================
--- trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-error-validation.xml (rev 0)
+++ trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-error-validation.xml 2010-12-24 16:28:42 UTC (rev 449)
@@ -0,0 +1,87 @@
+<!--
+ #%L
+ Coser :: Business
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser 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 Lesser Public License for more details.
+
+ You should have received a copy of the GNU General Lesser Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ #L%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+ <field name="survey">
+ <field-validator type="requiredstring">
+ <message>Missing survey name</message>
+ </field-validator>
+ </field>
+ <field name="year">
+ <field-validator type="regex">
+ <param name="expression">[0-9]{4}(\.[0-9]{1,2})?</param>
+ <message>year is not valid (4 digits.2 digits)</message>
+ </field-validator>
+ </field>
+ <field name="haul">
+ <field-validator type="regex">
+ <param name="expression">[0-9a-z]+</param>
+ <param name="caseSensitive">false</param>
+ <message>haul name is not valid</message>
+ </field-validator>
+ </field>
+ <field name="month">
+ <field-validator type="regex">
+ <param name="expression">[0-9]{1,2}</param>
+ <message>month is not valid (2 digits)</message>
+ </field-validator>
+ </field>
+ <field name="stratum">
+ <field-validator type="requiredstring">
+ <message>Missing stratum name</message>
+ </field-validator>
+ </field>
+ <field name="sweptSurfaceAsString">
+ <field-validator type="requiredstring">
+ <message>Missing sweptSurface attribute</message>
+ </field-validator>
+ </field>
+ <field name="sweptSurfaceAsString">
+ <field-validator type="checkDouble">
+ <param name="notAvailable">NA</param>
+ <message>sweptSurface attribute is not a valid double</message>
+ </field-validator>
+ </field>
+ <field name="latAsString">
+ <field-validator type="checkDouble">
+ <param name="notAvailable">NA</param>
+ <message>lat attribute is not a valid double</message>
+ </field-validator>
+ </field>
+ <field name="longAsString">
+ <field-validator type="checkDouble">
+ <param name="notAvailable">NA</param>
+ <message>long attribute is not a valid double</message>
+ </field-validator>
+ </field>
+ <field name="depthAsString">
+ <field-validator type="checkDouble">
+ <param name="notAvailable">NA</param>
+ <message>depth attribute is not a valid double</message>
+ </field-validator>
+ </field>
+</validators>
\ No newline at end of file
Deleted: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-fatal-validation.xml
===================================================================
--- trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Haul-fatal-validation.xml 2010-11-10 17:31:36 UTC (rev 207)
+++ trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-fatal-validation.xml 2010-12-24 16:28:42 UTC (rev 449)
@@ -1,47 +0,0 @@
-<!--
- #%L
- Coser :: Business
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser 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 Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-<validators>
- <field name="sweptSurface">
- <field-validator type="regex">
- <param name="expression">\-?[0-9]+\.[0-9]{3,}</param>
- <message>lat must contains at least 5 decimal</message>
- </field-validator>
- </field>
- <field name="lat">
- <field-validator type="regex">
- <param name="expression">\-?[0-9]+\.[0-9]{3,}</param>
- <message>lat must contains at least 5 decimal</message>
- </field-validator>
- </field>
- <field name="long">
- <field-validator type="regex">
- <param name="expression">\-?[0-9]+\.[0-9]{3,}</param>
- <message>long must contains at least 5 decimal</message>
- </field-validator>
- </field>
-</validators>
\ No newline at end of file
Copied: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-fatal-validation.xml (from rev 410, trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Haul-fatal-validation.xml)
===================================================================
--- trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-fatal-validation.xml (rev 0)
+++ trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-fatal-validation.xml 2010-12-24 16:28:42 UTC (rev 449)
@@ -0,0 +1,47 @@
+<!--
+ #%L
+ Coser :: Business
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser 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 Lesser Public License for more details.
+
+ You should have received a copy of the GNU General Lesser Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ #L%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+ <field name="sweptSurface">
+ <field-validator type="regex">
+ <param name="expression">\-?[0-9]+\.[0-9]{3,}</param>
+ <message>sweptSurface must contain at least 3 decimals</message>
+ </field-validator>
+ </field>
+ <field name="lat">
+ <field-validator type="regex">
+ <param name="expression">\-?[0-9]+\.[0-9]{4,}</param>
+ <message>lat must contain at least 4 decimals</message>
+ </field-validator>
+ </field>
+ <field name="long">
+ <field-validator type="regex">
+ <param name="expression">\-?[0-9]+\.[0-9]{4,}</param>
+ <message>long must contain at least 4 decimals</message>
+ </field-validator>
+ </field>
+</validators>
\ No newline at end of file
Deleted: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Length-error-validation.xml
===================================================================
--- trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Length-error-validation.xml 2010-11-10 17:31:36 UTC (rev 207)
+++ trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Length-error-validation.xml 2010-12-24 16:28:42 UTC (rev 449)
@@ -1,85 +0,0 @@
-<!--
- #%L
- Coser :: UI
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser 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 Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-<validators>
- <field name="survey">
- <field-validator type="requiredstring">
- <param name="trim">true</param>
- <message>You must enter a campagne name.</message>
- </field-validator>
- </field>
- <field name="year">
- <field-validator type="regex">
- <param name="expression">[0-9]{4}</param>
- <message>year is not valid</message>
- </field-validator>
- </field>
- <field name="haul">
- <field-validator type="requiredstring">
- <param name="trim">true</param>
- <message>You must enter a trait name.</message>
- </field-validator>
- </field>
- <field name="species">
- <field-validator type="requiredstring">
- <param name="trim">true</param>
- <message>You must enter a espece name.</message>
- </field-validator>
- </field>
- <field name="sex">
- <field-validator type="requiredstring">
- <message>Sex is mandatory</message>
- </field-validator>
- </field>
- <field name="maturity">
- <field-validator type="requiredstring">
- <message>Maturity attribute is required</message>
- </field-validator>
- </field>
- <field name="length">
- <field-validator type="checkDouble">
- <message>length attribute is not a valid double</message>
- </field-validator>
- </field>
- <field name="number">
- <field-validator type="checkDouble">
- <param name="notAvailable">NA</param>
- <message>number attribute is not a valid double</message>
- </field-validator>
- </field>
- <field name="weight">
- <field-validator type="checkDouble">
- <param name="notAvailable">NA</param>
- <message>Weight attribute is not a valid double</message>
- </field-validator>
- </field>
- <field name="age">
- <field-validator type="requiredstring">
- <message>Age attribute is required</message>
- </field-validator>
- </field>
-</validators>
\ No newline at end of file
Copied: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Length-error-validation.xml (from rev 448, trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Length-error-validation.xml)
===================================================================
--- trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Length-error-validation.xml (rev 0)
+++ trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Length-error-validation.xml 2010-12-24 16:28:42 UTC (rev 449)
@@ -0,0 +1,91 @@
+<!--
+ #%L
+ Coser :: Business
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser 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 Lesser Public License for more details.
+
+ You should have received a copy of the GNU General Lesser Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ #L%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+ <field name="survey">
+ <field-validator type="requiredstring">
+ <param name="trim">true</param>
+ <message>Missing survey name</message>
+ </field-validator>
+ </field>
+ <field name="year">
+ <field-validator type="regex">
+ <param name="expression">[0-9]{4}(\.[0-9]{1,2})?</param>
+ <message>year is not valid (4 digits.2 digits)</message>
+ </field-validator>
+ </field>
+ <field name="haul">
+ <field-validator type="regex">
+ <param name="expression">[0-9a-z]+</param>
+ <param name="caseSensitive">false</param>
+ <message>haul name is not valid</message>
+ </field-validator>
+ </field>
+ <field name="species">
+ <field-validator type="requiredstring">
+ <param name="trim">true</param>
+ <message>Missing species name</message>
+ </field-validator>
+ </field>
+ <field name="sex">
+ <field-validator type="requiredstring">
+ <message>Missing sex attribute</message>
+ </field-validator>
+ </field>
+ <field name="maturity">
+ <field-validator type="requiredstring">
+ <message>Missing maturity attribute</message>
+ </field-validator>
+ </field>
+ <field name="lengthAsString">
+ <field-validator type="checkDouble">
+ <message>length attribute is not a valid double</message>
+ </field-validator>
+ </field>
+ <field name="numberAsString">
+ <field-validator type="checkDouble">
+ <param name="notAvailable">NA</param>
+ <message>number attribute is not a valid double</message>
+ </field-validator>
+ </field>
+ <field name="weightAsString">
+ <field-validator type="checkDouble">
+ <param name="notAvailable">NA</param>
+ <message>weight attribute is not a valid double</message>
+ </field-validator>
+ </field>
+ <field name="age">
+ <field-validator type="checkDouble">
+ <param name="notAvailable">NA</param>
+ <message>age attribute is not a valid double</message>
+ </field-validator>
+ </field>
+ <validator type="coserExpression">
+ <param name="expression"><![CDATA[ (weight > 0 && number > 0) || weight == 0]]></param>
+ <message>coser.business.control.error.noCatchNumberWithWeight</message>
+ </validator>
+</validators>
\ No newline at end of file
Deleted: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Strata-error-validation.xml
===================================================================
--- trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Strata-error-validation.xml 2010-11-10 17:31:36 UTC (rev 207)
+++ trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Strata-error-validation.xml 2010-12-24 16:28:42 UTC (rev 449)
@@ -1,47 +0,0 @@
-<!--
- #%L
- Coser :: UI
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser 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 Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-<validators>
- <field name="survey">
- <field-validator type="requiredstring">
- <param name="trim">true</param>
- <message>You must enter a campagne name.</message>
- </field-validator>
- </field>
- <field name="stratum">
- <field-validator type="requiredstring">
- <param name="trim">true</param>
- <message>You must enter a strata name.</message>
- </field-validator>
- </field>
- <field name="surface">
- <field-validator type="requiredstring">
- <param name="trim">true</param>
- <message>You must enter a trait name.</message>
- </field-validator>
- </field>
-</validators>
\ No newline at end of file
Copied: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Strata-error-validation.xml (from rev 448, trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Strata-error-validation.xml)
===================================================================
--- trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Strata-error-validation.xml (rev 0)
+++ trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Strata-error-validation.xml 2010-12-24 16:28:42 UTC (rev 449)
@@ -0,0 +1,47 @@
+<!--
+ #%L
+ Coser :: Business
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser 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 Lesser Public License for more details.
+
+ You should have received a copy of the GNU General Lesser Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ #L%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+ <field name="survey">
+ <field-validator type="requiredstring">
+ <param name="trim">true</param>
+ <message>Missing survey name</message>
+ </field-validator>
+ </field>
+ <field name="stratum">
+ <field-validator type="requiredstring">
+ <param name="trim">true</param>
+ <message>Missing stratum name</message>
+ </field-validator>
+ </field>
+ <field name="surfaceAsString">
+ <field-validator type="checkDouble">
+ <param name="notAvailable">NA</param>
+ <message>surface attribute is not a valid double</message>
+ </field-validator>
+ </field>
+</validators>
\ No newline at end of file
Modified: trunk/coser-business/src/test/java/fr/ifremer/coser/services/CoserTestAbstract.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/services/CoserTestAbstract.java 2010-12-24 14:25:00 UTC (rev 448)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/services/CoserTestAbstract.java 2010-12-24 16:28:42 UTC (rev 449)
@@ -42,6 +42,7 @@
import fr.ifremer.coser.CoserBusinessConfig;
import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.CoserClassLoader;
import fr.ifremer.coser.CoserConstants.Category;
import fr.ifremer.coser.bean.Project;
@@ -63,6 +64,15 @@
protected static File testDirectory;
@BeforeClass
+ public static void setUpClassLoader() {
+ // declare new classloader because validation files are not
+ // in classpath
+ ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
+ CoserClassLoader coserClassLoader = new CoserClassLoader(currentClassLoader);
+ Thread.currentThread().setContextClassLoader(coserClassLoader);
+ }
+
+ @BeforeClass
public static void initConfig() throws IOException {
String tmpDir = System.getProperty("java.io.tmpdir");
testDirectory = new File(tmpDir, "coser");
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java 2010-12-24 14:25:00 UTC (rev 448)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java 2010-12-24 16:28:42 UTC (rev 449)
@@ -38,10 +38,10 @@
import org.nuiton.util.ArgumentsParserException;
import org.nuiton.widget.SwingSession;
-import fr.ifremer.coser.services.PublicationService;
+import fr.ifremer.coser.services.ControlService;
import fr.ifremer.coser.services.ImportService;
import fr.ifremer.coser.services.ProjectService;
-import fr.ifremer.coser.services.ControlService;
+import fr.ifremer.coser.services.PublicationService;
import fr.ifremer.coser.ui.CoserFrame;
import fr.ifremer.coser.ui.util.ErrorHelper;
Deleted: trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserClassLoader.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserClassLoader.java 2010-12-24 14:25:00 UTC (rev 448)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserClassLoader.java 2010-12-24 16:28:42 UTC (rev 449)
@@ -1,79 +0,0 @@
-/*
- * #%L
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-package fr.ifremer.coser;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Enumeration;
-
-/**
- * Coser class loader.
- *
- * Used to load custom work validation file.
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-public class CoserClassLoader extends ClassLoader {
-
- protected File validatorsDirectory;
-
- public CoserClassLoader(ClassLoader parent) {
- super(parent);
- }
-
- public void setValidatorsDirectory(File validatorsDirectory) {
- this.validatorsDirectory = validatorsDirectory;
- }
-
- @Override
- public URL getResource(String name) {
- return super.getResource(name);
- }
-
- @Override
- public Enumeration<URL> getResources(String name) throws IOException {
- return super.getResources(name);
- }
-
- @Override
- protected URL findResource(String name) {
- return super.findResource(name);
- }
-
- @Override
- protected Enumeration<URL> findResources(String name) throws IOException {
- return super.findResources(name);
- }
-
- @Override
- public InputStream getResourceAsStream(String name) {
- return super.getResourceAsStream(name);
- }
-}
1
0
r448 - trunk/coser-business/src/main/resources/fr/ifremer/coser/data
by chatellier@users.labs.libre-entreprise.org 24 Dec '10
by chatellier@users.labs.libre-entreprise.org 24 Dec '10
24 Dec '10
Author: chatellier
Date: 2010-12-24 14:25:00 +0000 (Fri, 24 Dec 2010)
New Revision: 448
Log:
Fix comments
Modified:
trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Catch-error-validation.xml
trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Length-error-validation.xml
trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Strata-error-validation.xml
Modified: trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Catch-error-validation.xml
===================================================================
--- trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Catch-error-validation.xml 2010-12-24 10:14:35 UTC (rev 447)
+++ trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Catch-error-validation.xml 2010-12-24 14:25:00 UTC (rev 448)
@@ -1,6 +1,6 @@
<!--
#%L
- Coser :: UI
+ Coser :: Business
$Id$
$HeadURL$
Modified: trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Length-error-validation.xml
===================================================================
--- trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Length-error-validation.xml 2010-12-24 10:14:35 UTC (rev 447)
+++ trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Length-error-validation.xml 2010-12-24 14:25:00 UTC (rev 448)
@@ -1,6 +1,6 @@
<!--
#%L
- Coser :: UI
+ Coser :: Business
$Id$
$HeadURL$
Modified: trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Strata-error-validation.xml
===================================================================
--- trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Strata-error-validation.xml 2010-12-24 10:14:35 UTC (rev 447)
+++ trunk/coser-business/src/main/resources/fr/ifremer/coser/data/Strata-error-validation.xml 2010-12-24 14:25:00 UTC (rev 448)
@@ -1,6 +1,6 @@
<!--
#%L
- Coser :: UI
+ Coser :: Business
$Id$
$HeadURL$
1
0
r447 - in trunk/coser-web/src/main: java/fr/ifremer/coser/web/actions webapp/WEB-INF webapp/WEB-INF/content webapp/WEB-INF/decorators webapp/styles
by chatellier@users.labs.libre-entreprise.org 24 Dec '10
by chatellier@users.labs.libre-entreprise.org 24 Dec '10
24 Dec '10
Author: chatellier
Date: 2010-12-24 10:14:35 +0000 (Fri, 24 Dec 2010)
New Revision: 447
Log:
Add site global layout.
Added:
trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/show-graph.jsp
trunk/coser-web/src/main/webapp/WEB-INF/decorators.xml
trunk/coser-web/src/main/webapp/WEB-INF/decorators/
trunk/coser-web/src/main/webapp/WEB-INF/decorators/footer.jsp
trunk/coser-web/src/main/webapp/WEB-INF/decorators/header.jsp
trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp
Removed:
trunk/coser-web/src/main/webapp/WEB-INF/content/footer.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/header.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/locale.jsp
Modified:
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/ShowGraphAction.java
trunk/coser-web/src/main/webapp/WEB-INF/content/select-indicator.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/select-species.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/select-zone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result-success.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result.jsp
trunk/coser-web/src/main/webapp/WEB-INF/web.xml
trunk/coser-web/src/main/webapp/styles/coser.css
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java 2010-12-24 10:14:35 UTC (rev 447)
@@ -28,6 +28,11 @@
import java.util.Date;
import java.util.Properties;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.struts2.ServletActionContext;
+
import com.opensymphony.xwork2.ActionSupport;
import fr.ifremer.coser.web.CoserWebConfig;
@@ -55,6 +60,23 @@
return dataUpdateDate;
}
+ /**
+ * Return l'url de l'application context inclut.
+ *
+ * @return l'url du context
+ */
+ public String getContextUrl() {
+ HttpServletRequest request = ServletActionContext.getRequest();
+
+ String url = request.getScheme() + "://" + request.getServerName();
+ if (request.getServerPort() != 80) {
+ url += ":" + request.getServerPort();
+ }
+ url += request.getContextPath();
+
+ return url;
+ }
+
@Override
public String execute() {
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/ShowGraphAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/ShowGraphAction.java 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/ShowGraphAction.java 2010-12-24 10:14:35 UTC (rev 447)
@@ -108,7 +108,7 @@
// data
chartUrl += "&chd=t:10,20,40,80,90,95,99|20,30,40,50,60,70,80";
// legend
- chartUrl += "&chdl=Ponies";
+ chartUrl += "&chdl=Species";
// legend position
chartUrl += "&chdlp=b";
// markers (plot)
@@ -117,10 +117,10 @@
chartUrl += "&chxt=x,y";
// taille
chartUrl += "&chs=600x300";
- // naffiche aps les lignes :
- chartUrl += "&chls=2,0,16";
+ // taille de la courbe
+ chartUrl += "&chls=2";
// titre du graphique
- chartUrl += "&chtt=Toto";
+ chartUrl += "&chtt=" + zone + ";" + species + ";" + indicator;
return SUCCESS;
}
Deleted: trunk/coser-web/src/main/webapp/WEB-INF/content/footer.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/footer.jsp 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/footer.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -1,29 +0,0 @@
-<!--
- #%L
- Coser :: Web
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
- %%
- 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%
- -->
-<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
-<%@taglib uri="/struts-tags" prefix="s" %>
-
- <div>
- Copyright 2010 Ifremer
- </div>
\ No newline at end of file
Deleted: trunk/coser-web/src/main/webapp/WEB-INF/content/header.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/header.jsp 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/header.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -1,44 +0,0 @@
-<!--
- #%L
- Coser :: Web
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
- %%
- 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%
- -->
-<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
-<%@taglib uri="/struts-tags" prefix="s" %>
-
- <div>
- <img src="images/logo_sih.gif" />
- <img src="images/logo_ifremer.gif" />
-
- <s:url id="localeEN" namespace="/" action="locale">
- <s:param name="request_locale" >en</s:param>
- </s:url>
- <s:url id="localeFR" namespace="/" action="locale">
- <s:param name="request_locale" >fr</s:param>
- </s:url>
-
- <s:a href="%{localeEN}"><img src="images/gb.png" /></s:a>
- <s:a href="%{localeFR}"><img src="images/fr.png" /></s:a>
-
- </div>
-
- <hr />
-
Deleted: trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -1,95 +0,0 @@
-<!--
- #%L
- Coser :: Web
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
- %%
- 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%
- -->
-<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<%@taglib uri="/struts-tags" prefix="s" %>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Coser</title>
- <link rel="stylesheet" type="text/css" href="styles/coser.css" />
- </head>
- <body>
-
- <%@ include file="header.jsp" %>
-
- <h2>Tutu : <s:text name="message.index.title" /></h2>
- <!-- <h2>Indices de populations et de communauté issus des campagnes de surveillance halieutique de l'Ifremer</h2> -->
-
- <p>Ce site présente des indices de populations et de communauté calculés à partir des
- données du réseau des campagnes de surveillance halieutiques opérées par l'Ifremer
- en mer du Nord, Manche, Atlantique et Méditerranée.
- Il contient des informations relatives à 15 séries de campagnes</p>
-
- <a href="http://www.ifremer.fr/SIH-indices-campagnes/fichiers/Web_EstPopInd_Presenta…"
- target="_blank">Les campagnes de surveillance halieutique de l'Ifremer</a>
-
- <h3>Les indices de populations et de communauté</h3>
- <ul>
- <li>10 indices de populations et 4 indices de communauté</li>
- <li>168 taxons pris en compte</li>
- </ul>
-
- <table>
- <tr>
- <td>Informations sur les</td>
- <td>populations</td>
- <td>/</td>
- <td>Communautés</td>
- </tr>
- <tr>
- <td>Les indices calculés</td>
- <td>
- <a href="http://www.ifremer.fr/SIH-indices-campagnes/fichiers/Web_EstPopInd_Presenta…">X</a>
- </td>
- <td />
- <td>
- <a href="http://www.ifremer.fr/SIH-indices-campagnes/fichiers/Web_EstComInd_Presenta…">X</a>
- </td>
- </tr>
- <tr>
- <td>Accès aux données</td>
- <td>
- <s:a action="select-zone">X</s:a>
- </td>
- <td />
- <td>
- <s:a action="select-zone">X</s:a>
- </td>
- </tr>
- </table>
-
- <p><b>Pour citer ce site :</b> Ifremer <s:date name="dataUpdateDate" format="yyyy" />. Indices de populations et de communautés
- issus des campagnes de surveillance halieutique de l'Ifremer.
- http://www.ifremer.fr/SIH-indices-campagnes/ <s:date name="dataUpdateDate" format="dd MMMM" />.</p>
-
- <p>Gestion des données des campagnes océanographiques :
- <ul>
- <li><a href="http://www.ifremer.fr/sismer/index_FR.htm">le Système d'informations scientifiques pour la mer de l'Ifremer (SISMER)</a></li>
- <li><a href="http://www.ifremer.fr/sih">le Système d'information halieutique de l'Ifremer (SIH)</a></li>
- </ul></p>
-
- <%@ include file="footer.jsp" %>
- </body>
-</html>
\ No newline at end of file
Added: trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -0,0 +1,89 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ 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%
+ -->
+<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<%@taglib uri="/struts-tags" prefix="s" %>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <div class="maintitle"><s:text name="message.index.title" /></div>
+
+ <p>Ce site présente des indices de populations et de communauté calculés à partir des
+ données du réseau des campagnes de surveillance halieutiques opérées par l'Ifremer
+ en mer du Nord, Manche, Atlantique et Méditerranée.
+ Il contient des informations relatives à 15 séries de campagnes</p>
+
+ <a href="http://www.ifremer.fr/SIH-indices-campagnes/fichiers/Web_EstPopInd_Presenta…"
+ target="_blank">Les campagnes de surveillance halieutique de l'Ifremer</a>
+
+ <h3>Les indices de populations et de communauté</h3>
+ <ul>
+ <li>10 indices de populations et 4 indices de communauté</li>
+ <li>168 taxons pris en compte</li>
+ </ul>
+
+ <table>
+ <tr>
+ <td>Informations sur les</td>
+ <td>populations</td>
+ <td>/</td>
+ <td>Communautés</td>
+ </tr>
+ <tr>
+ <td>Les indices calculés</td>
+ <td style="text-align:center">
+ <a href="http://www.ifremer.fr/SIH-indices-campagnes/fichiers/Web_EstPopInd_Presenta…">X</a>
+ </td>
+ <td />
+ <td style="text-align:center">
+ <a href="http://www.ifremer.fr/SIH-indices-campagnes/fichiers/Web_EstComInd_Presenta…">X</a>
+ </td>
+ </tr>
+ <tr>
+ <td>Accès aux données</td>
+ <td style="text-align:center">
+ <s:a action="select-zone">X</s:a>
+ </td>
+ <td />
+ <td style="text-align:center">
+ <s:a action="select-zone">X</s:a>
+ </td>
+ </tr>
+ </table>
+
+ <p><b>Pour citer ce site :</b> Ifremer <s:date name="dataUpdateDate" format="yyyy" />. Indices de populations et de communautés
+ issus des campagnes de surveillance halieutique de l'Ifremer.
+ <span style="white-space: nowrap;"><s:property value="contextUrl"/></span> (<s:date name="dataUpdateDate" format="dd MMMM" />).</p>
+
+ <p>Gestion des données des campagnes océanographiques :
+ <ul>
+ <li><a href="http://www.ifremer.fr/sismer/index_FR.htm">le Système d'informations scientifiques pour la mer de l'Ifremer (SISMER)</a></li>
+ <li><a href="http://www.ifremer.fr/sih">le Système d'information halieutique de l'Ifremer (SIH)</a></li>
+ </ul></p>
+
+ </body>
+</html>
\ No newline at end of file
Deleted: trunk/coser-web/src/main/webapp/WEB-INF/content/locale.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/locale.jsp 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/locale.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -1,44 +0,0 @@
-<!--
- #%L
- Coser :: Web
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
- %%
- 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%
- -->
-<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<%@taglib uri="/struts-tags" prefix="s" %>
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Coser</title>
- <link rel="stylesheet" type="text/css" href="styles/coser.css" />
- </head>
- <body>
-
- <%@ include file="header.jsp" %>
-
- <img src="images/zonesmap.jpg" />
-
- <br />
-
- <%@ include file="footer.jsp" %>
- </body>
-</html>
\ No newline at end of file
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/select-indicator.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/select-indicator.jsp 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/select-indicator.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -27,25 +27,18 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Coser</title>
- <link rel="stylesheet" type="text/css" href="styles/coser.css" />
</head>
<body>
-
- <%@ include file="header.jsp" %>
-
<img src="images/zonesmap.jpg" />
<br />
<s:form action="show-graph" method="get">
- <s:select name="indicator" list="indicators" label="Select a country" />
+ <s:select name="indicator" list="indicators" label="Select an indicator" />
<s:hidden name="zone" value="zone" />
<s:hidden name="species" value="species" />
<s:submit label="Suite"/>
</s:form>
-
- <%@ include file="footer.jsp" %>
</body>
</html>
\ No newline at end of file
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/select-species.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/select-species.jsp 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/select-species.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -27,24 +27,18 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Coser</title>
- <link rel="stylesheet" type="text/css" href="styles/coser.css" />
</head>
<body>
-
- <%@ include file="header.jsp" %>
<img src="images/zonesmap.jpg" />
<br />
<s:form action="select-indicator" method="get">
- <s:select name="species" list="species" label="Select a country" />
+ <s:select name="species" list="species" label="Select a species" />
<s:hidden name="zone" value="zone" />
<s:submit label="Suite"/>
</s:form>
-
- <%@ include file="footer.jsp" %>
</body>
</html>
\ No newline at end of file
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/select-zone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/select-zone.jsp 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/select-zone.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -26,13 +26,9 @@
<%@taglib uri="/struts-tags" prefix="s" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Coser</title>
- <link rel="stylesheet" type="text/css" href="styles/coser.css" />
</head>
<body>
-
- <%@ include file="header.jsp" %>
<img src="images/zonesmap.jpg" />
@@ -57,7 +53,5 @@
</select>
<s:submit label="Suite"/>
</s:form>
-
- <%@ include file="footer.jsp" %>
</body>
</html>
\ No newline at end of file
Added: trunk/coser-web/src/main/webapp/WEB-INF/content/show-graph.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/show-graph.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/show-graph.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -0,0 +1,37 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ 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%
+ -->
+<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<%@taglib uri="/struts-tags" prefix="s" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:property value="chartUrl"/>" />
+
+ </body>
+</html>
\ No newline at end of file
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result-success.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result-success.jsp 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result-success.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -26,8 +26,7 @@
<%@taglib uri="/struts-tags" prefix="s" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Hello World</title>
+ <title>Hello World</title>
</head>
<body>
Success !!!
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result.jsp 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -26,8 +26,7 @@
<%@taglib uri="/struts-tags" prefix="s" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Hello World</title>
+ <title>Hello World</title>
</head>
<body>
<s:a action="index">Index</s:a>
Copied: trunk/coser-web/src/main/webapp/WEB-INF/decorators/footer.jsp (from rev 441, trunk/coser-web/src/main/webapp/WEB-INF/content/footer.jsp)
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/decorators/footer.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/decorators/footer.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -0,0 +1,29 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ 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%
+ -->
+<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
+<%@taglib uri="/struts-tags" prefix="s" %>
+
+ <div>
+
+ </div>
\ No newline at end of file
Copied: trunk/coser-web/src/main/webapp/WEB-INF/decorators/header.jsp (from rev 445, trunk/coser-web/src/main/webapp/WEB-INF/content/header.jsp)
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/decorators/header.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/decorators/header.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -0,0 +1,44 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ 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%
+ -->
+<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
+<%@taglib uri="/struts-tags" prefix="s" %>
+
+ <div>
+ <img src="images/logo_ifremer.gif" style="width:333px;heigth:69px" />
+ <img src="images/logo_sih.gif" />
+
+ <s:url id="localeEN" namespace="/" action="locale">
+ <s:param name="request_locale" >en</s:param>
+ </s:url>
+ <s:url id="localeFR" namespace="/" action="locale">
+ <s:param name="request_locale" >fr</s:param>
+ </s:url>
+
+ <s:a href="%{localeEN}"><img src="images/gb.png" /></s:a>
+ <s:a href="%{localeFR}"><img src="images/fr.png" /></s:a>
+
+ </div>
+
+ <hr />
+
Added: trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2010-12-24 10:14:35 UTC (rev 447)
@@ -0,0 +1,45 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ 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%
+ -->
+<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<%@taglib uri="/struts-tags" prefix="s" %>
+<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title><decorator:title default="Coser"/></title>
+ <link rel="stylesheet" type="text/css" href="styles/coser.css" />
+ <decorator:head/>
+ </head>
+ <body>
+
+ <%@ include file="header.jsp" %>
+
+ <div class="main">
+ <decorator:body/>
+ </div>
+
+ <%@ include file="footer.jsp" %>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/coser-web/src/main/webapp/WEB-INF/decorators.xml
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/decorators.xml (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/decorators.xml 2010-12-24 10:14:35 UTC (rev 447)
@@ -0,0 +1,10 @@
+<decorators defaultdir="/WEB-INF/decorators">
+ <excludes>
+ <pattern>/styles/*</pattern>
+ <pattern>/images/*</pattern>
+ </excludes>
+
+ <decorator name="layout" page="layout.jsp">
+ <pattern>/*</pattern>
+ </decorator>
+</decorators>
\ No newline at end of file
Modified: trunk/coser-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/web.xml 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/webapp/WEB-INF/web.xml 2010-12-24 10:14:35 UTC (rev 447)
@@ -30,13 +30,9 @@
<display-name>Coser</display-name>
- <!-- <welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
- </welcome-file-list> -->
-
<filter>
- <filter-name>struts2</filter-name>
- <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
+ <filter-name>struts-prepare</filter-name>
+ <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>fr.ifremer.coser.web</param-value>
@@ -46,10 +42,34 @@
<param-value>true</param-value>
</init-param>
</filter>
-
+
+ <filter>
+ <filter-name>struts-execute</filter-name>
+ <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>sitemesh</filter-name>
+ <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
+ </filter>
+
<filter-mapping>
- <filter-name>struts2</filter-name>
+ <filter-name>struts-prepare</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
+
+ <filter-mapping>
+ <filter-name>sitemesh</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>struts-execute</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ <listener>
+ <listener-class>org.apache.struts2.dispatcher.ng.listener.StrutsListener</listener-class>
+ </listener>
+
</web-app>
Modified: trunk/coser-web/src/main/webapp/styles/coser.css
===================================================================
--- trunk/coser-web/src/main/webapp/styles/coser.css 2010-12-24 10:14:05 UTC (rev 446)
+++ trunk/coser-web/src/main/webapp/styles/coser.css 2010-12-24 10:14:35 UTC (rev 447)
@@ -1,13 +1,31 @@
body {
background-color: #1F7DCB;
color: #2A2A2A;
+ font-family: Verdana,"Lucida Grande",Lucida,Arial,Helvetica,sans-serif;
+ width: 960px;
+ margin: 0 auto;
}
a {
- color: #2C9FF;
+ color: #0080CB;
+ text-decoration: none;
}
a:hover {
color: #165A97;
}
+.main {
+ background-color: white;
+ border: 1px solid black;
+ color: #696969;
+ margin-left:200px;
+ padding:2.5em 1.95em 1.5em;
+}
+
+.main .maintitle {
+ font-weight: bold;
+ font-size: 125%;
+ color: #044F90;
+ border-bottom: 1px solid #044F90;
+}
\ No newline at end of file
1
0
Author: chatellier
Date: 2010-12-24 10:14:05 +0000 (Fri, 24 Dec 2010)
New Revision: 446
Log:
Add sitemesh plugin
Modified:
trunk/coser-web/pom.xml
trunk/pom.xml
Modified: trunk/coser-web/pom.xml
===================================================================
--- trunk/coser-web/pom.xml 2010-12-23 17:03:38 UTC (rev 445)
+++ trunk/coser-web/pom.xml 2010-12-24 10:14:05 UTC (rev 446)
@@ -50,6 +50,10 @@
<artifactId>struts2-convention-plugin</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-sitemesh-plugin</artifactId>
+ </dependency>
+ <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-12-23 17:03:38 UTC (rev 445)
+++ trunk/pom.xml 2010-12-24 10:14:05 UTC (rev 446)
@@ -217,6 +217,13 @@
<version>${struts.version}</version>
<scope>compile</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-sitemesh-plugin</artifactId>
+ <version>${struts.version}</version>
+ <scope>compile</scope>
+ </dependency>
<dependency>
<groupId>org.apache.struts.xwork</groupId>
1
0
r445 - in trunk: coser-business/src/main/java/fr/ifremer/coser/services coser-ui/src/main/java/fr/ifremer/coser/ui/result coser-web/src/main/java/fr/ifremer/coser/web/actions coser-web/src/main/resources coser-web/src/main/resources/fr coser-web/src/main/resources/fr/ifremer coser-web/src/main/resources/fr/ifremer/coser coser-web/src/main/resources/fr/ifremer/coser/web coser-web/src/main/resources/fr/ifremer/coser/web/actions coser-web/src/main/webapp/WEB-INF/content coser-web/src/main/webap
by chatellier@users.labs.libre-entreprise.org 23 Dec '10
by chatellier@users.labs.libre-entreprise.org 23 Dec '10
23 Dec '10
Author: chatellier
Date: 2010-12-23 17:03:38 +0000 (Thu, 23 Dec 2010)
New Revision: 445
Log:
Udpate web ui code.
Begin localization.
Added:
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/ShowGraphAction.java
trunk/coser-web/src/main/resources/fr/
trunk/coser-web/src/main/resources/fr/ifremer/
trunk/coser-web/src/main/resources/fr/ifremer/coser/
trunk/coser-web/src/main/resources/fr/ifremer/coser/web/
trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/
trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction.properties
trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction_en.properties
trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction_fr.properties
trunk/coser-web/src/main/webapp/WEB-INF/content/locale.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/select-indicator.jsp
trunk/coser-web/src/main/webapp/images/fr.png
trunk/coser-web/src/main/webapp/images/gb.png
Modified:
trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SelectIndicatorAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java
trunk/coser-web/src/main/resources/struts.xml
trunk/coser-web/src/main/webapp/WEB-INF/content/header.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/select-species.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/select-zone.jsp
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java 2010-12-23 17:02:43 UTC (rev 444)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java 2010-12-23 17:03:38 UTC (rev 445)
@@ -179,4 +179,88 @@
return result;
}
+
+ /**
+ * Retourne les indicateurs calculables.
+ *
+ * @param zone zone
+ * @param species especes
+ * @return la liste des indicateurs
+ */
+ public Map<String, String> getIndicators(String zone, String species) {
+ Map<String, String> indicators = new TreeMap<String, String>();
+
+ // populations
+ indicators.put("Abundance", "Abundance");
+ indicators.put("lnN", "lnN");
+ //indicators.put("Dbar", "Dbar");
+ indicators.put("Wbar", "Wbar");
+ indicators.put("Biomass", "Biomass");
+ indicators.put("Lbar", "Lbar");
+ //indicators.put("propMat", "propMat");
+ indicators.put("L50", "L50");
+ //indicators.put("sexRatio", "sexRatio");
+ //indicators.put("Zmoy", "Zmoy");
+
+ // communauté
+ indicators.put("Delta", "Delta");
+ indicators.put("Gtot", "Gtot");
+ //indicators.put("Shannonmod", "Shannonmod");
+ indicators.put("meanWbar", "meanWbar");
+ indicators.put("NBWtot", "NBWtot");
+ //indicators.put("propL", "propL");
+ indicators.put("propLW", "propLW");
+ indicators.put("meanQuant", "meanQuant");
+ //indicators.put("biomSmall", "biomSmall");
+ //indicators.put("biomBig", "biomBig");
+
+ return indicators;
+ }
+
+ /**
+ * Generer les données du graph et genere la liste des parametres pour
+ * les generateurs de graph (eastwood ou jfreechart).
+ *
+ * @param zone zone
+ * @param species species
+ * @param indicator indicator
+ * @return chart parameters
+ * @throws CoserBusinessException
+ */
+ public String getChartParameters(String zone, String species, String indicator) throws CoserBusinessException {
+
+ // charge du fichier EstComInd_survey.txt ou EstPopInd_survey.txt
+ // suivant le type de resultat demandé (communauté/population)
+
+ File webDirectory = config.getWebServerDirectory();
+ File newDirectory = new File(webDirectory, "tutu");
+ File[] projectFiles = newDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ Project project = projectService.openProject(projectFile.getName(), newDirectory);
+
+ for (Selection selection : project.getSelections().values()) {
+ boolean resultFound = false;
+
+ for (RSufiResult rsufiResult : selection.getRsufiResults()) {
+ if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zone)) {
+ projectService.loadSelectionData(project, selection);
+ Map<String, String> resultSpecies = getRsufiResultSpecies(project, selection, rsufiResult);
+ //result.putAll(resultSpecies);
+ resultFound = true;
+ break;
+ }
+ }
+
+ if (resultFound) {
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java 2010-12-23 17:02:43 UTC (rev 444)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java 2010-12-23 17:03:38 UTC (rev 445)
@@ -28,10 +28,6 @@
import static org.nuiton.i18n.I18n._;
import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ExecutionException;
import javax.swing.JOptionPane;
import javax.swing.SwingWorker;
@@ -39,14 +35,10 @@
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jfree.chart.JFreeChart;
import fr.ifremer.coser.CoserBusinessException;
import fr.ifremer.coser.CoserException;
-import fr.ifremer.coser.CoserConstants.ValidationLevel;
-import fr.ifremer.coser.control.ControlError;
import fr.ifremer.coser.services.ProjectService;
-import fr.ifremer.coser.services.PublicationService;
import fr.ifremer.coser.ui.common.CommonHandler;
import fr.ifremer.coser.ui.util.CoserProgressBar;
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java 2010-12-23 17:02:43 UTC (rev 444)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java 2010-12-23 17:03:38 UTC (rev 445)
@@ -24,7 +24,6 @@
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;
import java.util.Properties;
@@ -37,7 +36,7 @@
import fr.ifremer.coser.web.ServiceFactory;
/**
- * Action index, recupere la liste des resultats.
+ * Action index, ecupere la date de derniere mise à jour.
*
* @author chatellier
* @version $Revision$
@@ -62,23 +61,26 @@
CoserWebConfig config = ServiceFactory.getCoserConfig();
File webProperties = new File(config.getWebServerDirectory(), CoserWebConstants.WEB_PROPERTIES_NAME);
- // get update date
- Properties props = new Properties();
- try {
- props.load(new FileInputStream(webProperties));
-
- if (props.containsKey("updateDate")) {
- String date = props.getProperty("updateDate");
- long time = Long.parseLong(date);
- dataUpdateDate = new Date(time);
+ if (webProperties.isFile()) {
+ // get update date
+ Properties props = new Properties();
+ try {
+ props.load(new FileInputStream(webProperties));
+
+ if (props.containsKey("updateDate")) {
+ String date = props.getProperty("updateDate");
+ long time = Long.parseLong(date);
+ dataUpdateDate = new Date(time);
+ }
+
+ } catch (IOException ex) {
+ throw new CoserWebException("Can't save properties file", ex);
}
- else {
- dataUpdateDate = new Date(0);
- }
-
- } catch (IOException ex) {
- throw new CoserWebException("Can't save properties file", ex);
}
+
+ if (dataUpdateDate == null) {
+ dataUpdateDate = new Date(0);
+ }
return SUCCESS;
}
Added: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java 2010-12-23 17:03:38 UTC (rev 445)
@@ -0,0 +1,49 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ * %%
+ * 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.coser.web.actions;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+/**
+ * Action index, recupere la liste des resultats.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class LocaleAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 1663244944108703571L;
+
+ @Override
+ @Action(results={@Result(location="index", type="redirect")})
+ public String execute() {
+ return SUCCESS;
+ }
+}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SelectIndicatorAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SelectIndicatorAction.java 2010-12-23 17:02:43 UTC (rev 444)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SelectIndicatorAction.java 2010-12-23 17:03:38 UTC (rev 445)
@@ -22,10 +22,13 @@
package fr.ifremer.coser.web.actions;
-import java.util.List;
+import java.util.Map;
import com.opensymphony.xwork2.ActionSupport;
+import fr.ifremer.coser.services.WebService;
+import fr.ifremer.coser.web.ServiceFactory;
+
/**
* Action index, recupere la liste des resultats.
*
@@ -40,29 +43,39 @@
/** serialVersionUID. */
private static final long serialVersionUID = 1663244944108703571L;
- protected String result;
+ protected String zone;
- protected List<String> indicatorNames;
+ protected String species;
- public String getResult() {
- return result;
+ protected Map<String, String> indicators;
+
+ public String getZone() {
+ return zone;
}
- public void setResult(String result) {
- this.result = result;
+ public void setZone(String zone) {
+ this.zone = zone;
}
- public List<String> getIndicatorNames() {
- return indicatorNames;
+ public String getSpecies() {
+ return species;
}
- public void setIndicatorNames(List<String> indicatorNames) {
- this.indicatorNames = indicatorNames;
+ public void setSpecies(String species) {
+ this.species = species;
}
+ public Map<String, String> getIndicators() {
+ return indicators;
+ }
+
@Override
public String execute() {
+ WebService webService = ServiceFactory.getWebService();
+
+ indicators = webService.getIndicators(zone, species);
+
return SUCCESS;
}
}
Added: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/ShowGraphAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/ShowGraphAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/ShowGraphAction.java 2010-12-23 17:03:38 UTC (rev 445)
@@ -0,0 +1,127 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ * %%
+ * 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.coser.web.actions;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+import fr.ifremer.coser.web.CoserWebConfig;
+import fr.ifremer.coser.web.ServiceFactory;
+
+/**
+ * Affiche le graphique demandé.
+ *
+ * Parametre : zone, species, indicator.
+ *
+ * Based on eastwoood, same doc as google chart api :
+ * http://code.google.com/apis/chart/docs/making_charts.html
+ *
+ * chart?cht=<chart_type>&chd=<chart_data>&chs=<chart_size>&...additional_parameters...
+ *
+ * Dans ce cas, on va faire un graphe avec des points pour les valeurs
+ * et des traits (en dessous/au dessus) pour les ecarts types.
+ * chd=t:
+ * 12,16,16,24,26,28,41,51,66,68,13,45,81|
+ * 16,14,22,34,22,31,31,48,71,64,15,38,84|
+ * 8,6,4,5,2,13,9,8,7,6,1,8,8
+ * chm=
+ * o,0000FF,0,-1,0|
+ * h,FF0000,0,0:9:,5|
+ * h,FF0000,0,0:9:,5
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class ShowGraphAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3385467755357775199L;
+
+ protected String zone;
+
+ protected String species;
+
+ protected String indicator;
+
+ protected String chartUrl;
+
+ public String getZone() {
+ return zone;
+ }
+
+ public void setZone(String zone) {
+ this.zone = zone;
+ }
+
+ public String getSpecies() {
+ return species;
+ }
+
+ public void setSpecies(String species) {
+ this.species = species;
+ }
+
+ public String getIndicator() {
+ return indicator;
+ }
+
+ public void setIndicator(String indicator) {
+ this.indicator = indicator;
+ }
+
+ public String getChartUrl() {
+ return chartUrl;
+ }
+
+
+ @Override
+ public String execute() {
+
+ CoserWebConfig config = ServiceFactory.getCoserConfig();
+
+ chartUrl = config.getEastWoodUrl() + "/chart?";
+
+ // chart type
+ chartUrl += "&cht=lxy";
+ // data
+ chartUrl += "&chd=t:10,20,40,80,90,95,99|20,30,40,50,60,70,80";
+ // legend
+ chartUrl += "&chdl=Ponies";
+ // legend position
+ chartUrl += "&chdlp=b";
+ // markers (plot)
+ chartUrl += "&chm=o,FF0000,0,-1,5";
+ // display x y axis
+ chartUrl += "&chxt=x,y";
+ // taille
+ chartUrl += "&chs=600x300";
+ // naffiche aps les lignes :
+ chartUrl += "&chls=2,0,16";
+ // titre du graphique
+ chartUrl += "&chtt=Toto";
+
+ return SUCCESS;
+ }
+}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/ShowGraphAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java 2010-12-23 17:02:43 UTC (rev 444)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java 2010-12-23 17:03:38 UTC (rev 445)
@@ -24,7 +24,6 @@
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;
@@ -130,7 +129,9 @@
Properties props = new Properties();
try {
- props.load(new FileInputStream(webProperties));
+ if (webProperties.isFile()) {
+ props.load(new FileInputStream(webProperties));
+ }
props.setProperty("updateDate", String.valueOf(new Date().getTime()));
props.store(new FileOutputStream(webProperties), "Update data");
Added: trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction.properties
===================================================================
--- trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction.properties (rev 0)
+++ trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction.properties 2010-12-23 17:03:38 UTC (rev 445)
@@ -0,0 +1 @@
+message.index.title=Default Populations and communities indices, resulting from Ifremer monitoring halieutics survey
\ No newline at end of file
Added: trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction_en.properties
===================================================================
--- trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction_en.properties (rev 0)
+++ trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction_en.properties 2010-12-23 17:03:38 UTC (rev 445)
@@ -0,0 +1 @@
+message.index.title=Populations and communities indices, resulting from Ifremer monitoring halieutics survey
\ No newline at end of file
Added: trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction_fr.properties
===================================================================
--- trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction_fr.properties (rev 0)
+++ trunk/coser-web/src/main/resources/fr/ifremer/coser/web/actions/IndexAction_fr.properties 2010-12-23 17:03:38 UTC (rev 445)
@@ -0,0 +1 @@
+message.index.title=Indices de populations et de communauté issus des campagnes de surveillance halieutique de l'Ifremer
\ No newline at end of file
Modified: trunk/coser-web/src/main/resources/struts.xml
===================================================================
--- trunk/coser-web/src/main/resources/struts.xml 2010-12-23 17:02:43 UTC (rev 444)
+++ trunk/coser-web/src/main/resources/struts.xml 2010-12-23 17:03:38 UTC (rev 445)
@@ -2,6 +2,4 @@
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.multipart.maxSize" value="100097152"/>
-
-
</struts>
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/header.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/header.jsp 2010-12-23 17:02:43 UTC (rev 444)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/header.jsp 2010-12-23 17:03:38 UTC (rev 445)
@@ -27,6 +27,17 @@
<div>
<img src="images/logo_sih.gif" />
<img src="images/logo_ifremer.gif" />
+
+ <s:url id="localeEN" namespace="/" action="locale">
+ <s:param name="request_locale" >en</s:param>
+ </s:url>
+ <s:url id="localeFR" namespace="/" action="locale">
+ <s:param name="request_locale" >fr</s:param>
+ </s:url>
+
+ <s:a href="%{localeEN}"><img src="images/gb.png" /></s:a>
+ <s:a href="%{localeFR}"><img src="images/fr.png" /></s:a>
+
</div>
<hr />
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp 2010-12-23 17:02:43 UTC (rev 444)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp 2010-12-23 17:03:38 UTC (rev 445)
@@ -31,7 +31,11 @@
<link rel="stylesheet" type="text/css" href="styles/coser.css" />
</head>
<body>
- <h2>Indices de populations et de communauté issus des campagnes de surveillance halieutique de l'Ifremer</h2>
+
+ <%@ include file="header.jsp" %>
+
+ <h2>Tutu : <s:text name="message.index.title" /></h2>
+ <!-- <h2>Indices de populations et de communauté issus des campagnes de surveillance halieutique de l'Ifremer</h2> -->
<p>Ce site présente des indices de populations et de communauté calculés à partir des
données du réseau des campagnes de surveillance halieutiques opérées par l'Ifremer
@@ -80,11 +84,12 @@
issus des campagnes de surveillance halieutique de l'Ifremer.
http://www.ifremer.fr/SIH-indices-campagnes/ <s:date name="dataUpdateDate" format="dd MMMM" />.</p>
- <p>Gestion des données des campagnes océanographiques :
+ <p>Gestion des données des campagnes océanographiques :
<ul>
<li><a href="http://www.ifremer.fr/sismer/index_FR.htm">le Système d'informations scientifiques pour la mer de l'Ifremer (SISMER)</a></li>
<li><a href="http://www.ifremer.fr/sih">le Système d'information halieutique de l'Ifremer (SIH)</a></li>
</ul></p>
+ <%@ include file="footer.jsp" %>
</body>
</html>
\ No newline at end of file
Added: trunk/coser-web/src/main/webapp/WEB-INF/content/locale.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/locale.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/locale.jsp 2010-12-23 17:03:38 UTC (rev 445)
@@ -0,0 +1,44 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ 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%
+ -->
+<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<%@taglib uri="/struts-tags" prefix="s" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Coser</title>
+ <link rel="stylesheet" type="text/css" href="styles/coser.css" />
+ </head>
+ <body>
+
+ <%@ include file="header.jsp" %>
+
+ <img src="images/zonesmap.jpg" />
+
+ <br />
+
+ <%@ include file="footer.jsp" %>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/coser-web/src/main/webapp/WEB-INF/content/select-indicator.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/select-indicator.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/select-indicator.jsp 2010-12-23 17:03:38 UTC (rev 445)
@@ -0,0 +1,51 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ 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%
+ -->
+<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<%@taglib uri="/struts-tags" prefix="s" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Coser</title>
+ <link rel="stylesheet" type="text/css" href="styles/coser.css" />
+ </head>
+ <body>
+
+ <%@ include file="header.jsp" %>
+
+ <img src="images/zonesmap.jpg" />
+
+ <br />
+
+ <s:form action="show-graph" method="get">
+ <s:select name="indicator" list="indicators" label="Select a country" />
+ <s:hidden name="zone" value="zone" />
+ <s:hidden name="species" value="species" />
+ <s:submit label="Suite"/>
+ </s:form>
+
+ <%@ include file="footer.jsp" %>
+ </body>
+</html>
\ No newline at end of file
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/select-species.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/select-species.jsp 2010-12-23 17:02:43 UTC (rev 444)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/select-species.jsp 2010-12-23 17:03:38 UTC (rev 445)
@@ -39,10 +39,10 @@
<br />
- <s:form action="select-indicator">
-
+ <s:form action="select-indicator" method="get">
<s:select name="species" list="species" label="Select a country" />
<s:hidden name="zone" value="zone" />
+ <s:submit label="Suite"/>
</s:form>
<%@ include file="footer.jsp" %>
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/select-zone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/select-zone.jsp 2010-12-23 17:02:43 UTC (rev 444)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/select-zone.jsp 2010-12-23 17:03:38 UTC (rev 445)
@@ -38,7 +38,7 @@
<br />
- <s:form action="select-species">
+ <s:form action="select-species" method="get">
<select name="zone">
<option value="manchecgfs">Plateau - Manche CGFS</option>
<option value="celtiqueevhoe">Plateau - Celtique EVHOE</option>
Added: trunk/coser-web/src/main/webapp/images/fr.png
===================================================================
(Binary files differ)
Property changes on: trunk/coser-web/src/main/webapp/images/fr.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/coser-web/src/main/webapp/images/gb.png
===================================================================
(Binary files differ)
Property changes on: trunk/coser-web/src/main/webapp/images/gb.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
Author: chatellier
Date: 2010-12-23 17:02:43 +0000 (Thu, 23 Dec 2010)
New Revision: 444
Log:
Update struts scopes
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-12-23 13:46:37 UTC (rev 443)
+++ trunk/pom.xml 2010-12-23 17:02:43 UTC (rev 444)
@@ -186,7 +186,7 @@
<dependency>
<groupId>com.fifesoft</groupId>
<artifactId>rsyntaxtextarea</artifactId>
- <version>1.4.1</version>
+ <version>r239</version>
<scope>runtime</scope>
</dependency>
@@ -208,14 +208,14 @@
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts.version}</version>
- <scope>runtime</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${struts.version}</version>
- <scope>runtime</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
1
0