Starting integration of the geoportal-data-mapper library

This commit is contained in:
Francesco Mangiacrapa 2023-04-13 11:46:17 +02:00
parent 031ba50a03
commit 2d4bfbee38
7 changed files with 61 additions and 24 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.3.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.3.1/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/geoportal-data-viewer-app-3.3.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/geoportal-data-viewer-app-3.3.1/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -35,5 +35,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.3.1-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.3.1/WEB-INF/classes"/>
</classpath>

View File

@ -1,4 +1,4 @@
eclipse.preferences.version=1
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.3.1-SNAPSHOT
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.3.1
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -58,7 +58,13 @@
<wb-module deploy-name="geoportal-data-viewer-app-3.3.1-SNAPSHOT">
<wb-module deploy-name="geoportal-data-viewer-app-3.3.1">
@ -157,6 +163,9 @@
@ -217,6 +226,9 @@
@ -277,6 +289,9 @@
@ -337,6 +352,9 @@
@ -362,6 +380,12 @@
<dependent-module archiveName="metadata-profile-form-builder-widget-2.1.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>
<dependent-module archiveName="geoportal-data-common-2.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -460,6 +484,9 @@
@ -520,6 +547,9 @@
@ -580,6 +610,9 @@

View File

@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v3.4.0-SNAPSHOT] - 2023-04-13
- Integrated the geoportal-data-mapper component [#24978]
## [v3.3.1] - 2023-03-30
- Just including new dependencies

View File

@ -14,7 +14,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>geoportal-data-viewer-app</artifactId>
<packaging>war</packaging>
<version>3.3.1</version>
<version>3.4.0-SNAPSHOT</version>
<name>GeoPortal Data Viewer App</name>
<description>The GeoPortal Data Viewer App is an application to access, discovery and navigate the Geoportal projects/documents by a Web-Map Interface</description>

View File

@ -124,7 +124,7 @@ public class SectionViewer extends Composite {
List<FilesetDV> files = subDocumentView.getListFiles();
if (files != null) {
for (FilesetDV fileset : files) {
showLinkToDownloadWsContent(fileset.getName(), fileset.getListPayload());
showLinkToDownloadWsContent(fileset.getGcubeProfileFieldName(), fileset.getListPayload());
}
}
}

View File

@ -101,7 +101,7 @@ public class Geoportal_JSON_Mapper {
String filesetJSONPath = String.format("%s.%s", JSON_$_POINTER, FILESET);
List<Payload> listPayloads = readPayloadsForFileset(filesetJSONPath, wholeSectionDoc);
FilesetDV filesetDV = new FilesetDV();
filesetDV.setName(FILESET);
filesetDV.setGcubeProfileFieldName(FILESET);
for (Payload payload : listPayloads) {
PayloadDV payloadDV = ConvertToDataValueObjectModel.toPayloadDV(payload);
filesetDV.addPayloadDV(payloadDV);
@ -267,7 +267,7 @@ public class Geoportal_JSON_Mapper {
String filesetJSONPath = String.format("%s.%s", JSON_$_POINTER, filePath.getFieldName());
List<Payload> listPayloads = readPayloadsForFileset(filesetJSONPath, fromSectionDocJSON);
FilesetDV filesetDV = new FilesetDV();
filesetDV.setName(filePath.getGcubeProfileFieldName());
filesetDV.setGcubeProfileFieldName(filePath.getGcubeProfileFieldName());
for (Payload payload : listPayloads) {
PayloadDV payloadDV = ConvertToDataValueObjectModel.toPayloadDV(payload);
filesetDV.addPayloadDV(payloadDV);
@ -392,7 +392,7 @@ public class Geoportal_JSON_Mapper {
String filesetJSONPath = String.format("%s.%s", JSON_$_POINTER, FILESET);
List<Payload> listPayloads = readPayloadsForFileset(filesetJSONPath, wholeSectionDoc);
FilesetDV filesetDV = new FilesetDV();
filesetDV.setName(FILESET);
filesetDV.setGcubeProfileFieldName(FILESET);
for (Payload payload : listPayloads) {
PayloadDV payloadDV = ConvertToDataValueObjectModel.toPayloadDV(payload);
filesetDV.addPayloadDV(payloadDV);
@ -545,11 +545,11 @@ public class Geoportal_JSON_Mapper {
boolean isImage = ImageDetector.isImage(payload.getMimetype());
if (isImage) {
filesetImages.setName(filePath.getGcubeProfileFieldName());
filesetImages.setGcubeProfileFieldName(filePath.getGcubeProfileFieldName());
filesetImages.addPayloadDV(payloadDV);
} else {
filesetFiles.addPayloadDV(payloadDV);
filesetFiles.setName(filePath.getGcubeProfileFieldName());
filesetFiles.setGcubeProfileFieldName(filePath.getGcubeProfileFieldName());
}
}
@ -972,7 +972,7 @@ public class Geoportal_JSON_Mapper {
System.out.println("***** Files");
if (subDocument.getListFiles() != null) {
for (FilesetDV filesetDV : subDocument.getListFiles()) {
System.out.println("******* File Fileset name: " + filesetDV.getName());
System.out.println("******* File Fileset name: " + filesetDV.getGcubeProfileFieldName());
for (PayloadDV payload : filesetDV.getListPayload()) {
System.out.println("********* Payload: " + payload);
}
@ -981,7 +981,7 @@ public class Geoportal_JSON_Mapper {
System.out.println("***** Images");
if (subDocument.getListImages() != null) {
for (FilesetDV filesetDV : subDocument.getListImages()) {
System.out.println("******* Image Fileset name: " + filesetDV.getName());
System.out.println("******* Image Fileset name: " + filesetDV.getGcubeProfileFieldName());
for (PayloadDV payload : filesetDV.getListPayload()) {
System.out.println("********* Payload: " + payload);
}