Just including new dependencies
This commit is contained in:
parent
5ec86d1a8d
commit
4a44835356
|
@ -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.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.3.1-SNAPSHOT/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.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/geoportal-data-viewer-app-3.3.1-SNAPSHOT/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.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.3.1-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -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.0-SNAPSHOT
|
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.3.1-SNAPSHOT
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,8 +52,18 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="geoportal-data-viewer-app-3.3.0-SNAPSHOT">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<wb-module deploy-name="geoportal-data-viewer-app-3.3.1-SNAPSHOT">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -107,7 +117,12 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -161,7 +176,12 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -215,7 +235,12 @@
|
||||||
|
|
||||||
|
|
||||||
<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"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -269,7 +294,12 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -323,7 +353,18 @@
|
||||||
|
|
||||||
|
|
||||||
<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-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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -377,7 +418,12 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="java-output-path" value="/geoportal-data-viewer-app/target/geoportal-data-viewer-app-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
<property name="java-output-path" value="/geoportal-data-viewer-app/target/geoportal-data-viewer-app-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -431,7 +477,12 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="context-root" value="geoportal-data-viewer-app"/>
|
<property name="context-root" value="geoportal-data-viewer-app"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -485,7 +536,12 @@
|
||||||
|
|
||||||
|
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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.3.1-SNAPSHOT] - 2023-03-30
|
||||||
|
|
||||||
|
- Just including new dependencies
|
||||||
|
|
||||||
## [v3.3.0] - 2023-02-20
|
## [v3.3.0] - 2023-02-20
|
||||||
|
|
||||||
#### Fixes
|
#### Fixes
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -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.0</version>
|
<version>3.3.1-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>
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>maven-portal-bom</artifactId>
|
<artifactId>maven-portal-bom</artifactId>
|
||||||
<version>3.6.4</version>
|
<version>3.7.0-SNAPSHOT</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -57,15 +57,15 @@ public class GeoportalViewer_Tests {
|
||||||
|
|
||||||
private ProjectsCaller clientProjects;
|
private ProjectsCaller clientProjects;
|
||||||
|
|
||||||
//private static String CONTEXT = "/pred4s/preprod/preVRE";
|
private static String CONTEXT = "/gcube/devsec/devVRE";
|
||||||
private static String CONTEXT = "/d4science.research-infrastructures.eu/D4OS/GNA";
|
// private static String CONTEXT = "/pred4s/preprod/preVRE";
|
||||||
private static String TOKEN = ""; //GNA
|
// private static String CONTEXT = "/d4science.research-infrastructures.eu/D4OS/GNA";
|
||||||
|
private static String TOKEN = ""; // GNA
|
||||||
|
|
||||||
//private static String CONTEXT = "/gcube/devsec/devVRE";
|
// private static String TOKEN = ""; // devVRE
|
||||||
//private static String TOKEN = ""; // devVRE
|
|
||||||
|
|
||||||
private static String PROFILE_ID = "profiledConcessioni";
|
private static String PROFILE_ID = "profiledConcessioni";
|
||||||
private static String PROJECT_ID = "6388ea6ca1e60e66b7b584e0";
|
private static String PROJECT_ID = "63d011c4dcac4551b9a6b930";
|
||||||
|
|
||||||
private static String USERNAME = "francesco.mangiacrapa";
|
private static String USERNAME = "francesco.mangiacrapa";
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public class GeoportalViewer_Tests {
|
||||||
*
|
*
|
||||||
* @return the client
|
* @return the client
|
||||||
*/
|
*/
|
||||||
@Before
|
//@Before
|
||||||
public void getClient() {
|
public void getClient() {
|
||||||
// assumeTrue(GCubeTest.isTestInfrastructureEnabled());
|
// assumeTrue(GCubeTest.isTestInfrastructureEnabled());
|
||||||
ScopeProvider.instance.set(CONTEXT);
|
ScopeProvider.instance.set(CONTEXT);
|
||||||
|
@ -103,7 +103,7 @@ public class GeoportalViewer_Tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
// @Test
|
||||||
public void getLayersForId() {
|
public void getLayersForId() {
|
||||||
System.out.println("getLayersForId [profileID: " + PROFILE_ID + ", projectID: " + PROJECT_ID + "] called");
|
System.out.println("getLayersForId [profileID: " + PROFILE_ID + ", projectID: " + PROJECT_ID + "] called");
|
||||||
|
|
||||||
|
@ -116,22 +116,23 @@ public class GeoportalViewer_Tests {
|
||||||
Project project = clientProjects.getProjectByID(PROFILE_ID, PROJECT_ID);
|
Project project = clientProjects.getProjectByID(PROFILE_ID, PROJECT_ID);
|
||||||
String jsonDocument = project.getTheDocument().toJson();
|
String jsonDocument = project.getTheDocument().toJson();
|
||||||
System.out.println("JSON Project is: " + jsonDocument);
|
System.out.println("JSON Project is: " + jsonDocument);
|
||||||
|
|
||||||
ACCESS_POLICY accessPolicy = GeportalCheckAccessPolicy.accessPolicyFromSessionLogin(null);
|
ACCESS_POLICY accessPolicy = GeportalCheckAccessPolicy.accessPolicyFromSessionLogin(null);
|
||||||
|
|
||||||
String materializationParentJSONPath = null;
|
String materializationParentJSONPath = null;
|
||||||
|
|
||||||
if(accessPolicy.equals(ACCESS_POLICY.OPEN)) {
|
if (accessPolicy.equals(ACCESS_POLICY.OPEN)) {
|
||||||
//Filtering for ACCESS_POLICY.OPEN when the username is not in session. IAM identity is running, no logged in user.
|
// Filtering for ACCESS_POLICY.OPEN when the username is not in session. IAM
|
||||||
materializationParentJSONPath = String.format("%s..%s[?(@._access._policy=='%s')]", Geoportal_JSON_Mapper.JSON_$_POINTER,
|
// identity is running, no logged in user.
|
||||||
Geoportal_JSON_Mapper.FILESET, accessPolicy);
|
materializationParentJSONPath = String.format("%s..%s[?(@._access._policy=='%s')]",
|
||||||
}else {
|
Geoportal_JSON_Mapper.JSON_$_POINTER, Geoportal_JSON_Mapper.FILESET, accessPolicy);
|
||||||
//Accessing to all fileset (with any ACCESS_POLICY) when the user is logged in.
|
} else {
|
||||||
|
// Accessing to all fileset (with any ACCESS_POLICY) when the user is logged in.
|
||||||
materializationParentJSONPath = String.format("%s..%s", Geoportal_JSON_Mapper.JSON_$_POINTER,
|
materializationParentJSONPath = String.format("%s..%s", Geoportal_JSON_Mapper.JSON_$_POINTER,
|
||||||
Geoportal_JSON_Mapper.FILESET);
|
Geoportal_JSON_Mapper.FILESET);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("jsonPathQuery is: "+materializationParentJSONPath);
|
System.out.println("jsonPathQuery is: " + materializationParentJSONPath);
|
||||||
|
|
||||||
// String materializationParentJSONPath = String.format("%s..%s", Geoportal_JSON_Mapper.JSON_$_POINTER,
|
// String materializationParentJSONPath = String.format("%s..%s", Geoportal_JSON_Mapper.JSON_$_POINTER,
|
||||||
// Geoportal_JSON_Mapper.FILESET);
|
// Geoportal_JSON_Mapper.FILESET);
|
||||||
|
@ -238,7 +239,7 @@ public class GeoportalViewer_Tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
// @Test
|
||||||
public void testReadProjectEdit() {
|
public void testReadProjectEdit() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -261,7 +262,7 @@ public class GeoportalViewer_Tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
// @Test
|
||||||
public void testTemporalReference() {
|
public void testTemporalReference() {
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(CONTEXT);
|
ScopeProvider.instance.set(CONTEXT);
|
||||||
|
@ -270,8 +271,9 @@ public class GeoportalViewer_Tests {
|
||||||
Document temporalJsonTemplate = GeoportalClientCaller.useCaseDescriptors()
|
Document temporalJsonTemplate = GeoportalClientCaller.useCaseDescriptors()
|
||||||
.readTemporalDimensionTemplate(theProject.getProfileID());
|
.readTemporalDimensionTemplate(theProject.getProfileID());
|
||||||
|
|
||||||
// String template = "{\"content\": \"$.nome\"," + "\"title\": \"$.nome\","
|
// String template = "{\"content\": \"$.nome\"," + "\"title\": \"$.nome\","
|
||||||
// + "\"start\" : \"$.dataInizioProgetto\"," + "\"end\" : \"$.dataFineProgetto\"}";
|
// + "\"start\" : \"$.dataInizioProgetto\"," + "\"end\" :
|
||||||
|
// \"$.dataFineProgetto\"}";
|
||||||
|
|
||||||
if (temporalJsonTemplate != null) {
|
if (temporalJsonTemplate != null) {
|
||||||
|
|
||||||
|
@ -291,14 +293,13 @@ public class GeoportalViewer_Tests {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//@Test
|
// @Test
|
||||||
public void getResultsWithSize() throws Exception {
|
public void getResultsWithSize() throws Exception {
|
||||||
// List<Project> listOfProjects = client.getListForProfileID(PROFILE_ID);
|
// List<Project> listOfProjects = client.getListForProfileID(PROFILE_ID);
|
||||||
|
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
System.out.println("start at: "+start);
|
System.out.println("start at: " + start);
|
||||||
SearchingFilter filter = new SearchingFilter();
|
SearchingFilter filter = new SearchingFilter();
|
||||||
|
|
||||||
// Where Clause
|
// Where Clause
|
||||||
|
@ -310,32 +311,32 @@ public class GeoportalViewer_Tests {
|
||||||
conditions.add(whereClause);
|
conditions.add(whereClause);
|
||||||
filter.setConditions(conditions);
|
filter.setConditions(conditions);
|
||||||
|
|
||||||
//NEED TO GET projections
|
// NEED TO GET projections
|
||||||
|
|
||||||
//SETTING PROJECTION ONLY FOR PROEJCT ID
|
// SETTING PROJECTION ONLY FOR PROEJCT ID
|
||||||
LinkedHashMap<String, Object> projectionForIDs = new LinkedHashMap<String, Object>();
|
LinkedHashMap<String, Object> projectionForIDs = new LinkedHashMap<String, Object>();
|
||||||
projectionForIDs.put(Project.ID, 1);
|
projectionForIDs.put(Project.ID, 1);
|
||||||
filter.setProjection(projectionForIDs);
|
filter.setProjection(projectionForIDs);
|
||||||
|
|
||||||
//LIMIT IS NULL MEANS THAT IT IS EQUAL TO NUMBER TOTAL OF DOCUMENTS
|
// LIMIT IS NULL MEANS THAT IT IS EQUAL TO NUMBER TOTAL OF DOCUMENTS
|
||||||
Integer totalDocs = clientProjects.getTotalDocument(PROFILE_ID);
|
Integer totalDocs = clientProjects.getTotalDocument(PROFILE_ID);
|
||||||
Iterator<Project> projects = clientProjects.queryOnMongo(PROFILE_ID, totalDocs, 0, null, filter);
|
Iterator<Project> projects = clientProjects.queryOnMongo(PROFILE_ID, totalDocs, 0, null, filter);
|
||||||
|
|
||||||
//CALCULATING SIZE OF THE ITERATOR OF PROJECT IDs
|
// CALCULATING SIZE OF THE ITERATOR OF PROJECT IDs
|
||||||
Iterable<Project> itP = () -> projects;
|
Iterable<Project> itP = () -> projects;
|
||||||
Stream<Project> targetStream = StreamSupport.stream(itP.spliterator(), false);
|
Stream<Project> targetStream = StreamSupport.stream(itP.spliterator(), false);
|
||||||
List<String> listProjectIDs = targetStream.map(Project::getId).collect(Collectors.toList());
|
List<String> listProjectIDs = targetStream.map(Project::getId).collect(Collectors.toList());
|
||||||
|
|
||||||
System.out.println("Total Ids are: "+listProjectIDs.size());
|
System.out.println("Total Ids are: " + listProjectIDs.size());
|
||||||
//listProjectIDs.stream().forEach(p -> System.out.println(p));
|
// listProjectIDs.stream().forEach(p -> System.out.println(p));
|
||||||
|
|
||||||
long end = System.currentTimeMillis();
|
long end = System.currentTimeMillis();
|
||||||
System.out.println("IDS returned in ms: "+(end-start));
|
System.out.println("IDS returned in ms: " + (end - start));
|
||||||
|
|
||||||
//RESETTIG FILTER AND PROJECT TO CLIENT QUERY
|
// RESETTIG FILTER AND PROJECT TO CLIENT QUERY
|
||||||
LinkedHashMap<String, Object> projection = new LinkedHashMap<String, Object>();
|
LinkedHashMap<String, Object> projection = new LinkedHashMap<String, Object>();
|
||||||
// default
|
// default
|
||||||
//PROJECTION
|
// PROJECTION
|
||||||
projection.put(Project.ID, 1);
|
projection.put(Project.ID, 1);
|
||||||
projection.put("_theDocument.nome", 1);
|
projection.put("_theDocument.nome", 1);
|
||||||
projection.put("_profileID", 1);
|
projection.put("_profileID", 1);
|
||||||
|
@ -353,21 +354,21 @@ public class GeoportalViewer_Tests {
|
||||||
projection.put("_theDocument.dataInizioProgetto", 1);
|
projection.put("_theDocument.dataInizioProgetto", 1);
|
||||||
filter.setProjection(projection);
|
filter.setProjection(projection);
|
||||||
|
|
||||||
|
// Integer totalDocs = client.getTotalDocument(PROFILE_ID);
|
||||||
//Integer totalDocs = client.getTotalDocument(PROFILE_ID);
|
|
||||||
Iterator<Project> itProjects = clientProjects.queryOnMongo(PROFILE_ID, totalDocs, 0, 50, filter);
|
Iterator<Project> itProjects = clientProjects.queryOnMongo(PROFILE_ID, totalDocs, 0, 50, filter);
|
||||||
|
|
||||||
List<ResultDocumentDV> results = ConvertToDataValueObjectModel.toListResultDocument(itProjects);
|
List<ResultDocumentDV> results = ConvertToDataValueObjectModel.toListResultDocument(itProjects);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (ResultDocumentDV projectDV : results) {
|
for (ResultDocumentDV projectDV : results) {
|
||||||
System.out.println(++i + ") " + projectDV.getId() + " dataInizioProgetto: "+projectDV.getDocumentAsMap().get("dataInizioProgetto"));
|
System.out.println(++i + ") " + projectDV.getId() + " dataInizioProgetto: "
|
||||||
|
+ projectDV.getDocumentAsMap().get("dataInizioProgetto"));
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("Result listed has size: "+results.size());
|
System.out.println("Result listed has size: " + results.size());
|
||||||
|
|
||||||
end = System.currentTimeMillis();
|
end = System.currentTimeMillis();
|
||||||
System.out.println("Result listed in ms: "+(end-start));
|
System.out.println("Result listed in ms: " + (end - start));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue