Wao-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- 2357 discussions
[Suiviobsmer-commits] r178 - in trunk: suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl suiviobsmer-business/src/main/xmi suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages suiviobsmer-ui/src/main/webapp
by fdesbois@users.labs.libre-entreprise.org 08 Jan '10
by fdesbois@users.labs.libre-entreprise.org 08 Jan '10
08 Jan '10
Author: fdesbois
Date: 2010-01-08 15:02:58 +0000 (Fri, 08 Jan 2010)
New Revision: 178
Modified:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/ImportHelper.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSynthesisImpl.java
trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml
Log:
- Add validation for contact (on dataInputDate)
- Improve Imports with helper (using enums)
- Add synthese service first method to have data on realTides and expectedTides
- WARNING !! Add periodDate field in SampleMonth entity (put deprecated periodMonth and periodYear)
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/ImportHelper.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/ImportHelper.java 2010-01-07 16:15:13 UTC (rev 177)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/ImportHelper.java 2010-01-08 15:02:58 UTC (rev 178)
@@ -21,6 +21,8 @@
package fr.ifremer.suiviobsmer;
+import com.csvreader.CsvReader;
+import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -46,10 +48,17 @@
*/
public class ImportHelper {
+ public interface ImportHeader {
+
+ int forContactCsv();
+
+ String name();
+ }
+
/**
* CSV headers for Boat
*/
- public static enum BOAT {
+ public static enum BOAT implements ImportHeader {
/** Boat immatriculation **/
NAVS_COD(20),
/** Boat name **/
@@ -75,6 +84,7 @@
this.contactHeader = index;
}
+ @Override
public int forContactCsv() {
return contactHeader;
}
@@ -83,7 +93,7 @@
/**
* CSV headers for SamplingPlan
*/
- public static enum SAMPLING {
+ public static enum SAMPLING implements ImportHeader {
/** SampleRow code **/
PLAN_CODE(6),
/** Company name **/
@@ -119,6 +129,7 @@
this.contactHeader = index;
}
+ @Override
public int forContactCsv() {
return contactHeader;
}
@@ -127,7 +138,7 @@
/**
* CSV headers for FishingZone
*/
- public static enum FISHING_ZONE {
+ public static enum FISHING_ZONE implements ImportHeader {
/** FishingZone facade **/
PECHE_FACADE(10),
/** FishingZone sector **/
@@ -141,6 +152,7 @@
this.contactHeader = index;
}
+ @Override
public int forContactCsv() {
return contactHeader;
}
@@ -149,7 +161,7 @@
/**
* CSV headers for Contact
*/
- public static enum CONTACT {
+ public static enum CONTACT implements ImportHeader {
/** Contact code (create date time for existing contact) **/
CONT_CODE(0),
/** Contact create date **/
@@ -189,6 +201,7 @@
this.contactHeader = index;
}
+ @Override
public int forContactCsv() {
return contactHeader;
}
@@ -245,7 +258,8 @@
return mammals ? "X" : "";
}
- public static boolean parseContactMammals(String mammals) {
+ public static boolean parseContactMammals(CsvReader reader, ImportHeader header) throws IOException {
+ String mammals = read(reader, header);
return mammals.equals("X");
}
@@ -300,4 +314,13 @@
return System.currentTimeMillis();
}
+ public static String read(CsvReader reader, ImportHeader header) throws IOException {
+ return reader.get(header.name().trim());
+ }
+
+ public static int readInt(CsvReader reader, ImportHeader header) throws IOException {
+ String str = read(reader, header);
+ return Integer.parseInt(str);
+ }
+
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java 2010-01-07 16:15:13 UTC (rev 177)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java 2010-01-08 15:02:58 UTC (rev 178)
@@ -50,14 +50,73 @@
private static final long serialVersionUID = 1L;
@Override
+ @Deprecated
public void setPeriod(Date date) {
+ setPeriodDate(date);
+ }
+
+// @Override
+// public void setPeriodDate(Date date) {
+// periodDate = date;
+// periodMonth = getCalendar().get(Calendar.MONTH) +1;
+// periodYear = getCalendar().get(Calendar.YEAR);
+// }
+
+ protected Calendar getCalendar() {
Calendar calendar = new GregorianCalendar();
- calendar.setTime(date);
- setPeriodMonth(calendar.get(Calendar.MONTH));
- setPeriodYear(calendar.get(Calendar.YEAR));
+ if (getPeriodDate() != null) {
+ calendar.setTime(getPeriodDate());
+ }
+ return calendar;
}
/**
+ * @since 0.0.3 new attribute periodDate
+ * @deprecated
+ */
+ @Override
+ @Deprecated
+ public int getPeriodMonth() {
+ return getCalendar().get(Calendar.MONTH) + 1;
+ }
+
+ /**
+ * @since 0.0.3 new attribute periodDate
+ * @deprecated
+ */
+ @Override
+ @Deprecated
+ public int getPeriodYear() {
+ return getCalendar().get(Calendar.YEAR);
+ }
+
+ /**
+ * @since 0.0.3 new attribute periodDate
+ * @param month
+ * @deprecated
+ */
+ @Override
+ @Deprecated
+ public void setPeriodMonth(int month) {
+ Calendar calendar = getCalendar();
+ calendar.set(Calendar.MONTH, month - 1);
+ setPeriodDate(calendar.getTime());
+ }
+
+ /**
+ * @since 0.0.3 new attribute periodDate
+ * @param year
+ * @deprecated
+ */
+ @Override
+ @Deprecated
+ public void setPeriodYear(int year) {
+ Calendar calendar = getCalendar();
+ calendar.set(Calendar.YEAR, year);
+ setPeriodDate(calendar.getTime());
+ }
+
+ /**
* Method could be use to add some time for realTidesValue or
* remove time with a negative nbDays.
* If nbDays is negative and superior to the current value,
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2010-01-07 16:15:13 UTC (rev 177)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2010-01-08 15:02:58 UTC (rev 178)
@@ -80,7 +80,9 @@
}
Calendar ref = new GregorianCalendar();
ref.setTime(date);
+ log.info("Ref : " + date);
for (SampleMonth curr : getSampleMonth()) {
+ log.info("Curr month : " + curr.getPeriodDate() + " : " + curr.getPeriodMonth() + " / " + curr.getPeriodYear());
if (ref.get(Calendar.MONTH) == (curr.getPeriodMonth()-1) && ref.get(Calendar.YEAR) == curr.getPeriodYear()) {
return curr;
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java 2010-01-07 16:15:13 UTC (rev 177)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java 2010-01-08 15:02:58 UTC (rev 178)
@@ -49,7 +49,9 @@
*/
@Override
public String getFullName() {
- return getFirstName() + " " + getLastName();
+ String name = getFirstName() != null ? getFirstName() : "";
+ name += getLastName() != null ? " " + getLastName() : "";
+ return name;
}
/**
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2010-01-07 16:15:13 UTC (rev 177)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2010-01-08 15:02:58 UTC (rev 178)
@@ -368,8 +368,8 @@
while(reader.readRecord()) {
currRow++;
- String observerId = reader.get(CONTACT.OBSERV_ID.name());
- String state = reader.get(CONTACT.CONT_ETAT.name());
+ String observerId = ImportHelper.read(reader, CONTACT.OBSERV_ID);
+ String state = ImportHelper.read(reader, CONTACT.CONT_ETAT);
ContactState contactState = ContactState.createContactStateEnum(state);
@@ -395,12 +395,12 @@
}
if (company != null) {
- String rowCode = reader.get(SAMPLING.PLAN_CODE.name().trim());
+ String rowCode = ImportHelper.read(reader, SAMPLING.PLAN_CODE);
SampleRow row = rowDAO.findByProperties(SampleRow.CODE, rowCode, SampleRow.COMPANY, company);
if (row != null) {
- int boatImmatriculation = Integer.parseInt(reader.get(BOAT.NAVS_COD.name().trim()));
+ int boatImmatriculation = ImportHelper.readInt(reader, BOAT.NAVS_COD);
Boat boat = boatDAO.findByImmatriculation(boatImmatriculation);
@@ -439,10 +439,10 @@
Contact contact = null;
// Check if createDate exist
- String createDateString = reader.get(CONTACT.CONT_CREATION.name().trim());
+ String createDateString = ImportHelper.read(reader, CONTACT.CONT_CREATION);
//Date createDate = !StringUtils.isEmpty(createDateString) ? dateFormat.parse(createDateString) : null;
- String contactCode = reader.get(CONTACT.CONT_CODE.name().trim());
+ String contactCode = ImportHelper.read(reader, CONTACT.CONT_CODE);
Date createDate = ImportHelper.parseContactCreateDate(contactCode, createDateString);
if (log.isDebugEnabled()) {
log.debug("Ligne " + currRow + " : Create date : " + createDate);
@@ -467,17 +467,17 @@
Contact.BOAT, boat);
}
- String tideBeginString = reader.get(CONTACT.CONT_DEBUT_MAREE.name().trim());
- String tideEndString = reader.get(CONTACT.CONT_FIN_MAREE.name().trim());
- String nbObservantsString = reader.get(CONTACT.CONT_NB_OBSERV.name().trim());
+ String tideBeginString = ImportHelper.read(reader, CONTACT.CONT_DEBUT_MAREE);
+ String tideEndString = ImportHelper.read(reader, CONTACT.CONT_FIN_MAREE);
+ String nbObservantsString = ImportHelper.read(reader, CONTACT.CONT_NB_OBSERV);
Date tideBegin = !StringUtils.isEmpty(tideBeginString) ? dateFormat.parse(tideBeginString) : null;
Date tideEnd = !StringUtils.isEmpty(tideEndString) ? dateFormat.parse(tideEndString) : null;
int nbObservants = !StringUtils.isEmpty(nbObservantsString) ? Integer.parseInt(nbObservantsString) : 0;
boolean mammalsCapture =
- ImportHelper.parseContactMammals(reader.get(CONTACT.CONT_MAM_CAPT.name().trim()));
+ ImportHelper.parseContactMammals(reader, CONTACT.CONT_MAM_CAPT);
boolean mammalsObsv =
- ImportHelper.parseContactMammals(reader.get(CONTACT.CONT_MAM_OBS.name().trim()));
+ ImportHelper.parseContactMammals(reader, CONTACT.CONT_MAM_OBS);
contact.setState(state);
contact.setTideBeginDate(tideBegin);
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSynthesisImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSynthesisImpl.java 2010-01-07 16:15:13 UTC (rev 177)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSynthesisImpl.java 2010-01-08 15:02:58 UTC (rev 178)
@@ -1,12 +1,24 @@
package fr.ifremer.suiviobsmer.impl;
+import fr.ifremer.suiviobsmer.SuiviObsmerContext;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
+import fr.ifremer.suiviobsmer.SuiviObsmerModelDAOHelper;
+import fr.ifremer.suiviobsmer.entity.SampleMonth;
+import fr.ifremer.suiviobsmer.entity.SampleRow;
+import fr.ifremer.suiviobsmer.entity.SampleRowDAO;
import fr.ifremer.suiviobsmer.services.ServiceSynthesis;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-import java.util.Map;
+import java.util.SortedMap;
+import java.util.TreeMap;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.framework.TopiaQuery;
+import org.nuiton.topia.framework.TopiaQuery.Op;
import org.nuiton.util.PeriodDates;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* ServiceSynthesisImpl
@@ -21,9 +33,59 @@
*/
public class ServiceSynthesisImpl implements ServiceSynthesis {
+ private static final Logger log = LoggerFactory.getLogger(ServiceSynthesisImpl.class);
+
+ protected TopiaContext rootContext;
+
+ public ServiceSynthesisImpl() throws SuiviObsmerException {
+ rootContext = SuiviObsmerContext.getTopiaRootContext();
+ }
+
@Override
- public List<Map<Date, Integer>> getDataSampling(PeriodDates period) throws SuiviObsmerException {
- throw new UnsupportedOperationException("Not supported yet.");
+ public List<SortedMap<Date, Integer>> getDataSampling(PeriodDates period) throws SuiviObsmerException {
+ TopiaContext transaction = null;
+ List<SortedMap<Date, Integer>> results = new ArrayList<SortedMap<Date, Integer>>();
+ try {
+ transaction = rootContext.beginTransaction();
+
+ if (period.getFromDate() == null || period.getThruDate() == null) {
+ return results;
+ }
+
+ SortedMap<Date, Integer> serie1 = new TreeMap<Date,Integer>();
+ SortedMap<Date, Integer> serie2 = new TreeMap<Date,Integer>();
+ results.add(serie1);
+ results.add(serie2);
+
+ // Prepare results
+ for (Date month : period.getMonths()) {
+ serie1.put(month, 0);
+ serie2.put(month, 0);
+ }
+
+ SampleRowDAO dao = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
+ TopiaQuery<SampleRow> query = dao.createQuery("S").
+ addFrom(SampleMonth.class.getName() + " M").add("M IN elements(S)").
+ add("M.periodDate", Op.GE, period.getFromDate()).
+ add("M.periodDate", Op.LE, period.getThruDate()).
+ addGroup("M.periodDate").addOrder("M.periodDate");
+
+ List<Object[]> res =
+ (List<Object[]>)query.setSelect("M.periodDate, SUM(M.realTidesValue), SUM(M.expectedTidesValue)").execute();
+
+ for (Object[] tab : res) {
+ Date date = (Date)tab[0];
+ int sumReal = (Integer)tab[1];
+ int sumExpected = (Integer)tab[2];
+ serie1.put(date, sumExpected);
+ serie2.put(date, sumReal);
+ }
+
+ transaction.closeContext();
+ } catch (Exception eee) {
+
+ }
+ return results;
}
}
Modified: trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
===================================================================
(Binary files differ)
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2010-01-07 16:15:13 UTC (rev 177)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2010-01-08 15:02:58 UTC (rev 178)
@@ -227,7 +227,7 @@
@Log
public Object onChangeFromFacadeName(String value) throws SuiviObsmerException {
- if (!StringUtils.isEmpty(value)) {
+ if (!StringUtils.isEmpty(value.trim())) {
// Reset contactFilter to avoid strange behavior (cause of no form submit)
contactFilter = null;
// set facadeName selected in contactFilter
@@ -527,6 +527,9 @@
@InjectComponent
private Field comment;
+ @InjectComponent
+ private Field inputDate;
+
@Log
void onValidateFormFromContactsForm() {
contactsForm.clearErrors();
@@ -538,6 +541,7 @@
Date begin = contact.getTideBeginDate();
Date end = contact.getTideEndDate();
+ Date input = contact.getDataInputDate();
Program program = contact.getSampleRow().getProgram();
DateFormat dateFormat = new SimpleDateFormat("MM/yyyy");
@@ -563,6 +567,14 @@
contactsForm.recordError(endDate, "La date de fin de la marée ne peut pas être postérieure à la date du jour");
}
+ if (end != null && input != null && end.after(input)) {
+ contactsForm.recordError(inputDate, "La date de saisie des données ne peut pas être antérieure à la date de fin de la marée");
+ }
+
+ if (input != null && input.after(current)) {
+ contactsForm.recordError(inputDate, "La date de saisie des données ne peut pas être postérieure à la date du jour");
+ }
+
// Non abouti, Refus ou Refus Définitif
if (contactState.isUnfinishedState()) {
if (!StringUtils.isEmpty(contact.getComment())) {
Modified: trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml 2010-01-07 16:15:13 UTC (rev 177)
+++ trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml 2010-01-08 15:02:58 UTC (rev 178)
@@ -54,11 +54,11 @@
<input t:type="checkbox" t:id="companyAccepted" value="contactFilter.companyAccepted" />
<t:label t:for="companyAccepted">
<img src="${asset:context:}/img/true-22px.png" title="Accepté par la société" />
- </t:label>
+ </t:label>
<input t:type="checkbox" t:id="companyRefused" value="contactFilter.companyRefused" />
<t:label t:for="companyRefused">
<img src="${asset:context:}/img/false-22px.png" title="Refusé par la société" />
- </t:label>
+ </t:label>
<input t:type="checkbox" t:id="companyUndefined" value="contactFilter.companyUndefined" />
<t:label t:for="companyUndefined">
<img src="${asset:context:}/img/help-22px.png" title="Non validé par la société" />
@@ -68,11 +68,11 @@
<input t:type="checkbox" t:id="programAccepted" value="contactFilter.programAccepted" />
<t:label t:for="programAccepted">
<img src="${asset:context:}/img/true-22px.png" title="Accepté par le programme" />
- </t:label>
+ </t:label>
<input t:type="checkbox" t:id="programRefused" value="contactFilter.programRefused" />
<t:label t:for="programRefused">
<img src="${asset:context:}/img/false-22px.png" title="Refusé par le programme" />
- </t:label>
+ </t:label>
<input t:type="checkbox" t:id="programUndefined" value="contactFilter.programUndefined" />
<t:label t:for="programUndefined">
<img src="${asset:context:}/img/help-22px.png" title="Non validé par le programme" />
1
0
[Suiviobsmer-commits] r177 - trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages
by fdesbois@users.labs.libre-entreprise.org 07 Jan '10
by fdesbois@users.labs.libre-entreprise.org 07 Jan '10
07 Jan '10
Author: fdesbois
Date: 2010-01-07 16:15:13 +0000 (Thu, 07 Jan 2010)
New Revision: 177
Modified:
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java
Log:
missing
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java 2010-01-07 16:14:09 UTC (rev 176)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java 2010-01-07 16:15:13 UTC (rev 177)
@@ -44,9 +44,9 @@
return false;
}
- public JFreeChart getTestChart() {
-
- }
+// public JFreeChart getTestChart() {
+//
+// }
}
1
0
07 Jan '10
Author: fdesbois
Date: 2010-01-07 16:14:09 +0000 (Thu, 07 Jan 2010)
New Revision: 176
Added:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSynthesisImpl.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Chart.java
Modified:
trunk/pom.xml
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/ImportHelper.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java
trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java
trunk/suiviobsmer-ui/src/main/webapp/Synthesis.tml
Log:
- Change filters hierarchy
- Create service for Synthesis
- Add Chart component in UI
- Use snapshots for EUGene (error on generated type) and Nuiton-utils (PeriodDates)
- The company is now considerated in SamplingPlan import
- The elligibleBoat for a contact is automatically created from a contact import
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/pom.xml 2010-01-07 16:14:09 UTC (rev 176)
@@ -238,11 +238,11 @@
<labs.id>154</labs.id>
<!-- libraries version -->
- <nuitonutils.version>1.1.2</nuitonutils.version>
+ <nuitonutils.version>1.1.3-SNAPSHOT</nuitonutils.version>
<topia.version>2.3.0-beta-4-SNAPSHOT</topia.version>
<license.version>2.0.0</license.version>
<helper.version>1.1.0</helper.version>
- <eugene.version>2.0.0-beta-2</eugene.version>
+ <eugene.version>2.0.0-beta-3-SNAPSHOT</eugene.version>
<tapestry.version>5.1.0.5</tapestry.version>
<!-- default license to use -->
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/ImportHelper.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/ImportHelper.java 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/ImportHelper.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -86,6 +86,8 @@
public static enum SAMPLING {
/** SampleRow code **/
PLAN_CODE(6),
+ /** Company name **/
+ SOCIETE_NOM(5),
/** Program code **/
PROGRAMME_CODE(7),
/** Program period begin **/
@@ -160,8 +162,6 @@
OBSERV_NOM(4),
/** Company id **/
//SOCIETE_ID,
- /** Company nom **/
- SOCIETE_NOM(5),
/** Contact state **/
CONT_ETAT(23),
/** Contact tide begin **/
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -43,6 +43,7 @@
import fr.ifremer.suiviobsmer.entity.ContactDAO;
import fr.ifremer.suiviobsmer.entity.ContactImpl;
import fr.ifremer.suiviobsmer.entity.ElligibleBoat;
+import fr.ifremer.suiviobsmer.entity.ElligibleBoatDAO;
import fr.ifremer.suiviobsmer.entity.FishingZone;
import fr.ifremer.suiviobsmer.entity.Profession;
import fr.ifremer.suiviobsmer.entity.Program;
@@ -292,7 +293,7 @@
record[CONTACT.OBSERV_ID.forContactCsv()] = observer.getLogin();
record[CONTACT.OBSERV_PRENOM.forContactCsv()] = observer.getFirstName();
record[CONTACT.OBSERV_NOM.forContactCsv()] = observer.getLastName();
- record[CONTACT.SOCIETE_NOM.forContactCsv()] = company.getName();
+ record[SAMPLING.SOCIETE_NOM.forContactCsv()] = company.getName();
// SampleRow part
SampleRow row = contact.getSampleRow();
@@ -394,36 +395,54 @@
}
if (company != null) {
- String rowCode = reader.get(SAMPLING.PLAN_CODE.name());
+ String rowCode = reader.get(SAMPLING.PLAN_CODE.name().trim());
SampleRow row = rowDAO.findByProperties(SampleRow.CODE, rowCode, SampleRow.COMPANY, company);
if (row != null) {
- int boatImmatriculation = Integer.parseInt(reader.get(BOAT.NAVS_COD.name()));
+ int boatImmatriculation = Integer.parseInt(reader.get(BOAT.NAVS_COD.name().trim()));
- // The boat must be elligible for the row
- TopiaQuery<Boat> boatQuery = boatDAO.createQuery("B").
- addFrom(ElligibleBoat.class.getName() + " E").
- add("E.sampleRow", row).add("E.boat = B").
- add(Boat.IMMATRICULATION, boatImmatriculation);
+ Boat boat = boatDAO.findByImmatriculation(boatImmatriculation);
- if (!user.getAdmin()) {
- // Constraint on companyActive for elligibleBoat for a simple user
- boatQuery.add("E.companyActive = :booleanTrue OR (E.companyActive IS NULL AND E.globalActive = :booleanTrue)").
- addParam("booleanTrue", Boolean.TRUE);
- }
+ if (boat != null) {
- Boat boat = boatQuery.executeToEntity();
+ ElligibleBoatDAO elligibleDAO = SuiviObsmerModelDAOHelper.getElligibleBoatDAO(transaction);
+ ElligibleBoat elligible = elligibleDAO.findByProperties(
+ ElligibleBoat.BOAT, boat, ElligibleBoat.SAMPLE_ROW, row);
- if (boat != null) {
+ if (elligible == null) {
+ // Create new elligible boat not active in a global way
+ elligible = elligibleDAO.create(
+ ElligibleBoat.BOAT, boat, ElligibleBoat.SAMPLE_ROW, row);
+ }
+ elligible.setCompanyActive(Boolean.TRUE);
+ // The boat must be elligible for the row
+// TopiaQuery<Boat> boatQuery = boatDAO.createQuery("B").
+// addFrom(ElligibleBoat.class.getName() + " E").
+// add("E.sampleRow", row).add("E.boat = B").
+// add(Boat.IMMATRICULATION, boatImmatriculation);
+//
+// if (!user.getAdmin()) {
+// // Constraint on companyActive for elligibleBoat for a simple user
+// boatQuery.add("E.companyActive = :booleanTrue OR (E.companyActive IS NULL AND E.globalActive = :booleanTrue)").
+// addParam("booleanTrue", Boolean.TRUE);
+// }
+//
+// Boat boat = boatQuery.executeToEntity();
+//
+// if (boat == null) {
+// ElligibleBoatDAO elligibleDAO = SuiviObsmerModelDAOHelper.getElligibleBoatDAO(transaction);
+//
+// }
+
Contact contact = null;
// Check if createDate exist
- String createDateString = reader.get(CONTACT.CONT_CREATION.name());
+ String createDateString = reader.get(CONTACT.CONT_CREATION.name().trim());
//Date createDate = !StringUtils.isEmpty(createDateString) ? dateFormat.parse(createDateString) : null;
- String contactCode = reader.get(CONTACT.CONT_CODE.name());
+ String contactCode = reader.get(CONTACT.CONT_CODE.name().trim());
Date createDate = ImportHelper.parseContactCreateDate(contactCode, createDateString);
if (log.isDebugEnabled()) {
log.debug("Ligne " + currRow + " : Create date : " + createDate);
@@ -440,25 +459,25 @@
}
// new contact to import
- if (contact == null) {
+ if (contact == null) {
contact = dao.create(
TopiaEntity.TOPIA_CREATE_DATE, createDate,
Contact.USER, observer,
Contact.SAMPLE_ROW, row,
Contact.BOAT, boat);
}
-
- String tideBeginString = reader.get(CONTACT.CONT_DEBUT_MAREE.name());
- String tideEndString = reader.get(CONTACT.CONT_FIN_MAREE.name());
- String nbObservantsString = reader.get(CONTACT.CONT_NB_OBSERV.name());
+ String tideBeginString = reader.get(CONTACT.CONT_DEBUT_MAREE.name().trim());
+ String tideEndString = reader.get(CONTACT.CONT_FIN_MAREE.name().trim());
+ String nbObservantsString = reader.get(CONTACT.CONT_NB_OBSERV.name().trim());
+
Date tideBegin = !StringUtils.isEmpty(tideBeginString) ? dateFormat.parse(tideBeginString) : null;
Date tideEnd = !StringUtils.isEmpty(tideEndString) ? dateFormat.parse(tideEndString) : null;
int nbObservants = !StringUtils.isEmpty(nbObservantsString) ? Integer.parseInt(nbObservantsString) : 0;
boolean mammalsCapture =
- ImportHelper.parseContactMammals(reader.get(CONTACT.CONT_MAM_CAPT.name()));
+ ImportHelper.parseContactMammals(reader.get(CONTACT.CONT_MAM_CAPT.name().trim()));
boolean mammalsObsv =
- ImportHelper.parseContactMammals(reader.get(CONTACT.CONT_MAM_OBS.name()));
+ ImportHelper.parseContactMammals(reader.get(CONTACT.CONT_MAM_OBS.name().trim()));
contact.setState(state);
contact.setTideBeginDate(tideBegin);
@@ -471,8 +490,7 @@
} else if (log.isWarnEnabled()) {
log.warn("Import contact ligne " + currRow + " : " +
- "Navire inexistant ou incompatible avec la ligne d'échantillon " +
- "pour l'immatriculation : " + boatImmatriculation);
+ "Navire inexistant avec l'immatriculation : " + boatImmatriculation);
}
} else if (log.isWarnEnabled()) {
log.warn("Import contact ligne " + currRow + " : " +
@@ -490,16 +508,6 @@
if (result % 1000 == 0) {
transaction.commitTransaction();
tic = ImportHelper.logTimeAndMemory(log, tic, "contacts ligne " + currRow);
-// if (log.isInfoEnabled()) {
-// log.info("RUNNING... Import contacts ligne " + currRow);
-// Runtime runtime = Runtime.getRuntime();
-// long mem = (runtime.totalMemory() - runtime.freeMemory()) / 1048576;
-// //long memMega = mem / 1024 / 1024;
-// log.info("Memory : " + mem + " Mo");
-// tic2 = System.currentTimeMillis();
-// log.info("Time : " + DurationFormatUtils.formatDurationHMS(tic2 - tic1));
-// tic1 = System.currentTimeMillis();
-// }
}
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -24,6 +24,8 @@
import com.csvreader.CsvReader;
import fr.ifremer.suiviobsmer.ImportHelper.FISHING_ZONE;
import fr.ifremer.suiviobsmer.ImportHelper.SAMPLING;
+import fr.ifremer.suiviobsmer.SuiviObsmerBusinessException;
+import fr.ifremer.suiviobsmer.SuiviObsmerBusinessException.Type;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
import fr.ifremer.suiviobsmer.SuiviObsmerModelDAOHelper;
import fr.ifremer.suiviobsmer.SuiviObsmerContext;
@@ -53,6 +55,7 @@
import org.nuiton.topia.persistence.TopiaEntity;
import org.nuiton.topia.persistence.util.EntityLoador;
import org.nuiton.util.DateUtils;
+import org.nuiton.util.PeriodDates;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -170,11 +173,11 @@
}
@Override
- public List<SampleRow> getSampleRowsOrderedByFishingZone(Date periodBegin, Date periodEnd, Company company) throws SuiviObsmerException {
+ public List<SampleRow> getSampleRowsOrderedByFishingZone(PeriodDates period, Company company) throws SuiviObsmerException {
TopiaContext transaction = null;
List<SampleRow> results = new ArrayList<SampleRow>();
try {
- if (periodBegin == null || periodEnd == null) {
+ if (period.getFromDate() == null || period.getThruDate() == null) {
throw new IllegalArgumentException("PeriodBegin date and/or PeriodEnd date can't be null !");
}
transaction = rootContext.beginTransaction();
@@ -189,9 +192,9 @@
}
// Prepare period dates
- periodBegin = DateUtils.setFirstDayOfMonth(periodBegin);
- periodEnd = DateUtils.setLastDayOfMonth(periodEnd);
- query.add("S.program.periodBegin", Op.LT, periodEnd).add("S.program.periodEnd", Op.GT, periodBegin);
+ period.setDayOfMonthExtremities();
+ query.add("S.program.periodBegin", Op.LT, period.getThruDate()).
+ add("S.program.periodEnd", Op.GT, period.getFromDate());
// Order By facade, sector, districtCode, sampleRowCode
String zoneOrder = "F.facadeName, F.sectorName, F.districtCode";
@@ -369,7 +372,7 @@
int[] programBegin = getMonthAndYear(reader.get(SAMPLING.PROGRAMME_DEBUT.name()).trim());
int[] programEnd = getMonthAndYear(reader.get(SAMPLING.PROGRAMME_FIN.name()).trim());
String districts = reader.get(FISHING_ZONE.PECHE_DIVISION.name());
-
+
row = dao.findByCode(code);
// Refuse existing SampleRow
if (row != null) {
@@ -380,8 +383,8 @@
nbRefused++;
// Refuse Fishing zones empty
} else if (StringUtils.isEmpty(programName)) {
- throw new SuiviObsmerException(
- "Erreur à la ligne " + currRow + " [CODE = " + row.getCode() + "] : " +
+ throw new SuiviObsmerBusinessException(Type.IMPORT_ERROR, this.getClass(),
+ "Erreur à la ligne " + currRow + " [CODE = " + code + "] : " +
"Cette ligne n'est lié à aucun programme !");
//nbRefused++;
} else if (StringUtils.isEmpty(districts)) {
@@ -393,6 +396,20 @@
} else {
row = dao.create(SampleRow.CODE, code);
+ String companyName = reader.get(SAMPLING.SOCIETE_NOM.name()).trim();
+
+ // Create link with company if set in file
+ if (!StringUtils.isEmpty(companyName)) {
+ CompanyDAO companyDAO = SuiviObsmerModelDAOHelper.getCompanyDAO(transaction);
+ Company company = companyDAO.findByName(companyName);
+ if (company == null) {
+ throw new SuiviObsmerBusinessException(Type.IMPORT_ERROR, this.getClass(),
+ "Erreur à la ligne " + currRow + " [CODE = " + code + "] : " +
+ "La société portant le nom '" + companyName + "' n'existe pas dans l'application");
+ }
+ row.setCompany(company);
+ }
+
// Import program. Creation if not exist
Program program = importProgram(transaction, programName, programBegin, programEnd);
row.setProgram(program);
@@ -530,7 +547,7 @@
for (String districtCode : districtList) {
FishingZone zone = dao.findByDistrictCode(districtCode.trim());
if (zone == null) {
- throw new SuiviObsmerException(
+ throw new SuiviObsmerBusinessException(Type.IMPORT_ERROR, this.getClass(),
"Erreur à la ligne " + currRow + " [CODE = " + row.getCode() + "] : " +
"Cette ligne est lié à une zone inexistante : " + districtCode);
}
Added: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSynthesisImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSynthesisImpl.java (rev 0)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSynthesisImpl.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -0,0 +1,29 @@
+
+package fr.ifremer.suiviobsmer.impl;
+
+import fr.ifremer.suiviobsmer.SuiviObsmerException;
+import fr.ifremer.suiviobsmer.services.ServiceSynthesis;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import org.nuiton.util.PeriodDates;
+
+/**
+ * ServiceSynthesisImpl
+ *
+ * Created: 7 janv. 2010
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public class ServiceSynthesisImpl implements ServiceSynthesis {
+
+ @Override
+ public List<Map<Date, Integer>> getDataSampling(PeriodDates period) throws SuiviObsmerException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+}
Property changes on: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSynthesisImpl.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -38,6 +38,7 @@
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
+import org.nuiton.util.PeriodDates;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -57,7 +58,7 @@
private static final Logger log = LoggerFactory.getLogger(ServiceSamplingMock.class);
@Override
- public List<SampleRow> getSampleRowsOrderedByFishingZone(Date periodBegin, Date periodEnd, Company company) throws SuiviObsmerException {
+ public List<SampleRow> getSampleRowsOrderedByFishingZone(PeriodDates period, Company company) throws SuiviObsmerException {
return new ArrayList<SampleRow>();
}
Modified: trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
===================================================================
(Binary files differ)
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -180,6 +180,9 @@
FishingZone zoneIId = zoneDAO.create(FishingZone.DISTRICT_CODE, "IId");
FishingZone zoneIV = zoneDAO.create(FishingZone.DISTRICT_CODE, "IV");
FishingZone zoneI = zoneDAO.create(FishingZone.DISTRICT_CODE, "I");
+
+ CompanyDAO companyDAO = SuiviObsmerModelDAOHelper.getCompanyDAO(transaction);
+ companyDAO.create(Company.NAME, "TARTANPION");
transaction.commitTransaction();
ServiceSampling serviceSampling = new ServiceSamplingImpl();
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -209,18 +209,17 @@
InputStream input = getClass().getResourceAsStream("/import/zonesPeche.csv");
serviceReferential.importFishingZoneCsv(input);
- ServiceSampling serviceSampling = new ServiceSamplingImpl();
- input = getClass().getResourceAsStream("/import/echantillonnage.csv");
- serviceSampling.importSamplingPlanCsv(input);
-
- // Import doesn't set company
TopiaContext transaction = SuiviObsmerContext.getTopiaRootContext().beginTransaction();
-
// Create a company
CompanyDAO companyDAO = SuiviObsmerModelDAOHelper.getCompanyDAO(transaction);
SuiviObsmerContext.prepareTopiaId(Company.class, company);
companyDAO.update(company);
+ transaction.commitTransaction();
+ ServiceSampling serviceSampling = new ServiceSamplingImpl();
+ input = getClass().getResourceAsStream("/import/echantillonnage.csv");
+ serviceSampling.importSamplingPlanCsv(input);
+
// Get two SampleRows : 2009_3 & 2010_4
SampleRowDAO rowDAO = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
SampleRow row1 = rowDAO.findByCode("2009_03");
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -60,6 +60,7 @@
import org.junit.Test;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
+import org.nuiton.util.PeriodDates;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.*;
@@ -237,7 +238,8 @@
// NO COMPANY (= null)
Calendar begin = new GregorianCalendar(2000, 0, 1, 0, 0, 0);
Calendar end = new GregorianCalendar(2020, 11, 31, 0, 0, 0);
- List<SampleRow> rows = service.getSampleRowsOrderedByFishingZone(begin.getTime(), end.getTime(), null);
+ PeriodDates period = new PeriodDates(begin, end);
+ List<SampleRow> rows = service.getSampleRowsOrderedByFishingZone(period, null);
assertEquals(4, rows.size());
SampleRow resultRow0 = rows.get(0);
assertEquals("2010_02", resultRow0.getCode());
@@ -264,7 +266,8 @@
// NO COMPANY (= null)
begin = new GregorianCalendar(2009, 0, 1, 0, 0, 0);
end = new GregorianCalendar(2020, 11, 31, 0, 0, 0);
- rows = service.getSampleRowsOrderedByFishingZone(begin.getTime(), end.getTime(), null);
+ period = new PeriodDates(begin, end);
+ rows = service.getSampleRowsOrderedByFishingZone(period, null);
assertEquals(3, rows.size());
resultRow0 = rows.get(0);
assertEquals("2010_02", resultRow0.getCode());
@@ -401,7 +404,9 @@
FishingZone zoneIId = zoneDAO.create(FishingZone.DISTRICT_CODE, "IId");
FishingZone zoneIV = zoneDAO.create(FishingZone.DISTRICT_CODE, "IV");
FishingZone zoneI = zoneDAO.create(FishingZone.DISTRICT_CODE, "I");
-
+
+ CompanyDAO companyDAO = SuiviObsmerModelDAOHelper.getCompanyDAO(transaction);
+ companyDAO.create(Company.NAME, "TARTANPION");
transaction.commitTransaction();
@@ -446,7 +451,9 @@
FishingZone zoneIId = zoneDAO.create(FishingZone.DISTRICT_CODE, "IId");
FishingZone zoneIV = zoneDAO.create(FishingZone.DISTRICT_CODE, "IV");
FishingZone zoneI = zoneDAO.create(FishingZone.DISTRICT_CODE, "I");
-
+
+ CompanyDAO companyDAO = SuiviObsmerModelDAOHelper.getCompanyDAO(transaction);
+ companyDAO.create(Company.NAME, "TARTANPION");
transaction.commitTransaction();
transaction.closeContext();
Added: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Chart.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Chart.java (rev 0)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Chart.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -0,0 +1,167 @@
+/* *##% Pollen
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. ##%*/
+
+package fr.ifremer.suiviobsmer.ui.components;
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+import org.apache.tapestry5.ComponentResources;
+import org.apache.tapestry5.Link;
+import org.apache.tapestry5.MarkupWriter;
+import org.apache.tapestry5.StreamResponse;
+import org.apache.tapestry5.annotations.Parameter;
+import org.apache.tapestry5.annotations.Persist;
+import org.apache.tapestry5.dom.Element;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.apache.tapestry5.services.Response;
+import org.jfree.chart.ChartUtilities;
+import org.jfree.chart.JFreeChart;
+import org.nuiton.util.ArrayUtil;
+
+/**
+ * Composant qui affiche un graphe de type PieChart.
+ *
+ * <pre>
+ * Utilisation :
+ * <t:chart width="210" height="190" values="choice" title="title" type="1"/>
+ * - choice est une liste de chaînes représentant les labels et leur valeurs respectives. ({"val1", "20", "val2", "10"}...)
+ * - type est le type de représentation du diagramme (1:PIE, 2:PIE3D...)
+ * Pour généraliser à d'autres types de graphes il faudrait passer un JFreeChart :
+ * Persist Parameter(required=true)
+ * private JFreeChart _chart;
+ * </pre>
+ *
+ * @author rannou
+ * @version $Id$
+ */
+public class Chart {
+
+// /** diagramme de type PIE */
+// public static final int PIE = 1;
+// /** diagramme de type PIE3D */
+// public static final int PIE3D = 2;
+// /** diagramme de type RING */
+// public static final int RING = 3;
+
+ /** titre du diagramme */
+ @Parameter
+ private String _title = "";
+
+ @Parameter(required = true)
+ private JFreeChart _chart;
+
+ /** type de représentation du diagramme */
+// @Parameter(required = true)
+// private int _type;
+
+ @Parameter(required = true)
+ private int _width;
+
+ @Parameter(required = true)
+ private int _height;
+
+ @Persist
+ private JFreeChart currentChart;
+
+ /**
+ * list(array) of paired values(label,value):
+ * [String,Number,String,Number,...]
+ */
+// @Parameter(required = true)
+// private List<Object> _values;
+
+ @Inject
+ private ComponentResources _resources;
+
+ void beginRender(MarkupWriter writer) {
+
+ // event link params
+ Object[] params = new Object[] { _title, _width, _height };
+// params = ArrayUtil.concat(params, _values.toArray());
+
+ // generate event link
+ Link link = _resources.createEventLink("chart", params);
+ Element img = writer.element("img", "src", link);
+
+ _resources.renderInformalParameters(writer);
+ }
+
+ void afterRender(MarkupWriter writer) {
+ writer.end();
+ }
+
+ public StreamResponse onChart(final String title,
+ final int width, final int height) {
+// DefaultKeyedValues values = new DefaultKeyedValues();
+// for (int i = 4; i < rest.length; i += 2) {
+// values.addValue(rest[i].toString(), Double.valueOf(rest[i + 1]
+// .toString()));
+// }
+// values.sortByValues(SortOrder.DESCENDING);
+// PieDataset data = new DefaultPieDataset(values);
+//
+// // create the chart look according to the type
+// PiePlot plot = null;
+// switch (type) {
+// case PIE:
+// plot = new PiePlot(data);
+// break;
+// case PIE3D:
+// plot = new PiePlot3D(data);
+// break;
+// case RING:
+// plot = new RingPlot(data);
+// break;
+// default:
+// plot = new PiePlot(data);
+// break;
+// }
+
+ //plot.setForegroundAlpha(0.7f);
+// plot.setCircular(true);
+// plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0} {2}"));
+// plot.setLegendLabelGenerator(new StandardPieSectionLabelGenerator(
+// "{0} = {1}"));
+// plot.setNoDataMessage("No Data");
+//
+// final JFreeChart chart = new JFreeChart(plot);
+// chart.setTitle(new TextTitle(title, new Font(Font.SANS_SERIF,
+// Font.BOLD, 12)));
+// chart.setBackgroundPaint(new Color(255, 255, 255));
+
+ // return the image
+ return new StreamResponse() {
+ public String getContentType() {
+ return "image/png";
+ }
+
+ public InputStream getStream() throws IOException {
+ BufferedImage image = currentChart.createBufferedImage(width, height);
+ ByteArrayOutputStream byteArray = new ByteArrayOutputStream();
+ ChartUtilities.writeBufferedImageAsPNG(byteArray, image);
+ return new ByteArrayInputStream(byteArray.toByteArray());
+ }
+
+ public void prepareResponse(Response response) {
+ }
+ };
+ }
+}
\ No newline at end of file
Property changes on: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Chart.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -22,6 +22,7 @@
package fr.ifremer.suiviobsmer.ui.pages;
+import fr.ifremer.suiviobsmer.SuiviObsmerBusinessException;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
import fr.ifremer.suiviobsmer.entity.Company;
import fr.ifremer.suiviobsmer.entity.FishingZone;
@@ -104,12 +105,12 @@
private UploadedFile samplingPlanCsvFile;
@Log
- void onSuccessFromImportSamplingPlan() {
+ void onSuccessFromImportSamplingPlan() throws SuiviObsmerException {
try {
int[] result = serviceSampling.importSamplingPlanCsv(samplingPlanCsvFile.getStream());
layout.getFeedBack().addInfo(result[0] + " lignes du plan importés, " +
result[1] + " refusés (voir documentation)");
- } catch (SuiviObsmerException eee) {
+ } catch (SuiviObsmerBusinessException eee) {
layout.getFeedBack().addError(eee.getMessage());
}
}
@@ -179,8 +180,7 @@
if (!user.getAdmin()) {
company = user.getCompany();
}
- data = serviceSampling.getSampleRowsOrderedByFishingZone(
- getPeriod().getFromDate(), getPeriod().getThruDate(), company);
+ data = serviceSampling.getSampleRowsOrderedByFishingZone(getPeriod(), company);
}
return data;
}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -23,6 +23,7 @@
import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
import org.apache.tapestry5.annotations.IncludeStylesheet;
+import org.jfree.chart.JFreeChart;
/**
* Synthesis
@@ -42,5 +43,10 @@
public boolean isOnlyForAdmin() {
return false;
}
+
+ public JFreeChart getTestChart() {
+ }
+
+
}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java 2010-01-07 16:14:09 UTC (rev 176)
@@ -19,6 +19,8 @@
package fr.ifremer.suiviobsmer.ui.services;
+import fr.ifremer.suiviobsmer.SuiviObsmerModelDAOHelper;
+import fr.ifremer.suiviobsmer.entity.User;
import fr.ifremer.suiviobsmer.mock.*;
import fr.ifremer.suiviobsmer.services.*;
import fr.ifremer.suiviobsmer.impl.*;
@@ -55,6 +57,8 @@
binder.bind(ServiceBoat.class, ServiceBoatImpl.class);
binder.bind(ServiceContact.class, ServiceContactImpl.class);
binder.bind(ContactModelFactory.class);
+ binder.bind(SuiviObsmerModelDAOHelper.getContractClass(User.class),
+ SuiviObsmerModelDAOHelper.getImplementationClass(User.class));
}
public static void contributeApplicationDefaults(
Modified: trunk/suiviobsmer-ui/src/main/webapp/Synthesis.tml
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/Synthesis.tml 2010-01-07 11:15:49 UTC (rev 175)
+++ trunk/suiviobsmer-ui/src/main/webapp/Synthesis.tml 2010-01-07 16:14:09 UTC (rev 176)
@@ -41,4 +41,6 @@
lectus nunc. Proin molestie molestie augue aliquet suscipit. Sed id enim diam,
sed rutrum libero. </p>
</div>
+
+ <t:chart t:width="300" t:height="250" t:chart="testChart" />
</t:layout>
1
0
[Suiviobsmer-commits] r175 - in trunk: . suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl suiviobsmer-ui/src/main/webapp/img
by fdesbois@users.labs.libre-entreprise.org 07 Jan '10
by fdesbois@users.labs.libre-entreprise.org 07 Jan '10
07 Jan '10
Author: fdesbois
Date: 2010-01-07 11:15:49 +0000 (Thu, 07 Jan 2010)
New Revision: 175
Modified:
trunk/pom.xml
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
trunk/suiviobsmer-ui/src/main/webapp/img/fishing-net-22px.png
Log:
- Use last topia SNAPSHOT
- Uncomment query for sampleRows
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-07 10:40:03 UTC (rev 174)
+++ trunk/pom.xml 2010-01-07 11:15:49 UTC (rev 175)
@@ -239,7 +239,7 @@
<!-- libraries version -->
<nuitonutils.version>1.1.2</nuitonutils.version>
- <topia.version>2.3.0-beta-3</topia.version>
+ <topia.version>2.3.0-beta-4-SNAPSHOT</topia.version>
<license.version>2.0.0</license.version>
<helper.version>1.1.0</helper.version>
<eugene.version>2.0.0-beta-2</eugene.version>
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2010-01-07 10:40:03 UTC (rev 174)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2010-01-07 11:15:49 UTC (rev 175)
@@ -157,8 +157,8 @@
query.addLoad("user.company", "sampleRow.program", "sampleRow.profession", "sampleRow.company");
- if (log.isInfoEnabled()) {
- log.info("Query : " + query);
+ if (log.isDebugEnabled()) {
+ log.debug("Query : " + query);
}
results = query.executeToEntityMap();
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2010-01-07 10:40:03 UTC (rev 174)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2010-01-07 11:15:49 UTC (rev 175)
@@ -179,54 +179,32 @@
}
transaction = rootContext.beginTransaction();
- // uncomment the query for Topia 2.3.0-beta-4 (manage order and multiple select results, need addSelect method)
+ SampleRowDAO dao = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
-// SampleRowDAO dao = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
-//
-// TopiaQuery<SampleRow> query = dao.createQuery("S").addDistinct().
-// addFrom(FishingZone.class.getName() + " F").add("S IN elements(F.sampleRow)");
-//
-// if (company != null) {
-// query.add("S.company", company);
-// }
-//
-// // Prepare period dates
-// periodBegin = DateUtils.setFirstDayOfMonth(periodBegin);
-// periodEnd = DateUtils.setLastDayOfMonth(periodEnd);
-// query.add("S.program.periodBegin", Op.LT, periodEnd).add("S.program.periodEnd", Op.GT, periodBegin);
-//
-// String zoneOrder = "F.facadeName, F.sectorName, F.districtCode";
-// query.addOrder(zoneOrder).addOrder("S.code").addSelect(zoneOrder);
-//
-// query.addLoad(SampleRow.PROFESSION, SampleRow.PROGRAM, SampleRow.COMPANY);
-// results = query.executeToEntityList();
+ TopiaQuery<SampleRow> query = dao.createQuery("S").addDistinct().
+ addFrom(FishingZone.class.getName() + " F").add("S IN elements(F.sampleRow)");
- FishingZoneDAO zoneDAO = SuiviObsmerModelDAOHelper.getFishingZoneDAO(transaction);
- List<FishingZone> list = zoneDAO.findAllWithOrder(
- FishingZone.FACADE_NAME,
- FishingZone.SECTOR_NAME,
- FishingZone.DISTRICT_CODE);
+ if (company != null) {
+ query.add("S.company", company);
+ }
- for (FishingZone zone : list) {
- if (log.isTraceEnabled()) {
- log.trace("Zone : " + zone);
- }
- for (SampleRow row : zone.getSampleRow()) {
- if (!results.contains(row)) {
- Company rowCompany = row.getCompany();
- Program rowProgram = row.getProgram();
- if (rowProgram.isValid(periodBegin, periodEnd) && (company == null || company.equals(rowCompany))) {
- if (log.isTraceEnabled()) {
- log.trace("Code : " + row.getCode());
- }
- // load data
- row.getProfession();
- results.add(row);
- }
- }
- }
+ // Prepare period dates
+ periodBegin = DateUtils.setFirstDayOfMonth(periodBegin);
+ periodEnd = DateUtils.setLastDayOfMonth(periodEnd);
+ query.add("S.program.periodBegin", Op.LT, periodEnd).add("S.program.periodEnd", Op.GT, periodBegin);
+
+ // Order By facade, sector, districtCode, sampleRowCode
+ String zoneOrder = "F.facadeName, F.sectorName, F.districtCode";
+ query.addOrder(zoneOrder).addOrder("S.code").addSelect(zoneOrder);
+ // Load data
+ query.addLoad(SampleRow.PROFESSION, SampleRow.PROGRAM, SampleRow.COMPANY);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Query : " + query);
}
+ results = query.executeToEntityList();
+
transaction.closeContext();
} catch (Exception eee) {
SuiviObsmerContext.serviceException(transaction,
Modified: trunk/suiviobsmer-ui/src/main/webapp/img/fishing-net-22px.png
===================================================================
(Binary files differ)
1
0
[Suiviobsmer-commits] r174 - in trunk: . suiviobsmer-business suiviobsmer-ui
by fdesbois@users.labs.libre-entreprise.org 07 Jan '10
by fdesbois@users.labs.libre-entreprise.org 07 Jan '10
07 Jan '10
Author: fdesbois
Date: 2010-01-07 10:40:03 +0000 (Thu, 07 Jan 2010)
New Revision: 174
Modified:
trunk/pom.xml
trunk/suiviobsmer-business/pom.xml
trunk/suiviobsmer-ui/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-07 10:40:00 UTC (rev 173)
+++ trunk/pom.xml 2010-01-07 10:40:03 UTC (rev 174)
@@ -15,7 +15,7 @@
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.3</version>
+ <version>0.0.4-SNAPSHOT</version>
<modules>
<module>suiviobsmer-ui</module>
@@ -256,9 +256,9 @@
<scm>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3</developerConnection>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.3?root…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/?root=suiviobsmer</url>
</scm>
<build>
Modified: trunk/suiviobsmer-business/pom.xml
===================================================================
--- trunk/suiviobsmer-business/pom.xml 2010-01-07 10:40:00 UTC (rev 173)
+++ trunk/suiviobsmer-business/pom.xml 2010-01-07 10:40:03 UTC (rev 174)
@@ -10,7 +10,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.3</version>
+ <version>0.0.4-SNAPSHOT</version>
</parent>
<groupId>fr.ifremer.suiviobsmer</groupId>
@@ -120,9 +120,9 @@
</build>
<scm>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.3/suiv…</url>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3/suivio…</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3/suivio…</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-business/…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-business</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-business</developerConnection>
</scm>
</project>
Modified: trunk/suiviobsmer-ui/pom.xml
===================================================================
--- trunk/suiviobsmer-ui/pom.xml 2010-01-07 10:40:00 UTC (rev 173)
+++ trunk/suiviobsmer-ui/pom.xml 2010-01-07 10:40:03 UTC (rev 174)
@@ -10,7 +10,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.3</version>
+ <version>0.0.4-SNAPSHOT</version>
</parent>
<groupId>fr.ifremer.suiviobsmer</groupId>
@@ -122,9 +122,9 @@
</build>
<scm>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.3/suiv…</url>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3/suivio…</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3/suivio…</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-ui/?root=…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-ui</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-ui</developerConnection>
</scm>
</project>
1
0
Author: fdesbois
Date: 2010-01-07 10:40:00 +0000 (Thu, 07 Jan 2010)
New Revision: 173
Added:
tags/suiviobsmer-0.0.3/
Log:
[maven-scm] copy for tag suiviobsmer-0.0.3
1
0
[Suiviobsmer-commits] r172 - in trunk: . suiviobsmer-business suiviobsmer-ui
by fdesbois@users.labs.libre-entreprise.org 07 Jan '10
by fdesbois@users.labs.libre-entreprise.org 07 Jan '10
07 Jan '10
Author: fdesbois
Date: 2010-01-07 10:39:56 +0000 (Thu, 07 Jan 2010)
New Revision: 172
Modified:
trunk/pom.xml
trunk/suiviobsmer-business/pom.xml
trunk/suiviobsmer-ui/pom.xml
Log:
[maven-release-plugin] prepare release suiviobsmer-0.0.3
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-07 10:21:45 UTC (rev 171)
+++ trunk/pom.xml 2010-01-07 10:39:56 UTC (rev 172)
@@ -15,7 +15,7 @@
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.3-SNAPSHOT</version>
+ <version>0.0.3</version>
<modules>
<module>suiviobsmer-ui</module>
@@ -256,9 +256,9 @@
<scm>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk</developerConnection>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/?root=suiviobsmer</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.3?root…</url>
</scm>
<build>
Modified: trunk/suiviobsmer-business/pom.xml
===================================================================
--- trunk/suiviobsmer-business/pom.xml 2010-01-07 10:21:45 UTC (rev 171)
+++ trunk/suiviobsmer-business/pom.xml 2010-01-07 10:39:56 UTC (rev 172)
@@ -10,7 +10,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.3-SNAPSHOT</version>
+ <version>0.0.3</version>
</parent>
<groupId>fr.ifremer.suiviobsmer</groupId>
@@ -120,9 +120,9 @@
</build>
<scm>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-business/…</url>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-business</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-business</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.3/suiv…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3/suivio…</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3/suivio…</developerConnection>
</scm>
</project>
Modified: trunk/suiviobsmer-ui/pom.xml
===================================================================
--- trunk/suiviobsmer-ui/pom.xml 2010-01-07 10:21:45 UTC (rev 171)
+++ trunk/suiviobsmer-ui/pom.xml 2010-01-07 10:39:56 UTC (rev 172)
@@ -10,7 +10,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.3-SNAPSHOT</version>
+ <version>0.0.3</version>
</parent>
<groupId>fr.ifremer.suiviobsmer</groupId>
@@ -122,9 +122,9 @@
</build>
<scm>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-ui/?root=…</url>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-ui</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-ui</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.3/suiv…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3/suivio…</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.3/suivio…</developerConnection>
</scm>
</project>
1
0
[Suiviobsmer-commits] r171 - trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl
by fdesbois@users.labs.libre-entreprise.org 07 Jan '10
by fdesbois@users.labs.libre-entreprise.org 07 Jan '10
07 Jan '10
Author: fdesbois
Date: 2010-01-07 10:21:45 +0000 (Thu, 07 Jan 2010)
New Revision: 171
Modified:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
Log:
Improve queries (add comment code for topia next version in ServiceSampling for getSampleRows query)
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2010-01-06 17:18:15 UTC (rev 170)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2010-01-07 10:21:45 UTC (rev 171)
@@ -109,7 +109,7 @@
// Add join for ElligibleBoat
if (sampleRowFiltered) {
String elligibleBoatClassName = ElligibleBoat.class.getName();
- query.setSelect("B").addFrom(elligibleBoatClassName + " E").add("E.boat = B");
+ query.addFrom(elligibleBoatClassName + " E").add("E.boat = B");
}
// SampleRowCode
if (sampleRowCodeFiltered) {
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2010-01-06 17:18:15 UTC (rev 170)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2010-01-07 10:21:45 UTC (rev 171)
@@ -402,7 +402,7 @@
int boatImmatriculation = Integer.parseInt(reader.get(BOAT.NAVS_COD.name()));
// The boat must be elligible for the row
- TopiaQuery<Boat> boatQuery = boatDAO.createQuery("B").setSelect("B").
+ TopiaQuery<Boat> boatQuery = boatDAO.createQuery("B").
addFrom(ElligibleBoat.class.getName() + " E").
add("E.sampleRow", row).add("E.boat = B").
add(Boat.IMMATRICULATION, boatImmatriculation);
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2010-01-06 17:18:15 UTC (rev 170)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2010-01-07 10:21:45 UTC (rev 171)
@@ -179,11 +179,7 @@
}
transaction = rootContext.beginTransaction();
- FishingZoneDAO zoneDAO = SuiviObsmerModelDAOHelper.getFishingZoneDAO(transaction);
- List<FishingZone> list = zoneDAO.findAllWithOrder(
- FishingZone.FACADE_NAME,
- FishingZone.SECTOR_NAME,
- FishingZone.DISTRICT_CODE);
+ // uncomment the query for Topia 2.3.0-beta-4 (manage order and multiple select results, need addSelect method)
// SampleRowDAO dao = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
//
@@ -199,11 +195,17 @@
// periodEnd = DateUtils.setLastDayOfMonth(periodEnd);
// query.add("S.program.periodBegin", Op.LT, periodEnd).add("S.program.periodEnd", Op.GT, periodBegin);
//
-// query.addOrder("F.facadeName, F.sectorName, F.districtCode");
+// String zoneOrder = "F.facadeName, F.sectorName, F.districtCode";
+// query.addOrder(zoneOrder).addOrder("S.code").addSelect(zoneOrder);
//
// query.addLoad(SampleRow.PROFESSION, SampleRow.PROGRAM, SampleRow.COMPANY);
// results = query.executeToEntityList();
+ FishingZoneDAO zoneDAO = SuiviObsmerModelDAOHelper.getFishingZoneDAO(transaction);
+ List<FishingZone> list = zoneDAO.findAllWithOrder(
+ FishingZone.FACADE_NAME,
+ FishingZone.SECTOR_NAME,
+ FishingZone.DISTRICT_CODE);
for (FishingZone zone : list) {
if (log.isTraceEnabled()) {
1
0
[Suiviobsmer-commits] r170 - in trunk: src src/site src/site/resources src/site/resources/doc src/site/rst src/site/rst/import suiviobsmer-business/src suiviobsmer-business/src/site suiviobsmer-ui/src suiviobsmer-ui/src/site
by fdesbois@users.labs.libre-entreprise.org 06 Jan '10
by fdesbois@users.labs.libre-entreprise.org 06 Jan '10
06 Jan '10
Author: fdesbois
Date: 2010-01-06 17:18:15 +0000 (Wed, 06 Jan 2010)
New Revision: 170
Added:
trunk/src/site/
trunk/src/site/resources/
trunk/src/site/resources/doc/
trunk/src/site/resources/doc/DOC_Contacts_Header.ods
trunk/src/site/resources/logo-obsmer.jpg
trunk/src/site/resources/logo-wao.png
trunk/src/site/rst/
trunk/src/site/rst/business-rules.rst
trunk/src/site/rst/import/
trunk/src/site/rst/import/boats.rst
trunk/src/site/rst/import/contacts.rst
trunk/src/site/rst/import/samplingPlan.rst
trunk/src/site/rst/installation.rst
trunk/src/site/site.xml
trunk/suiviobsmer-business/src/site/
trunk/suiviobsmer-business/src/site/site.xml
trunk/suiviobsmer-ui/src/site/
trunk/suiviobsmer-ui/src/site/site.xml
Log:
Add maven-site
Added: trunk/src/site/resources/doc/DOC_Contacts_Header.ods
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/doc/DOC_Contacts_Header.ods
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/logo-obsmer.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/logo-obsmer.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/logo-wao.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/logo-wao.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/rst/business-rules.rst
===================================================================
--- trunk/src/site/rst/business-rules.rst (rev 0)
+++ trunk/src/site/rst/business-rules.rst 2010-01-06 17:18:15 UTC (rev 170)
@@ -0,0 +1,107 @@
+Documentation des règles métiers de l'application WAO
+=====================================================
+
+Ligne du plan d'échantillonnage (ADMIN)
+---------------------------------------
+
+Pré-requis : Import des zones de pêche
+
+- Création :
+
+ * (obligatoire) profession : toujours une nouvelle profession
+ * (obligatoire) zone de pêche : au moins une zone de pêche doit être ajouté à la ligne
+ * (obligatoire) programme : déjà existant ou nouveau programme
+ * (obligatoire) période du programme : modifiable si cela ne pose pas de problème sur des données d'embarquements réels
+ * données des marées / mois : toujours minimum à 0
+ * (obligatoire) code de la ligne : générer automatiquement à partir de la date de début du programme : [year]_[lastNum]
+ * autres champs non obligatoire
+
+- Modification (si aucun embarquement réel effectué sur la ligne) :
+
+ * Même contraintes que pour la création sauf code de la ligne déjà existant
+ * (obligatoire) Commentaire de modification
+
+- Modification (si des embarquements réels ont été effectuées sur la ligne) :
+
+ * Modification impossible pour les champs : profession, zones de pêche, programme
+ * (obligatoire) Commentaire de modification
+
+- Suppression : possible uniquement si aucun embarquement réel n'a été enregistré sur la ligne
+
+- Unicité : code de la ligne
+
+Navires (OBSERVER/USER)
+-----------------------
+
+- Filtres :
+
+ * Code de la ligne : uniquement celles liés à la société
+
+- Informations :
+
+ * Possibilité de lier un navire à une ligne du plan disponible (ouverte)
+ * Possibilité de rayer une ligne du plan d'un navire si elle a été liée par un ADMIN
+ * Possibilité de supprimer une liaison avec une ligne du plan, uniquement celles liés par la société
+
+- Unicité : immatriculation du navire
+
+Contact (OBSERVER/USER)
+-----------------------
+
+Pré-requis : La création n'est possible que sur un navire elligible lié à une ligne du plan
+
+Etats des contacts : "Contact pris" (CREATION), "Embarquement prévu", "Embarquement réalisé" (TERMINE), "Refus" (TERMINE), "Refus définitif" (TERMINE), "Non abouti" (TERMINE)
+
+- Création :
+
+ * possible uniquement depuis la page des navires
+ * doit être effectué sur une ligne du plan (potentiellement sélectionné depuis le plan d'échantillonnage)
+ * aucun navire doit avoir de contact en cours pour cette société
+ * impossible si le programme de la ligne du plan est terminé (date de fin > date du jour)
+ * état initial : "Contact pris"
+ * observateur initial : l'utilisateur qui a créé la ligne
+
+- Modification (changement d'état) :
+
+ * possible uniquement si aucune validation n'a été faites
+ * "Embarquement prévu" -> aucune contrainte
+ * "Embarquement réalisé" -> les champs "date de début de la marée", "date de fin de la marée" et "nb observateurs" sont obligatoires
+ * "Non abouti", "Refus", "Refus définitif" -> champs commentaire obligatoire, le changement d'état efface tous les autres champs
+
+- Contraintes sur les dates :
+
+ * Date de fin postérieure ou égal à la date de début
+ * Date de fin antérieure à la date du jour
+ * Date de début et date de fin incluses dans la période du programme de la ligne du plan lié au contact
+
+- Validation par la société :
+
+ * Aucune validation faites par le programme (ADMIN)
+ * Etat terminé ("Non abouti", "Refus", "Refus définitif")
+ * Etat "Embarquement réalisé" avec "date de saisie dans Allegro" renseignée
+
+- Validation par le programme :
+
+ * Le contact doit être accepté/validé par la société
+
+- Suppression :
+
+ * possible uniquement si aucune validation n'a été faites
+
+- Calcul de la durée des marées réels :
+
+ * Ajout si accepté par la société
+ * Retrait si invalidé par la société après avoir été accepté
+ * Retrait si refusé par le programme
+ * Ajout si invalidé par le programme après avoir été refusé
+
+- Unicité : code de la ligne + immatriculation du navire + société + date de création (avec temps)
+
+Administration
+--------------
+
+- Connexion impossible si inactif
+- Aucune création d'utilisateur possible pour une société inactive
+
+
+
Added: trunk/src/site/rst/import/boats.rst
===================================================================
--- trunk/src/site/rst/import/boats.rst (rev 0)
+++ trunk/src/site/rst/import/boats.rst 2010-01-06 17:18:15 UTC (rev 170)
@@ -0,0 +1,30 @@
+Import des navires
+==================
+
+Cette fonctionnalité est disponible depuis la page des **Navires** en mode administrateur.
+
+Infos
+-----
+
+- Disponible depuis version 0.0.1-alpha-1
+- Encodage du fichier CSV obligatoire en UTF-8
+
+Sélections
+----------
+
+- Navires actifs (indicateur d'état du numéro = actif)
+- Pays d'appartenance du navire = France
+- Immatriculation du navire NAVS_COD comprise entre 100000 et 999999
+- Navires présents dans le calendrier d'activité 2008 et dont le port d'exploitation est français
+
+Champs de la table
+------------------
+
+- NAVS_COD : Numéro d'immatriculation du navire (identifiant unique)
+- CARN_NOM : Nom du navire
+- CARN_LONGUEUR_HT : Longueur hors tout du navire (en mètres)
+- CARN_ANNEE : Année de construction du navire
+- QUARTIER_IMMA : Code lieu d'immatriculation
+- PER_COD : Code armateur (identifiant unique) (NA = pas d'armateur)
+- PER_NOM : Nom de l'armateur
+- PER_PRENOM : Prénom de l'armateur
\ No newline at end of file
Added: trunk/src/site/rst/import/contacts.rst
===================================================================
--- trunk/src/site/rst/import/contacts.rst (rev 0)
+++ trunk/src/site/rst/import/contacts.rst 2010-01-06 17:18:15 UTC (rev 170)
@@ -0,0 +1,68 @@
+Import/Export des Contacts
+==========================
+
+Cette fonctionnalité est disponible depuis la page des **Contacts**.
+
+Infos
+-----
+
+- Disponible depuis version 0.0.3
+- Encodage du fichier CSV obligatoire en UTF-8
+
+Voir `Fichier OpenOffice`_
+
+.. _Fichier OpenOffice: ../doc/DOC_Contacts_Header.ods
+
+Note
+----
+
+- Création d'une ligne si CONT_CREATION est vide.
+- Modification d'une ligne si existante : recherche sur NAVS_COD, PLAN_CODE, CONT_CREATION, SOCIETE_NOM
+- Les validations (société ou programme) ne sont pas importés
+
+Types et formats des cellules
+-----------------------------
+
+- string = chaîne de caractères -> ex : "Une_Chaine345"
+- double = nombre réel, formaté en anglais -> ex : 1.2
+- date = date, formaté en jour/mois/année (JJ/MM/AAAA sous Excel) -> ex : 01/12/2010
+- int = nombre entier -> ex : 3
+- boolean = vrai ou faux, se traduit par un 'X' si c'est vrai
+
+Descriptions des colonnes
+-------------------------
+
+- CONT_CODE (string) : Code pour modification d'un contact existant dans WAO (uniquement récupérable depuis un export)
+- CONT_CREATION (date) : Date de création de la ligne (si vide, nouvelle ligne dans WAO)
+- OBSERV_ID (string) : Login de l'observateur (obligatoire)
+- OBSERV_PRENOM (string) : Prénom de l'observateur
+- OBSERV_NOM (string) : Nom de l'observateur
+- SOCIETE_NOM (string) : Nom de la société
+- PLAN_CODE (string) : Code de la ligne (obligatoire)
+- PROGRAMME_CODE (string) : Nom du programme
+- PROGRAMME_DEBUT (date) : Date de début du programme
+- PROGRAMME_FIN (date) : Date de fin du programme
+- PECHE_FACADE (string) : Facade de la zone de pêche
+- PECHE_ZONE (string) : Secteur de la zone de pêche
+- PECHE_DIVISION (string) : Zones de pêche liés à la ligne, chaque zone est séparé par un " / " -> ex : VIIa / VIIb (obligatoire)
+- PECHE_AUTRE (string) : Autres information sur les zones de pêche pour la ligne
+- METIER_CODE_DCF5 (string) : Code DCF niveau 5 du métier
+- METIER_MAILLAGE (string) : Maillage du métier
+- METIER_TAILLE (string) : Taille du métier
+- METIER_AUTRE (string) : Autre information du métier
+- METIER_LIBELLE (string) : Libellé du métier
+- METIER_ESPECES (string) : Espèces liées au métier
+- NAVS_COD (int) : Immatriculation du navire (6 chiffres) (obligatoire)
+- CARN_NOM (string) : Nom du navire
+- QUARTIER_IMMA (string) : Code quartier du navire
+- CONT_ETAT (string) : Etat du contact
+ (valeurs possibles : "Contact pris", "Embarquement prévu", "Embarquement réalisé", "Non abouti", "Refus", "Refus définitif")
+- CONT_DEBUT_MAREE (date) : Date de début de la marée
+- CONT_FIN_MAREE (date) : Date de fin de la marée
+- CONT_NB_OBSERV (int) : Nombre d'observateurs pour l'embarquement
+- CONT_MAM_CAPT (boolean) : Capture de mammifères
+- CONT_MAM_OBSERV (boolean) : Observation de mammifères
+- CONT_COMMENT (string) : Commentaire sur le contact
+- CONT_ALLEGRO (date) : Date de saisies dans Allegro
+- CONT_SOCIETE_VALID (string) : Validation par la société : 'A' pour Accepter, 'N' pour en attente, 'R' pour Refuser
+- CONT_PROGRAM_VALID (string) : Validation par le programme : 'A' pour Accepter, 'N' pour en attente, 'R' pour Refuser
Added: trunk/src/site/rst/import/samplingPlan.rst
===================================================================
--- trunk/src/site/rst/import/samplingPlan.rst (rev 0)
+++ trunk/src/site/rst/import/samplingPlan.rst 2010-01-06 17:18:15 UTC (rev 170)
@@ -0,0 +1,53 @@
+Documentation Import du plan d'échantillonnage
+==============================================
+
+Cette fonctionnalité est disponible depuis la page du **Plan d'échantillonnage** en mode administrateur.
+
+Infos
+-----
+
+- Disponible depuis version 0.0.1-alpha-1
+- Encodage du fichier CSV obligatoire en UTF-8
+
+Types et formats des cellules
+-----------------------------
+
+- string = chaîne de caractères -> ex : "Une_Chaine345"
+- double = nombre réel, formaté en anglais -> ex : 1.2
+- date = date, formaté en mois/année (MM/AAAA sous Excel) -> ex : 12/2010
+- int = nombre entier -> ex : 3
+
+Descriptions des colonnes
+-------------------------
+
+- PLAN_CODE (string) : Code de la ligne (unique, obligatoire)
+- SOCIETE_NOM (string) : Nom de la société
+- PECHE_DIVISION (string) : Zones de pêche liés à la ligne, chaque zone est séparé par un " / " -> ex : VIIa / VIIb (obligatoire)
+- PECHE_AUTRE (string) : Autres information sur les zones de pêche pour la ligne
+- METIER_CODE_DCF5 (string) : Code DCF niveau 5 du métier (obligatoire)
+- METIER_MAILLAGE (string) : Maillage du métier
+- METIER_TAILLE (string) : Taille du métier
+- METIER_AUTRE (string) : Autre information du métier
+- METIER_LIBELLE (string) : Libellé du métier
+- METIER_ESPECES (string) : Espèces liées au métier
+- PROGRAMME_CODE (string) : Nom du programme (obligatoire)
+- PROGRAMME_DEBUT (date) : Date de début du programme (obligatoire)
+- PROGRAMME_FIN (date) : Date de fin du programme (obligatoire)
+- champs pour les mois formatés comme des dates (MM/AAAA)
+- PLAN_DUREE_MOY (double) : Durée moyenne d'une marée (obligatoire)
+- PLAN_NB_OBSERV (int) : Nombre d'observateurs (obligatoire)
+- PLAN_COMMENT (string) : Commentaire sur la création de la ligne
+
+Refus
+-----
+
+L'affichage indique le nombre de lignes qui ont été refusés pour les raisons suivantes :
+
+- (PLAN_CODE) Les lignes avec un code déjà existant dans l'application ne seront ni ajoutées, ni modifiées
+- (PECHE_DIVISION) Les lignes sans zone de pêche ne seront pas prises en compte
+
+Note
+----
+
+Si il n'y a aucun Code pour la ligne, elle ne sera ni interprété ni refusé.
+
Added: trunk/src/site/rst/installation.rst
===================================================================
--- trunk/src/site/rst/installation.rst (rev 0)
+++ trunk/src/site/rst/installation.rst 2010-01-06 17:18:15 UTC (rev 170)
@@ -0,0 +1,29 @@
+Installation
+============
+
+Deux possibilités
+-----------------
+
+- Lancement direct du fichier war (utilisation de Java-JRE 1.6)
+- Déploiement sur un serveur d'application (comme tomcat)
+
+Super administrateur par défaut
+-------------------------------
+
+Lors du premier lancement de l'application l'utilisateur admin sera créé avec comme identifiants :
+
+- login = admin
+- password = password
+
+Note
+ Il est fortement conseillé de modifier le mot de passe par défaut du super admin ! (dans le profile utilisateur)
+
+Références
+----------
+
+- `Tomcat`_
+- WarLauncher de `Nuiton-utils`_
+
+.. _Tomcat: http://tomcat.apache.org/
+
+.. _Nuiton-utils: http://maven-site.nuiton.org/nuiton-utils/Warlauncher.html
\ No newline at end of file
Added: trunk/src/site/site.xml
===================================================================
--- trunk/src/site/site.xml (rev 0)
+++ trunk/src/site/site.xml 2010-01-06 17:18:15 UTC (rev 170)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="${project.name}">
+
+ <publishDate format="dd/MM/yyyy"/>
+
+ <bannerLeft>
+ <src alt="Web Applicatif Obsmer">logo-wao.png</src>
+ <name>${project.name}</name>
+ <href>index.html</href>
+ </bannerLeft>
+
+ <bannerRight>
+ <src alt="Obsmer">logo-obsmer.jpg</src>
+ </bannerRight>
+
+ <poweredBy>
+ <logo href="http://maven.apache.org" name="Maven" img="http://maven-site.nuiton.org/jrst/images/logos/maven-feather.png"/>
+ <logo href="http://maven-site.nuiton.org/jrst" name="JRst" img="http://maven-site.nuiton.org/jrst/images/jrst-logo.png"/>
+ <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText" img="http://maven-site.nuiton.org/jrst/images/restructuredtext-logo.png"/>
+ </poweredBy>
+
+ <body>
+
+ <breadcrumbs>
+ <item name="${project.name}" href="${project.url}" />
+ </breadcrumbs>
+
+<!-- <links>
+ <item name="Libre-Entreprise" href="http://www.libre-entreprise.org/" />
+ <item name="[fr" href="index.html" />
+ <item name="en]" href="../en/index.html" />
+ </links>-->
+
+ <menu name ="Documentation">
+ <item name="Import/Export">
+ <item name="Plan d'échantillonnage" href="import/samplingPlan.html"/>
+ <item name="Navires" href="import/boats.html"/>
+ <item name="Contacts" href="import/contacts.html"/>
+ <!--<item name="Calendrier d'activité" href="import/activityCalendar.html"/>-->
+ </item>
+ <item name="Règles métier" href="business-rules.html" />
+ </menu>
+
+ <menu name ="Mise en place">
+ <item name="Téléchargement" href="http://labs.libre-entreprise.org/frs/?group_id=154" />
+ <item name="Installation" href="installation.html"/>
+ <item name="Demo" href="http://demo.codelutin.com/suiviobsmer"/>
+ <item name="Tracker" href="http://labs.libre-entreprise.org/tracker/?group_id=154"/>
+ </menu>
+
+ <!--<menu ref="parent"/>-->
+ <menu ref="modules"/>
+ <menu ref="reports"/>
+
+ </body>
+
+</project>
+
Added: trunk/suiviobsmer-business/src/site/site.xml
===================================================================
--- trunk/suiviobsmer-business/src/site/site.xml (rev 0)
+++ trunk/suiviobsmer-business/src/site/site.xml 2010-01-06 17:18:15 UTC (rev 170)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="${project.name}">
+
+ <publishDate format="dd/MM/yyyy"/>
+
+ <bannerLeft>
+ <name>${project.name}</name>
+ <href>index.html</href>
+ </bannerLeft>
+
+<!-- <bannerRight>
+ <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
+ <href>http://www.codelutin.com</href>
+ </bannerRight>-->
+
+ <poweredBy>
+ <logo href="http://maven.apache.org" name="Maven" img="http://maven-site.nuiton.org/jrst/images/logos/maven-feather.png"/>
+ <logo href="http://maven-site.nuiton.org/jrst" name="JRst" img="http://maven-site.nuiton.org/jrst/images/jrst-logo.png"/>
+ <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText" img="http://maven-site.nuiton.org/jrst/images/restructuredtext-logo.png"/>
+ </poweredBy>
+
+ <body>
+
+ <breadcrumbs>
+ <item name="${project.name}" href="${project.url}" />
+ </breadcrumbs>
+
+ <menu ref="parent"/>
+ <menu ref="reports"/>
+
+ </body>
+
+</project>
+
Added: trunk/suiviobsmer-ui/src/site/site.xml
===================================================================
--- trunk/suiviobsmer-ui/src/site/site.xml (rev 0)
+++ trunk/suiviobsmer-ui/src/site/site.xml 2010-01-06 17:18:15 UTC (rev 170)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="${project.name}">
+
+ <publishDate format="dd/MM/yyyy"/>
+
+ <bannerLeft>
+ <name>${project.name}</name>
+ <href>index.html</href>
+ </bannerLeft>
+
+<!-- <bannerRight>
+ <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
+ <href>http://www.codelutin.com</href>
+ </bannerRight>-->
+
+ <poweredBy>
+ <logo href="http://maven.apache.org" name="Maven" img="http://maven-site.nuiton.org/jrst/images/logos/maven-feather.png"/>
+ <logo href="http://maven-site.nuiton.org/jrst" name="JRst" img="http://maven-site.nuiton.org/jrst/images/jrst-logo.png"/>
+ <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText" img="http://maven-site.nuiton.org/jrst/images/restructuredtext-logo.png"/>
+ </poweredBy>
+
+ <body>
+
+ <breadcrumbs>
+ <item name="${project.name}" href="${project.url}" />
+ </breadcrumbs>
+
+ <menu ref="parent"/>
+ <menu ref="reports"/>
+
+ </body>
+
+</project>
+
1
0
06 Jan '10
Author: fdesbois
Date: 2010-01-06 16:18:37 +0000 (Wed, 06 Jan 2010)
New Revision: 169
Modified:
trunk/pom.xml
Log:
Use last topia release
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-06 15:08:45 UTC (rev 168)
+++ trunk/pom.xml 2010-01-06 16:18:37 UTC (rev 169)
@@ -239,7 +239,7 @@
<!-- libraries version -->
<nuitonutils.version>1.1.2</nuitonutils.version>
- <topia.version>2.3.0-beta-3-SNAPSHOT</topia.version>
+ <topia.version>2.3.0-beta-3</topia.version>
<license.version>2.0.0</license.version>
<helper.version>1.1.0</helper.version>
<eugene.version>2.0.0-beta-2</eugene.version>
1
0