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
- 1258 discussions
r503 - in trunk/coser-web/src/main: java/fr/ifremer/coser/web/actions java/fr/ifremer/coser/web/actions/source webapp/WEB-INF/content webapp/WEB-INF/content/source
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
12 Jan '11
Author: chatellier
Date: 2011-01-12 15:11:27 +0000 (Wed, 12 Jan 2011)
New Revision: 503
Log:
Download sources action
Added:
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/FacadeAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceDataAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/ZoneAction.java
trunk/coser-web/src/main/webapp/WEB-INF/content/source/
trunk/coser-web/src/main/webapp/WEB-INF/content/source/facade.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/source/source.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/source/zone.jsp
Modified:
trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
Added: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/FacadeAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/FacadeAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/FacadeAction.java 2011-01-12 15:11:27 UTC (rev 503)
@@ -0,0 +1,68 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2011 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.source;
+
+import java.util.Map;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.services.WebService;
+import fr.ifremer.coser.web.CoserWebException;
+import fr.ifremer.coser.web.ServiceFactory;
+
+/**
+ * Action index, affiche la liste des facades majeures.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class FacadeAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3385467755357775199L;
+
+ protected Map<String, String> facades;
+
+ public Map<String, String> getFacades() {
+ return facades;
+ }
+
+ @Override
+ public String execute() {
+
+ WebService webService = ServiceFactory.getWebService();
+ try {
+ // renvoi la liste des facadeid et leur label associé
+ facades = webService.getFacades();
+
+ } catch (CoserBusinessException ex) {
+ throw new CoserWebException("Can't get zone map", ex);
+ }
+
+ return SUCCESS;
+ }
+}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/FacadeAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceAction.java 2011-01-12 15:11:27 UTC (rev 503)
@@ -0,0 +1,56 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2011 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.source;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+/**
+ * Affiche les liens de téléchargement du zip pour le projet choisit.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class SourceAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3385467755357775199L;
+
+ protected String zone;
+
+ public String getZone() {
+ return zone;
+ }
+
+ public void setZone(String zone) {
+ this.zone = zone;
+ }
+
+ @Override
+ public String execute() {
+
+ return SUCCESS;
+ }
+}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceDataAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceDataAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceDataAction.java 2011-01-12 15:11:27 UTC (rev 503)
@@ -0,0 +1,93 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2011 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.source;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.Locale;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.services.WebService;
+import fr.ifremer.coser.web.CoserWebException;
+import fr.ifremer.coser.web.ServiceFactory;
+
+/**
+ * Force le téléchargement du zip.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class SourceDataAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3385467755357775199L;
+
+ protected String zone;
+
+ public String getZone() {
+ return zone;
+ }
+
+ public void setZone(String zone) {
+ this.zone = zone;
+ }
+
+ @Action(results= {@Result(type="stream", params={"contentType", "application/zip", "inputName", "inputStream", "contentDisposition", "attachment; filename=\"${filename}\""})})
+ public String execute() {
+ return SUCCESS;
+ }
+
+ public String getFilename() {
+ return "source.zip";
+ }
+
+ public InputStream getInputStream() {
+ WebService webService = ServiceFactory.getWebService();
+
+ Locale locale = getLocale();
+ String localeCode = locale.getLanguage();
+
+ InputStream input = null;
+ try {
+
+ File sourceZip = webService.getSourceZip(zone, localeCode);
+ input = new FileInputStream(sourceZip);
+ } catch (CoserBusinessException ex) {
+ throw new CoserWebException("Can't get source zip file", ex);
+ } catch (FileNotFoundException ex) {
+ throw new CoserWebException("Can't get source zip file", ex);
+ }
+
+ return input;
+ }
+}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceDataAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/ZoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/ZoneAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/ZoneAction.java 2011-01-12 15:11:27 UTC (rev 503)
@@ -0,0 +1,76 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2011 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.source;
+
+import java.util.Map;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.services.WebService;
+import fr.ifremer.coser.web.CoserWebException;
+import fr.ifremer.coser.web.ServiceFactory;
+
+/**
+ * Affiche la liste des sous zones (zone).
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class ZoneAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3385467755357775199L;
+
+ protected String facade;
+
+ public void setFacade(String facade) {
+ this.facade = facade;
+ }
+
+ protected Map<String, String> zones;
+
+ public Map<String, String> getZones() {
+ return zones;
+ }
+
+ @Override
+ public String execute() {
+
+ WebService webService = ServiceFactory.getWebService();
+ try {
+
+ // renvoi la liste des id subzone-survey et leurs label
+ // associé
+ zones = webService.getZoneForFacade(facade);
+
+ } catch (CoserBusinessException ex) {
+ throw new CoserWebException("Can't get zone map", ex);
+ }
+
+ return SUCCESS;
+ }
+}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/ZoneAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp 2011-01-12 14:58:42 UTC (rev 502)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp 2011-01-12 15:11:27 UTC (rev 503)
@@ -41,7 +41,7 @@
<p>
<span style="font-weight:bold"><s:text name="message.index.datatypetitle" /> :</span><br />
<ul>
- <li><s:a action="zone"><s:text name="message.index.datatype1" /></s:a></li>
+ <li><s:a action="source/facade"><s:text name="message.index.datatype1" /></s:a></li>
<li><s:a action="map/facade"><s:text name="message.index.datatype2" /></s:a></li>
<li><s:a action="pop/facade"><s:text name="message.index.datatype3" /></s:a></li>
<li><s:a action="com/facade"><s:text name="message.index.datatype4" /></s:a></li>
Added: trunk/coser-web/src/main/webapp/WEB-INF/content/source/facade.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/source/facade.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/source/facade.jsp 2011-01-12 15:11:27 UTC (rev 503)
@@ -0,0 +1,42 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:url value='/images/zonesmap.jpg' />" />
+
+ <br />
+
+ <s:form action="zone" method="get">
+ <s:select name="facade" list="facades" label="Select a facade" />
+ <s:submit label="Suite"/>
+ </s:form>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/coser-web/src/main/webapp/WEB-INF/content/source/source.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/source/source.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/source/source.jsp 2011-01-12 15:11:27 UTC (rev 503)
@@ -0,0 +1,38 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <s:a action="source-data">
+ <s:param name="zone" value="%{zone}" />
+ Download
+ </s:a>.
+ </body>
+</html>
\ No newline at end of file
Added: trunk/coser-web/src/main/webapp/WEB-INF/content/source/zone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/source/zone.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/source/zone.jsp 2011-01-12 15:11:27 UTC (rev 503)
@@ -0,0 +1,47 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:url value='/images/zonesmap.jpg' />" />
+
+ <br />
+
+ <s:if test="%{zones.isEmpty()}">
+ No result founds
+ </s:if>
+ <s:else>
+ <s:form action="source" method="get">
+ <s:select name="zone" list="zones" label="Select a sub zone" />
+ <s:submit label="Suite"/>
+ </s:form>
+ </s:else>
+ </body>
+</html>
\ No newline at end of file
1
0
Author: chatellier
Date: 2011-01-12 14:58:42 +0000 (Wed, 12 Jan 2011)
New Revision: 502
Log:
Add itext and xhtmlrenderer deps.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-01-12 14:58:40 UTC (rev 501)
+++ trunk/pom.xml 2011-01-12 14:58:42 UTC (rev 502)
@@ -259,6 +259,20 @@
<version>2.5</version>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>com.lowagie</groupId>
+ <artifactId>itext</artifactId>
+ <version>2.0.8</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.xhtmlrenderer</groupId>
+ <artifactId>core-renderer</artifactId>
+ <version>R8pre2</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</dependencyManagement>
1
0
Author: chatellier
Date: 2011-01-12 14:58:40 +0000 (Wed, 12 Jan 2011)
New Revision: 501
Log:
Add itext and xhtmlrenderer deps.
Modified:
trunk/coser-business/pom.xml
Modified: trunk/coser-business/pom.xml
===================================================================
--- trunk/coser-business/pom.xml 2011-01-12 10:05:12 UTC (rev 500)
+++ trunk/coser-business/pom.xml 2011-01-12 14:58:40 UTC (rev 501)
@@ -94,6 +94,14 @@
<groupId>jfree</groupId>
<artifactId>jcommon</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.lowagie</groupId>
+ <artifactId>itext</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.xhtmlrenderer</groupId>
+ <artifactId>core-renderer</artifactId>
+ </dependency>
</dependencies>
<name>Coser :: Business</name>
1
0
r500 - in trunk/coser-web/src/main: java/fr/ifremer/coser/web/actions/com java/fr/ifremer/coser/web/actions/map java/fr/ifremer/coser/web/actions/pop webapp/WEB-INF/content webapp/WEB-INF/content/com webapp/WEB-INF/content/map webapp/WEB-INF/content/pop
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
12 Jan '11
Author: chatellier
Date: 2011-01-12 10:05:12 +0000 (Wed, 12 Jan 2011)
New Revision: 500
Log:
Refactoring zone>facade, subzone > zone
Added:
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/FacadeAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/FacadeAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/FacadeAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java
trunk/coser-web/src/main/webapp/WEB-INF/content/com/facade.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/map/facade.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/pop/facade.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp
Removed:
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/SubzoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SubzoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SubzoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java
trunk/coser-web/src/main/webapp/WEB-INF/content/com/subzone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/map/subzone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/pop/subzone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp
Modified:
trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
Copied: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/FacadeAction.java (from rev 498, trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java)
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/FacadeAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/FacadeAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,69 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2011 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.com;
+
+import java.util.Map;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.services.WebService;
+import fr.ifremer.coser.web.CoserWebException;
+import fr.ifremer.coser.web.ServiceFactory;
+
+/**
+ * Action index, affiche la liste des facades majeures.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class FacadeAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3385467755357775199L;
+
+ protected Map<String, String> facades;
+
+ public Map<String, String> getFacades() {
+ return facades;
+ }
+
+ @Override
+ public String execute() {
+
+ WebService webService = ServiceFactory.getWebService();
+ try {
+
+ // renvoi la liste des facadeid et leur label associé
+ facades = webService.getFacades();
+
+ } catch (CoserBusinessException ex) {
+ throw new CoserWebException("Can't get zone map", ex);
+ }
+
+ return SUCCESS;
+ }
+}
Deleted: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/SubzoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/SubzoneAction.java 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/SubzoneAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,76 +0,0 @@
-/*
- * #%L
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2010 - 2011 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.com;
-
-import java.util.Map;
-
-import com.opensymphony.xwork2.ActionSupport;
-
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-
-/**
- * Affiche la liste des sous zones (zone).
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-public class SubzoneAction extends ActionSupport {
-
- /** serialVersionUID. */
- private static final long serialVersionUID = 3385467755357775199L;
-
- protected String facade;
-
- public void setFacade(String facade) {
- this.facade = facade;
- }
-
- protected Map<String, String> zones;
-
- public Map<String, String> getZones() {
- return zones;
- }
-
- @Override
- public String execute() {
-
- WebService webService = ServiceFactory.getWebService();
- try {
-
- // renvoi la liste des id subzone-survey et leurs label
- // associé
- zones = webService.getZoneForFacade(facade);
-
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone map", ex);
- }
-
- return SUCCESS;
- }
-}
Deleted: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,69 +0,0 @@
-/*
- * #%L
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2010 - 2011 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.com;
-
-import java.util.Map;
-
-import com.opensymphony.xwork2.ActionSupport;
-
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-
-/**
- * Action index, affiche la liste des facades majeures.
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-public class ZoneAction extends ActionSupport {
-
- /** serialVersionUID. */
- private static final long serialVersionUID = 3385467755357775199L;
-
- protected Map<String, String> facades;
-
- public Map<String, String> getFacades() {
- return facades;
- }
-
- @Override
- public String execute() {
-
- WebService webService = ServiceFactory.getWebService();
- try {
-
- // renvoi la liste des facadeid et leur label associé
- facades = webService.getFacades();
-
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone map", ex);
- }
-
- return SUCCESS;
- }
-}
Copied: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java (from rev 498, trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/SubzoneAction.java)
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,76 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2011 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.com;
+
+import java.util.Map;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.services.WebService;
+import fr.ifremer.coser.web.CoserWebException;
+import fr.ifremer.coser.web.ServiceFactory;
+
+/**
+ * Affiche la liste des sous zones (zone).
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class ZoneAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3385467755357775199L;
+
+ protected String facade;
+
+ public void setFacade(String facade) {
+ this.facade = facade;
+ }
+
+ protected Map<String, String> zones;
+
+ public Map<String, String> getZones() {
+ return zones;
+ }
+
+ @Override
+ public String execute() {
+
+ WebService webService = ServiceFactory.getWebService();
+ try {
+
+ // renvoi la liste des id subzone-survey et leurs label
+ // associé
+ zones = webService.getZoneForFacade(facade);
+
+ } catch (CoserBusinessException ex) {
+ throw new CoserWebException("Can't get zone map", ex);
+ }
+
+ return SUCCESS;
+ }
+}
Copied: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/FacadeAction.java (from rev 498, trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java)
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/FacadeAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/FacadeAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,68 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2011 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.map;
+
+import java.util.Map;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.services.WebService;
+import fr.ifremer.coser.web.CoserWebException;
+import fr.ifremer.coser.web.ServiceFactory;
+
+/**
+ * Action index, affiche la liste des facades majeures.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class FacadeAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3385467755357775199L;
+
+ protected Map<String, String> facades;
+
+ public Map<String, String> getFacades() {
+ return facades;
+ }
+
+ @Override
+ public String execute() {
+
+ WebService webService = ServiceFactory.getWebService();
+ try {
+ // renvoi la liste des facadeid et leur label associé
+ facades = webService.getFacades();
+
+ } catch (CoserBusinessException ex) {
+ throw new CoserWebException("Can't get zone map", ex);
+ }
+
+ return SUCCESS;
+ }
+}
Deleted: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SubzoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SubzoneAction.java 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SubzoneAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,76 +0,0 @@
-/*
- * #%L
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2010 - 2011 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.map;
-
-import java.util.Map;
-
-import com.opensymphony.xwork2.ActionSupport;
-
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-
-/**
- * Affiche la liste des sous zones (zone).
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-public class SubzoneAction extends ActionSupport {
-
- /** serialVersionUID. */
- private static final long serialVersionUID = 3385467755357775199L;
-
- protected String facade;
-
- public void setFacade(String facade) {
- this.facade = facade;
- }
-
- protected Map<String, String> zones;
-
- public Map<String, String> getZones() {
- return zones;
- }
-
- @Override
- public String execute() {
-
- WebService webService = ServiceFactory.getWebService();
- try {
-
- // renvoi la liste des id subzone-survey et leurs label
- // associé
- zones = webService.getZoneForFacade(facade);
-
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone map", ex);
- }
-
- return SUCCESS;
- }
-}
Deleted: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,68 +0,0 @@
-/*
- * #%L
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2010 - 2011 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.map;
-
-import java.util.Map;
-
-import com.opensymphony.xwork2.ActionSupport;
-
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-
-/**
- * Action index, affiche la liste des facades majeures.
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-public class ZoneAction extends ActionSupport {
-
- /** serialVersionUID. */
- private static final long serialVersionUID = 3385467755357775199L;
-
- protected Map<String, String> facades;
-
- public Map<String, String> getFacades() {
- return facades;
- }
-
- @Override
- public String execute() {
-
- WebService webService = ServiceFactory.getWebService();
- try {
- // renvoi la liste des facadeid et leur label associé
- facades = webService.getFacades();
-
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone map", ex);
- }
-
- return SUCCESS;
- }
-}
Copied: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java (from rev 498, trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SubzoneAction.java)
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,76 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2011 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.map;
+
+import java.util.Map;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.services.WebService;
+import fr.ifremer.coser.web.CoserWebException;
+import fr.ifremer.coser.web.ServiceFactory;
+
+/**
+ * Affiche la liste des sous zones (zone).
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class ZoneAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3385467755357775199L;
+
+ protected String facade;
+
+ public void setFacade(String facade) {
+ this.facade = facade;
+ }
+
+ protected Map<String, String> zones;
+
+ public Map<String, String> getZones() {
+ return zones;
+ }
+
+ @Override
+ public String execute() {
+
+ WebService webService = ServiceFactory.getWebService();
+ try {
+
+ // renvoi la liste des id subzone-survey et leurs label
+ // associé
+ zones = webService.getZoneForFacade(facade);
+
+ } catch (CoserBusinessException ex) {
+ throw new CoserWebException("Can't get zone map", ex);
+ }
+
+ return SUCCESS;
+ }
+}
Copied: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/FacadeAction.java (from rev 498, trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java)
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/FacadeAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/FacadeAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,68 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2011 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.pop;
+
+import java.util.Map;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.services.WebService;
+import fr.ifremer.coser.web.CoserWebException;
+import fr.ifremer.coser.web.ServiceFactory;
+
+/**
+ * Action index, affiche la liste des facades majeures.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class FacadeAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3385467755357775199L;
+
+ protected Map<String, String> facades;
+
+ public Map<String, String> getFacades() {
+ return facades;
+ }
+
+ @Override
+ public String execute() {
+
+ WebService webService = ServiceFactory.getWebService();
+ try {
+ // renvoi la liste des facadeid et leur label associé
+ facades = webService.getFacades();
+
+ } catch (CoserBusinessException ex) {
+ throw new CoserWebException("Can't get zone map", ex);
+ }
+
+ return SUCCESS;
+ }
+}
Deleted: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SubzoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SubzoneAction.java 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SubzoneAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,76 +0,0 @@
-/*
- * #%L
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2010 - 2011 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.pop;
-
-import java.util.Map;
-
-import com.opensymphony.xwork2.ActionSupport;
-
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-
-/**
- * Affiche la liste des sous zones (zone).
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-public class SubzoneAction extends ActionSupport {
-
- /** serialVersionUID. */
- private static final long serialVersionUID = 3385467755357775199L;
-
- protected String facade;
-
- public void setFacade(String facade) {
- this.facade = facade;
- }
-
- protected Map<String, String> zones;
-
- public Map<String, String> getZones() {
- return zones;
- }
-
- @Override
- public String execute() {
-
- WebService webService = ServiceFactory.getWebService();
- try {
-
- // renvoi la liste des id subzone-survey et leurs label
- // associé
- zones = webService.getZoneForFacade(facade);
-
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone map", ex);
- }
-
- return SUCCESS;
- }
-}
Deleted: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,68 +0,0 @@
-/*
- * #%L
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2010 - 2011 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.pop;
-
-import java.util.Map;
-
-import com.opensymphony.xwork2.ActionSupport;
-
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-
-/**
- * Action index, affiche la liste des facades majeures.
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-public class ZoneAction extends ActionSupport {
-
- /** serialVersionUID. */
- private static final long serialVersionUID = 3385467755357775199L;
-
- protected Map<String, String> facades;
-
- public Map<String, String> getFacades() {
- return facades;
- }
-
- @Override
- public String execute() {
-
- WebService webService = ServiceFactory.getWebService();
- try {
- // renvoi la liste des facadeid et leur label associé
- facades = webService.getFacades();
-
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone map", ex);
- }
-
- return SUCCESS;
- }
-}
Copied: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java (from rev 498, trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SubzoneAction.java)
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,76 @@
+/*
+ * #%L
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2011 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.pop;
+
+import java.util.Map;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.services.WebService;
+import fr.ifremer.coser.web.CoserWebException;
+import fr.ifremer.coser.web.ServiceFactory;
+
+/**
+ * Affiche la liste des sous zones (zone).
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class ZoneAction extends ActionSupport {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3385467755357775199L;
+
+ protected String facade;
+
+ public void setFacade(String facade) {
+ this.facade = facade;
+ }
+
+ protected Map<String, String> zones;
+
+ public Map<String, String> getZones() {
+ return zones;
+ }
+
+ @Override
+ public String execute() {
+
+ WebService webService = ServiceFactory.getWebService();
+ try {
+
+ // renvoi la liste des id subzone-survey et leurs label
+ // associé
+ zones = webService.getZoneForFacade(facade);
+
+ } catch (CoserBusinessException ex) {
+ throw new CoserWebException("Can't get zone map", ex);
+ }
+
+ return SUCCESS;
+ }
+}
Copied: trunk/coser-web/src/main/webapp/WEB-INF/content/com/facade.jsp (from rev 498, trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp)
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/com/facade.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/com/facade.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,42 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:url value='/images/zonesmap.jpg' />" />
+
+ <br />
+
+ <s:form action="zone" method="get">
+ <s:select name="facade" list="facades" label="Select a facade" />
+ <s:submit label="Suite"/>
+ </s:form>
+ </body>
+</html>
\ No newline at end of file
Deleted: trunk/coser-web/src/main/webapp/WEB-INF/content/com/subzone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/com/subzone.jsp 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/com/subzone.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,47 +0,0 @@
-<!--
- #%L
- Coser :: Web
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 - 2011 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">
- <head>
- <title>Coser</title>
- </head>
- <body>
-
- <img src="<s:url value='/images/zonesmap.jpg' />" />
-
- <br />
-
- <s:if test="%{zones.isEmpty()}">
- No result founds
- </s:if>
- <s:else>
- <s:form action="indicator" method="get">
- <s:select name="zone" list="zones" label="Select a sub zone" />
- <s:submit label="Suite"/>
- </s:form>
- </s:else>
- </body>
-</html>
\ No newline at end of file
Deleted: trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,42 +0,0 @@
-<!--
- #%L
- Coser :: Web
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 - 2011 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">
- <head>
- <title>Coser</title>
- </head>
- <body>
-
- <img src="<s:url value='/images/zonesmap.jpg' />" />
-
- <br />
-
- <s:form action="subzone" method="get">
- <s:select name="facade" list="facades" label="Select a facade" />
- <s:submit label="Suite"/>
- </s:form>
- </body>
-</html>
\ No newline at end of file
Copied: trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp (from rev 494, trunk/coser-web/src/main/webapp/WEB-INF/content/com/subzone.jsp)
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,47 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:url value='/images/zonesmap.jpg' />" />
+
+ <br />
+
+ <s:if test="%{zones.isEmpty()}">
+ No result founds
+ </s:if>
+ <s:else>
+ <s:form action="indicator" method="get">
+ <s:select name="zone" list="zones" label="Select a sub zone" />
+ <s:submit label="Suite"/>
+ </s:form>
+ </s:else>
+ </body>
+</html>
\ No newline at end of file
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -42,9 +42,9 @@
<span style="font-weight:bold"><s:text name="message.index.datatypetitle" /> :</span><br />
<ul>
<li><s:a action="zone"><s:text name="message.index.datatype1" /></s:a></li>
- <li><s:a action="map/zone"><s:text name="message.index.datatype2" /></s:a></li>
- <li><s:a action="pop/zone"><s:text name="message.index.datatype3" /></s:a></li>
- <li><s:a action="com/zone"><s:text name="message.index.datatype4" /></s:a></li>
+ <li><s:a action="map/facade"><s:text name="message.index.datatype2" /></s:a></li>
+ <li><s:a action="pop/facade"><s:text name="message.index.datatype3" /></s:a></li>
+ <li><s:a action="com/facade"><s:text name="message.index.datatype4" /></s:a></li>
</ul>
</p>
Copied: trunk/coser-web/src/main/webapp/WEB-INF/content/map/facade.jsp (from rev 498, trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp)
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/map/facade.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/map/facade.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,42 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:url value='/images/zonesmap.jpg' />" />
+
+ <br />
+
+ <s:form action="zone" method="get">
+ <s:select name="facade" list="facades" label="Select a facade" />
+ <s:submit label="Suite"/>
+ </s:form>
+ </body>
+</html>
\ No newline at end of file
Deleted: trunk/coser-web/src/main/webapp/WEB-INF/content/map/subzone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/map/subzone.jsp 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/map/subzone.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,47 +0,0 @@
-<!--
- #%L
- Coser :: Web
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 - 2011 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">
- <head>
- <title>Coser</title>
- </head>
- <body>
-
- <img src="<s:url value='/images/zonesmap.jpg' />" />
-
- <br />
-
- <s:if test="%{zones.isEmpty()}">
- No result founds
- </s:if>
- <s:else>
- <s:form action="species" method="get">
- <s:select name="zone" list="zones" label="Select a sub zone" />
- <s:submit label="Suite"/>
- </s:form>
- </s:else>
- </body>
-</html>
\ No newline at end of file
Deleted: trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,42 +0,0 @@
-<!--
- #%L
- Coser :: Web
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 - 2011 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">
- <head>
- <title>Coser</title>
- </head>
- <body>
-
- <img src="<s:url value='/images/zonesmap.jpg' />" />
-
- <br />
-
- <s:form action="subzone" method="get">
- <s:select name="facade" list="facades" label="Select a facade" />
- <s:submit label="Suite"/>
- </s:form>
- </body>
-</html>
\ No newline at end of file
Copied: trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp (from rev 491, trunk/coser-web/src/main/webapp/WEB-INF/content/map/subzone.jsp)
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,47 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:url value='/images/zonesmap.jpg' />" />
+
+ <br />
+
+ <s:if test="%{zones.isEmpty()}">
+ No result founds
+ </s:if>
+ <s:else>
+ <s:form action="species" method="get">
+ <s:select name="zone" list="zones" label="Select a sub zone" />
+ <s:submit label="Suite"/>
+ </s:form>
+ </s:else>
+ </body>
+</html>
\ No newline at end of file
Copied: trunk/coser-web/src/main/webapp/WEB-INF/content/pop/facade.jsp (from rev 498, trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp)
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/pop/facade.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/pop/facade.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,42 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:url value='/images/zonesmap.jpg' />" />
+
+ <br />
+
+ <s:form action="zone" method="get">
+ <s:select name="facade" list="facades" label="Select a facade" />
+ <s:submit label="Suite"/>
+ </s:form>
+ </body>
+</html>
\ No newline at end of file
Deleted: trunk/coser-web/src/main/webapp/WEB-INF/content/pop/subzone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/pop/subzone.jsp 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/pop/subzone.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,47 +0,0 @@
-<!--
- #%L
- Coser :: Web
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 - 2011 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">
- <head>
- <title>Coser</title>
- </head>
- <body>
-
- <img src="<s:url value='/images/zonesmap.jpg' />" />
-
- <br />
-
- <s:if test="%{zones.isEmpty()}">
- No result founds
- </s:if>
- <s:else>
- <s:form action="species" method="get">
- <s:select name="zone" list="zones" label="Select a sub zone" />
- <s:submit label="Suite"/>
- </s:form>
- </s:else>
- </body>
-</html>
\ No newline at end of file
Deleted: trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp 2011-01-12 09:23:11 UTC (rev 499)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -1,42 +0,0 @@
-<!--
- #%L
- Coser :: Web
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 - 2011 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">
- <head>
- <title>Coser</title>
- </head>
- <body>
-
- <img src="<s:url value='/images/zonesmap.jpg' />" />
-
- <br />
-
- <s:form action="subzone" method="get">
- <s:select name="facade" list="facades" label="Select a facade" />
- <s:submit label="Suite"/>
- </s:form>
- </body>
-</html>
\ No newline at end of file
Copied: trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp (from rev 488, trunk/coser-web/src/main/webapp/WEB-INF/content/pop/subzone.jsp)
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp 2011-01-12 10:05:12 UTC (rev 500)
@@ -0,0 +1,47 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:url value='/images/zonesmap.jpg' />" />
+
+ <br />
+
+ <s:if test="%{zones.isEmpty()}">
+ No result founds
+ </s:if>
+ <s:else>
+ <s:form action="species" method="get">
+ <s:select name="zone" list="zones" label="Select a sub zone" />
+ <s:submit label="Suite"/>
+ </s:form>
+ </s:else>
+ </body>
+</html>
\ No newline at end of file
1
0
r499 - trunk/coser-business/src/main/java/fr/ifremer/coser/services
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
12 Jan '11
Author: chatellier
Date: 2011-01-12 09:23:11 +0000 (Wed, 12 Jan 2011)
New Revision: 499
Log:
Refactoring zone>facade, subzone > zone
Modified:
trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2011-01-12 09:23:01 UTC (rev 498)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2011-01-12 09:23:11 UTC (rev 499)
@@ -2823,25 +2823,9 @@
}
/**
- * Look for project survey name in container data.
- *
- * @param container data container
- * @return survey name
- */
- public String getProjectSurveyName(AbstractDataContainer container) {
- String result = null;
-
- Iterator<String[]> itCatchData = container.getCatch().iterator(true);
- while (StringUtils.isEmpty(result) && itCatchData.hasNext()) {
- result = itCatchData.next()[Catch.INDEX_SURVEY];
- }
-
- return result;
- }
-
- /**
* Look for project survey name in rsufi result.
* Read estcomind file to known that.
+ * Used in webservice to know map file names.
*
* @param resultDirectory result directory
* @param rSufiResult rsufi result
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 2011-01-12 09:23:01 UTC (rev 498)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java 2011-01-12 09:23:11 UTC (rev 499)
@@ -53,17 +53,18 @@
import fr.ifremer.coser.bean.Project;
import fr.ifremer.coser.bean.RSufiResult;
import fr.ifremer.coser.storage.DataStorage;
+import fr.ifremer.coser.storage.MemoryDataStorage;
/**
* Service specifique à l'interface web de visualisation.
*
- * Ce service, contrairement au autre a un état, les indicateurs et zones
- * chargées persistent apres chargement, car elle ne peuvent pas changer
+ * Ce service, contrairement aux autres a un état, les indicateurs et zones
+ * chargées persistent après chargement, car elle ne peuvent pas changer
* tant que l'application est en cours d'utilisation.
*
* Il faut garder à l'esprit que les projets n'ont pas forcement
* de resultat, donc le chargement du projet est possible, mais
- * pas les données de control et les données de selection.
+ * pas les données de controle et les données de selection.
*
* @author chatellier
* @version $Revision$
@@ -86,8 +87,8 @@
/** Indicator map (id, locale > translation) (etat du service). */
protected MultiKeyMap indicatorsMap;
- /** Zones map (id > zone, subzone) (etat du service). */
- protected Map<String, String[]> zonesMap;
+ /** Zones map (etat du service). */
+ protected DataStorage zonesMap;
public WebService(CoserBusinessConfig config) {
this.config = config;
@@ -129,7 +130,7 @@
* @return zones map
* @throws CoserBusinessException
*/
- public Map<String, String[]> getZonesMap() throws CoserBusinessException {
+ public DataStorage getZonesMap() throws CoserBusinessException {
if (zonesMap == null) {
File zoneFile = config.getWebZonesFile();
@@ -137,20 +138,12 @@
// l'operation n'est pas obligatoire pour tous les clients
// lourd, le fichier peut donc ne pas exister
if (zoneFile.isFile()) {
- zonesMap = new HashMap<String, String[]>();
-
- DataStorage zonesStorage = importService.loadCSVFile(zoneFile);
- Iterator<String[]> iteratorZones = zonesStorage.iterator(true);
- while (iteratorZones.hasNext()) {
- // "id";"zone";"subzone";"periode";"serie";"comment";"map"
- String[] zone = iteratorZones.next();
- zonesMap.put(zone[0], new String[]{zone[1], zone[2]});
- }
+ zonesMap = importService.loadCSVFile(zoneFile);
}
else {
// fait volontairement un return new, n'affecte pas l'etat du
// service
- return new HashMap<String, String[]>();
+ return new MemoryDataStorage();
}
}
@@ -164,8 +157,8 @@
* Le nouveau fichier uploadé est mergé avec l'ancien, c'est à dire:
* <ul>
* <li>dezipage dans un fichier temporaire
- * <li>recuperation des noms zone/souszone-campagne des nouveau fichiers
- * <li>suppression dans l'ancien répertoire des resultats deja presents dans le nouveau (pour les conflits)
+ * <li>recuperation des noms de zones des nouveau fichiers
+ * <li>suppression dans l'ancien répertoire des resultats deja presents dans le nouveau (pour les conflits zone-type : map/non map)
* <li>suppression des selections vides
* <li>suppression des projets vides
* <li>copie (avec ecrasement) des nouveaux fichiers dans l'ancien répertoire
@@ -348,22 +341,42 @@
}
/**
+ * Get facades list (as facadeid/facadename).
+ *
+ * @return facades map
+ * @throws CoserBusinessException
+ */
+ public Map<String, String> getFacades() throws CoserBusinessException {
+ Map<String, String> facades = new HashMap<String, String>();
+ DataStorage zonesMap = getZonesMap();
+ Iterator<String[]> itZone = zonesMap.iterator(true);
+ while (itZone.hasNext()) {
+ String[] tuple = itZone.next();
+ // on a pas d'id pour les facades
+ facades.put(tuple[1], tuple[1]);
+ }
+ return facades;
+ }
+
+ /**
* Pour une zone principale, recupere la liste des couples sous-zone /
* campagne qui sont disponible dans cette zone principale.
*
- * @param mainZone main zone (le nom de la zone principale)
+ * @param facade facade (le nom de la facade principale)
* @return couple subzoneid/sub
* @throws CoserBusinessException
*/
- public Map<String, String> getSurveysForZone(String mainZone) throws CoserBusinessException {
+ public Map<String, String> getZoneForFacade(String facade) throws CoserBusinessException {
Map<String, String> surveyForZone = new HashMap<String, String>();
// get subzone for main zone
Collection<String> subZones = new ArrayList<String>();
- for (Map.Entry<String, String[]> zoneEntry : getZonesMap().entrySet()) {
- String[] zoneAndSubZone = zoneEntry.getValue();
- if (zoneAndSubZone[0].equals(mainZone)) {
- subZones.add(zoneEntry.getKey());
+ Iterator<String[]> itZone = getZonesMap().iterator(true);
+ while (itZone.hasNext()) {
+ // "id";"facade";"zone";"periode";"serie";"comment";"map"
+ String[] tuple = itZone.next();
+ if (tuple[1].equals(facade)) {
+ subZones.add(tuple[0]);
}
}
@@ -391,18 +404,14 @@
RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
String resultZoneId = rsufiResult.getZone();
if (subZones.contains(resultZoneId)) {
- String surveyName = projectService.getProjectSurveyName(resultFile, rsufiResult);
- String zoneid = resultZoneId + "-" + surveyName;
-
+ String zoneid = resultZoneId;
+
// get zone name
- String zoneName = "";
- for (Map.Entry<String, String[]> zoneEntry : getZonesMap().entrySet()) {
- if (zoneEntry.getKey().equals(resultZoneId)) {
- zoneName = zoneEntry.getValue()[1];
- }
- }
-
- zoneName += " - " + surveyName;
+ // "id";"facade";"zone";"periode";"serie";"comment";"map"
+ int zoneIndex = getZonesMap().indexOf(zoneid);
+ String[] zoneData = getZonesMap().get(zoneIndex);
+ String zoneName = zoneData[2] + " - " + zoneData[3] + " - " + zoneData[4];
+
surveyForZone.put(zoneid, zoneName);
}
}
@@ -421,7 +430,7 @@
/**
* Recuperer la liste des populations pour une zone donnée.
*
- * @param zone zone (zoneid-surveyname)
+ * @param zone zone id
* @return map species nom info>nom officiel
* @throws CoserBusinessException
*/
@@ -429,9 +438,6 @@
Map<String, String> result = new TreeMap<String, String>();
- String zoneId = zone.substring(0, zone.indexOf('-'));
- String survey = zone.substring(zone.indexOf('-') + 1);
-
// parcours des resultats disponibles
File projectsDirectory = config.getWebProjectsDirectory();
File[] projectFiles = projectsDirectory.listFiles();
@@ -455,18 +461,14 @@
RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
// extraction des especes pour le résultat demandé
- if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zoneId)) {
+ if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zone)) {
// load project (without data to get reftax data)
Project project = projectService.openProject(projectFile.getName(), projectsDirectory);
- // get survey name (other condition)
- String surveyName = projectService.getProjectSurveyName(resultFile, rsufiResult);
- if (surveyName.equals(survey)) {
- Map<String, String> resultSpecies = getRsufiResultSpecies(project, resultFile, rsufiResult);
- result.putAll(resultSpecies);
- break;
- }
+ Map<String, String> resultSpecies = getRsufiResultSpecies(project, resultFile, rsufiResult);
+ result.putAll(resultSpecies);
+ break;
}
}
}
@@ -533,7 +535,7 @@
* Retourne les indicateurs calculés avec leurs traductions scientifique
* pour la zone et l'especes souhaitées.
*
- * @param zone zone (zoneid-surveyname)
+ * @param zone zone id
* @param species especes (if {@code null} look for com indicators
* @param locale locale ({@code fr} ou {@code en})
* @return la liste des indicateurs
@@ -542,9 +544,6 @@
public Map<String, String> getIndicators(String zone, String species, String locale) throws CoserBusinessException {
Map<String, String> indicators = new TreeMap<String, String>();
- String zoneId = zone.substring(0, zone.indexOf('-'));
- String survey = zone.substring(zone.indexOf('-') + 1);
-
// parcours des resultats disponibles
File projectsDirectory = config.getWebProjectsDirectory();
File[] projectFiles = projectsDirectory.listFiles();
@@ -568,24 +567,18 @@
RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
// extraction des especes pour le résultat demandé
- if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zoneId)) {
+ if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zone)) {
- // get survey name (other condition)
- String surveyName = projectService.getProjectSurveyName(resultFile, rsufiResult);
-
- // data loading not necessary here
- if (surveyName.equals(survey)) {
- Map<String, String> resultIndicators = null;
-
- if (species == null) {
- resultIndicators = getRsufiResultComIndicators(resultFile, rsufiResult, locale);
- }
- else {
- resultIndicators = getRsufiResultPopIndicators(resultFile, rsufiResult, species, locale);
- }
- indicators.putAll(resultIndicators);
- break;
+ Map<String, String> resultIndicators = null;
+
+ if (species == null) {
+ resultIndicators = getRsufiResultComIndicators(resultFile, rsufiResult, locale);
}
+ else {
+ resultIndicators = getRsufiResultPopIndicators(resultFile, rsufiResult, species, locale);
+ }
+ indicators.putAll(resultIndicators);
+ break;
}
}
}
@@ -684,7 +677,7 @@
* Retourne les indicateurs calculés avec leurs traductions scientifique
* pour la zone et l'especes souhaitées.
*
- * @param zone zone (zoneid-surveyname)
+ * @param zone zone id
* @param species especes (if {@code null} look for com indicators
* @param indicator indicator
* @param locale locale ({@code fr} ou {@code en})
@@ -694,9 +687,6 @@
public File getChart(String zone, String species, String indicator, String locale) throws CoserBusinessException {
File result = null;
- String zoneId = zone.substring(0, zone.indexOf('-'));
- String survey = zone.substring(zone.indexOf('-') + 1);
-
// parcours des resultats disponibles
File projectsDirectory = config.getWebProjectsDirectory();
File[] projectFiles = projectsDirectory.listFiles();
@@ -720,21 +710,15 @@
RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
// extraction des especes pour le résultat demandé
- if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zoneId)) {
+ if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zone)) {
- // get survey name (other condition)
- String surveyName = projectService.getProjectSurveyName(resultFile, rsufiResult);
-
- // data loading not necessary here
- if (surveyName.equals(survey)) {
- if (species == null) {
- result = publicationService.getRsufiResultComChart(resultFile, rsufiResult, indicator, locale);
- }
- else {
- result = publicationService.getRsufiResultPopChart(resultFile, rsufiResult, species, indicator, locale);
- }
- break;
+ if (species == null) {
+ result = publicationService.getRsufiResultComChart(resultFile, rsufiResult, indicator, locale);
}
+ else {
+ result = publicationService.getRsufiResultPopChart(resultFile, rsufiResult, species, indicator, locale);
+ }
+ break;
}
}
}
@@ -762,9 +746,6 @@
File result = null;
- String zoneId = zone.substring(0, zone.indexOf('-'));
- String survey = zone.substring(zone.indexOf('-') + 1);
-
// parcours des resultats disponibles
File projectsDirectory = config.getWebProjectsDirectory();
File[] projectFiles = projectsDirectory.listFiles();
@@ -788,16 +769,14 @@
RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
// extraction des especes pour le résultat demandé
- if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zoneId)) {
+ if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zone)) {
// get survey name (other condition)
String surveyName = projectService.getProjectSurveyName(resultFile, rsufiResult);
- if (surveyName.equals(survey)) {
- String mapName = survey + "_" + species.toUpperCase() + ".png";
- File mapsDirectory = new File(resultFile, CoserConstants.STORAGE_MAPS_DIRECTORY);
- result = new File(mapsDirectory, mapName);
- }
+ String mapName = surveyName + "_" + species.toUpperCase() + ".png";
+ File mapsDirectory = new File(resultFile, CoserConstants.STORAGE_MAPS_DIRECTORY);
+ result = new File(mapsDirectory, mapName);
}
}
}
1
0
r498 - in trunk: coser-business/src/test/java/fr/ifremer/coser/services coser-web/src/main/java/fr/ifremer/coser/web coser-web/src/main/java/fr/ifremer/coser/web/actions/com coser-web/src/main/java/fr/ifremer/coser/web/actions/map coser-web/src/main/java/fr/ifremer/coser/web/actions/pop coser-web/src/main/webapp/WEB-INF/content/com coser-web/src/main/webapp/WEB-INF/content/map coser-web/src/main/webapp/WEB-INF/content/pop
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
12 Jan '11
Author: chatellier
Date: 2011-01-12 09:23:01 +0000 (Wed, 12 Jan 2011)
New Revision: 498
Log:
Refactoring zone>facade, subzone > zone
Modified:
trunk/coser-business/src/test/java/fr/ifremer/coser/services/ProjectServiceTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDataAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/SubzoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapDataAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SubzoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDataAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SubzoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java
trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp
Modified: trunk/coser-business/src/test/java/fr/ifremer/coser/services/ProjectServiceTest.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/services/ProjectServiceTest.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/services/ProjectServiceTest.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -460,20 +460,4 @@
MatrixND matrix = projectService.getLengthStructure(project, selection);
Assert.assertNotNull(matrix);
}
-
- /**
- * Test la recuperation du nom de la campagne.
- *
- * @throws CoserBusinessException
- */
- @Test
- public void getProjectSurveyName() throws CoserBusinessException {
- Project project = createTestProject(projectService, true);
- String survey = projectService.getProjectSurveyName(project.getControl());
- Assert.assertEquals("COSER_TEST", survey);
-
- Selection selection = projectService.initProjectSelection(project);
- survey = projectService.getProjectSurveyName(selection);
- Assert.assertEquals("COSER_TEST", survey);
- }
}
Modified: trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -27,7 +27,6 @@
import java.io.File;
import java.net.URL;
-import java.util.Map;
import org.apache.commons.collections.map.MultiKeyMap;
import org.junit.Assert;
@@ -35,6 +34,7 @@
import org.junit.Test;
import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.storage.DataStorage;
/**
* Test du service de l'interface web.
@@ -82,7 +82,7 @@
*/
@Test
public void testGetZones() throws CoserBusinessException {
- Map<String, String[]> zones = webService.getZonesMap();
+ DataStorage zones = webService.getZonesMap();
Assert.assertEquals(16, zones.size());
}
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 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
@@ -25,7 +25,6 @@
import org.nuiton.i18n.I18n;
import org.nuiton.util.ArgumentsParserException;
-import fr.ifremer.coser.services.PublicationService;
import fr.ifremer.coser.services.WebService;
/**
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphAction.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphAction.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -28,22 +28,6 @@
* 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$
@@ -60,8 +44,6 @@
protected String indicator;
- protected String chartUrl;
-
public String getZone() {
return zone;
}
@@ -80,7 +62,6 @@
@Override
public String execute() {
-
return SUCCESS;
}
}
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDataAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDataAction.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDataAction.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -42,22 +42,6 @@
* 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$
@@ -71,7 +55,7 @@
private static final long serialVersionUID = 3385467755357775199L;
protected String zone;
-
+
protected String indicator;
protected String chartUrl;
@@ -91,12 +75,12 @@
public void setIndicator(String indicator) {
this.indicator = indicator;
}
-
+
@Action(results= {@Result(type="stream", params={"contentType", "image/png", "inputName", "inputStream"})})
public String execute() {
return SUCCESS;
}
-
+
public InputStream getInputStream() {
WebService webService = ServiceFactory.getWebService();
@@ -112,7 +96,7 @@
} catch (FileNotFoundException ex) {
throw new CoserWebException("Can't get map file", ex);
}
-
+
return input;
}
}
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/SubzoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/SubzoneAction.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/SubzoneAction.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -45,10 +45,10 @@
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
- protected String mainZone;
+ protected String facade;
- public void setMainZone(String mainZone) {
- this.mainZone = mainZone;
+ public void setFacade(String facade) {
+ this.facade = facade;
}
protected Map<String, String> zones;
@@ -65,7 +65,7 @@
// renvoi la liste des id subzone-survey et leurs label
// associé
- zones = webService.getSurveysForZone(mainZone);
+ zones = webService.getZoneForFacade(facade);
} catch (CoserBusinessException ex) {
throw new CoserWebException("Can't get zone map", ex);
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -22,7 +22,6 @@
package fr.ifremer.coser.web.actions.com;
-import java.util.HashMap;
import java.util.Map;
import com.opensymphony.xwork2.ActionSupport;
@@ -33,7 +32,7 @@
import fr.ifremer.coser.web.ServiceFactory;
/**
- * Action index, affiche la liste des zones majeures (main zone).
+ * Action index, affiche la liste des facades majeures.
*
* @author chatellier
* @version $Revision$
@@ -46,25 +45,21 @@
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
- protected Map<String, String> mainZones;
+ protected Map<String, String> facades;
- public Map<String, String> getMainZones() {
- return mainZones;
+ public Map<String, String> getFacades() {
+ return facades;
}
@Override
public String execute() {
- mainZones = new HashMap<String, String>();
-
WebService webService = ServiceFactory.getWebService();
try {
- Map<String, String[]> zonesMap = webService.getZonesMap();
+
+ // renvoi la liste des facadeid et leur label associé
+ facades = webService.getFacades();
- for (Map.Entry<String, String[]> zoneMapEntry : zonesMap.entrySet()) {
- mainZones.put(zoneMapEntry.getValue()[0], zoneMapEntry.getValue()[0]);
- }
-
} catch (CoserBusinessException ex) {
throw new CoserWebException("Can't get zone map", ex);
}
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapDataAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapDataAction.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapDataAction.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -26,9 +26,7 @@
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
-import java.io.OutputStream;
-import org.apache.commons.io.IOUtils;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SubzoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SubzoneAction.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SubzoneAction.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -45,10 +45,10 @@
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
- protected String mainZone;
+ protected String facade;
- public void setMainZone(String mainZone) {
- this.mainZone = mainZone;
+ public void setFacade(String facade) {
+ this.facade = facade;
}
protected Map<String, String> zones;
@@ -65,7 +65,7 @@
// renvoi la liste des id subzone-survey et leurs label
// associé
- zones = webService.getSurveysForZone(mainZone);
+ zones = webService.getZoneForFacade(facade);
} catch (CoserBusinessException ex) {
throw new CoserWebException("Can't get zone map", ex);
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -22,7 +22,6 @@
package fr.ifremer.coser.web.actions.map;
-import java.util.HashMap;
import java.util.Map;
import com.opensymphony.xwork2.ActionSupport;
@@ -33,7 +32,7 @@
import fr.ifremer.coser.web.ServiceFactory;
/**
- * Action index, affiche la liste des zones majeures (main zone).
+ * Action index, affiche la liste des facades majeures.
*
* @author chatellier
* @version $Revision$
@@ -46,25 +45,20 @@
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
- protected Map<String, String> mainZones;
+ protected Map<String, String> facades;
- public Map<String, String> getMainZones() {
- return mainZones;
+ public Map<String, String> getFacades() {
+ return facades;
}
@Override
public String execute() {
- mainZones = new HashMap<String, String>();
-
WebService webService = ServiceFactory.getWebService();
try {
- Map<String, String[]> zonesMap = webService.getZonesMap();
+ // renvoi la liste des facadeid et leur label associé
+ facades = webService.getFacades();
- for (Map.Entry<String, String[]> zoneMapEntry : zonesMap.entrySet()) {
- mainZones.put(zoneMapEntry.getValue()[0], zoneMapEntry.getValue()[0]);
- }
-
} catch (CoserBusinessException ex) {
throw new CoserWebException("Can't get zone map", ex);
}
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphAction.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphAction.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -24,29 +24,10 @@
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$
@@ -65,8 +46,6 @@
protected String indicator;
- protected String chartUrl;
-
public String getZone() {
return zone;
}
@@ -93,30 +72,6 @@
@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=Species";
- // 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";
- // taille de la courbe
- chartUrl += "&chls=2";
- // titre du graphique
- chartUrl += "&chtt=" + zone + ";" + species + ";" + indicator;*/
-
return SUCCESS;
}
}
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDataAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDataAction.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDataAction.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -34,9 +34,7 @@
import com.opensymphony.xwork2.ActionSupport;
import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.PublicationService;
import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebConfig;
import fr.ifremer.coser.web.CoserWebException;
import fr.ifremer.coser.web.ServiceFactory;
@@ -44,22 +42,6 @@
* 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$
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SubzoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SubzoneAction.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SubzoneAction.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -45,10 +45,10 @@
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
- protected String mainZone;
+ protected String facade;
- public void setMainZone(String mainZone) {
- this.mainZone = mainZone;
+ public void setFacade(String facade) {
+ this.facade = facade;
}
protected Map<String, String> zones;
@@ -65,7 +65,7 @@
// renvoi la liste des id subzone-survey et leurs label
// associé
- zones = webService.getSurveysForZone(mainZone);
+ zones = webService.getZoneForFacade(facade);
} catch (CoserBusinessException ex) {
throw new CoserWebException("Can't get zone map", ex);
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java 2011-01-12 09:23:01 UTC (rev 498)
@@ -22,7 +22,6 @@
package fr.ifremer.coser.web.actions.pop;
-import java.util.HashMap;
import java.util.Map;
import com.opensymphony.xwork2.ActionSupport;
@@ -33,7 +32,7 @@
import fr.ifremer.coser.web.ServiceFactory;
/**
- * Action index, affiche la liste des zones majeures (main zone).
+ * Action index, affiche la liste des facades majeures.
*
* @author chatellier
* @version $Revision$
@@ -46,25 +45,20 @@
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
- protected Map<String, String> mainZones;
+ protected Map<String, String> facades;
- public Map<String, String> getMainZones() {
- return mainZones;
+ public Map<String, String> getFacades() {
+ return facades;
}
@Override
public String execute() {
- mainZones = new HashMap<String, String>();
-
WebService webService = ServiceFactory.getWebService();
try {
- Map<String, String[]> zonesMap = webService.getZonesMap();
+ // renvoi la liste des facadeid et leur label associé
+ facades = webService.getFacades();
- for (Map.Entry<String, String[]> zoneMapEntry : zonesMap.entrySet()) {
- mainZones.put(zoneMapEntry.getValue()[0], zoneMapEntry.getValue()[0]);
- }
-
} catch (CoserBusinessException ex) {
throw new CoserWebException("Can't get zone map", ex);
}
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp 2011-01-12 09:23:01 UTC (rev 498)
@@ -35,7 +35,7 @@
<br />
<s:form action="subzone" method="get">
- <s:select name="mainZone" list="mainZones" label="Select a zone" />
+ <s:select name="facade" list="facades" label="Select a facade" />
<s:submit label="Suite"/>
</s:form>
</body>
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp 2011-01-12 09:23:01 UTC (rev 498)
@@ -35,7 +35,7 @@
<br />
<s:form action="subzone" method="get">
- <s:select name="mainZone" list="mainZones" label="Select a zone" />
+ <s:select name="facade" list="facades" label="Select a facade" />
<s:submit label="Suite"/>
</s:form>
</body>
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp 2011-01-12 09:21:35 UTC (rev 497)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp 2011-01-12 09:23:01 UTC (rev 498)
@@ -35,7 +35,7 @@
<br />
<s:form action="subzone" method="get">
- <s:select name="mainZone" list="mainZones" label="Select a zone" />
+ <s:select name="facade" list="facades" label="Select a facade" />
<s:submit label="Suite"/>
</s:form>
</body>
1
0
r497 - trunk/coser-business/src/main/java/fr/ifremer/coser/services
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
12 Jan '11
Author: chatellier
Date: 2011-01-12 09:21:35 +0000 (Wed, 12 Jan 2011)
New Revision: 497
Log:
Label axis verticaux
Modified:
trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java 2011-01-12 09:20:31 UTC (rev 496)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java 2011-01-12 09:21:35 UTC (rev 497)
@@ -45,7 +45,6 @@
import java.util.TreeMap;
import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.collections.map.MultiKeyMap;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
@@ -53,6 +52,7 @@
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.CategoryAxis;
+import org.jfree.chart.axis.CategoryLabelPositions;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.labels.CategoryToolTipGenerator;
@@ -673,7 +673,6 @@
String indicatorCode = tuple[1];
if (indicatorCode.equals(indicator)) {
Double estimation = Double.parseDouble(tuple[5]);
- //Double ecart = estimation * 0.97;
Double ecart = Double.parseDouble(tuple[6]);
String year = tuple[4];
statisticalDataset.add(estimation, ecart, "Serie1", year);
@@ -684,7 +683,7 @@
CategoryAxis categoryAxis = new CategoryAxis(_("coser.business.common.year"));
categoryAxis.setCategoryMargin(0);
// label horizontaux
- //categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
+ categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
ValueAxis valueAxis = new NumberAxis(_("coser.business.common.number"));
valueAxis.setUpperMargin(0.1);
@@ -739,7 +738,6 @@
String indicatorCode = tuple[1];
if (speciesCode.equals(species) && indicatorCode.equals(indicator)) {
Double estimation = Double.parseDouble(tuple[6]);
- //Double ecart = estimation * 0.97;
Double ecart = Double.parseDouble(tuple[7]);
String year = tuple[5];
statisticalDataset.add(estimation, ecart, "Serie1", year);
@@ -750,7 +748,7 @@
CategoryAxis categoryAxis = new CategoryAxis(_("coser.business.common.year"));
categoryAxis.setCategoryMargin(0);
// label horizontaux
- //categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
+ categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
ValueAxis valueAxis = new NumberAxis(_("coser.business.common.number"));
valueAxis.setUpperMargin(0.1);
1
0
r496 - trunk/coser-business/src/main/java/fr/ifremer/coser/bean
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
by chatellier@users.labs.libre-entreprise.org 12 Jan '11
12 Jan '11
Author: chatellier
Date: 2011-01-12 09:20:31 +0000 (Wed, 12 Jan 2011)
New Revision: 496
Log:
Add creationDate, dataAllowed, and mapsReferenceResult attribute on rsufi result
Modified:
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractDataContainer.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractEntity.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Control.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/RSufiResult.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Selection.java
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractDataContainer.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractDataContainer.java 2011-01-10 17:52:00 UTC (rev 495)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractDataContainer.java 2011-01-12 09:20:31 UTC (rev 496)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 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
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractEntity.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractEntity.java 2011-01-10 17:52:00 UTC (rev 495)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractEntity.java 2011-01-12 09:20:31 UTC (rev 496)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 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
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Control.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Control.java 2011-01-10 17:52:00 UTC (rev 495)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Control.java 2011-01-12 09:20:31 UTC (rev 496)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 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
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java 2011-01-10 17:52:00 UTC (rev 495)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java 2011-01-12 09:20:31 UTC (rev 496)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 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
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/RSufiResult.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/RSufiResult.java 2011-01-10 17:52:00 UTC (rev 495)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/RSufiResult.java 2011-01-12 09:20:31 UTC (rev 496)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 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
@@ -25,6 +25,7 @@
package fr.ifremer.coser.bean;
+import java.util.Date;
import java.util.Properties;
/**
@@ -41,10 +42,14 @@
/** serialVersionUID. */
private static final long serialVersionUID = -1337710082675120199L;
+ // FIXME echatellier 20110111 compabilité avec les projets beta (a retirer pour la v1)
+ protected Date creationDate = new Date(0);
+
protected String name;
protected String rsufiVersion;
+ /** Zone d'application du resultat. */
protected String zone;
/** Utilisé seulement pour la validation (sinon, non valorisé). */
@@ -63,6 +68,20 @@
/** Result selected for web publication. */
protected boolean publishResult;
+ /** Result flaged as maps result. */
+ protected boolean mapsReferenceResult;
+
+ /** Data download allowed. */
+ protected boolean dataAllowed;
+
+ public Date getCreationDate() {
+ return creationDate;
+ }
+
+ public void setCreationDate(Date creationDate) {
+ this.creationDate = creationDate;
+ }
+
public String getName() {
return name;
}
@@ -142,7 +161,7 @@
public String getMapsPath() {
return mapsPath;
}
-
+
public void setPublishResult(boolean publishResult) {
boolean oldValue = this.publishResult;
this.publishResult = publishResult;
@@ -153,8 +172,31 @@
return publishResult;
}
+ public boolean isMapsReferenceResult() {
+ return mapsReferenceResult;
+ }
+
+ public void setMapsReferenceResult(boolean mapsReferenceResult) {
+ boolean oldValue = this.mapsReferenceResult;
+ this.mapsReferenceResult = mapsReferenceResult;
+ getPropertyChangeSupport().firePropertyChange("mapsReferenceResult", oldValue, mapsReferenceResult);
+ }
+
+ public boolean isDataAllowed() {
+ return dataAllowed;
+ }
+
+ public void setDataAllowed(boolean dataAllowed) {
+ boolean oldValue = this.dataAllowed;
+ this.dataAllowed = dataAllowed;
+ getPropertyChangeSupport().firePropertyChange("dataAllowed", oldValue, dataAllowed);
+ }
+
public Properties toProperties() {
Properties props = new Properties();
+ if (getCreationDate() != null) {
+ props.setProperty("result.creationdate", String.valueOf(creationDate.getTime()));
+ }
if (getRsufiVersion() != null) {
props.setProperty("result.rsufiversion", getRsufiVersion());
}
@@ -168,10 +210,16 @@
props.setProperty("result.estPopIndName", getEstPopIndName());
}
props.setProperty("result.publishResult", String.valueOf(isPublishResult()));
+ props.setProperty("result.dataAllowed", String.valueOf(isDataAllowed()));
+ props.setProperty("result.mapsReferenceResult", String.valueOf(isMapsReferenceResult()));
return props;
}
-
+
public void fromProperties(Properties props) {
+ if (props.containsKey("result.creationdate")) {
+ Date date = new Date(Long.parseLong(props.getProperty("result.creationdate")));
+ setCreationDate(date);
+ }
if (props.containsKey("result.rsufiversion")) {
setRsufiVersion(props.getProperty("result.rsufiversion"));
}
@@ -187,5 +235,11 @@
if (props.containsKey("result.publishResult")) {
setPublishResult(Boolean.parseBoolean(props.getProperty("result.publishResult")));
}
+ if (props.containsKey("result.dataAllowed")) {
+ setDataAllowed(Boolean.parseBoolean(props.getProperty("result.dataAllowed")));
+ }
+ if (props.containsKey("result.mapsReferenceResult")) {
+ setMapsReferenceResult(Boolean.parseBoolean(props.getProperty("result.mapsReferenceResult")));
+ }
}
}
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Selection.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Selection.java 2011-01-10 17:52:00 UTC (rev 495)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Selection.java 2011-01-12 09:20:31 UTC (rev 496)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 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
1
0
r495 - trunk/coser-business/src/main/java/fr/ifremer/coser/services
by chatellier@users.labs.libre-entreprise.org 10 Jan '11
by chatellier@users.labs.libre-entreprise.org 10 Jan '11
10 Jan '11
Author: chatellier
Date: 2011-01-10 17:52:00 +0000 (Mon, 10 Jan 2011)
New Revision: 495
Log:
Fix graphs for community
Modified:
trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java 2011-01-10 17:47:43 UTC (rev 494)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java 2011-01-10 17:52:00 UTC (rev 495)
@@ -660,10 +660,10 @@
File result = null;
// le fichier estcomind
- File estPopIndFile = new File(resultDirectory, rsufiResult.getEstPopIndName());
+ File estComIndFile = new File(resultDirectory, rsufiResult.getEstComIndName());
// Campagne Indicateur Liste Strate Annee Estimation EcartType CV
- DataStorage dataStorage = importService.loadCSVFile(estPopIndFile, CoserConstants.CSV_RESULT_SEPARATOR_CHAR);
+ DataStorage dataStorage = importService.loadCSVFile(estComIndFile, CoserConstants.CSV_RESULT_SEPARATOR_CHAR);
DefaultStatisticalCategoryDataset statisticalDataset = new DefaultStatisticalCategoryDataset();
Iterator<String[]> estPopIndIterator = dataStorage.iterator(true);
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 2011-01-10 17:47:43 UTC (rev 494)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java 2011-01-10 17:52:00 UTC (rev 495)
@@ -727,8 +727,6 @@
// data loading not necessary here
if (surveyName.equals(survey)) {
- Map<String, String> resultIndicators = null;
-
if (species == null) {
result = publicationService.getRsufiResultComChart(resultFile, rsufiResult, indicator, locale);
}
1
0
r494 - in trunk/coser-web/src/main/webapp/WEB-INF/content: . com
by chatellier@users.labs.libre-entreprise.org 10 Jan '11
by chatellier@users.labs.libre-entreprise.org 10 Jan '11
10 Jan '11
Author: chatellier
Date: 2011-01-10 17:47:43 +0000 (Mon, 10 Jan 2011)
New Revision: 494
Log:
Added:
trunk/coser-web/src/main/webapp/WEB-INF/content/com/
trunk/coser-web/src/main/webapp/WEB-INF/content/com/graph.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/com/indicator.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/com/subzone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp
Added: trunk/coser-web/src/main/webapp/WEB-INF/content/com/graph.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/com/graph.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/com/graph.jsp 2011-01-10 17:47:43 UTC (rev 494)
@@ -0,0 +1,40 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:url action='graph-data'>
+ <s:param name="zone" value="%{zone}" />
+ <s:param name="indicator" value="%{indicator}" />
+ </s:url>" />
+
+ </body>
+</html>
\ No newline at end of file
Added: trunk/coser-web/src/main/webapp/WEB-INF/content/com/indicator.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/com/indicator.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/com/indicator.jsp 2011-01-10 17:47:43 UTC (rev 494)
@@ -0,0 +1,44 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+ <img src="<s:url value='/images/zonesmap.jpg' />" />
+
+ <br />
+
+ <s:form action="graph" method="get">
+ <s:select name="indicator" list="indicators" label="Select an indicator" />
+ <s:hidden name="zone" property="zone"/>
+ <s:hidden name="species" property="species"/>
+ <s:submit label="Suite"/>
+ </s:form>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/coser-web/src/main/webapp/WEB-INF/content/com/subzone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/com/subzone.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/com/subzone.jsp 2011-01-10 17:47:43 UTC (rev 494)
@@ -0,0 +1,47 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:url value='/images/zonesmap.jpg' />" />
+
+ <br />
+
+ <s:if test="%{zones.isEmpty()}">
+ No result founds
+ </s:if>
+ <s:else>
+ <s:form action="indicator" method="get">
+ <s:select name="zone" list="zones" label="Select a sub zone" />
+ <s:submit label="Suite"/>
+ </s:form>
+ </s:else>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp (rev 0)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp 2011-01-10 17:47:43 UTC (rev 494)
@@ -0,0 +1,42 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 - 2011 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">
+ <head>
+ <title>Coser</title>
+ </head>
+ <body>
+
+ <img src="<s:url value='/images/zonesmap.jpg' />" />
+
+ <br />
+
+ <s:form action="subzone" method="get">
+ <s:select name="mainZone" list="mainZones" label="Select a zone" />
+ <s:submit label="Suite"/>
+ </s:form>
+ </body>
+</html>
\ No newline at end of file
1
0