Added Junit Test testReadProjectView
This commit is contained in:
parent
cae2317480
commit
5b68910147
|
@ -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.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>
|
<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.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>
|
<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.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.1.0-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.0.0-SNAPSHOT
|
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.1.0-SNAPSHOT
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -35,7 +35,13 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="geoportal-data-viewer-app-3.0.0-SNAPSHOT">
|
|
||||||
|
|
||||||
|
|
||||||
|
<wb-module deploy-name="geoportal-data-viewer-app-3.1.0-SNAPSHOT">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,6 +97,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,6 +137,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -165,6 +177,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -202,6 +217,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,6 +257,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -276,6 +297,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -313,6 +337,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -350,6 +377,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
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.0.0-SNAPSHOT] - 2022-11-09
|
## [v3.1.0-SNAPSHOT] - 2022-11-29
|
||||||
|
|
||||||
|
## [v3.0.0] - 2022-11-09
|
||||||
|
|
||||||
- [#23940] Passed to CMS-UCD
|
- [#23940] Passed to CMS-UCD
|
||||||
- [#23941] Implemented and integrated the DTO Project/Document per UCD config and gCube Metadata Profiles
|
- [#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
|
* [OpenJDK](https://openjdk.java.net/) - The JDK used
|
||||||
* [Maven](https://maven.apache.org/) - Dependency Management
|
* [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**
|
**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-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)
|
* 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)
|
* 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
|
* 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
|
* 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
|
## Documentation
|
||||||
|
|
||||||
N/A
|
N/A
|
||||||
|
|
|
@ -56,13 +56,13 @@ public class GeoportalViewer_Tests {
|
||||||
private ProjectsCaller clientProjects;
|
private ProjectsCaller clientProjects;
|
||||||
|
|
||||||
private static String CONTEXT = "/pred4s/preprod/preVRE";
|
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 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 = "6384c56c308f5c28c5ee0986";
|
private static String PROJECT_ID = "6384942f308f5c28c5ee07b3";
|
||||||
|
|
||||||
private static String USERNAME = "francesco.mangiacrapa";
|
private static String USERNAME = "francesco.mangiacrapa";
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ public class GeoportalViewer_Tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
//@Test
|
||||||
public void testReadProjectEdit() {
|
public void testReadProjectEdit() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -229,7 +229,6 @@ public class GeoportalViewer_Tests {
|
||||||
ProjectDVBuilder projectBuilder = ProjectDVBuilder.newBuilder().fullDocumentMap(true);
|
ProjectDVBuilder projectBuilder = ProjectDVBuilder.newBuilder().fullDocumentMap(true);
|
||||||
projectBuilder.relationships(true);
|
projectBuilder.relationships(true);
|
||||||
ProjectDV theProjectDV = ConvertToDataValueObjectModel.toProjectDV(theProject, projectBuilder);
|
ProjectDV theProjectDV = ConvertToDataValueObjectModel.toProjectDV(theProject, projectBuilder);
|
||||||
Geoportal_JSON_Mapper geojsonM = new Geoportal_JSON_Mapper();
|
|
||||||
ProjectEdit projectEdit = Geoportal_JSON_Mapper.loadProjectEdit(theProjectDV, CONTEXT, USERNAME);
|
ProjectEdit projectEdit = Geoportal_JSON_Mapper.loadProjectEdit(theProjectDV, CONTEXT, USERNAME);
|
||||||
Geoportal_JSON_Mapper.prettyPrintProjectEdit(projectEdit);
|
Geoportal_JSON_Mapper.prettyPrintProjectEdit(projectEdit);
|
||||||
|
|
||||||
|
@ -242,6 +241,31 @@ public class GeoportalViewer_Tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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
|
//@Test
|
||||||
public void testTemporalReference() {
|
public void testTemporalReference() {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue