Added Junit Test testReadProjectView
This commit is contained in:
parent
cae2317480
commit
5b68910147
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.1.0-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.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/geoportal-data-viewer-app-3.1.0-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.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.1.0-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.0.0-SNAPSHOT
|
||||
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.1.0-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">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -35,8 +35,14 @@
|
|||
|
||||
|
||||
|
||||
<wb-module deploy-name="geoportal-data-viewer-app-3.0.0-SNAPSHOT">
|
||||
|
||||
|
||||
|
||||
|
||||
<wb-module deploy-name="geoportal-data-viewer-app-3.1.0-SNAPSHOT">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -73,7 +79,10 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -110,7 +119,10 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -147,7 +159,10 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -184,7 +199,10 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -221,7 +239,10 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -258,7 +279,10 @@
|
|||
|
||||
|
||||
<property name="java-output-path" value="/geoportal-data-viewer-app/target/geoportal-data-viewer-app-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -295,7 +319,10 @@
|
|||
|
||||
|
||||
<property name="context-root" value="geoportal-data-viewer-app"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -332,7 +359,10 @@
|
|||
|
||||
|
||||
</wb-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
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.0.0-SNAPSHOT] - 2022-11-09
|
||||
## [v3.1.0-SNAPSHOT] - 2022-11-29
|
||||
|
||||
## [v3.0.0] - 2022-11-09
|
||||
|
||||
- [#23940] Passed to CMS-UCD
|
||||
- [#23941] Implemented and integrated the DTO Project/Document per UCD config and gCube Metadata Profiles
|
||||
|
|
|
@ -6,16 +6,22 @@ The GeoPortal Data Viewer App is an application to access, discovery and navigat
|
|||
|
||||
* [OpenJDK](https://openjdk.java.net/) - The JDK used
|
||||
* [Maven](https://maven.apache.org/) - Dependency Management
|
||||
* GWT v.2.9.0. [GWT](http://www.gwtproject.org) is licensed under [Apache License 2.0](http://www.gwtproject.org/terms.html)
|
||||
|
||||
**Uses**
|
||||
|
||||
* GWT v.2.9.0. [GWT](http://www.gwtproject.org) is licensed under [Apache License 2.0](http://www.gwtproject.org/terms.html)
|
||||
* GWT-Bootstrap v.2.3.2.0. [GWT-Bootstrap](https://github.com/gwtbootstrap) is licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
||||
* GWT-OpenLayers 3+ v.8.1.0-gwt2_9. [GWT-OL3](https://github.com/TDesjardins/gwt-ol)
|
||||
* OpenLayers v.6.x [OpenLayers](https://openlayers.org/) is licensed under [BSD 2-Clause "Simplified"](https://github.com/openlayers/openlayers/blob/main/LICENSE.md)
|
||||
* Vis-Timeline v7.x [VisTimeline](https://github.com/visjs/vis-timeline) is licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0) and MIT
|
||||
* Handlebarsjs v4.x [Handlebarsjs](https://handlebarsjs.com/) is licensed under MIT
|
||||
|
||||
**Base Maps**
|
||||
|
||||
* OpenStreetMap [openstreetmap](http://www.openstreetmap.org)
|
||||
* Mapbox Satellite [mapbox](https://www.mapbox.com/)
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
N/A
|
||||
|
|
|
@ -56,13 +56,13 @@ public class GeoportalViewer_Tests {
|
|||
private ProjectsCaller clientProjects;
|
||||
|
||||
private static String CONTEXT = "/pred4s/preprod/preVRE";
|
||||
private static String TOKEN = ""; //preVRE
|
||||
private static String TOKEN = "5c3c7551-870d-4259-bd77-a7e603fe4949-980114272"; //preVRE
|
||||
|
||||
//private static String CONTEXT = "/gcube/devsec/devVRE";
|
||||
//private static String TOKEN = ""; // devVRE
|
||||
|
||||
private static String PROFILE_ID = "profiledConcessioni";
|
||||
private static String PROJECT_ID = "6384c56c308f5c28c5ee0986";
|
||||
private static String PROJECT_ID = "6384942f308f5c28c5ee07b3";
|
||||
|
||||
private static String USERNAME = "francesco.mangiacrapa";
|
||||
|
||||
|
@ -219,7 +219,7 @@ public class GeoportalViewer_Tests {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
//@Test
|
||||
public void testReadProjectEdit() {
|
||||
|
||||
try {
|
||||
|
@ -229,7 +229,6 @@ public class GeoportalViewer_Tests {
|
|||
ProjectDVBuilder projectBuilder = ProjectDVBuilder.newBuilder().fullDocumentMap(true);
|
||||
projectBuilder.relationships(true);
|
||||
ProjectDV theProjectDV = ConvertToDataValueObjectModel.toProjectDV(theProject, projectBuilder);
|
||||
Geoportal_JSON_Mapper geojsonM = new Geoportal_JSON_Mapper();
|
||||
ProjectEdit projectEdit = Geoportal_JSON_Mapper.loadProjectEdit(theProjectDV, CONTEXT, USERNAME);
|
||||
Geoportal_JSON_Mapper.prettyPrintProjectEdit(projectEdit);
|
||||
|
||||
|
@ -241,6 +240,31 @@ public class GeoportalViewer_Tests {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadProjectView() {
|
||||
|
||||
try {
|
||||
ScopeProvider.instance.set(CONTEXT);
|
||||
SecurityTokenProvider.instance.set(TOKEN);
|
||||
Project theProject = clientProjects.getProjectByID(PROFILE_ID, PROJECT_ID);
|
||||
ProjectDVBuilder projectBuilder = ProjectDVBuilder.newBuilder().fullDocumentMap(true);
|
||||
projectBuilder.relationships(true);
|
||||
|
||||
System.out.println("project json: "+theProject.getTheDocument().toJson());
|
||||
|
||||
ProjectDV theProjectDV = ConvertToDataValueObjectModel.toProjectDV(theProject, projectBuilder);
|
||||
ProjectView projectView = Geoportal_JSON_Mapper.loadProjectView(theProjectDV, CONTEXT, USERNAME);
|
||||
Geoportal_JSON_Mapper.prettyPrintProjectView(projectView);
|
||||
|
||||
// ProjectView projectView = Geoportal_JSON_Mapper.loadProjectView(theProjectDV, CONTEXT, USERNAME);
|
||||
// Geoportal_JSON_Mapper.prettyPrintProjectView(projectView);
|
||||
System.out.println("\n\n testReadProjectView terminated!!!");
|
||||
} catch (Exception e) {
|
||||
System.err.println("Error");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//@Test
|
||||
public void testTemporalReference() {
|
||||
|
|
Loading…
Reference in New Issue