Compare commits
1 Commits
master
...
task_25066
Author | SHA1 | Date |
---|---|---|
Francesco Mangiacrapa | 3a7005728f |
14
.classpath
14
.classpath
|
@ -1,11 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.7.0/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.5.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.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
|
@ -30,10 +35,5 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/geoportal-data-viewer-app-3.7.0/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.7.0/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.5.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.7.0
|
||||
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.5.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">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -84,132 +84,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<wb-module deploy-name="geoportal-data-viewer-app-3.7.0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<wb-module deploy-name="geoportal-data-viewer-app-3.5.0-SNAPSHOT">
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -295,69 +171,7 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -443,69 +257,7 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -591,69 +343,7 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -739,7 +429,59 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -773,75 +515,10 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="geoportal-client-1.2.2.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-client/geoportal-client">
|
||||
<dependent-module archiveName="geoportal-data-common-2.2.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="geoportal-common-1.1.1.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-common/geoportal-common">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -927,69 +604,7 @@
|
|||
|
||||
|
||||
<property name="java-output-path" value="/geoportal-data-viewer-app/target/geoportal-data-viewer-app-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1075,69 +690,7 @@
|
|||
|
||||
|
||||
<property name="context-root" value="geoportal-data-viewer-app"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1223,69 +776,7 @@
|
|||
|
||||
|
||||
</wb-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -4,19 +4,7 @@
|
|||
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.7.0]
|
||||
|
||||
- Provided the "Export as PDF" facility [#26026]
|
||||
- Integrated the GeoportalExporter as service [#27321]
|
||||
- Passed to the new KC-client [#27398]
|
||||
|
||||
## [v3.6.0]
|
||||
|
||||
- GUI optimization [#25461]
|
||||
- Using the latest libraries version: gwt-ol.v8.4.1 (with openlayers.v6.6.1) and gwt.v2.10
|
||||
- Showing basic statistics (i.e. "X project published") via 'countByPhase' method [#25598]
|
||||
|
||||
## [v3.5.0]
|
||||
## [v3.5.0-SNAPSHOT]
|
||||
|
||||
- Supported the cross-filtering [#25074]
|
||||
- Supported the grouped custom layers [#25110]
|
||||
|
|
31
README.md
31
README.md
|
@ -1,6 +1,6 @@
|
|||
# GeoPortal Data Viewer App
|
||||
|
||||
The "Geoportal data-viewer" technology allows users to access and search for spatio-temporal documents through a web GIS which allows them to: (i) navigate and select the projects published in the system by "geographical map" (spatial dimension) , (ii) navigate and select the relationships between projects (evolution of over time) via "timeline" (temporal dimension), (iii) view metadata and resources (images, layers, etc. .) of documents via the "project view detail", (iv) export a view of the map with the layer of interest or add the layers of a project to the main map, (v) manage the order and overlapping of the layers, (vi) execute spatial queries on the layers and view the results, (vii) search through metadata or temporal dimension queries for the projects of interest, (vii) apply spatial filters for cross-layer.
|
||||
The GeoPortal Data Viewer App is an application to access, discovery and navigate the Geoportal projects/documents by a Web-Map Interface
|
||||
|
||||
## Built With
|
||||
|
||||
|
@ -9,9 +9,9 @@ The "Geoportal data-viewer" technology allows users to access and search for spa
|
|||
|
||||
**Uses**
|
||||
|
||||
* GWT v.2.10.0. [GWT](http://www.gwtproject.org) is licensed under [Apache License 2.0](http://www.gwtproject.org/terms.html)
|
||||
* 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.5.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)
|
||||
* NanoGallery v2.X [NanoGallery2](https://github.com/nanostudio-org/nanogallery2) is licensed under [GNU General Public License "gplv3"](https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
* 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
|
||||
|
@ -21,40 +21,17 @@ The "Geoportal data-viewer" technology allows users to access and search for spa
|
|||
|
||||
<img src="https://gcube.wiki.gcube-system.org/images_gcube/8/82/GeoPortalDataViewer_Architecture.png" style="max-width:800px;" alt="GeoPortal Data-Viewer - Architecture" />
|
||||
|
||||
## Showcase
|
||||
|
||||
##### D4GNA instance of Geoportal D4Science
|
||||
|
||||
see at [Dataset per il Geoportale Nazionale per l’Archeologia (D4GNA)](https://gna.d4science.org/)
|
||||
|
||||
**D4GNA Viewer - OSM**
|
||||
|
||||
<img src="https://gcube.wiki.gcube-system.org/images_gcube/0/06/D4GNA_Viewer_OSM.png" style="max-width:800px;" alt="Data_Viewer_OSM" />
|
||||
|
||||
**D4GNA Viewer - MapBox**
|
||||
|
||||
<img src="https://gcube.wiki.gcube-system.org/images_gcube/9/9c/D4GNA_Viewer_MapBox.png" style="max-width:800px;" alt="Data_Viewer_MapBox" />
|
||||
|
||||
**D4GNA Viewer - Discovering...**
|
||||
|
||||
<img src="https://gcube.wiki.gcube-system.org/images_gcube/8/85/D4GNA_ERCIM_3.png" style="max-width:800px;" alt="D4GNA_ERCIM_3" />
|
||||
<br />
|
||||
<br />
|
||||
<img src="https://gcube.wiki.gcube-system.org/images_gcube/9/9c/D4GNA_ERCIM_2.png" style="max-width:800px;" alt="D4GNA_ERCIM_2" />
|
||||
|
||||
## Documentation
|
||||
|
||||
Geoportal Service Documentation is available at [gCube CMS Suite](https://geoportal.d4science.org/geoportal-service/docs/index.html)
|
||||
|
||||
User Guide (DRAFT ITA) is available at [Guida al DataViewer D4GNA (DRAFT-ITA)](https://gcube.wiki.gcube-system.org/images_gcube/b/b3/D4science_Guida_al_DataViewer_D4GNA_bozza.pdf)
|
||||
|
||||
## Change log
|
||||
|
||||
See the [Releases](https://code-repo.d4science.org/gCubeSystem/geoportal-data-viewer-app/releases)
|
||||
|
||||
## Authors
|
||||
|
||||
* **Francesco Mangiacrapa** ([ORCID](https://orcid.org/0000-0002-6528-664X)) Computer Scientist at [ISTI-CNR Infrascience Group](http://infrascience.isti.cnr.it)
|
||||
* **Francesco Mangiacrapa** ([ORCID](https://orcid.org/0000-0002-6528-664X)) Computer Scientist at [ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience)
|
||||
|
||||
## License
|
||||
|
||||
|
|
44
pom.xml
44
pom.xml
|
@ -14,7 +14,7 @@
|
|||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>geoportal-data-viewer-app</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>3.7.0</version>
|
||||
<version>3.5.0-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>
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
|||
<gwt.version>2.10.0</gwt.version>
|
||||
<gwt.compiler.style>PRETTY</gwt.compiler.style>
|
||||
<gson.version>2.6.2</gson.version>
|
||||
<gwt.ol.version>8.5.0</gwt.ol.version>
|
||||
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
|
||||
<!-- GWT 2.9 support 8, 9 and 11 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
|
@ -56,40 +55,13 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-portal-bom</artifactId>
|
||||
<version>${gcube-portal-bom-version}</version>
|
||||
<version>3.7.0</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<profiles>
|
||||
<!-- PROD profile -->
|
||||
<profile>
|
||||
<id>geoportal-data-viewer-app-release-profile</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>Release</name>
|
||||
</property>
|
||||
</activation>
|
||||
<properties>
|
||||
<gcube-portal-bom-version>4.0.0</gcube-portal-bom-version>
|
||||
</properties>
|
||||
</profile>
|
||||
<!-- DEV profile -->
|
||||
<profile>
|
||||
<id>geoportal-data-viewer-app-snapshot-profile</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>!Release</name>
|
||||
</property>
|
||||
</activation>
|
||||
<properties>
|
||||
<gcube-portal-bom-version>4.0.0-SNAPSHOT</gcube-portal-bom-version>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
|
@ -130,7 +102,7 @@
|
|||
<dependency>
|
||||
<groupId>com.github.tdesjardins</groupId>
|
||||
<artifactId>gwt-ol3</artifactId>
|
||||
<version>${gwt.ol.version}</version>
|
||||
<version>8.1.0-gwt2_9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.gwtbootstrap</groupId>
|
||||
|
@ -174,13 +146,13 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.application</groupId>
|
||||
<artifactId>geoportal-data-mapper</artifactId>
|
||||
<version>[1.0.1, 2.0.0-SNAPSHOT)</version>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.application</groupId>
|
||||
<artifactId>geoportal-data-common</artifactId>
|
||||
<version>[2.0.0, 3.0.0-SNAPSHOT)</version>
|
||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -202,26 +174,30 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>keycloak-client</artifactId>
|
||||
<version>[2.0.0, 3.0.0-SNAPSHOT)</version>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.liferay.portal</groupId>
|
||||
<artifactId>portal-service</artifactId>
|
||||
<!-- <version>6.2.5</version> -->
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.portlet</groupId>
|
||||
<artifactId>portlet-api</artifactId>
|
||||
<!-- <version>2.0</version> -->
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<!-- <version>1.6.4</version> -->
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<!-- <version>1.6.4</version> -->
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -17,17 +17,11 @@
|
|||
|
||||
<inherits name="com.google.gwt.json.JSON" />
|
||||
|
||||
<inherits
|
||||
name='org.gcube.portal.clientcontext.GCubeClientContext' />
|
||||
|
||||
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||
|
||||
<!-- Other module inherits -->
|
||||
|
||||
<servlet path="/geoportalexporterservice"
|
||||
class="org.gcube.portlets.user.geoportaldataviewer.server.GeoportalExporterActionServlet" />
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<entry-point
|
||||
class='org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewer' />
|
||||
|
|
|
@ -64,7 +64,7 @@ import org.gcube.portlets.user.geoportaldataviewer.client.gis.ExtentWrapped;
|
|||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.MapUtils;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayerMap;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayerMap.CQL_FACILITY_ORIGIN;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GeoportalImages;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GNAImages;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.GeonaDataViewMainPanel;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.cms.project.relation.TimelineManagerStatus;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.util.OLGeoJSONUtil;
|
||||
|
@ -111,8 +111,6 @@ import ol.Feature;
|
|||
public class GeoportalDataViewer implements EntryPoint {
|
||||
|
||||
public static final String DIV_TIMELINE_DATA = "timeline-data";
|
||||
|
||||
public static final String DIV_LAYER_VIEW = "layer-viewer";
|
||||
|
||||
public static final String APP_NOTIFIER = "app-notifier";
|
||||
|
||||
|
@ -150,7 +148,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|||
int attempt = 0;
|
||||
|
||||
private LoaderIcon loaderApp = new LoaderIcon("Loading application... please wait",
|
||||
new com.google.gwt.user.client.ui.Image(GeoportalImages.ICONS.spinnerEarth()));
|
||||
new com.google.gwt.user.client.ui.Image(GNAImages.ICONS.spinnerEarth()));
|
||||
|
||||
private HTML attributionDiv = new HTML();
|
||||
|
||||
|
@ -416,8 +414,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|||
int height = rootHeight;
|
||||
mainPanel.setPanelsHeight(height);
|
||||
GWT.log("Set height: " + height);
|
||||
|
||||
mainPanel.setPanelsWidth(Window.getClientWidth());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -543,7 +540,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|||
Modal errorModal = new Modal(true, true);
|
||||
errorModal.setCloseVisible(true);
|
||||
errorModal.setTitle("Oops...");
|
||||
Image geoportalError = new Image(GeoportalImages.ICONS.warningError());
|
||||
Image geoportalError = new Image(GNAImages.ICONS.warningError());
|
||||
FlowPanel errorPanelMsg = new FlowPanel();
|
||||
errorPanelMsg.getElement().addClassName("general_warning");
|
||||
errorPanelMsg.add(geoportalError);
|
||||
|
@ -1072,7 +1069,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|||
* @return the general error panel
|
||||
*/
|
||||
private FlowPanel getGeneralErrorPanel() {
|
||||
Image geoportalError = new Image(GeoportalImages.ICONS.geoportaServiceError());
|
||||
Image geoportalError = new Image(GNAImages.ICONS.geoportaServiceError());
|
||||
FlowPanel errorPanelMsg = new FlowPanel();
|
||||
errorPanelMsg.getElement().addClassName("general_error");
|
||||
errorPanelMsg.add(geoportalError);
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.gcube.portlets.user.geoportaldataviewer.client;
|
|||
import org.gcube.application.geoportalcommon.ConvertToDataViewModel;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayersMapParameters;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
|
||||
|
@ -16,17 +15,6 @@ import com.google.gwt.i18n.client.DateTimeFormat;
|
|||
*/
|
||||
public class GeoportalDataViewerConstants {
|
||||
|
||||
//Geoportal_Exporter_ACTION_SERVLET
|
||||
public static final String UCD_ID_PARAMETER = "ucdID";
|
||||
public static final String PROIECT_ID_PARAMETER = "projectID";
|
||||
public static final String CONTEXT_ID_PARAMETER = "c_id";
|
||||
public static final String USER_ID_PARAMETER = "u_id";
|
||||
public static final String USERNAME_PARAMETER = "usn";
|
||||
public static final String GEOPORTAL_EXPORT_ACTION_SERVLET = GWT.getModuleBaseURL()
|
||||
+ "geoportalexporterservice";
|
||||
|
||||
public static final int TABLET_WIDTH = 1601;
|
||||
|
||||
public static final String MAP_DIV = "map";
|
||||
|
||||
public static final String GET_WMS_PARAMETER = "wmsrequest";
|
||||
|
@ -37,7 +25,7 @@ public class GeoportalDataViewerConstants {
|
|||
public static final String GET_MAX_ZOOM_LEVEL = OpenLayersMapParameters.OL_MAP_PARAM.maxzoomlevel.name();
|
||||
public static final String GET_ZOOM = OpenLayersMapParameters.OL_MAP_PARAM.zoom.name();
|
||||
public static final String GET_CENTER_MAP_TO_LONG_LAT = OpenLayersMapParameters.OL_MAP_PARAM.centermap.name();
|
||||
|
||||
|
||||
public static final Double INITIAL_LAYER_OPACITY = 0.8;
|
||||
public static final int SEARCH_LIMIT_RESULTS_TO_MAXIMUM = 50;
|
||||
|
||||
|
@ -49,29 +37,6 @@ public class GeoportalDataViewerConstants {
|
|||
|
||||
public static final String PROJECT_ID_KEY_FEATURE = "projectid";
|
||||
|
||||
public static enum GisToolbarFacilities {
|
||||
COLLECTION("Collection", "Open the collections"), MAP("Map", "Select the base Map"),
|
||||
OVERLAY("Overlay", "Add overlay layers"), SEARCH("Search", "Search in the collections"),
|
||||
FILTER("Filter", "Apply spatial filtering"), LAYERS("Layers", "Layers added to Map"),
|
||||
PRESET_LOCATION("Preset Location", "Center the Map to Location");
|
||||
|
||||
String name;
|
||||
String tooltip;
|
||||
|
||||
GisToolbarFacilities(String name, String tooltip) {
|
||||
this.name = name;
|
||||
this.tooltip = tooltip;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getTooltip() {
|
||||
return tooltip;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The Enum LayerType.
|
||||
*
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.gcube.application.geoportalcommon.shared.geoportal.materialization.GC
|
|||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.GEOPORTAL_DATA_HANDLER;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
|
||||
import org.gcube.application.geoportalcommon.shared.gis.BoundsMap;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoportalSpatialQueryResult;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoNaSpatialQueryResult;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.ItemFieldsResponse;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.ResultSetPaginatedDataIDs;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.ViewerConfiguration;
|
||||
|
@ -57,8 +57,8 @@ public interface GeoportalDataViewerService extends RemoteService {
|
|||
* @return the data result
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
List<GeoportalSpatialQueryResult> getDataResult(List<LayerObject> layerObjects, String mapSrsName,
|
||||
BoundsMap mapBBOX, int maxWFSFeature, double zoomLevel) throws Exception;
|
||||
List<GeoNaSpatialQueryResult> getDataResult(List<LayerObject> layerObjects, String mapSrsName, BoundsMap mapBBOX,
|
||||
int maxWFSFeature, double zoomLevel) throws Exception;
|
||||
|
||||
/**
|
||||
* Gets the my login.
|
||||
|
@ -104,7 +104,7 @@ public interface GeoportalDataViewerService extends RemoteService {
|
|||
* @param zoomLevel the zoom level
|
||||
* @return the WFS features
|
||||
*/
|
||||
List<GeoportalSpatialQueryResult> getWFSFeatures(List<LayerObject> layerObjects, String mapSrsName,
|
||||
List<GeoNaSpatialQueryResult> getWFSFeatures(List<LayerObject> layerObjects, String mapSrsName,
|
||||
BoundsMap selectBBOX, int maxWFSFeature, double zoomLevel);
|
||||
|
||||
/**
|
||||
|
@ -227,8 +227,4 @@ public interface GeoportalDataViewerService extends RemoteService {
|
|||
*/
|
||||
String getHTTPResponseForURL(String url);
|
||||
|
||||
Integer getCountFor(String profileID, String phase, String status);
|
||||
|
||||
Boolean checkExportAsPDFConfig();
|
||||
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.gcube.application.geoportalcommon.shared.geoportal.materialization.GC
|
|||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.GEOPORTAL_DATA_HANDLER;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
|
||||
import org.gcube.application.geoportalcommon.shared.gis.BoundsMap;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoportalSpatialQueryResult;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoNaSpatialQueryResult;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.ItemFieldsResponse;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.ResultSetPaginatedDataIDs;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.ViewerConfiguration;
|
||||
|
@ -48,7 +48,7 @@ public interface GeoportalDataViewerServiceAsync {
|
|||
void parseWmsRequest(String wmsRequest, String layerName, AsyncCallback<GeoInformationForWMSRequest> callback);
|
||||
|
||||
void getDataResult(List<LayerObject> layerObjects, String mapSrsName, BoundsMap mapBBOX, int maxWFSFeature,
|
||||
double zoomLevel, AsyncCallback<List<GeoportalSpatialQueryResult>> callback);
|
||||
double zoomLevel, AsyncCallback<List<GeoNaSpatialQueryResult>> callback);
|
||||
|
||||
void getMyLogin(AsyncCallback<String> callback);
|
||||
|
||||
|
@ -60,7 +60,7 @@ public interface GeoportalDataViewerServiceAsync {
|
|||
AsyncCallback<List<GCubeSDIViewerLayerDV>> asyncCallback);
|
||||
|
||||
void getWFSFeatures(List<LayerObject> layerObjects, String mapSrsName, BoundsMap selectBBOX, int maxWFSFeature,
|
||||
double zoomLevel, AsyncCallback<List<GeoportalSpatialQueryResult>> callback);
|
||||
double zoomLevel, AsyncCallback<List<GeoNaSpatialQueryResult>> callback);
|
||||
|
||||
void getListBaseLayers(AsyncCallback<List<BaseMapLayer>> callback);
|
||||
|
||||
|
@ -91,8 +91,4 @@ public interface GeoportalDataViewerServiceAsync {
|
|||
|
||||
void getHTTPResponseForURL(String url, AsyncCallback<String> callback);
|
||||
|
||||
void getCountFor(String profileID, String phase, String status, AsyncCallback<Integer> callback);
|
||||
|
||||
void checkExportAsPDFConfig(AsyncCallback<Boolean> callback);
|
||||
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.gcube.portlets.user.geoportaldataviewer.client.ui.ModalWindow;
|
|||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.cms.project.ProjectUtil;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.StringUtil;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.URLUtil;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoportalSpatialQueryResult;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoNaSpatialQueryResult;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.GeoQuery;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerItem;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerObject;
|
||||
|
@ -190,7 +190,7 @@ public class LayerManager {
|
|||
|
||||
GeoportalDataViewerServiceAsync.Util.getInstance().getDataResult(listLO, olMap.getProjectionCode(),
|
||||
mapBBOX, GeoportalDataViewerConstants.MAX_WFS_FEATURES, olMap.getCurrentZoomLevel(),
|
||||
new AsyncCallback<List<GeoportalSpatialQueryResult>>() {
|
||||
new AsyncCallback<List<GeoNaSpatialQueryResult>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -199,7 +199,7 @@ public class LayerManager {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<GeoportalSpatialQueryResult> listGeonaDataObjects) {
|
||||
public void onSuccess(List<GeoNaSpatialQueryResult> listGeonaDataObjects) {
|
||||
|
||||
if (listGeonaDataObjects == null)
|
||||
return;
|
||||
|
@ -221,7 +221,7 @@ public class LayerManager {
|
|||
List<FeatureRow> theFeatures = null;
|
||||
|
||||
// TODO SWTCH FOR EARCH ITEM TYPE
|
||||
for (final GeoportalSpatialQueryResult geoNaDataObject : listGeonaDataObjects) {
|
||||
for (final GeoNaSpatialQueryResult geoNaDataObject : listGeonaDataObjects) {
|
||||
GWT.log("GeoNaDataObject: " + geoNaDataObject);
|
||||
List<FeatureRow> features = geoNaDataObject.getFeatures();
|
||||
LayerItem layerItem = geoNaDataObject.getSourceLayerObject().getLayerItem();
|
||||
|
@ -515,7 +515,7 @@ public class LayerManager {
|
|||
GWT.log("Parsed WMS Request returned: " + geoInfoWMS);
|
||||
|
||||
LayerItem layerItem = toLayerItem(featureType, layerTitle, geoInfoWMS.getLayerName(),
|
||||
geoInfoWMS.getWmsRequest(), geoInfoWMS.getServiceEndPoint(), true, isBase,
|
||||
geoInfoWMS.getWmsRequest(), geoInfoWMS.getBaseWmsServiceHost(), true, isBase,
|
||||
displayInLayerSwitcher, (ArrayList<String>) geoInfoWMS.getStyles().getGeoStyles(),
|
||||
geoInfoWMS.getWmsRequest(), false, geoInfoWMS.getMapWMSNoStandard(),
|
||||
geoInfoWMS.isNcWMS(), UUID, geoInfoWMS.getZAxis(), minResolution, maxResolution);
|
||||
|
@ -709,7 +709,7 @@ public class LayerManager {
|
|||
* @param listGeoNaDataObject the list geo na data object
|
||||
* @param queryClick the query click
|
||||
*/
|
||||
public void showPopupInfoForLayer(List<GeoportalSpatialQueryResult> listGeoNaDataObject, ExtentWrapped queryClick) {
|
||||
public void showPopupInfoForLayer(List<GeoNaSpatialQueryResult> listGeoNaDataObject, ExtentWrapped queryClick) {
|
||||
GWT.log("showPopupInfoForLayer called for " + listGeoNaDataObject);
|
||||
|
||||
ScrollPanel scrollPanel = new ScrollPanel();
|
||||
|
@ -767,7 +767,7 @@ public class LayerManager {
|
|||
// }
|
||||
|
||||
String prevProjectId = "";
|
||||
for (GeoportalSpatialQueryResult geoNaSpatialQueryResult : listGeoNaDataObject) {
|
||||
for (GeoNaSpatialQueryResult geoNaSpatialQueryResult : listGeoNaDataObject) {
|
||||
try {
|
||||
|
||||
Set<String> indexLayers = mapIndexLayerObjects.keySet();
|
||||
|
@ -1123,7 +1123,7 @@ public class LayerManager {
|
|||
* @param feature the feature
|
||||
* @param onFailureCenterTo the on failure center to
|
||||
*/
|
||||
public void showPopupInfoForCentroidLayer(GeoportalSpatialQueryResult geoNaDataObject, FeatureRow feature,
|
||||
public void showPopupInfoForCentroidLayer(GeoNaSpatialQueryResult geoNaDataObject, FeatureRow feature,
|
||||
Coordinate onFailureCenterTo) {
|
||||
GWT.log("showPopupInfoForCentroidLayer showing feature: " + feature);
|
||||
GWT.log("showPopupInfoForCentroidLayer showing layerObject: " + geoNaDataObject.getSourceLayerObject());
|
||||
|
@ -1142,7 +1142,6 @@ public class LayerManager {
|
|||
FlexTable intFlex = new FlexTable();
|
||||
intFlex.setCellPadding(1);
|
||||
intFlex.setCellSpacing(1);
|
||||
intFlex.getElement().addClassName("thePopDataTable");
|
||||
if (projectDV.getTheDocument() != null) {
|
||||
LinkedHashMap<String, Object> map = projectDV.getTheDocument().getDocumentAsMap();
|
||||
// my-html-table
|
||||
|
|
|
@ -32,15 +32,15 @@ public class ExtentWrapped extends ol.Extent {
|
|||
super(minX, minY, maxX, maxY);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @param coordinate coordinate to check.
|
||||
// * @return true if the passed coordinate is contained or on the edge of the
|
||||
// * extent.
|
||||
// */
|
||||
// @JsOverlay
|
||||
// public final Coordinate getCenter() {
|
||||
// return getCenter((ol.Extent) this);
|
||||
// }
|
||||
/**
|
||||
* @param coordinate coordinate to check.
|
||||
* @return true if the passed coordinate is contained or on the edge of the
|
||||
* extent.
|
||||
*/
|
||||
@JsOverlay
|
||||
public final Coordinate getCenter() {
|
||||
return getCenter((ol.Extent) this);
|
||||
}
|
||||
|
||||
@JsMethod(name = "getCenter", namespace = PACKAGE_EXTENT)
|
||||
private static native Coordinate getCenter(Extent extent);
|
||||
|
|
|
@ -8,7 +8,7 @@ import org.gcube.application.geoportalcommon.shared.gis.BoundsMap;
|
|||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewer;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants.MAP_PROJECTION;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GeoportalImages;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GNAImages;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.BaseMapLayer;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.GeoQuery;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.GeoQuery.TYPE;
|
||||
|
@ -87,7 +87,7 @@ public class LightOpenLayerMap {
|
|||
|
||||
private ol.layer.Vector geometryLayer;
|
||||
|
||||
private String markerURL = GeoportalImages.ICONS.mapMarkerIcon().getURL();
|
||||
private String markerURL = GNAImages.ICONS.mapMarkerIcon().getURL();
|
||||
|
||||
private LayerOrder layerOrder = new LayerOrder();
|
||||
|
||||
|
|
|
@ -439,7 +439,7 @@ public abstract class OpenLayerMap {
|
|||
imageWMSParams.setLayers(layerItem.getName());
|
||||
|
||||
ImageWmsOptions imageWMSOptions = OLFactory.createOptions();
|
||||
imageWMSOptions.setUrl(layerItem.getMapServerEndpoint());
|
||||
imageWMSOptions.setUrl(layerItem.getMapServerHost());
|
||||
|
||||
imageWMSOptions.setParams(imageWMSParams);
|
||||
// imageWMSOptions.setRatio(1.5f);
|
||||
|
@ -544,7 +544,7 @@ public abstract class OpenLayerMap {
|
|||
imageWMSParams.setLayers(layerItem.getName());
|
||||
|
||||
ImageWmsOptions imageWMSOptions = OLFactory.createOptions();
|
||||
imageWMSOptions.setUrl(layerItem.getMapServerEndpoint());
|
||||
imageWMSOptions.setUrl(layerItem.getMapServerHost());
|
||||
imageWMSOptions.setParams(imageWMSParams);
|
||||
// imageWMSOptions.setRatio(1.5f);
|
||||
|
||||
|
@ -595,7 +595,7 @@ public abstract class OpenLayerMap {
|
|||
imageWMSParams.setLayers(layerItem.getName());
|
||||
|
||||
ImageWmsOptions imageWMSOptions = OLFactory.createOptions();
|
||||
imageWMSOptions.setUrl(layerItem.getMapServerEndpoint());
|
||||
imageWMSOptions.setUrl(layerItem.getMapServerHost());
|
||||
imageWMSOptions.setParams(imageWMSParams);
|
||||
// imageWMSOptions.setRatio(1.5f);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import com.github.gwtbootstrap.client.ui.constants.BaseIconType;
|
|||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
|
||||
public interface GeoportalIcons extends ClientBundle {
|
||||
public interface GNAIcons extends ClientBundle {
|
||||
|
||||
/** My custom base icon collection */
|
||||
public enum CustomIconType implements BaseIconType {
|
||||
|
@ -15,7 +15,7 @@ public interface GeoportalIcons extends ClientBundle {
|
|||
|
||||
/** Inject the icon's css once at first usage */
|
||||
static {
|
||||
GeoportalImages icons = GWT.create(GeoportalImages.class);
|
||||
GNAImages icons = GWT.create(GNAImages.class);
|
||||
icons.css().ensureInjected();
|
||||
}
|
||||
|
|
@ -5,13 +5,13 @@ import com.google.gwt.resources.client.ClientBundle;
|
|||
import com.google.gwt.resources.client.CssResource;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
|
||||
public interface GeoportalImages extends ClientBundle {
|
||||
public interface GNAImages extends ClientBundle {
|
||||
|
||||
/** Get access to the css resource during gwt compilation */
|
||||
@Source("baseIcons.css")
|
||||
CssResource css();
|
||||
|
||||
public static final GeoportalImages ICONS = GWT.create(GeoportalImages.class);
|
||||
public static final GNAImages ICONS = GWT.create(GNAImages.class);
|
||||
|
||||
/**
|
||||
* Our sample image icon. Makes the image resource for the gwt-compiler's css
|
|
@ -11,20 +11,9 @@
|
|||
top: 50px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.to-align-left {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
color: white !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.to-align-left :hover {
|
||||
color: #F5F5F5;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel ui:field="detailsHTMLPanel" visible="false">
|
||||
<b:Button ui:field="closeButton" addStyleNames="{style.to-align-left}"></b:Button>
|
||||
<b:Button ui:field="closeButton" addStyleNames="{style.to-align-right}"></b:Button>
|
||||
<g:HTMLPanel ui:field="datailsContainerPanel"></g:HTMLPanel>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
|
@ -14,16 +14,14 @@ import org.gcube.application.geoportalcommon.shared.geoportal.config.layers.Conf
|
|||
import org.gcube.application.geoportalcommon.shared.geoportal.config.layers.LayerIDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewer;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants.GisToolbarFacilities;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants.MAP_PROJECTION;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.ChangeMapLayerEvent;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.MapExtentToEvent;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.collections.OpenCollectionEvent;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayerMap;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GeoportalIcons;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GeoportalImages;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GNAIcons;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GNAImages;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.cms.search.SearchFacilityUI;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.crossfiltering.CrossFilteringLayerPanel;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.customoverlays.OverlayCustomLayerPanel;
|
||||
|
@ -66,7 +64,6 @@ import com.google.gwt.user.client.ui.Image;
|
|||
import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.LayoutPanel;
|
||||
import com.google.gwt.user.client.ui.RadioButton;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.google.gwt.user.client.ui.ScrollPanel;
|
||||
import com.google.gwt.user.client.ui.SimplePanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
@ -80,8 +77,6 @@ import com.google.gwt.user.client.ui.Widget;
|
|||
*/
|
||||
public class GeonaDataViewMainPanel extends Composite {
|
||||
|
||||
|
||||
|
||||
private static final String PLACEHOLDER_SELECT_SEARCH_IN = "Select Collection...";
|
||||
|
||||
private static GeonaDataViewMainPanelUiBinder uiBinder = GWT.create(GeonaDataViewMainPanelUiBinder.class);
|
||||
|
@ -147,10 +142,8 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
@UiField
|
||||
ListBox navListSearch;
|
||||
|
||||
//@UiField
|
||||
//ScrollPanel overlayLayersPanel;
|
||||
|
||||
RootPanel overlayLayersPanel = RootPanel.get(GeoportalDataViewer.DIV_LAYER_VIEW);
|
||||
@UiField
|
||||
ScrollPanel overlayLayersPanel;
|
||||
|
||||
@UiField
|
||||
ScrollPanel searchFacilityPanel;
|
||||
|
@ -186,26 +179,25 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
mapPanel = new MapPanel(mapHeight + "px");
|
||||
detailsPanel.setHeight(mapHeight + "px");
|
||||
detailsPanel.setApplicationBus(applicationBus);
|
||||
overlayLayersPanel.setVisible(false);
|
||||
mainContainerPanel.add(mapPanel);
|
||||
bindHandlers();
|
||||
dataPointSelection.setIcon(IconType.SCREENSHOT);
|
||||
dataBoxSelection.setIcon(IconType.BOOKMARK);
|
||||
removeQuery.setIcon(IconType.REMOVE);
|
||||
|
||||
Image italyImg = new Image(GeoportalImages.ICONS.italyIcon());
|
||||
Image italyImg = new Image(GNAImages.ICONS.italyIcon());
|
||||
italyImg.getElement().getStyle().setPaddingLeft(20, Unit.PX);
|
||||
extentToItaly.getElement().appendChild(italyImg.getElement());
|
||||
extentToItaly.setWidth("140px");
|
||||
|
||||
Image worldImg = new Image(GeoportalImages.ICONS.worldIcon());
|
||||
Image worldImg = new Image(GNAImages.ICONS.worldIcon());
|
||||
worldImg.getElement().getStyle().setPaddingLeft(20, Unit.PX);
|
||||
extentToEarth.getElement().appendChild(worldImg.getElement());
|
||||
extentToEarth.setWidth("140px");
|
||||
|
||||
// linkMap.setCustomIconStyle(GeoportalIcons.CustomIconType.MAP.get());
|
||||
linkPresetLocation.setCustomIconStyle(GeoportalIcons.CustomIconType.PRESET_LOCATION.get());
|
||||
linkLayers.setCustomIconStyle(GeoportalIcons.CustomIconType.LAYERS.get());
|
||||
// linkMap.setCustomIconStyle(GNAIcons.CustomIconType.MAP.get());
|
||||
linkPresetLocation.setCustomIconStyle(GNAIcons.CustomIconType.PRESET_LOCATION.get());
|
||||
linkLayers.setCustomIconStyle(GNAIcons.CustomIconType.LAYERS.get());
|
||||
|
||||
openCollectionDropDown.setIcon(IconType.COMPASS);
|
||||
|
||||
|
@ -289,17 +281,10 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
openCollectionDropDown.setTitle(GisToolbarFacilities.COLLECTION.getTooltip());
|
||||
linkCustomOverlayLayers.setTitle(GisToolbarFacilities.OVERLAY.getTooltip());
|
||||
linkCrossFilteringLayers.setTitle(GisToolbarFacilities.FILTER.getTooltip());
|
||||
searchFacilityButton.setTitle(GisToolbarFacilities.SEARCH.getTooltip());
|
||||
linkLayers.setTitle(GisToolbarFacilities.LAYERS.getTooltip());
|
||||
linkMap.setTitle(GisToolbarFacilities.MAP.getTooltip());
|
||||
linkPresetLocation.setTitle(GisToolbarFacilities.PRESET_LOCATION.getTooltip());
|
||||
|
||||
// layersDDB.setToggle(true);
|
||||
bindEvents();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -376,27 +361,6 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
setOverlayPanelMaxHeight();
|
||||
|
||||
}
|
||||
|
||||
public void setPanelsWidth(int clientWidth) {
|
||||
if(clientWidth<GeoportalDataViewerConstants.TABLET_WIDTH) {
|
||||
openCollectionDropDown.setText("");
|
||||
linkCustomOverlayLayers.setText("");
|
||||
linkCrossFilteringLayers.setText("");
|
||||
searchFacilityButton.setText("");
|
||||
linkLayers.setText("");
|
||||
linkPresetLocation.setText("");
|
||||
linkMap.setText("");
|
||||
}else {
|
||||
openCollectionDropDown.setText(GisToolbarFacilities.COLLECTION.getName());
|
||||
linkCustomOverlayLayers.setText(GisToolbarFacilities.OVERLAY.getName());
|
||||
linkCrossFilteringLayers.setText(GisToolbarFacilities.FILTER.getName());
|
||||
searchFacilityButton.setText(GisToolbarFacilities.SEARCH.getName());
|
||||
linkLayers.setText(GisToolbarFacilities.LAYERS.getName());
|
||||
linkMap.setText(GisToolbarFacilities.MAP.getName());
|
||||
linkPresetLocation.setText(GisToolbarFacilities.PRESET_LOCATION.getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the overlay panel max height.
|
||||
|
@ -781,6 +745,4 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -55,15 +55,18 @@
|
|||
addStyleNames="open-collection-style">
|
||||
</g:HTMLPanel>
|
||||
</b:DropdownButton>
|
||||
<b:DropdownButton type="LINK" text="Map" ui:field="linkMap" icon="GLOBE">
|
||||
<b:DropdownButton type="LINK"
|
||||
title="Select the base Map" text="Map" ui:field="linkMap" icon="GLOBE">
|
||||
<g:HTMLPanel ui:field="panelBaseLayers">
|
||||
</g:HTMLPanel>
|
||||
</b:DropdownButton>
|
||||
<b:DropdownButton type="LINK" visible="false" text="Overlay" ui:field="linkCustomOverlayLayers" icon="REORDER">
|
||||
<b:DropdownButton type="LINK" visible="false"
|
||||
title="Add overlay layers.." text="Overlay" ui:field="linkCustomOverlayLayers" icon="REORDER">
|
||||
<g:HTMLPanel ui:field="panelCustomOverlayLayers" addStyleNames="overlay-panel-style">
|
||||
</g:HTMLPanel>
|
||||
</b:DropdownButton>
|
||||
<b:DropdownButton type="LINK" visible="false" text="Filter" ui:field="linkCrossFilteringLayers" icon="FILTER">
|
||||
<b:DropdownButton type="LINK" visible="false"
|
||||
title="Apply spatial filtering.." text="Filter" ui:field="linkCrossFilteringLayers" icon="FILTER">
|
||||
<g:HTMLPanel ui:field="panelCrossFilteringLayers" addStyleNames="filter-panel-style">
|
||||
</g:HTMLPanel>
|
||||
</b:DropdownButton>
|
||||
|
@ -80,7 +83,8 @@
|
|||
<g:ScrollPanel ui:field="searchFacilityPanel"
|
||||
addStyleNames="search-facility"></g:ScrollPanel>
|
||||
</b:DropdownButton>
|
||||
<b:DropdownButton type="LINK" text="Preset Location"
|
||||
<b:DropdownButton type="LINK"
|
||||
title="Center Map to Location" text="Preset Location"
|
||||
ui:field="linkPresetLocation" addStyleNames="preset-location">
|
||||
<b:Nav>
|
||||
<b:Button type="LINK" ui:field="extentToItaly"
|
||||
|
@ -105,8 +109,8 @@
|
|||
text="Remove Query" visible="false"></b:Button>
|
||||
<b:Button type="LINK" text="Layers" ui:field="linkLayers">
|
||||
</b:Button>
|
||||
<!-- <g:ScrollPanel ui:field="overlayLayersPanel"
|
||||
addStyleNames="layers-panel" visible="false"></g:ScrollPanel> -->
|
||||
<g:ScrollPanel ui:field="overlayLayersPanel"
|
||||
addStyleNames="layers-panel" visible="false"></g:ScrollPanel>
|
||||
</g:HTMLPanel>
|
||||
</g:HTMLPanel>
|
||||
<c:DetailsPanel ui:field="detailsPanel"
|
||||
|
|
|
@ -4,11 +4,9 @@ import java.util.List;
|
|||
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.geojson.GeoJSON;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.project.RelationshipDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.view.SectionView;
|
||||
import org.gcube.portal.clientcontext.client.GCubeClientContext;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants.MAP_PROJECTION;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerServiceAsync;
|
||||
|
@ -27,7 +25,6 @@ import com.github.gwtbootstrap.client.ui.Button;
|
|||
import com.github.gwtbootstrap.client.ui.constants.ButtonType;
|
||||
import com.github.gwtbootstrap.client.ui.constants.IconType;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.FormElement;
|
||||
import com.google.gwt.dom.client.UListElement;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
|
@ -38,16 +35,8 @@ import com.google.gwt.user.client.Random;
|
|||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.FormPanel;
|
||||
import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent;
|
||||
import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteHandler;
|
||||
import com.google.gwt.user.client.ui.FormPanel.SubmitEvent;
|
||||
import com.google.gwt.user.client.ui.FormPanel.SubmitHandler;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.Hidden;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
import ol.Coordinate;
|
||||
|
@ -94,9 +83,6 @@ public class ProjectViewer extends Composite {
|
|||
@UiField
|
||||
Button expandButton;
|
||||
|
||||
@UiField
|
||||
Button exportButton;
|
||||
|
||||
@UiField
|
||||
Button relationshipsButton;
|
||||
|
||||
|
@ -150,22 +136,6 @@ public class ProjectViewer extends Composite {
|
|||
this.geoportalItemReferences = geoportalItemRefs;
|
||||
this.applicationBus = applicationBus;
|
||||
|
||||
GeoportalDataViewerServiceAsync.Util.getInstance().checkExportAsPDFConfig(new AsyncCallback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Boolean result) {
|
||||
GWT.log("Export as PDF visible: " + result);
|
||||
exportButton.setVisible(result);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
final String theTitle = projectView.getTheProjectDV().getProfileName() != null
|
||||
? projectView.getTheProjectDV().getProfileName()
|
||||
: "Project ID: " + projectView.getTheProjectDV().getId();
|
||||
|
@ -213,79 +183,6 @@ public class ProjectViewer extends Composite {
|
|||
}
|
||||
});
|
||||
|
||||
exportButton.setType(ButtonType.LINK);
|
||||
exportButton.setIcon(IconType.FILE);
|
||||
exportButton.setTitle("Export as PDF");
|
||||
exportButton.setVisible(false);
|
||||
|
||||
exportButton.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
String theProjectName = "";
|
||||
try {
|
||||
theProjectName = (String) projectView.getTheProjectDV().getTheDocument().getFirstEntryOfMap()
|
||||
.getValue();
|
||||
theProjectName = theProjectName != null ? theProjectName
|
||||
: "Project ID: " + projectView.getTheProjectDV().getId();
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
// Reading contextId and userId from GCubeClientContext
|
||||
String currentContextId = GCubeClientContext.getCurrentContextId();
|
||||
String currentUserId = GCubeClientContext.getCurrentUserId();
|
||||
|
||||
ProjectDV thePDV = projectView.getTheProjectDV();
|
||||
|
||||
final String targetWindow = "target_window_" + Random.nextInt() + "_" + Random.nextInt();
|
||||
|
||||
final FormPanel form = new FormPanel();
|
||||
final FormElement fe = form.getElement().cast();
|
||||
//NewBrowserWindow theNewTabWindow = NewBrowserWindow.open("", "", null);
|
||||
RootPanel.get().add(form);
|
||||
VerticalPanel panel = new VerticalPanel();
|
||||
form.setWidget(panel);
|
||||
form.setAction(GeoportalDataViewerConstants.GEOPORTAL_EXPORT_ACTION_SERVLET);
|
||||
form.setEncoding(FormPanel.ENCODING_URLENCODED);
|
||||
form.setMethod(FormPanel.METHOD_POST);
|
||||
panel.add(new Hidden(GeoportalDataViewerConstants.UCD_ID_PARAMETER, thePDV.getProfileID()));
|
||||
panel.add(new Hidden(GeoportalDataViewerConstants.PROIECT_ID_PARAMETER, thePDV.getId()));
|
||||
panel.add(new Hidden(GeoportalDataViewerConstants.CONTEXT_ID_PARAMETER, currentContextId));
|
||||
panel.add(new Hidden(GeoportalDataViewerConstants.USER_ID_PARAMETER, currentUserId));
|
||||
|
||||
if(myLogin!=null) {
|
||||
panel.add(new Hidden(GeoportalDataViewerConstants.USERNAME_PARAMETER, myLogin));
|
||||
}
|
||||
|
||||
// final Modal contactinServiceModal = new Modal(true, true);
|
||||
// contactinServiceModal.setCloseVisible(false);
|
||||
// contactinServiceModal.setTitle("Export");
|
||||
// FlowPanel panelMsg = new FlowPanel();
|
||||
// panelMsg.add(new HTML("Contacting the service..."));
|
||||
// contactinServiceModal.add(panelMsg);
|
||||
// contactinServiceModal.show();
|
||||
|
||||
// Add an event handler to the form.
|
||||
form.addSubmitHandler(new SubmitHandler() {
|
||||
public void onSubmit(SubmitEvent event) {
|
||||
GWT.log("onSubmit done");
|
||||
fe.setTarget(targetWindow);
|
||||
}
|
||||
});
|
||||
|
||||
form.addSubmitCompleteHandler(new SubmitCompleteHandler() {
|
||||
public void onSubmitComplete(SubmitCompleteEvent event) {
|
||||
GWT.log("onSubmitComplete done");
|
||||
//contactinServiceModal.hide();
|
||||
}
|
||||
});
|
||||
|
||||
form.submit();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
relationshipsButton.setType(ButtonType.LINK);
|
||||
relationshipsButton.setIcon(IconType.LINK);
|
||||
relationshipsButton.setTitle("Show Relationships of this Project");
|
||||
|
@ -343,6 +240,14 @@ public class ProjectViewer extends Composite {
|
|||
public void onClick(ClickEvent event) {
|
||||
boolean visible = toc_list_container.isVisible();
|
||||
setTocContentVisible(!visible);
|
||||
|
||||
// if (visible) {
|
||||
// toc_list_container.setVisible(false);
|
||||
// reduceToc.setIcon(IconType.PLUS_SIGN_ALT);
|
||||
// } else {
|
||||
// toc_list_container.setVisible(true);
|
||||
// reduceToc.setIcon(IconType.MINUS_SIGN_ALT);
|
||||
// }
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
color: white;
|
||||
padding: 10px 10px;
|
||||
font-size: 14px;
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.width-100 {
|
||||
|
@ -44,10 +43,9 @@
|
|||
<g:HorizontalPanel
|
||||
addStyleNames="functionalities-style">
|
||||
<b:Button ui:field="shareButton">Share</b:Button>
|
||||
<b:Button ui:field="exportButton">Export</b:Button>
|
||||
<b:Button ui:field="expandButton">Expand</b:Button>
|
||||
<b:Button ui:field="relationshipsButton">Relationships</b:Button>
|
||||
<b:Button ui:field="addLayersToMap">Add Layers</b:Button>
|
||||
<b:Button ui:field="addLayersToMap">Add Layers to Map</b:Button>
|
||||
</g:HorizontalPanel>
|
||||
<g:HTMLPanel ui:field="centroidPanel"></g:HTMLPanel>
|
||||
<g:HTMLPanel ui:field="tableOfContentPanel"
|
||||
|
|
|
@ -7,7 +7,7 @@ import org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV;
|
|||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerServiceAsync;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.ShowDetailsEvent;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.ShowDetailsEvent.EVENT_SOURCE;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GeoportalImages;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GNAImages;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.cms.project.ProjectUtil;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.LoaderIcon;
|
||||
|
||||
|
@ -45,7 +45,7 @@ public class TimelineRelationPanel extends Composite {
|
|||
Anchor timelinePopupCloser;
|
||||
|
||||
private LoaderIcon loaderData = new LoaderIcon("Loading data... please wait",
|
||||
new Image(GeoportalImages.ICONS.spinnerClock()));
|
||||
new Image(GNAImages.ICONS.spinnerClock()));
|
||||
|
||||
private TimelineRelationPanel instance = this;
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ public class OverlayCustomLayerPanel extends Composite {
|
|||
flow.add(new HTMLPanel("Legend for: " + theLayerName));
|
||||
final HorizontalPanel hpLegend = new HorizontalPanel();
|
||||
|
||||
String url = geoInformation.getServiceEndPoint() + "?service=WMS&" + "version="
|
||||
String url = geoInformation.getBaseWmsServiceHost() + "?service=WMS&" + "version="
|
||||
+ URLUtil.getValueOfParameter("version", wmsLink) + "&" + "request=GetLegendGraphic&" + "layer="
|
||||
+ theLayerName;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerSer
|
|||
import org.gcube.portlets.user.geoportaldataviewer.client.events.DoActionOnDetailLayersEvent;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.DoActionOnDetailLayersEvent.DO_LAYER_ACTION;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.DoActionOnDetailLayersEvent.SwapLayer;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GeoportalImages;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GNAImages;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.cms.project.ProjectUtil;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.LoaderIcon;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.StringUtil;
|
||||
|
@ -50,11 +50,11 @@ public class DragDropLayer extends FlowPanel {
|
|||
private static DragDropLayer draggingTarget = null;
|
||||
final boolean droppable;
|
||||
private Label labelLayerName;
|
||||
private Image imgLayerVisible = new Image(GeoportalImages.ICONS.layerVisible());
|
||||
private Image imgLayerInvisible = new Image(GeoportalImages.ICONS.layerInvisible());
|
||||
private Image imgLayerVisible = new Image(GNAImages.ICONS.layerVisible());
|
||||
private Image imgLayerInvisible = new Image(GNAImages.ICONS.layerInvisible());
|
||||
|
||||
private Image imgLocate = new Image(GeoportalImages.ICONS.locate());
|
||||
private Image imgLocateNone = new Image(GeoportalImages.ICONS.locateNone());
|
||||
private Image imgLocate = new Image(GNAImages.ICONS.locate());
|
||||
private Image imgLocateNone = new Image(GNAImages.ICONS.locateNone());
|
||||
private boolean locateEnabled = false;
|
||||
private HTML buttonLocate = new HTML();
|
||||
|
||||
|
|
|
@ -146,13 +146,13 @@ public class DialogShareableLink extends Composite {
|
|||
/**
|
||||
* Instantiates a new dialog shareable link.
|
||||
*
|
||||
* @param itemRef the item ref
|
||||
* @param item the item
|
||||
* @param version the version
|
||||
*/
|
||||
public DialogShareableLink(GeoportalItemReferences itemRef, String version) {
|
||||
public DialogShareableLink(GeoportalItemReferences item, String version) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
this.geonItemRef = itemRef;
|
||||
this.geonItemRef = item;
|
||||
this.fileVersion = version;
|
||||
this.actionAlert.setAnimation(true);
|
||||
|
||||
|
@ -186,7 +186,7 @@ public class DialogShareableLink extends Composite {
|
|||
showLoadingIcon(true);
|
||||
|
||||
// alertFilePublicLink.setVisible(true);
|
||||
loadAndShowPublicLinksForItem(itemRef);
|
||||
loadAndShowPublicLinksForItem(item);
|
||||
// getElement().setClassName("gwt-DialogBoxNew");
|
||||
modalBox.setTitle("Share Link...");
|
||||
ModalFooter modalFooter = new ModalFooter();
|
||||
|
|
|
@ -66,9 +66,6 @@ public class LayerCollectionPanel extends Composite {
|
|||
|
||||
@UiField
|
||||
HTMLPanel styleListPanel;
|
||||
|
||||
@UiField
|
||||
HTMLPanel statisticPanel;
|
||||
|
||||
@UiField
|
||||
Button buttonLegend;
|
||||
|
@ -112,7 +109,6 @@ public class LayerCollectionPanel extends Composite {
|
|||
|
||||
buttonLegend.setType(ButtonType.LINK);
|
||||
legendPanel.setVisible(false);
|
||||
statisticPanel.setVisible(false);
|
||||
|
||||
GWT.log("Found available collection " + coll);
|
||||
String label = coll.getUcd().getName();
|
||||
|
@ -143,31 +139,6 @@ public class LayerCollectionPanel extends Composite {
|
|||
});
|
||||
|
||||
basePanel.add(checkbox);
|
||||
|
||||
GeoportalDataViewerServiceAsync.Util.getInstance().getCountFor(collectionID, "Published", "OK", new AsyncCallback<Integer>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Integer result) {
|
||||
|
||||
if(result!=null) {
|
||||
String resultLabel = result+" project";
|
||||
if(result>1) {
|
||||
resultLabel+="s";
|
||||
}
|
||||
resultLabel+= " published";
|
||||
statisticPanel.setVisible(true);
|
||||
statisticPanel.add(new HTML(resultLabel));
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
ViewerConfiguration theConfig = GeoportalDataViewer.getStatus().getViewerConfig();
|
||||
final GCubeCollection toOpen = theConfig.getAvailableCollections().get(collectionID);
|
||||
|
@ -300,7 +271,7 @@ public class LayerCollectionPanel extends Composite {
|
|||
flow.add(new HTMLPanel("Legend for: " + theLayerName));
|
||||
final HorizontalPanel hpLegend = new HorizontalPanel();
|
||||
|
||||
String url = geoInformation.getServiceEndPoint() + "?service=WMS&" + "version="
|
||||
String url = geoInformation.getBaseWmsServiceHost() + "?service=WMS&" + "version="
|
||||
+ URLUtil.getValueOfParameter("version", wmsLink) + "&" + "request=GetLegendGraphic&" + "layer="
|
||||
+ theLayerName;
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
<g:HTMLPanel>
|
||||
<g:HTMLPanel ui:field="basePanel">
|
||||
</g:HTMLPanel>
|
||||
<g:HTMLPanel ui:field="statisticPanel" addStyleNames="statistic-style-panel">
|
||||
</g:HTMLPanel>
|
||||
<g:HTMLPanel ui:field="stylePanel" visible="false" addStyleNames="layer-style-panel">
|
||||
Layer Style
|
||||
<g:HorizontalPanel>
|
||||
|
|
|
@ -9,7 +9,7 @@ import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerCon
|
|||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.ExtentWrapped;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.LightOpenLayerMap;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.MapUtils;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GeoportalIcons;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GNAIcons;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.map.ExtentMapUtil.Location;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.map.ExtentMapUtil.PLACE;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.BaseMapLayer;
|
||||
|
@ -86,7 +86,7 @@ public class MapView extends Composite {
|
|||
theMapPanel.setWidth(internalMapWidth);
|
||||
theMapPanel.setHeight(internalMapHeight);
|
||||
|
||||
linkMap.setCustomIconStyle(GeoportalIcons.CustomIconType.MAP.get());
|
||||
linkMap.setCustomIconStyle(GNAIcons.CustomIconType.MAP.get());
|
||||
|
||||
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.geoportaldataviewer.client.util;
|
||||
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GeoportalImages;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GNAImages;
|
||||
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
|
@ -18,7 +18,7 @@ import com.google.gwt.user.client.ui.Image;
|
|||
public class LoaderIcon extends HorizontalPanel{
|
||||
|
||||
|
||||
private Image imgLoading = new Image(GeoportalImages.ICONS.loading());
|
||||
private Image imgLoading = new Image(GNAImages.ICONS.loading());
|
||||
private HTML txtLoading = new HTML("");
|
||||
|
||||
/**
|
||||
|
|
|
@ -65,11 +65,9 @@ import org.gcube.application.geoportalcommon.shared.geoportal.ucd.HandlerDeclara
|
|||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
|
||||
import org.gcube.application.geoportalcommon.shared.gis.BoundsMap;
|
||||
import org.gcube.application.geoportalcommon.util.StringUtil;
|
||||
import org.gcube.application.geoportalcommon.util.URLParserUtil;
|
||||
import org.gcube.application.geoportaldatamapper.GcubeProfilesPerUCDIdCache;
|
||||
import org.gcube.application.geoportaldatamapper.Geoportal_JSON_Mapper;
|
||||
import org.gcube.application.geoportaldatamapper.exporter.Geoportal_PDF_Exporter;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerService;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.gis.FeatureParser;
|
||||
|
@ -81,7 +79,7 @@ import org.gcube.portlets.user.geoportaldataviewer.server.util.HTTPRequestUtil;
|
|||
import org.gcube.portlets.user.geoportaldataviewer.server.util.SessionUtil;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.util.TemporalComparatorUtil;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GCubeCollection;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoportalSpatialQueryResult;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoNaSpatialQueryResult;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.ItemFieldsResponse;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.ResultSetPaginatedDataIDs;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.ViewerConfiguration;
|
||||
|
@ -264,7 +262,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
public GeoInformationForWMSRequest loadGeoInfoForWmsRequest(String wmsLink, String layerName) throws Exception {
|
||||
try {
|
||||
WMSUrlValidator validator = new WMSUrlValidator(wmsLink, layerName);
|
||||
String wmsServiceServiceEndpoint = validator.getWmsServiceEndPoint();
|
||||
String wmsServiceHost = validator.getWmsServiceHost();
|
||||
String validWMSRequest = validator.parseWMSRequest(true, true);
|
||||
layerName = validator.getLayerName();
|
||||
String versionWms = validator.getValueOfParsedWMSParameter(WmsParameters.VERSION);
|
||||
|
@ -291,8 +289,8 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
? new ZAxis(layerZAxis.getUnits(), layerZAxis.isPositive(), layerZAxis.getValues())
|
||||
: null;
|
||||
|
||||
return new GeoInformationForWMSRequest(wmsServiceServiceEndpoint, validWMSRequest, layerName, versionWms,
|
||||
crs, mapWmsNotStandard, styles, styles.isNcWms(), zAxis);
|
||||
return new GeoInformationForWMSRequest(wmsServiceHost, validWMSRequest, layerName, versionWms, crs,
|
||||
mapWmsNotStandard, styles, styles.isNcWms(), zAxis);
|
||||
} catch (Exception e) {
|
||||
String msg = "An error occurred during wms request validation for layer: " + layerName;
|
||||
LOG.error(msg, e);
|
||||
|
@ -414,14 +412,14 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
* @return the WFS features
|
||||
*/
|
||||
@Override
|
||||
public List<GeoportalSpatialQueryResult> getWFSFeatures(List<LayerObject> layerObjects, String mapSrsName,
|
||||
public List<GeoNaSpatialQueryResult> getWFSFeatures(List<LayerObject> layerObjects, String mapSrsName,
|
||||
BoundsMap selectBBOX, int maxWFSFeature, double zoomLevel) {
|
||||
LOG.info("getWFSFeatures called");
|
||||
|
||||
List<GeoportalSpatialQueryResult> listDAO = new ArrayList<GeoportalSpatialQueryResult>(layerObjects.size());
|
||||
List<GeoNaSpatialQueryResult> listDAO = new ArrayList<GeoNaSpatialQueryResult>(layerObjects.size());
|
||||
|
||||
for (LayerObject layerObject : layerObjects) {
|
||||
GeoportalSpatialQueryResult geoDAO = new GeoportalSpatialQueryResult();
|
||||
GeoNaSpatialQueryResult geoDAO = new GeoNaSpatialQueryResult();
|
||||
List<FeatureRow> features = FeatureParser.getWFSFeatures(layerObject.getLayerItem(), mapSrsName, selectBBOX,
|
||||
maxWFSFeature);
|
||||
LOG.debug("For layer name: " + layerObject.getLayerItem().getName() + " got features: " + features);
|
||||
|
@ -618,6 +616,56 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
|
||||
}
|
||||
|
||||
// public Map<String, List<GroupedLayersDV>> getAvaiableCrossFilteringLayers() {
|
||||
//
|
||||
// Map<String, List<GroupedLayersDV>> mapProfileIDOvelayLayers = new LinkedHashMap<>();
|
||||
//
|
||||
// // Reading UCDs Collections from the session
|
||||
// Map<String, UseCaseDescriptor> ucdCollections = SessionUtil.getAvailableCollections(getThreadLocalRequest());
|
||||
//
|
||||
// for (String profileId : ucdCollections.keySet()) {
|
||||
//
|
||||
// UseCaseDescriptor u = ucdCollections.get(profileId);
|
||||
//
|
||||
// // Loading geoportal_grouped_overlay_layers if exists
|
||||
// GEOPORTAL_DATA_HANDLER theHandler = GEOPORTAL_DATA_HANDLER.geoportal_grouped_cross_filtering;
|
||||
// List<HandlerDeclaration> handlers = u.getHandlersByType(theHandler.getType());
|
||||
//
|
||||
// if (handlers != null && handlers.size() > 0) {
|
||||
// // Loading Handler gcube_profiles
|
||||
// HandlerDeclaration handler = handlers.get(0);
|
||||
// List<GroupedLayersDV> listGroupedCustomLayers = null;
|
||||
// try {
|
||||
//
|
||||
// HandlerDeclarationDV handlerDV = ConvertToDataValueObjectModel.toHandlerDeclarationDV(handler, u,
|
||||
// GEOPORTAL_CONFIGURATION_TYPE.grouped_overlay_layers);
|
||||
//
|
||||
// if (handler != null) {
|
||||
// ConfigurationDV<?> config = handlerDV.getConfiguration();
|
||||
// switch (config.getConfigurationType()) {
|
||||
// case grouped_overlay_layers:
|
||||
// listGroupedCustomLayers = (List<GroupedLayersDV>) config.getConfiguration();
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// LOG.error("Error on loading {} config for ucd Id {}. Returning null",
|
||||
// GEOPORTAL_CONFIGURATION_TYPE.grouped_overlay_layers, u.getId());
|
||||
// }
|
||||
//
|
||||
// mapProfileIDOvelayLayers.put(profileId, listGroupedCustomLayers);
|
||||
// } else {
|
||||
// LOG.warn("No handler " + theHandler + "found into UCD " + u.getId() + ", continue...");
|
||||
// mapProfileIDOvelayLayers.put(profileId, null);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return mapProfileIDOvelayLayers;
|
||||
//
|
||||
// }
|
||||
|
||||
/**
|
||||
* Gets the layer index.
|
||||
*
|
||||
|
@ -657,7 +705,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
GCubeSDILayer indexLayer = index.getLayer();
|
||||
HashMap<String, String> ogcLinks = indexLayer.getOgcLinks();
|
||||
String wmsLink = ogcLinks.get("wms");
|
||||
LOG.info("wms link is {}", StringUtil.ellipsize(wmsLink, 150));
|
||||
LOG.info("wms link is {}", wmsLink);
|
||||
int lastCharOfthePath = wmsLink.indexOf("?");
|
||||
String wmsPath = wmsLink.substring(0, lastCharOfthePath);
|
||||
for (GeoServerPlatformInfoDV geoserver : indexLayer.getPlatformInfos()) {
|
||||
|
@ -667,7 +715,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
LOG.debug("purged wmsPath from the 'workspace' is {}", wmsPath);
|
||||
wmsLink = wmsPath + wmsLink.substring(lastCharOfthePath, wmsLink.length());
|
||||
ogcLinks.put("wms", wmsLink);
|
||||
LOG.info("wms link without {} is {}", geoserver.getWorkspace(), StringUtil.ellipsize(wmsLink, 150));
|
||||
LOG.info("wms link without {} is {}", geoserver.getWorkspace(), wmsLink);
|
||||
}
|
||||
}
|
||||
return index;
|
||||
|
@ -815,7 +863,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
*/
|
||||
@Override
|
||||
protected void onBeforeRequestDeserialized(String serializedRequest) {
|
||||
LOG.debug("onBeforeRequestDeserialized called");
|
||||
LOG.info("onBeforeRequestDeserialized called");
|
||||
String scope = "";
|
||||
|
||||
try {
|
||||
|
@ -1199,7 +1247,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
* @throws Exception the exception
|
||||
*/
|
||||
@Override
|
||||
public List<GeoportalSpatialQueryResult> getDataResult(List<LayerObject> layerObjects, String mapSrsName,
|
||||
public List<GeoNaSpatialQueryResult> getDataResult(List<LayerObject> layerObjects, String mapSrsName,
|
||||
BoundsMap selectBBOX, int maxWFSFeature, double zoomLevel) throws Exception {
|
||||
LOG.info("getDataResult called");
|
||||
|
||||
|
@ -1214,13 +1262,13 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
+ ", zoomLevel: " + zoomLevel);
|
||||
}
|
||||
|
||||
List<GeoportalSpatialQueryResult> listDAO = new ArrayList<GeoportalSpatialQueryResult>(layerObjects.size());
|
||||
List<GeoNaSpatialQueryResult> listDAO = new ArrayList<GeoNaSpatialQueryResult>(layerObjects.size());
|
||||
|
||||
try {
|
||||
new GeoportalServiceIdentityProxy(this.getThreadLocalRequest());
|
||||
|
||||
for (LayerObject layerObject : layerObjects) {
|
||||
GeoportalSpatialQueryResult geoDAO = new GeoportalSpatialQueryResult();
|
||||
GeoNaSpatialQueryResult geoDAO = new GeoNaSpatialQueryResult();
|
||||
List<FeatureRow> features = FeatureParser.getWFSFeatures(layerObject.getLayerItem(), mapSrsName,
|
||||
selectBBOX, maxWFSFeature);
|
||||
LOG.debug("For layer name: " + layerObject.getLayerItem().getName() + " got features: " + features);
|
||||
|
@ -1814,39 +1862,4 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
return HTTPRequestUtil.getResponse(url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCountFor(String profileID, String phase, String status) {
|
||||
LOG.debug("getCountFor profileID: " + profileID + ", phase: " + phase + ", status: " + status + "called");
|
||||
Integer integer = null;
|
||||
try {
|
||||
new GeoportalServiceIdentityProxy(this.getThreadLocalRequest());
|
||||
integer = GeoportalClientCaller.projects().getCountByPhaseFor(profileID, phase, status);
|
||||
LOG.info("getCountFor profileID: " + profileID + ", phase: " + phase + ", status: " + status
|
||||
+ " returning: " + integer);
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error occurred in getCountFor for profileID: " + profileID, e);
|
||||
}
|
||||
return integer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkExportAsPDFConfig() {
|
||||
LOG.debug("checkExportAsPDFConfig called");
|
||||
Boolean configChecked = null;
|
||||
try {
|
||||
new GeoportalServiceIdentityProxy(this.getThreadLocalRequest());
|
||||
configChecked = SessionUtil.getCheckConfigForPFDExporter(this.getThreadLocalRequest());
|
||||
if(configChecked==null) {
|
||||
Geoportal_PDF_Exporter gpdfe = new Geoportal_PDF_Exporter();
|
||||
configChecked = gpdfe.checkConfig();
|
||||
SessionUtil.setCheckConfigForPFDExporter(this.getThreadLocalRequest(), configChecked);
|
||||
}
|
||||
|
||||
LOG.info("Does the 'Export As PDF' config exists? " + configChecked);
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error occurred in checkExportAsPDFConfig", e);
|
||||
}
|
||||
return configChecked;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,257 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.geoportaldataviewer.server;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.Enumeration;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.gcube.common.portal.PortalContext;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.mongoservice.GeoportalServiceIdentityProxy;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.util.SessionUtil;
|
||||
import org.gcube.portlets.user.uriresolvermanager.geoportal.GeoportalExporterAPI;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* The Class GeoportalExporterActionServlet.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Apr 23, 2024
|
||||
*/
|
||||
public class GeoportalExporterActionServlet extends HttpServlet {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6037090280489238565L;
|
||||
protected static Logger logger = LoggerFactory.getLogger(GeoportalExporterActionServlet.class);
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void init() throws ServletException {
|
||||
super.init();
|
||||
logger.trace(GeoportalExporterActionServlet.class.getSimpleName() + " ready.");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
logger.info("doPost Called");
|
||||
serveRequest(req, resp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Do get.
|
||||
*
|
||||
* @param req the req
|
||||
* @param resp the resp
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
* @throws ServletException the servlet exception
|
||||
*/
|
||||
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {
|
||||
logger.info("doGet Called");
|
||||
sendError(resp,
|
||||
"The request cannot be served (via http GET). Please retry by using the Export facility provided by Data-Viewer UI");
|
||||
}
|
||||
|
||||
/**
|
||||
* Serve request.
|
||||
*
|
||||
* @param req the req
|
||||
* @param resp the resp
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
*/
|
||||
public void serveRequest(HttpServletRequest req, HttpServletResponse resp) throws IOException {
|
||||
// setSecretManager();
|
||||
String projectID = req.getParameter(GeoportalDataViewerConstants.PROIECT_ID_PARAMETER);
|
||||
String ucdID = req.getParameter(GeoportalDataViewerConstants.UCD_ID_PARAMETER);
|
||||
String contextID = req.getParameter(GeoportalDataViewerConstants.CONTEXT_ID_PARAMETER);
|
||||
String userID = req.getParameter(GeoportalDataViewerConstants.USER_ID_PARAMETER);
|
||||
String username = req.getParameter(GeoportalDataViewerConstants.USERNAME_PARAMETER);
|
||||
// logger.info("serveRequest called with [projectID: " + projectID + ", ucdID: " + ucdID + ", contextID: " + contextID+"]");
|
||||
logger.info("serveRequest called with [projectID: " + projectID + ", ucdID: " + ucdID + ", contextID: "
|
||||
+ contextID + ", userID: " + userID + ", username: " + username + "]");
|
||||
|
||||
if (contextID == null || contextID.isEmpty())
|
||||
sendError(resp, "Bad Request. No context found!");
|
||||
|
||||
PortalContext pContext = PortalContext.getConfiguration();
|
||||
String scope = pContext.getCurrentScope(contextID);
|
||||
logger.info("The scope is {}", scope);
|
||||
|
||||
try {
|
||||
// Setting header required to {@PortalContext}
|
||||
MutableHttpServletRequest mutableRequest = new MutableHttpServletRequest(req);
|
||||
mutableRequest.putHeader(PortalContext.VRE_ID_ATTR_NAME, contextID);
|
||||
// DEV MODE
|
||||
if (!SessionUtil.isIntoPortal()) {
|
||||
logger.info("DEBUG MODE, putting header " + PortalContext.USER_ID_ATTR_NAME);
|
||||
mutableRequest.putHeader(PortalContext.USER_ID_ATTR_NAME, userID);
|
||||
}
|
||||
|
||||
// IF USERNAME exists, add the userID to request. So performing the request to
|
||||
// exporter service on behalf of the user.
|
||||
if (username != null) {
|
||||
logger.info("Username found, putting header " + PortalContext.USER_ID_ATTR_NAME);
|
||||
mutableRequest.putHeader(PortalContext.USER_ID_ATTR_NAME, userID);
|
||||
}
|
||||
|
||||
ScopeProvider.instance.set(scope);
|
||||
GeoportalServiceIdentityProxy identity = new GeoportalServiceIdentityProxy(mutableRequest);
|
||||
String theToken = identity.getToken();
|
||||
String theIdentity = identity.getIdentity();
|
||||
logger.info("The identity is {}", theIdentity);
|
||||
|
||||
GeoportalExporterAPI geoportalExporterAPI = new GeoportalExporterAPI();
|
||||
URL urlRequest = geoportalExporterAPI.exportProject("pdf", ucdID, projectID, false);
|
||||
String urlToRedirect = urlRequest.toString();
|
||||
logger.info("Performing request to {} with identity description {}", urlToRedirect,
|
||||
identity.getDescription());
|
||||
logger.info("Token is {}", theToken.substring(0, 20) + "_MASKED_TOKEN");
|
||||
|
||||
InputStream is = performHttpRequestToSGService(urlToRedirect, theIdentity, theToken);
|
||||
resp.setContentType("text/html; charset=utf-8");
|
||||
IOUtils.copy(is, resp.getOutputStream());
|
||||
resp.flushBuffer();
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error occurred when exporting the Project with id: " + projectID, e);
|
||||
sendError(resp, "Error occurred when exporting the Project. Error is: " + e.getMessage());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform http request to SG service.
|
||||
*
|
||||
* @param urlToService the url to service
|
||||
* @param identity the identity
|
||||
* @param token the token
|
||||
* @return the input stream
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
*/
|
||||
public static InputStream performHttpRequestToSGService(String urlToService, String identity, String token)
|
||||
throws IOException {
|
||||
logger.debug("performHttpRequestToSGService called");
|
||||
try {
|
||||
|
||||
URL url = new URL(urlToService);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
// timeout at 60sec
|
||||
conn.setConnectTimeout(6000);
|
||||
conn.setDoOutput(true);
|
||||
|
||||
if (token.length() > 50) {
|
||||
// is JWT TOKEN
|
||||
conn.setRequestProperty("Authorization", "Bearer " + token);
|
||||
} else {
|
||||
// is legacy Token
|
||||
conn.setRequestProperty("gcube-token", token);
|
||||
}
|
||||
|
||||
conn.setRequestProperty("Content-Type", "text/html");
|
||||
conn.setRequestMethod("GET");
|
||||
logger.debug("performHttpRequestToSGService done, returning");
|
||||
return conn.getInputStream();
|
||||
} catch (IOException e) {
|
||||
logger.error("Error on performing request to url " + urlToService, e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the headers to target.
|
||||
*
|
||||
* @param httpSource the http source
|
||||
* @param response the response
|
||||
* @return the http servlet response
|
||||
*/
|
||||
public static HttpServletResponse setHeadersToTarget(HttpServletRequest httpSource, HttpServletResponse response) {
|
||||
|
||||
Enumeration<String> headersNames = httpSource.getHeaderNames();
|
||||
while (headersNames.hasMoreElements()) {
|
||||
String headerName = (String) headersNames.nextElement();
|
||||
Enumeration<String> values = httpSource.getHeaders(headerName);
|
||||
while (values.hasMoreElements()) {
|
||||
String value = values.nextElement();
|
||||
logger.info("Copying header {} with value {}", headerName, value);
|
||||
response.addHeader(headerName, value);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the headers to target.
|
||||
*
|
||||
* @param httpSource the http source
|
||||
* @param httpTarget the http target
|
||||
* @return the http get
|
||||
*/
|
||||
public static HttpGet setHeadersToTarget(HttpServletRequest httpSource, HttpGet httpTarget) {
|
||||
|
||||
Enumeration<String> headersNames = httpSource.getHeaderNames();
|
||||
while (headersNames.hasMoreElements()) {
|
||||
String headerName = (String) headersNames.nextElement();
|
||||
Enumeration<String> values = httpSource.getHeaders(headerName);
|
||||
while (values.hasMoreElements()) {
|
||||
String value = values.nextElement();
|
||||
logger.info("Copying header {} with value {}", headerName, value);
|
||||
httpTarget.addHeader(headerName, value);
|
||||
}
|
||||
}
|
||||
return httpTarget;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the headers to response.
|
||||
*
|
||||
* @param httpSource the http source
|
||||
* @param httpTarget the http target
|
||||
* @return the http get
|
||||
*/
|
||||
public static HttpGet setHeadersToResponse(HttpServletRequest httpSource, HttpGet httpTarget) {
|
||||
|
||||
Enumeration<String> headersNames = httpSource.getHeaderNames();
|
||||
while (headersNames.hasMoreElements()) {
|
||||
String headerName = (String) headersNames.nextElement();
|
||||
Enumeration<String> values = httpSource.getHeaders(headerName);
|
||||
while (values.hasMoreElements()) {
|
||||
String value = values.nextElement();
|
||||
logger.info("Copying header {} with value {}", headerName, value);
|
||||
httpTarget.addHeader(headerName, value);
|
||||
}
|
||||
}
|
||||
return httpTarget;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send response.
|
||||
*
|
||||
* @param response the response
|
||||
* @param message the message
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
*/
|
||||
protected void sendError(HttpServletResponse response, String message) throws IOException {
|
||||
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
||||
response.setContentType("text/html");
|
||||
response.getWriter().write("<html><head><title>Error</title></head><body>" + message + "</body></html>");
|
||||
response.flushBuffer();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
package org.gcube.portlets.user.geoportaldataviewer.server;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletRequestWrapper;
|
||||
|
||||
final class MutableHttpServletRequest extends HttpServletRequestWrapper {
|
||||
// holds custom header and value mapping
|
||||
private final Map<String, String> customHeaders;
|
||||
|
||||
public MutableHttpServletRequest(HttpServletRequest request){
|
||||
super(request);
|
||||
this.customHeaders = new HashMap<String, String>();
|
||||
}
|
||||
|
||||
public void putHeader(String name, String value){
|
||||
this.customHeaders.put(name, value);
|
||||
}
|
||||
|
||||
public String getHeader(String name) {
|
||||
// check the custom headers first
|
||||
String headerValue = customHeaders.get(name);
|
||||
|
||||
if (headerValue != null){
|
||||
return headerValue;
|
||||
}
|
||||
// else return from into the original wrapped object
|
||||
return ((HttpServletRequest) getRequest()).getHeader(name);
|
||||
}
|
||||
|
||||
public Enumeration<String> getHeaderNames() {
|
||||
// create a set of the custom header names
|
||||
Set<String> set = new HashSet<String>(customHeaders.keySet());
|
||||
|
||||
// now add the headers from the wrapped request object
|
||||
@SuppressWarnings("unchecked")
|
||||
Enumeration<String> e = ((HttpServletRequest) getRequest()).getHeaderNames();
|
||||
while (e.hasMoreElements()) {
|
||||
// add the names of the request headers into the list
|
||||
String n = e.nextElement();
|
||||
set.add(n);
|
||||
}
|
||||
|
||||
// create an enumeration from the set and return
|
||||
return Collections.enumeration(set);
|
||||
}
|
||||
}
|
|
@ -61,8 +61,8 @@ public class GisMakers {
|
|||
public static String buildWFSFeatureQuery(LayerItem layerItem, String mapSrsName, BoundsMap mapBBOX,
|
||||
int maxFeatures, String outputFormat) {
|
||||
|
||||
String link = layerItem.getMapServerEndpoint();
|
||||
LOG.debug("Map server endpoint: " + link);
|
||||
String link = layerItem.getMapServerHost();
|
||||
LOG.debug("Map server host URL: " + link);
|
||||
LOG.debug("CQL filter is: " + layerItem.getCqlFilter());
|
||||
LOG.debug("MAX FEATURES: " + maxFeatures);
|
||||
LOG.debug("BBOX: " + mapBBOX);
|
||||
|
|
|
@ -24,7 +24,7 @@ public class WMSUrlValidator {
|
|||
private static final String OWS = "ows";
|
||||
private HashMap<String, String> parametersValue = new HashMap<String, String>();
|
||||
private String wmsRequestURI;
|
||||
private String wmsServiceEndPoint;
|
||||
private String wmsServiceHost;
|
||||
private String layerName;
|
||||
|
||||
private String wmsNoStandardParameters = "";
|
||||
|
@ -48,29 +48,34 @@ public class WMSUrlValidator {
|
|||
throw new Exception("WMS request is null or empty");
|
||||
|
||||
this.wmsRequestURI = wmsRequest.trim();
|
||||
boolean isOwsService = GeoWmsServiceUtility.isOWSSerice(this.wmsRequestURI);
|
||||
WebMapServerHost webMapServerHost;
|
||||
|
||||
// IS WMS?
|
||||
if (GeoWmsServiceUtility.isWMSService(wmsRequestURI)) {
|
||||
LOG.trace("found " + GeoWmsServiceUtility.SERVICE_WMS + " in wms request: " + wmsRequestURI);
|
||||
webMapServerHost = getWebMapServerHost(wmsRequestURI);
|
||||
} else
|
||||
throw new Exception("WMS service not found for layer: " + inputLayerName);
|
||||
|
||||
// VALIDATION WMS
|
||||
int endpointLastCharIndex = wmsRequest.lastIndexOf("?");
|
||||
// No '?' char found
|
||||
if (endpointLastCharIndex == -1) {
|
||||
LOG.info("Char '?' not found, setting last index the end of the URI");
|
||||
endpointLastCharIndex = wmsRequest.length();
|
||||
}
|
||||
String readWMSServiceEndpoint = wmsRequest.substring(0, endpointLastCharIndex);
|
||||
this.wmsServiceEndPoint = readWMSServiceEndpoint;
|
||||
String baseWmsService = webMapServerHost.getHost();
|
||||
// IS OWS OR WMS?
|
||||
this.wmsServiceHost = appendWmsServiceToBaseUrl(wmsRequest.substring(0, wmsRequest.indexOf("?")), isOwsService);
|
||||
this.layerName = inputLayerName;
|
||||
|
||||
try {
|
||||
// VALIDATE WMS SERVICE FOR WEB MAP SERVER
|
||||
if (!HttpRequestUtil.urlExists(this.wmsServiceEndPoint, true)) {
|
||||
LOG.warn("baseWmsServiceUrl: " + wmsServiceEndPoint + " is not valid URL!!");
|
||||
this.wmsServiceEndPoint = readWMSServiceEndpoint;
|
||||
|
||||
if (!HttpRequestUtil.urlExists(this.wmsServiceHost, true)) {
|
||||
LOG.info("baseWmsServiceUrl: " + wmsServiceHost
|
||||
+ " is not a geoserver, setting as input base wms server: " + baseWmsService);
|
||||
this.wmsServiceHost = baseWmsService;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error on validating the endpoint: " + this.wmsServiceEndPoint, e);
|
||||
boolean isOwsService = GeoWmsServiceUtility.isOWSSerice(this.wmsRequestURI);
|
||||
LOG.info("Retrying by appending suffix WMS or WFS...");
|
||||
this.wmsServiceEndPoint = appendWmsServiceToBaseUrl(readWMSServiceEndpoint, isOwsService);
|
||||
LOG.error("error on validating geoserver wms service: " + e);
|
||||
LOG.info("setting baseWmsService as input base wms server: " + baseWmsService);
|
||||
this.wmsServiceHost = baseWmsService;
|
||||
}
|
||||
|
||||
// VALIDATION FOR THREDDS - FIND LAYER NAME INTO WMS PATH
|
||||
|
@ -81,8 +86,7 @@ public class WMSUrlValidator {
|
|||
throw new Exception("Layer name is null or empty");
|
||||
|
||||
}
|
||||
|
||||
LOG.info("WMSURLValidator found endpoint: " + wmsServiceEndPoint);
|
||||
|
||||
parametersValue.put(WmsParameters.LAYERS.getParameter(), this.layerName);
|
||||
}
|
||||
|
||||
|
@ -226,13 +230,13 @@ public class WMSUrlValidator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the wms service end point.
|
||||
* Gets the wms service host.
|
||||
*
|
||||
* @return the wms service end point
|
||||
* @return the wms service host
|
||||
*/
|
||||
public String getWmsServiceEndPoint() {
|
||||
public String getWmsServiceHost() {
|
||||
|
||||
return wmsServiceEndPoint;
|
||||
return wmsServiceHost;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,9 +22,9 @@ public class GeoportalServiceIdentityProxy {
|
|||
private static final Logger LOG = LoggerFactory.getLogger(GeoportalServiceIdentityProxy.class);
|
||||
|
||||
private GcubeIdentity gCubeIdentity;
|
||||
|
||||
|
||||
private boolean isUser = false;
|
||||
|
||||
|
||||
private boolean isIAMClient = false;
|
||||
|
||||
/**
|
||||
|
@ -57,24 +57,12 @@ public class GeoportalServiceIdentityProxy {
|
|||
|
||||
gCubeIdentity.setIdentity(request);
|
||||
}
|
||||
|
||||
|
||||
public boolean isUser() {
|
||||
return isUser;
|
||||
}
|
||||
|
||||
|
||||
public boolean isIAMClient() {
|
||||
return isIAMClient;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return gCubeIdentity.getIdentityDescription();
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return gCubeIdentity.getToken();
|
||||
}
|
||||
|
||||
public String getIdentity() {
|
||||
return gCubeIdentity.getIdentity();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,15 +2,16 @@ package org.gcube.portlets.user.geoportaldataviewer.server.mongoservice.accessid
|
|||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
|
||||
/**
|
||||
* The Interface GcubeIdentity.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Sep 23, 2021
|
||||
* Sep 23, 2021
|
||||
*/
|
||||
public interface GcubeIdentity {
|
||||
|
||||
|
||||
/**
|
||||
* Sets the identity.
|
||||
*
|
||||
|
@ -18,32 +19,10 @@ public interface GcubeIdentity {
|
|||
* @throws Exception the exception
|
||||
*/
|
||||
public void setIdentity(HttpServletRequest httpRequest) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Reset identity.
|
||||
*/
|
||||
public void resetIdentity();
|
||||
|
||||
/**
|
||||
* Gets the identity description.
|
||||
*
|
||||
* @return the identity description
|
||||
*/
|
||||
public String getIdentityDescription();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the identity.
|
||||
*
|
||||
* @return the identity
|
||||
*/
|
||||
public String getIdentity();
|
||||
|
||||
/**
|
||||
* Gets the token.
|
||||
*
|
||||
* @return the token
|
||||
*/
|
||||
public String getToken();
|
||||
|
||||
}
|
||||
|
|
|
@ -16,23 +16,18 @@ public class IAMClientIdentity implements GcubeIdentity {
|
|||
private static final Logger LOG = LoggerFactory.getLogger(IAMClientIdentity.class);
|
||||
|
||||
private String previousUMAToken = null;
|
||||
|
||||
private String currentUMAToken = null;
|
||||
|
||||
private String clientId = null;
|
||||
|
||||
|
||||
private static final String IAM_CLIENT_CREDENTIALS = "IAM_CLIENT_CREDENTIALS";
|
||||
|
||||
@Override
|
||||
public void setIdentity(HttpServletRequest httpRequest) throws Exception {
|
||||
LOG.info("setIdentity called");
|
||||
String currentScope = SessionUtil.getCurrentContext(httpRequest, true);
|
||||
LOG.info("the scope is {}", currentScope);
|
||||
IAMClientCredentials credentials = sessionGetIAMClientCredentials(httpRequest);
|
||||
IAMClientCredentials credentials = sessionGetIAMClientCredentials(httpRequest);
|
||||
try {
|
||||
if (credentials == null) {
|
||||
if(credentials==null) {
|
||||
credentials = IAMClientCredentialsReader.getCredentials();
|
||||
sessionSetIAMClientCredentials(httpRequest, credentials);
|
||||
sessionSetIAMClientCredentials(httpRequest,credentials);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error on discovering IAM Client credentials", e);
|
||||
|
@ -40,16 +35,16 @@ public class IAMClientIdentity implements GcubeIdentity {
|
|||
}
|
||||
|
||||
LOG.trace("Read credentials: " + credentials);
|
||||
clientId = credentials.getClientId();
|
||||
String umaAcessToken = null;
|
||||
String clientId = credentials.getClientId();
|
||||
String clientSecret = credentials.getClientSecret();
|
||||
try {
|
||||
|
||||
LOG.info("Querying KeycloakClientFactory to get UMA token..");
|
||||
TokenResponse tr = KeycloakClientFactory.newInstance().queryUMAToken(currentScope, clientId, clientSecret, currentScope,
|
||||
TokenResponse tr = KeycloakClientFactory.newInstance().queryUMAToken(clientId, clientSecret, currentScope,
|
||||
null);
|
||||
|
||||
currentUMAToken = tr.getAccessToken();
|
||||
if (currentUMAToken != null && !currentUMAToken.isEmpty()) {
|
||||
umaAcessToken = tr.getAccessToken();
|
||||
if (umaAcessToken != null && !umaAcessToken.isEmpty()) {
|
||||
LOG.info("UMA Access Token read correctly");
|
||||
} else {
|
||||
LOG.error("UMA Access Token NOT RETRIEVED!!!");
|
||||
|
@ -61,8 +56,6 @@ public class IAMClientIdentity implements GcubeIdentity {
|
|||
|
||||
try {
|
||||
|
||||
LOG.debug("JWT token: " + currentUMAToken.substring(0, 20) + "_MASKED_TOKEN_");
|
||||
|
||||
try {
|
||||
// Here the previousUMAToken should be null
|
||||
previousUMAToken = AccessTokenProvider.instance.get();
|
||||
|
@ -71,9 +64,10 @@ public class IAMClientIdentity implements GcubeIdentity {
|
|||
// silent
|
||||
}
|
||||
|
||||
LOG.debug("JWT token: " + umaAcessToken.substring(0, 20) + "_MASKED_TOKEN_");
|
||||
LOG.info("Setting clientId '" + clientId + "' identity by JWT token in the "
|
||||
+ AccessTokenProvider.class.getSimpleName());
|
||||
AccessTokenProvider.instance.set(currentUMAToken);
|
||||
AccessTokenProvider.instance.set(umaAcessToken);
|
||||
} catch (Exception e) {
|
||||
LOG.error(e.getMessage(), e);
|
||||
throw new Exception(e.getMessage());
|
||||
|
@ -81,11 +75,6 @@ public class IAMClientIdentity implements GcubeIdentity {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToken() {
|
||||
return currentUMAToken;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetIdentity() {
|
||||
LOG.info("resetIdentity called");
|
||||
|
@ -93,7 +82,7 @@ public class IAMClientIdentity implements GcubeIdentity {
|
|||
LOG.info("resetIdentity to previous AccessToken");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the IAM client credentials.
|
||||
*
|
||||
|
@ -114,7 +103,7 @@ public class IAMClientIdentity implements GcubeIdentity {
|
|||
* Sets the IAM client credentials.
|
||||
*
|
||||
* @param httpRequest the http request
|
||||
* @param iamCC the iam CC
|
||||
* @param iamCC the iam CC
|
||||
*/
|
||||
public static void sessionSetIAMClientCredentials(HttpServletRequest httpRequest, IAMClientCredentials iamCC) {
|
||||
HttpSession session = httpRequest.getSession();
|
||||
|
@ -125,15 +114,4 @@ public class IAMClientIdentity implements GcubeIdentity {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentityDescription() {
|
||||
return "ClientId: " + clientId;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentity() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.gcube.portlets.user.geoportaldataviewer.server.mongoservice.accessid
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.util.SessionUtil;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -11,19 +10,13 @@ public class UserIdentity implements GcubeIdentity {
|
|||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(UserIdentity.class);
|
||||
|
||||
private HttpServletRequest httpRequest;
|
||||
|
||||
private GCubeUser user;
|
||||
|
||||
public UserIdentity() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIdentity(HttpServletRequest httpRequest) throws Exception {
|
||||
LOG.info("setIdentity called");
|
||||
this.httpRequest = httpRequest;
|
||||
SessionUtil.getCurrentToken(this.httpRequest, true);
|
||||
user = SessionUtil.getCurrentUser(this.httpRequest);
|
||||
SessionUtil.getCurrentToken(httpRequest, true);
|
||||
|
||||
}
|
||||
|
||||
|
@ -32,20 +25,4 @@ public class UserIdentity implements GcubeIdentity {
|
|||
LOG.info("resetIdentity called, doing nothing");
|
||||
// doing nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToken() {
|
||||
return SessionUtil.getCurrentToken(this.httpRequest, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentityDescription() {
|
||||
return user != null ? "user: " + user.getUsername() : "null";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentity() {
|
||||
return user.getUsername();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -55,8 +55,6 @@ public class SessionUtil {
|
|||
|
||||
private static final String UCD_COLLECTIONS_SESSION = "THE_UCD_COLLECTIONS";
|
||||
|
||||
private static final String CHECKED_CONFIG_FOR_PDF_EXPORTER = "CHECKED_CONFIG_FOR_PDF_EXPORTER";
|
||||
|
||||
/**
|
||||
* Checks if is into portal.
|
||||
*
|
||||
|
@ -347,14 +345,4 @@ public class SessionUtil {
|
|||
return (Map<String, UseCaseDescriptor>) session.getAttribute(UCD_COLLECTIONS_SESSION);
|
||||
}
|
||||
|
||||
public static Boolean getCheckConfigForPFDExporter(HttpServletRequest httpServletRequest) {
|
||||
HttpSession session = httpServletRequest.getSession();
|
||||
return (Boolean) session.getAttribute(CHECKED_CONFIG_FOR_PDF_EXPORTER);
|
||||
}
|
||||
|
||||
public static void setCheckConfigForPFDExporter(HttpServletRequest httpServletRequest, Boolean configChecked) {
|
||||
HttpSession session = httpServletRequest.getSession();
|
||||
session.setAttribute(CHECKED_CONFIG_FOR_PDF_EXPORTER, configChecked);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package org.gcube.portlets.user.geoportaldataviewer.server.util;
|
|||
import java.util.Comparator;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoportalSpatialQueryResult;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoNaSpatialQueryResult;
|
||||
|
||||
/**
|
||||
* The Class TemporalComparatorUtil.
|
||||
|
@ -12,7 +12,7 @@ import org.gcube.portlets.user.geoportaldataviewer.shared.GeoportalSpatialQueryR
|
|||
*
|
||||
* Nov 18, 2022
|
||||
*/
|
||||
public class TemporalComparatorUtil implements Comparator<GeoportalSpatialQueryResult> {
|
||||
public class TemporalComparatorUtil implements Comparator<GeoNaSpatialQueryResult> {
|
||||
|
||||
/**
|
||||
* Compare.
|
||||
|
@ -22,7 +22,7 @@ public class TemporalComparatorUtil implements Comparator<GeoportalSpatialQueryR
|
|||
* @return the int
|
||||
*/
|
||||
@Override
|
||||
public int compare(GeoportalSpatialQueryResult a, GeoportalSpatialQueryResult b) {
|
||||
public int compare(GeoNaSpatialQueryResult a, GeoNaSpatialQueryResult b) {
|
||||
if (a == null || a.getSourceLayerObject() == null || a.getSourceLayerObject().getProjectDV() == null) {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -9,13 +9,13 @@ import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerObject;
|
|||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wfs.FeatureRow;
|
||||
|
||||
/**
|
||||
* The Class GeoportalSpatialQueryResult.
|
||||
* The Class GeoNaSpatialQueryResult.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Jul 30, 2021
|
||||
*/
|
||||
public class GeoportalSpatialQueryResult implements Serializable {
|
||||
public class GeoNaSpatialQueryResult implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -23,14 +23,14 @@ public class GeoportalSpatialQueryResult implements Serializable {
|
|||
private static final long serialVersionUID = 3513120677727206958L;
|
||||
private List<FeatureRow> features;
|
||||
private LayerObject sourceLayerObject;
|
||||
// Map with couple (mongoId project, list of uploaded GeoportalImages for the
|
||||
// project)
|
||||
// Map with couple (mongoId concessione, list of uploaded GNAImages for the
|
||||
// concessione)
|
||||
private Map<String, List<PayloadDV>> mapImages = null;
|
||||
|
||||
/**
|
||||
* Instantiates a new geo na data object.
|
||||
*/
|
||||
public GeoportalSpatialQueryResult() {
|
||||
public GeoNaSpatialQueryResult() {
|
||||
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class GeoportalSpatialQueryResult implements Serializable {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("GeoportalSpatialQueryResult [features=");
|
||||
builder.append("GeoNaSpatialQueryResult [features=");
|
||||
builder.append(features);
|
||||
builder.append(", sourceLayerObject=");
|
||||
builder.append(sourceLayerObject);
|
|
@ -0,0 +1,16 @@
|
|||
package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@Data
|
||||
public class DisplayCategory implements Serializable {
|
||||
|
||||
|
||||
String title;
|
||||
String description;
|
||||
|
||||
}
|
|
@ -2,13 +2,18 @@ package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.gis.BoundsMap;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants.LayerType;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.URLUtil;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wms.Property;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wms.ZAxis;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
||||
/**
|
||||
* The Class LayerItem.
|
||||
*
|
||||
|
@ -31,7 +36,7 @@ public class LayerItem implements Serializable, Cloneable {
|
|||
private String url;
|
||||
|
||||
/** The base map server URL. */
|
||||
private String mapServerEndpoint;
|
||||
private String mapServerHost;
|
||||
|
||||
/** The style. */
|
||||
private String style;
|
||||
|
@ -769,21 +774,21 @@ public class LayerItem implements Serializable, Cloneable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the map server endpoint.
|
||||
* Gets the map server host.
|
||||
*
|
||||
* @return the map server endpoint
|
||||
* @return the map server host
|
||||
*/
|
||||
public String getMapServerEndpoint() {
|
||||
return mapServerEndpoint;
|
||||
public String getMapServerHost() {
|
||||
return mapServerHost;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the map server host.
|
||||
*
|
||||
* @param mapServerEndpoint the new map server host
|
||||
* @param mapServerHost the new map server host
|
||||
*/
|
||||
public void setMapServerHost(String mapServerEndpoint) {
|
||||
this.mapServerEndpoint = mapServerEndpoint;
|
||||
public void setMapServerHost(String mapServerHost) {
|
||||
this.mapServerHost = mapServerHost;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -876,11 +881,6 @@ public class LayerItem implements Serializable, Cloneable {
|
|||
return maxResolution;
|
||||
}
|
||||
|
||||
/**
|
||||
* To string.
|
||||
*
|
||||
* @return the string
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
@ -890,8 +890,8 @@ public class LayerItem implements Serializable, Cloneable {
|
|||
builder.append(title);
|
||||
builder.append(", url=");
|
||||
builder.append(url);
|
||||
builder.append(", mapServerEndpoint=");
|
||||
builder.append(mapServerEndpoint);
|
||||
builder.append(", mapServerHost=");
|
||||
builder.append(mapServerHost);
|
||||
builder.append(", style=");
|
||||
builder.append(style);
|
||||
builder.append(", isTrasparent=");
|
||||
|
@ -948,4 +948,90 @@ public class LayerItem implements Serializable, Cloneable {
|
|||
return builder.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* To layer item.
|
||||
*
|
||||
* @param layerType the layer type
|
||||
* @param layerTitle the layer title
|
||||
* @param layerName the layer name
|
||||
* @param layerURL the layer URL
|
||||
* @param mapServerHost the map server host
|
||||
* @param isExternal the is external
|
||||
* @param isBase the is base
|
||||
* @param displayInLayerSwitcher the display in layer switcher
|
||||
* @param styles the styles
|
||||
* @param wmsLink the wms link
|
||||
* @param onTop the on top
|
||||
* @param wmsNotStandardParams the wms not standard params
|
||||
* @param isNcWms the is nc wms
|
||||
* @param UUID the uuid
|
||||
* @param zAxis the z axis
|
||||
* @param minResolution the min resolution
|
||||
* @param maxResolution the max resolution
|
||||
* @return the layer item
|
||||
*/
|
||||
|
||||
// TODO Constructor from IndexLayerDV, GCUBESDILAeryDV or direct info
|
||||
private LayerItem toLayerItem(LayerType layerType, String layerTitle, String layerName, String layerURL,
|
||||
String mapServerHost, boolean isExternal, boolean isBase, boolean displayInLayerSwitcher,
|
||||
ArrayList<String> styles, String wmsLink, boolean onTop, HashMap<String, String> wmsNotStandardParams,
|
||||
boolean isNcWms, String UUID, ZAxis zAxis, Double minResolution, Double maxResolution) {
|
||||
|
||||
// GWT.log("Add addLayerByWms 1");
|
||||
LayerItem layerItem = new LayerItem();
|
||||
layerItem.setBaseLayer(isBase);
|
||||
layerItem.setTitle(layerTitle);
|
||||
layerItem.setName(layerName);
|
||||
layerItem.setUrl(layerURL);
|
||||
layerItem.setMapServerHost(mapServerHost);
|
||||
// l.setExternal(isExternal);
|
||||
layerItem.setOpacity(1d);
|
||||
layerItem.setBuffer(2);
|
||||
layerItem.setWmsLink(wmsLink);
|
||||
layerItem.setWmsNotStandardParams(wmsNotStandardParams);
|
||||
layerItem.setNcWms(isNcWms);
|
||||
layerItem.setUUID(UUID);
|
||||
layerItem.setZAxis(zAxis);
|
||||
layerItem.setMinResolution(minResolution);
|
||||
layerItem.setMaxResolution(maxResolution);
|
||||
|
||||
switch (layerType) {
|
||||
|
||||
// TODO IMPLEMENT THIS CASE
|
||||
case RASTER_BASELAYER:
|
||||
|
||||
// l.setHasLegend(false);
|
||||
layerItem.setBaseLayer(true);
|
||||
layerItem.setTrasparent(false);
|
||||
layerItem.setClickData(false);
|
||||
break;
|
||||
|
||||
case FEATURE_TYPE:
|
||||
|
||||
// CASE FEATURE TYPE
|
||||
layerItem.setBaseLayer(false);
|
||||
layerItem.setClickData(true);
|
||||
layerItem.setTrasparent(true);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
GWT.log("styles " + styles);
|
||||
|
||||
if (styles != null && styles.size() > 0) {
|
||||
layerItem.setHasLegend(true);
|
||||
layerItem.setDefaultStyle(styles.get(0));
|
||||
layerItem.setStyle(styles.get(0));
|
||||
layerItem.setStyles(styles);
|
||||
} else {
|
||||
String style = URLUtil.getValueOfParameter("styles", wmsLink);
|
||||
if (style != null) { // CASE OF STYLE ="";
|
||||
// TENTATIVE TO GET LEGEND
|
||||
layerItem.setHasLegend(true);
|
||||
}
|
||||
}
|
||||
GWT.log("Built layer: " + layerItem);
|
||||
return layerItem;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class OverlayWMSLayer {
|
||||
|
||||
private String title;
|
||||
private String name;
|
||||
private String wmsServiceBaseURL;
|
||||
private boolean display;
|
||||
private Map<String, String> mapProperties;
|
||||
|
||||
}
|
|
@ -8,14 +8,15 @@ import java.util.HashMap;
|
|||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||
*
|
||||
* Oct 27, 2020
|
||||
* Oct 27, 2020
|
||||
*/
|
||||
public class GeoInformationForWMSRequest implements Serializable {
|
||||
|
||||
/** The Constant serialVersionUID. */
|
||||
private static final long serialVersionUID = -6846636281073641003L;
|
||||
|
||||
private String serviceEndPoint;
|
||||
/** The base wms service host. */
|
||||
private String baseWmsServiceHost;
|
||||
|
||||
/** The wms request. */
|
||||
private String wmsRequest;
|
||||
|
@ -52,19 +53,20 @@ public class GeoInformationForWMSRequest implements Serializable {
|
|||
/**
|
||||
* Instantiates a new geo information for wms request.
|
||||
*
|
||||
* @param serviceEndPoint the base wms service host
|
||||
* @param wmsRequest the wms request
|
||||
* @param layerName the layer name
|
||||
* @param versionWms the version wms
|
||||
* @param crs the crs
|
||||
* @param mapWmsNoStandard the map wms not standard
|
||||
* @param styles the layer styles
|
||||
* @param isNcWMS the is nc WMS
|
||||
* @param zAxis the z axis
|
||||
* @param baseWmsServiceHost the base wms service host
|
||||
* @param wmsRequest the wms request
|
||||
* @param layerName the layer name
|
||||
* @param versionWms the version wms
|
||||
* @param crs the crs
|
||||
* @param mapWmsNoStandard the map wms not standard
|
||||
* @param styles the layer styles
|
||||
* @param isNcWMS the is nc WMS
|
||||
* @param zAxis the z axis
|
||||
*/
|
||||
public GeoInformationForWMSRequest(String serviceEndPoint, String wmsRequest, String layerName, String versionWms,
|
||||
String crs, HashMap<String, String> mapWmsNoStandard, Styles styles, boolean isNcWMS, ZAxis zAxis) {
|
||||
this.serviceEndPoint = serviceEndPoint;
|
||||
public GeoInformationForWMSRequest(String baseWmsServiceHost, String wmsRequest, String layerName,
|
||||
String versionWms, String crs, HashMap<String, String> mapWmsNoStandard, Styles styles, boolean isNcWMS,
|
||||
ZAxis zAxis) {
|
||||
this.baseWmsServiceHost = baseWmsServiceHost;
|
||||
this.wmsRequest = wmsRequest;
|
||||
this.layerName = layerName;
|
||||
this.versionWMS = versionWms;
|
||||
|
@ -96,21 +98,13 @@ public class GeoInformationForWMSRequest implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the service end point.
|
||||
* Gets the base wms service host.
|
||||
*
|
||||
* @return the service end point
|
||||
* @return the baseWmsServiceHost
|
||||
*/
|
||||
public String getServiceEndPoint() {
|
||||
return serviceEndPoint;
|
||||
}
|
||||
public String getBaseWmsServiceHost() {
|
||||
|
||||
/**
|
||||
* Sets the service end point.
|
||||
*
|
||||
* @param serviceEndPoint the new service end point
|
||||
*/
|
||||
public void setServiceEndPoint(String serviceEndPoint) {
|
||||
this.serviceEndPoint = serviceEndPoint;
|
||||
return baseWmsServiceHost;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -186,11 +180,11 @@ public class GeoInformationForWMSRequest implements Serializable {
|
|||
/**
|
||||
* Sets the base wms service host.
|
||||
*
|
||||
* @param baseWmsServiceHost the new base wms service host
|
||||
* @param baseWmsServiceHost the baseWmsServiceHost to set
|
||||
*/
|
||||
public void setBaseWmsServiceHost(String baseWmsServiceHost) {
|
||||
|
||||
this.serviceEndPoint = baseWmsServiceHost;
|
||||
this.baseWmsServiceHost = baseWmsServiceHost;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -277,8 +271,8 @@ public class GeoInformationForWMSRequest implements Serializable {
|
|||
public String toString() {
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("GeoInformationForWMSRequest [serviceEndPoint=");
|
||||
builder.append(serviceEndPoint);
|
||||
builder.append("GeoInformationForWMSRequest [baseWmsServiceHost=");
|
||||
builder.append(baseWmsServiceHost);
|
||||
builder.append(", wmsRequest=");
|
||||
builder.append(wmsRequest);
|
||||
builder.append(", layerName=");
|
||||
|
|
|
@ -17,17 +17,11 @@
|
|||
|
||||
<inherits name="com.google.gwt.json.JSON" />
|
||||
|
||||
<inherits
|
||||
name='org.gcube.portal.clientcontext.GCubeClientContext' />
|
||||
|
||||
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||
|
||||
<!-- Other module inherits -->
|
||||
|
||||
<servlet path="/geoportalexporterservice"
|
||||
class="org.gcube.portlets.user.geoportaldataviewer.server.GeoportalExporterActionServlet" />
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<entry-point
|
||||
class='org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewer' />
|
||||
|
|
|
@ -200,7 +200,7 @@ body {
|
|||
/*margin-top: 30px;*/
|
||||
overflow-y: auto;
|
||||
transition: width 0.5s;
|
||||
z-index: 950;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
|
@ -363,16 +363,12 @@ body {
|
|||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.layer-panel {
|
||||
margin-top: 43px;
|
||||
.layers-panel {
|
||||
margin-top: 10px;
|
||||
background-color: white;
|
||||
opacity: 90%;
|
||||
padding: 10px;
|
||||
max-width: 430px;
|
||||
z-index: 500;
|
||||
overflow-y: auto;
|
||||
position: absolute;
|
||||
left: 52px;
|
||||
width: 410px;
|
||||
}
|
||||
|
||||
.dand-layer {
|
||||
|
@ -756,6 +752,62 @@ Table Of Contents (TOC)
|
|||
padding: 20px;
|
||||
}
|
||||
|
||||
|
||||
/******************************
|
||||
RESPONSIVE
|
||||
*******************************/
|
||||
|
||||
@media all and (max-width: 2350px) {
|
||||
#timeline-data {
|
||||
width: 700px;
|
||||
left: 550px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 2048px) {
|
||||
#timeline-data {
|
||||
width: 600px;
|
||||
left: 310px;
|
||||
bottom: 50px
|
||||
}
|
||||
|
||||
.details-panel {
|
||||
width: 600px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 1024px) {
|
||||
#timeline-data {
|
||||
width: 260px;
|
||||
left: 140px;
|
||||
bottom: 50px
|
||||
}
|
||||
.details-panel {
|
||||
width: 400px;
|
||||
}
|
||||
.search-facility {
|
||||
width: 250px;
|
||||
max-width: 300px;
|
||||
}
|
||||
.inner-toolbar {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-height: 900px) {
|
||||
.ol-popup{
|
||||
min-width: 150px;
|
||||
max-width: 150px;
|
||||
max-height: 150px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.ol-popup img {
|
||||
width: 100%;
|
||||
max-width: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* OPEN COLLECTION UI */
|
||||
.open-collection-style {
|
||||
padding-left: 10px;
|
||||
|
@ -776,14 +828,6 @@ Table Of Contents (TOC)
|
|||
color: gray;
|
||||
}
|
||||
|
||||
.statistic-style-panel {
|
||||
margin-left: 25px;
|
||||
font-size: 13px;
|
||||
color: gray;
|
||||
font-weight: bold;
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
.layer-style-panel-table-legend table td {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
@ -853,89 +897,3 @@ Table Of Contents (TOC)
|
|||
.opacity-09 {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
|
||||
/******************************
|
||||
RESPONSIVE
|
||||
*******************************/
|
||||
|
||||
@media all and (max-width: 2350px) {
|
||||
#timeline-data {
|
||||
width: 700px;
|
||||
left: 550px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 2048px) {
|
||||
#timeline-data {
|
||||
width: 600px;
|
||||
left: 310px;
|
||||
bottom: 50px
|
||||
}
|
||||
|
||||
.details-panel {
|
||||
width: 530px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 1601px) {
|
||||
.layers-panel {
|
||||
width: 350px;
|
||||
}
|
||||
.dand-layer {
|
||||
width: 336px;
|
||||
}
|
||||
.thePopDataTable {
|
||||
|
||||
}
|
||||
.search-facility {
|
||||
max-width: 680px;
|
||||
}
|
||||
.search-field {
|
||||
width: 97%;
|
||||
}
|
||||
.ol-popup {
|
||||
min-width: 220px;
|
||||
width: 220px;
|
||||
}
|
||||
.thePopDataTable tr:last-of-type {
|
||||
display: none;
|
||||
}
|
||||
.layer-panel {
|
||||
width: 355px;
|
||||
}
|
||||
}
|
||||
@media all and (max-width: 1024px) {
|
||||
#timeline-data {
|
||||
width: 260px;
|
||||
left: 140px;
|
||||
bottom: 50px
|
||||
}
|
||||
.details-panel {
|
||||
width: 400px;
|
||||
}
|
||||
.search-facility {
|
||||
/*width: 250px;
|
||||
max-width: 300px;*/
|
||||
}
|
||||
.inner-toolbar {
|
||||
/*width: 100px;*/
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-height: 900px) {
|
||||
.ol-popup{
|
||||
min-width: 150px;
|
||||
max-width: 150px;
|
||||
max-height: 150px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.ol-popup img {
|
||||
width: 100%;
|
||||
max-width: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
/******************************
|
||||
END RESPONSIVE
|
||||
*******************************/
|
|
@ -10,10 +10,10 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<link
|
||||
href="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.6.1/css/ol.css"
|
||||
href="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.4.3/css/ol.css"
|
||||
rel="stylesheet" type="text/css">
|
||||
<script
|
||||
src="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.6.1/build/ol.js"
|
||||
src="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.4.3/build/ol.js"
|
||||
type="text/javascript"></script>
|
||||
|
||||
<link
|
||||
|
@ -138,7 +138,6 @@
|
|||
application to display correctly.</div>
|
||||
</noscript>
|
||||
<div id="app-notifier" class="app-notifier"></div>
|
||||
<div id="layer-viewer" class="layer-panel"></div>
|
||||
<div id="geoportal-data-viewer"></div>
|
||||
<div class="timeline-container">
|
||||
<div id="timeline-data"></div>
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
src='<%=request.getContextPath()%>/GeoportalDataViewer/js/bootstrap.min.js'></script>
|
||||
|
||||
<link
|
||||
href="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.6.1/css/ol.css"
|
||||
href="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.4.3/css/ol.css"
|
||||
rel="stylesheet" type="text/css">
|
||||
|
||||
<script
|
||||
src="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.6.1/build/ol.js"
|
||||
src="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.4.3/build/ol.js"
|
||||
type="text/javascript"></script>
|
||||
|
||||
<link
|
||||
|
@ -111,7 +111,6 @@
|
|||
</script>
|
||||
|
||||
<div id="app-notifier" class="app-notifier"></div>
|
||||
<div id="layer-viewer" class="layer-panel"></div>
|
||||
<div id="geoportal-data-viewer"></div>
|
||||
<div class="timeline-container">
|
||||
<div id="timeline-data"></div>
|
||||
|
|
|
@ -15,17 +15,7 @@
|
|||
<servlet-name>geoportalDataViewerServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.geoportaldataviewer.server.GeoportalDataViewerServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<!-- <servlet> -->
|
||||
<!-- <servlet-name>geoportalWaitingServerActionServlet</servlet-name> -->
|
||||
<!-- <servlet-class>org.gcube.portlets.user.geoportaldataviewer.server.WatingServerActionServlet</servlet-class> -->
|
||||
<!-- </servlet> -->
|
||||
|
||||
<servlet>
|
||||
<servlet-name>geoportalExporterServerActionServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.geoportaldataviewer.server.GeoportalExporterActionServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
|
||||
<servlet>
|
||||
<servlet-name>mpformbuilderServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.mpformbuilder.server.MetadataProfileFormBuilderServiceImpl</servlet-class>
|
||||
|
@ -41,15 +31,5 @@
|
|||
<servlet-name>geoportalDataViewerServlet</servlet-name>
|
||||
<url-pattern>/GeoportalDataViewer/geoportaldataviewerservice</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- <servlet-mapping> -->
|
||||
<!-- <servlet-name>geoportalWaitingServerActionServlet</servlet-name> -->
|
||||
<!-- <url-pattern>/GeoportalDataViewer/geoportaldataviewerwaitingservice</url-pattern> -->
|
||||
<!-- </servlet-mapping> -->
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>geoportalExporterServerActionServlet</servlet-name>
|
||||
<url-pattern>/GeoportalDataViewer/geoportalexporterservice</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
</web-app>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 55 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB |
|
@ -1,42 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.geoportaldataviewer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.GeoportalExporterActionServlet;
|
||||
|
||||
/**
|
||||
* The Class GeoportalExporterActionServletTest.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Apr 24, 2024
|
||||
*/
|
||||
public class GeoportalExporterActionServletTest {
|
||||
|
||||
/**
|
||||
* The main method.
|
||||
*
|
||||
* @param args the arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
String url = "https://data.dev.d4science.org/geoportal/export/pdf/profiledConcessioni/661d2c6f8804530afb90b132";
|
||||
String identity = "francesco.mangiacrapa";
|
||||
String token = "";
|
||||
System.out.println("Start");
|
||||
InputStream response;
|
||||
try {
|
||||
response = GeoportalExporterActionServlet.performHttpRequestToSGService(url, identity, token);
|
||||
System.out.println(IOUtils.toString(response));
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println("End");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue