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"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <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> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </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> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
@ -35,5 +35,5 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </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> </classpath>

View File

@ -1,4 +1,4 @@
eclipse.preferences.version=1 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 warSrcDir=src/main/webapp
warSrcDirIsOutput=false 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"> <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> <dependency-type>uses</dependency-type>
</dependent-module> </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. 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). 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 ## [v3.3.1] - 2023-03-30
- Just including new dependencies - Just including new dependencies

View File

@ -14,7 +14,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>geoportal-data-viewer-app</artifactId> <artifactId>geoportal-data-viewer-app</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>3.3.1</version> <version>3.4.0-SNAPSHOT</version>
<name>GeoPortal Data Viewer App</name> <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> <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(); List<FilesetDV> files = subDocumentView.getListFiles();
if (files != null) { if (files != null) {
for (FilesetDV fileset : files) { 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); String filesetJSONPath = String.format("%s.%s", JSON_$_POINTER, FILESET);
List<Payload> listPayloads = readPayloadsForFileset(filesetJSONPath, wholeSectionDoc); List<Payload> listPayloads = readPayloadsForFileset(filesetJSONPath, wholeSectionDoc);
FilesetDV filesetDV = new FilesetDV(); FilesetDV filesetDV = new FilesetDV();
filesetDV.setName(FILESET); filesetDV.setGcubeProfileFieldName(FILESET);
for (Payload payload : listPayloads) { for (Payload payload : listPayloads) {
PayloadDV payloadDV = ConvertToDataValueObjectModel.toPayloadDV(payload); PayloadDV payloadDV = ConvertToDataValueObjectModel.toPayloadDV(payload);
filesetDV.addPayloadDV(payloadDV); filesetDV.addPayloadDV(payloadDV);
@ -267,7 +267,7 @@ public class Geoportal_JSON_Mapper {
String filesetJSONPath = String.format("%s.%s", JSON_$_POINTER, filePath.getFieldName()); String filesetJSONPath = String.format("%s.%s", JSON_$_POINTER, filePath.getFieldName());
List<Payload> listPayloads = readPayloadsForFileset(filesetJSONPath, fromSectionDocJSON); List<Payload> listPayloads = readPayloadsForFileset(filesetJSONPath, fromSectionDocJSON);
FilesetDV filesetDV = new FilesetDV(); FilesetDV filesetDV = new FilesetDV();
filesetDV.setName(filePath.getGcubeProfileFieldName()); filesetDV.setGcubeProfileFieldName(filePath.getGcubeProfileFieldName());
for (Payload payload : listPayloads) { for (Payload payload : listPayloads) {
PayloadDV payloadDV = ConvertToDataValueObjectModel.toPayloadDV(payload); PayloadDV payloadDV = ConvertToDataValueObjectModel.toPayloadDV(payload);
filesetDV.addPayloadDV(payloadDV); filesetDV.addPayloadDV(payloadDV);
@ -392,7 +392,7 @@ public class Geoportal_JSON_Mapper {
String filesetJSONPath = String.format("%s.%s", JSON_$_POINTER, FILESET); String filesetJSONPath = String.format("%s.%s", JSON_$_POINTER, FILESET);
List<Payload> listPayloads = readPayloadsForFileset(filesetJSONPath, wholeSectionDoc); List<Payload> listPayloads = readPayloadsForFileset(filesetJSONPath, wholeSectionDoc);
FilesetDV filesetDV = new FilesetDV(); FilesetDV filesetDV = new FilesetDV();
filesetDV.setName(FILESET); filesetDV.setGcubeProfileFieldName(FILESET);
for (Payload payload : listPayloads) { for (Payload payload : listPayloads) {
PayloadDV payloadDV = ConvertToDataValueObjectModel.toPayloadDV(payload); PayloadDV payloadDV = ConvertToDataValueObjectModel.toPayloadDV(payload);
filesetDV.addPayloadDV(payloadDV); filesetDV.addPayloadDV(payloadDV);
@ -545,11 +545,11 @@ public class Geoportal_JSON_Mapper {
boolean isImage = ImageDetector.isImage(payload.getMimetype()); boolean isImage = ImageDetector.isImage(payload.getMimetype());
if (isImage) { if (isImage) {
filesetImages.setName(filePath.getGcubeProfileFieldName()); filesetImages.setGcubeProfileFieldName(filePath.getGcubeProfileFieldName());
filesetImages.addPayloadDV(payloadDV); filesetImages.addPayloadDV(payloadDV);
} else { } else {
filesetFiles.addPayloadDV(payloadDV); filesetFiles.addPayloadDV(payloadDV);
filesetFiles.setName(filePath.getGcubeProfileFieldName()); filesetFiles.setGcubeProfileFieldName(filePath.getGcubeProfileFieldName());
} }
} }
@ -972,7 +972,7 @@ public class Geoportal_JSON_Mapper {
System.out.println("***** Files"); System.out.println("***** Files");
if (subDocument.getListFiles() != null) { if (subDocument.getListFiles() != null) {
for (FilesetDV filesetDV : subDocument.getListFiles()) { 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()) { for (PayloadDV payload : filesetDV.getListPayload()) {
System.out.println("********* Payload: " + payload); System.out.println("********* Payload: " + payload);
} }
@ -981,7 +981,7 @@ public class Geoportal_JSON_Mapper {
System.out.println("***** Images"); System.out.println("***** Images");
if (subDocument.getListImages() != null) { if (subDocument.getListImages() != null) {
for (FilesetDV filesetDV : subDocument.getListImages()) { 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()) { for (PayloadDV payload : filesetDV.getListPayload()) {
System.out.println("********* Payload: " + payload); System.out.println("********* Payload: " + payload);
} }