Just including new dependencies

pull/14/head
parent 5ec86d1a8d
commit 4a44835356

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<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.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>
<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.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.3.1-SNAPSHOT/WEB-INF/classes"/>
</classpath>

@ -1,4 +1,4 @@
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
warSrcDirIsOutput=false

@ -1,5 +1,5 @@
<?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"/>
@ -161,7 +176,12 @@
<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"/>
@ -269,7 +294,12 @@
<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"/>
<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"/>
@ -431,7 +477,12 @@
<property name="context-root" value="geoportal-data-viewer-app"/>
@ -485,7 +536,12 @@
</wb-module>

@ -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.3.1-SNAPSHOT] - 2023-03-30
- Just including new dependencies
## [v3.3.0] - 2023-02-20
#### Fixes

@ -14,7 +14,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>geoportal-data-viewer-app</artifactId>
<packaging>war</packaging>
<version>3.3.0</version>
<version>3.3.1-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>
@ -55,7 +55,7 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId>
<version>3.6.4</version>
<version>3.7.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>

@ -57,15 +57,15 @@ public class GeoportalViewer_Tests {
private ProjectsCaller clientProjects;
//private static String CONTEXT = "/pred4s/preprod/preVRE";
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 CONTEXT = "/pred4s/preprod/preVRE";
// 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 PROJECT_ID = "6388ea6ca1e60e66b7b584e0";
private static String PROJECT_ID = "63d011c4dcac4551b9a6b930";
private static String USERNAME = "francesco.mangiacrapa";
@ -74,7 +74,7 @@ public class GeoportalViewer_Tests {
*
* @return the client
*/
@Before
//@Before
public void getClient() {
// assumeTrue(GCubeTest.isTestInfrastructureEnabled());
ScopeProvider.instance.set(CONTEXT);
@ -103,7 +103,7 @@ public class GeoportalViewer_Tests {
}
}
//@Test
// @Test
public void getLayersForId() {
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);
String jsonDocument = project.getTheDocument().toJson();
System.out.println("JSON Project is: " + jsonDocument);
ACCESS_POLICY accessPolicy = GeportalCheckAccessPolicy.accessPolicyFromSessionLogin(null);
String materializationParentJSONPath = null;
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.
materializationParentJSONPath = String.format("%s..%s[?(@._access._policy=='%s')]", Geoportal_JSON_Mapper.JSON_$_POINTER,
Geoportal_JSON_Mapper.FILESET, accessPolicy);
}else {
//Accessing to all fileset (with any ACCESS_POLICY) when the user is logged in.
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.
materializationParentJSONPath = String.format("%s..%s[?(@._access._policy=='%s')]",
Geoportal_JSON_Mapper.JSON_$_POINTER, Geoportal_JSON_Mapper.FILESET, accessPolicy);
} 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,
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,
// Geoportal_JSON_Mapper.FILESET);
@ -238,7 +239,7 @@ public class GeoportalViewer_Tests {
}
}
//@Test
// @Test
public void testReadProjectEdit() {
try {
@ -261,7 +262,7 @@ public class GeoportalViewer_Tests {
}
}
//@Test
// @Test
public void testTemporalReference() {
try {
ScopeProvider.instance.set(CONTEXT);
@ -270,8 +271,9 @@ public class GeoportalViewer_Tests {
Document temporalJsonTemplate = GeoportalClientCaller.useCaseDescriptors()
.readTemporalDimensionTemplate(theProject.getProfileID());
// String template = "{\"content\": \"$.nome\"," + "\"title\": \"$.nome\","
// + "\"start\" : \"$.dataInizioProgetto\"," + "\"end\" : \"$.dataFineProgetto\"}";
// String template = "{\"content\": \"$.nome\"," + "\"title\": \"$.nome\","
// + "\"start\" : \"$.dataInizioProgetto\"," + "\"end\" :
// \"$.dataFineProgetto\"}";
if (temporalJsonTemplate != null) {
@ -291,14 +293,13 @@ public class GeoportalViewer_Tests {
e.printStackTrace();
}
}
//@Test
// @Test
public void getResultsWithSize() throws Exception {
// List<Project> listOfProjects = client.getListForProfileID(PROFILE_ID);
long start = System.currentTimeMillis();
System.out.println("start at: "+start);
System.out.println("start at: " + start);
SearchingFilter filter = new SearchingFilter();
// Where Clause
@ -310,32 +311,32 @@ public class GeoportalViewer_Tests {
conditions.add(whereClause);
filter.setConditions(conditions);
//NEED TO GET projections
//SETTING PROJECTION ONLY FOR PROEJCT ID
// NEED TO GET projections
// SETTING PROJECTION ONLY FOR PROEJCT ID
LinkedHashMap<String, Object> projectionForIDs = new LinkedHashMap<String, Object>();
projectionForIDs.put(Project.ID, 1);
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);
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;
Stream<Project> targetStream = StreamSupport.stream(itP.spliterator(), false);
List<String> listProjectIDs = targetStream.map(Project::getId).collect(Collectors.toList());
System.out.println("Total Ids are: "+listProjectIDs.size());
//listProjectIDs.stream().forEach(p -> System.out.println(p));
System.out.println("Total Ids are: " + listProjectIDs.size());
// listProjectIDs.stream().forEach(p -> System.out.println(p));
long end = System.currentTimeMillis();
System.out.println("IDS returned in ms: "+(end-start));
//RESETTIG FILTER AND PROJECT TO CLIENT QUERY
System.out.println("IDS returned in ms: " + (end - start));
// RESETTIG FILTER AND PROJECT TO CLIENT QUERY
LinkedHashMap<String, Object> projection = new LinkedHashMap<String, Object>();
// default
//PROJECTION
// PROJECTION
projection.put(Project.ID, 1);
projection.put("_theDocument.nome", 1);
projection.put("_profileID", 1);
@ -353,21 +354,21 @@ public class GeoportalViewer_Tests {
projection.put("_theDocument.dataInizioProgetto", 1);
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);
List<ResultDocumentDV> results = ConvertToDataValueObjectModel.toListResultDocument(itProjects);
int i = 0;
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();
System.out.println("Result listed in ms: "+(end-start));
System.out.println("Result listed in ms: " + (end - start));
}
}

Loading…
Cancel
Save