bug fixes: convert to long, lat and keywords
This commit is contained in:
parent
228023129d
commit
9375b517a0
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="geoportal-data-entry-app-1.0.0-SNAPSHOT">
|
<wb-module deploy-name="geoportal-data-entry-app-1.0.0-SNAPSHOT">
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,6 +27,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,6 +37,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,6 +47,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,10 +57,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
<dependent-module archiveName="metadata-profile-form-builder-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/metadata-profile-form-builder-widget/metadata-profile-form-builder-widget">
|
|
||||||
<dependency-type>uses</dependency-type>
|
|
||||||
</dependent-module>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,6 +75,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<property name="context-root" value="geoportal-data-entry-app"/>
|
<property name="context-root" value="geoportal-data-entry-app"/>
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,6 +85,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,4 +95,5 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</project-modules>
|
</project-modules>
|
||||||
|
|
|
@ -38,21 +38,15 @@ public class ConvertToServiceModel {
|
||||||
|
|
||||||
public static final String TIME_FORMAT = ConstantsGeoPortalDataEntryApp.TIME_FORMAT;
|
public static final String TIME_FORMAT = ConstantsGeoPortalDataEntryApp.TIME_FORMAT;
|
||||||
|
|
||||||
// public static final String DATE_FORMAT = "yyyy-MM-dd";
|
|
||||||
//
|
|
||||||
// public static final String HOURS_MINUTES_SEPARATOR = ":";
|
|
||||||
//
|
|
||||||
// public static final String TIME_FORMAT = "HH"+HOURS_MINUTES_SEPARATOR+"mm";
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To concessione.
|
* To concessione.
|
||||||
*
|
*
|
||||||
* @param gdb the gdb
|
* @param gdb the gdb
|
||||||
* @param user the user
|
* @param user the user
|
||||||
* @return the concessione
|
* @return the concessione
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static Concessione toConcessione(GenericDatasetBean gdb, GCubeUser user) {
|
public static Concessione toConcessione(GenericDatasetBean gdb, GCubeUser user) throws Exception {
|
||||||
|
|
||||||
Map<String, List<String>> mapFields = gdb.getFormDataEntryFields();
|
Map<String, List<String>> mapFields = gdb.getFormDataEntryFields();
|
||||||
|
|
||||||
|
@ -125,13 +119,15 @@ public class ConvertToServiceModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> paroleChiaveLibereLst = mapFields.get("Parola chiave a scelta libera");
|
List<String> paroleChiaveLibereLst = mapFields.get("Parola chiave a scelta libera");
|
||||||
|
//LOG.debug("Parola chiave a scelta libera: "+paroleChiaveLibereLst);
|
||||||
if(paroleChiaveLibereLst!=null){
|
if(paroleChiaveLibereLst!=null){
|
||||||
concessione.setParoleChiaveLibere(paroleChiaveLibereLst);
|
concessione.setParoleChiaveLibere(paroleChiaveLibereLst);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> setParoleChiaveICCDLst = mapFields.get("Parola chiave relativa alla cronologia");
|
List<String> paroleChiaveICCDLst = mapFields.get("Parola chiave relativa alla cronologia");
|
||||||
if(setParoleChiaveICCDLst!=null){
|
//LOG.debug("Parola chiave relativa alla cronologia: "+paroleChiaveICCDLst);
|
||||||
concessione.setParoleChiaveICCD(paroleChiaveLibereLst);
|
if(paroleChiaveICCDLst!=null){
|
||||||
|
concessione.setParoleChiaveICCD(paroleChiaveICCDLst);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> risorsaCorrelataLst = mapFields.get("Risorsa correlata");
|
List<String> risorsaCorrelataLst = mapFields.get("Risorsa correlata");
|
||||||
|
@ -164,6 +160,26 @@ public class ConvertToServiceModel {
|
||||||
concessione.setTitolari(titolareDatiLst);
|
concessione.setTitolari(titolareDatiLst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> latList = mapFields.get("Latitudine Centroide");
|
||||||
|
if(latList!=null){
|
||||||
|
try {
|
||||||
|
Double centroidLat = Double.parseDouble(latList.get(0));
|
||||||
|
concessione.setCentroidLat(centroidLat);
|
||||||
|
}catch (Exception e) {
|
||||||
|
throw new Exception("Unable to parse "+latList.get(0)+" as valid latitude");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> longList = mapFields.get("Longitudine Centroide");
|
||||||
|
if(longList!=null){
|
||||||
|
try {
|
||||||
|
Double centroidLong = Double.parseDouble(longList.get(0));
|
||||||
|
concessione.setCentroidLong(centroidLong);
|
||||||
|
}catch (Exception e) {
|
||||||
|
throw new Exception("Unable to parse "+longList.get(0)+" as valid longitude");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return concessione;
|
return concessione;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
||||||
LOG.debug("\n\n");
|
LOG.debug("\n\n");
|
||||||
LOG.debug(ConcessioniFormCardTitle.RELAZIONE_DI_SCAVO+" building with client obj: "+rds);
|
LOG.debug(ConcessioniFormCardTitle.RELAZIONE_DI_SCAVO+" building with client obj: "+rds);
|
||||||
RelazioneScavo relazioneDiScavo = ConvertToServiceModel.toRelazioneScavo(rds);
|
RelazioneScavo relazioneDiScavo = ConvertToServiceModel.toRelazioneScavo(rds);
|
||||||
LOG.debug("Built "+ConcessioniFormCardTitle.INFORMAZIONI_DI_PROGETTO+" as server obj: "+relazioneDiScavo);
|
LOG.debug("Built "+ConcessioniFormCardTitle.RELAZIONE_DI_SCAVO+" as server obj: "+relazioneDiScavo);
|
||||||
//Should be only one
|
//Should be only one
|
||||||
for (FileUploaded fileUploaded : rds.getFilesUploaded()) {
|
for (FileUploaded fileUploaded : rds.getFilesUploaded()) {
|
||||||
FileInputStream fis = new FileInputStream(fileUploaded.getTempSystemPath());
|
FileInputStream fis = new FileInputStream(fileUploaded.getTempSystemPath());
|
||||||
|
@ -168,10 +168,6 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
||||||
//If true -> data are published into the SDI
|
//If true -> data are published into the SDI
|
||||||
Boolean publish=true;
|
Boolean publish=true;
|
||||||
|
|
||||||
/*Chiedo al manager di salvare il progetto, causando :
|
|
||||||
*scrittura sul WS
|
|
||||||
*pubblicazione sull'SDI (boolean publish)
|
|
||||||
*scrittura sul DB di applicazione sia dei meta che dei vari link */
|
|
||||||
Concessione registered=manager.commit(publish);
|
Concessione registered=manager.commit(publish);
|
||||||
|
|
||||||
LOG.info("Registered: "+registered);
|
LOG.info("Registered: "+registered);
|
||||||
|
|
Loading…
Reference in New Issue