Available collections panel
This commit is contained in:
parent
8d664f6ba1
commit
43ddf88ba8
39
.classpath
39
.classpath
|
@ -1,39 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<classpath>
|
|
||||||
<classpathentry kind="src" output="target/geoportal-data-viewer-app-2.3.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-2.3.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"/>
|
|
||||||
<attribute name="optional" value="true"/>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="test" value="true"/>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="output" path="target/geoportal-data-viewer-app-2.3.0-SNAPSHOT/WEB-INF/classes"/>
|
|
||||||
</classpath>
|
|
|
@ -1,2 +0,0 @@
|
||||||
/bin/
|
|
||||||
/target/
|
|
47
.project
47
.project
|
@ -1,47 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>geoportal-data-viewer-app-ws</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>com.gwtplugins.gdt.eclipse.core.webAppProjectValidator</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>com.gwtplugins.gwt.eclipse.core.gwtProjectValidator</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
|
||||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
|
||||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
|
||||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
|
||||||
<nature>com.gwtplugins.gwt.eclipse.core.gwtNature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1,4 +0,0 @@
|
||||||
eclipse.preferences.version=1
|
|
||||||
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-2.3.0-SNAPSHOT
|
|
||||||
warSrcDir=src/main/webapp
|
|
||||||
warSrcDirIsOutput=false
|
|
|
@ -1,2 +0,0 @@
|
||||||
eclipse.preferences.version=1
|
|
||||||
gwtSyncCodeServer=true
|
|
|
@ -1,11 +0,0 @@
|
||||||
eclipse.preferences.version=1
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
|
||||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
|
||||||
org.eclipse.jdt.core.compiler.release=disabled
|
|
||||||
org.eclipse.jdt.core.compiler.source=1.8
|
|
|
@ -1,171 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="geoportal-data-viewer-app-2.3.0-SNAPSHOT">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<property name="java-output-path" value="/geoportal-data-viewer-app/target/geoportal-data-viewer-app-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<property name="context-root" value="geoportal-data-viewer-app"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</wb-module>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</project-modules>
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<faceted-project>
|
|
||||||
<installed facet="jst.web" version="3.0"/>
|
|
||||||
<installed facet="com.gwtplugins.gwt.facet" version="1.0"/>
|
|
||||||
<installed facet="jst.jaxrs" version="2.0"/>
|
|
||||||
<installed facet="java" version="1.8"/>
|
|
||||||
</faceted-project>
|
|
10
pom.xml
10
pom.xml
|
@ -73,13 +73,19 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.application</groupId>
|
<groupId>org.gcube.application</groupId>
|
||||||
<artifactId>geoportal-data-common</artifactId>
|
<artifactId>geoportal-data-common</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT, 1.5.0-SNAPSHOT)</version>
|
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.gcube.application</groupId>
|
||||||
|
<artifactId>geoportal-client</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.application</groupId>
|
<groupId>org.gcube.application</groupId>
|
||||||
<artifactId>geoportal-client</artifactId>
|
<artifactId>geoportal-client</artifactId>
|
||||||
<version>[1.0.0, 1.1.0-SNAPSHOT)</version>
|
<version>[1.0.0, 2.0.0-SNAPSHOT)</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
|
|
@ -371,6 +371,9 @@ public class GeoportalDataViewer implements EntryPoint {
|
||||||
|
|
||||||
applicationBus.addHandler(ZoomOutOverMinimumEvent.TYPE, zoomOutEvent -> {
|
applicationBus.addHandler(ZoomOutOverMinimumEvent.TYPE, zoomOutEvent -> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// TODO
|
||||||
if (mainPanel.getDisplayedRecord() == null && !olMapMng.isQueryPointActive()) {
|
if (mainPanel.getDisplayedRecord() == null && !olMapMng.isQueryPointActive()) {
|
||||||
olMapMng.hidePopInfo();
|
olMapMng.hidePopInfo();
|
||||||
layerManager.removeAllDetailLayers();
|
layerManager.removeAllDetailLayers();
|
||||||
|
|
|
@ -2,10 +2,8 @@ package org.gcube.portlets.user.geoportaldataviewer.client.ui;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
|
||||||
import org.gcube.application.geoportalcommon.shared.ItemField;
|
import org.gcube.application.geoportalcommon.shared.ItemField;
|
||||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter;
|
import org.gcube.application.geoportalcommon.shared.SearchingFilter;
|
||||||
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
|
||||||
import org.gcube.application.geoportalcommon.shared.products.model.RecordDV;
|
import org.gcube.application.geoportalcommon.shared.products.model.RecordDV;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants.MAP_PROJECTION;
|
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants.MAP_PROJECTION;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.application.ChangeBaseMapLayerEvent;
|
import org.gcube.portlets.user.geoportaldataviewer.client.events.application.ChangeBaseMapLayerEvent;
|
||||||
|
@ -15,16 +13,16 @@ 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.resources.GNAImages;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.map.ExtentMapUtil;
|
import org.gcube.portlets.user.geoportaldataviewer.client.ui.map.ExtentMapUtil;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.map.ExtentMapUtil.Location;
|
import org.gcube.portlets.user.geoportaldataviewer.client.ui.map.ExtentMapUtil.Location;
|
||||||
|
import org.gcube.portlets.user.geoportaldataviewer.shared.GCubeCollection;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.BaseMapLayer;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.BaseMapLayer;
|
||||||
|
|
||||||
import com.github.gwtbootstrap.client.ui.Button;
|
import com.github.gwtbootstrap.client.ui.Button;
|
||||||
|
import com.github.gwtbootstrap.client.ui.CheckBox;
|
||||||
import com.github.gwtbootstrap.client.ui.DropdownButton;
|
import com.github.gwtbootstrap.client.ui.DropdownButton;
|
||||||
import com.github.gwtbootstrap.client.ui.NavLink;
|
import com.github.gwtbootstrap.client.ui.NavLink;
|
||||||
import com.github.gwtbootstrap.client.ui.Paragraph;
|
import com.github.gwtbootstrap.client.ui.Paragraph;
|
||||||
import com.github.gwtbootstrap.client.ui.constants.IconType;
|
import com.github.gwtbootstrap.client.ui.constants.IconType;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.core.client.Scheduler;
|
|
||||||
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
|
||||||
import com.google.gwt.dom.client.Style.Unit;
|
import com.google.gwt.dom.client.Style.Unit;
|
||||||
import com.google.gwt.event.dom.client.ClickEvent;
|
import com.google.gwt.event.dom.client.ClickEvent;
|
||||||
import com.google.gwt.event.dom.client.ClickHandler;
|
import com.google.gwt.event.dom.client.ClickHandler;
|
||||||
|
@ -92,14 +90,26 @@ public class GeonaDataViewMainPanel extends Composite {
|
||||||
@UiField
|
@UiField
|
||||||
Button linkLayers;
|
Button linkLayers;
|
||||||
|
|
||||||
|
|
||||||
|
//TODO Search By Collection, postponed
|
||||||
|
// @UiField
|
||||||
|
// DropdownButton searchFacilityButton;
|
||||||
|
//
|
||||||
|
// @UiField
|
||||||
|
// ScrollPanel searchFacilityPanel;
|
||||||
|
//
|
||||||
|
|
||||||
@UiField
|
@UiField
|
||||||
DropdownButton searchFacilityButton;
|
DropdownButton openCollectionDropDown;
|
||||||
|
|
||||||
|
@UiField
|
||||||
|
HTMLPanel openCollectionPanel;
|
||||||
|
|
||||||
|
|
||||||
@UiField
|
@UiField
|
||||||
ScrollPanel overlayLayersPanel;
|
ScrollPanel overlayLayersPanel;
|
||||||
|
|
||||||
@UiField
|
|
||||||
ScrollPanel searchFacilityPanel;
|
|
||||||
|
|
||||||
@UiField
|
@UiField
|
||||||
HTMLPanel panelAttribution;
|
HTMLPanel panelAttribution;
|
||||||
|
@ -128,7 +138,8 @@ public class GeonaDataViewMainPanel extends Composite {
|
||||||
* @param applicationBus the application bus
|
* @param applicationBus the application bus
|
||||||
* @param mapHeight the map height
|
* @param mapHeight the map height
|
||||||
*/
|
*/
|
||||||
public GeonaDataViewMainPanel(HandlerManager applicationBus, int mapHeight, List<ItemField> sortByFields,
|
public GeonaDataViewMainPanel(HandlerManager applicationBus, int mapHeight,
|
||||||
|
List<ItemField> sortByFields,
|
||||||
List<ItemField> searchForFields, SearchingFilter initialSortFilter) {
|
List<ItemField> searchForFields, SearchingFilter initialSortFilter) {
|
||||||
initWidget(uiBinder.createAndBindUi(this));
|
initWidget(uiBinder.createAndBindUi(this));
|
||||||
this.applicationBus = applicationBus;
|
this.applicationBus = applicationBus;
|
||||||
|
@ -155,6 +166,11 @@ public class GeonaDataViewMainPanel extends Composite {
|
||||||
linkPresetLocation.setCustomIconStyle(GNAIcons.CustomIconType.PRESET_LOCATION.get());
|
linkPresetLocation.setCustomIconStyle(GNAIcons.CustomIconType.PRESET_LOCATION.get());
|
||||||
linkLayers.setCustomIconStyle(GNAIcons.CustomIconType.LAYERS.get());
|
linkLayers.setCustomIconStyle(GNAIcons.CustomIconType.LAYERS.get());
|
||||||
|
|
||||||
|
openCollectionDropDown.setCustomIconStyle(GNAIcons.CustomIconType.MAP.get());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
GWT.log("!!! NB TODO : Search facility is skipped ");
|
GWT.log("!!! NB TODO : Search facility is skipped ");
|
||||||
|
@ -174,6 +190,9 @@ public class GeonaDataViewMainPanel extends Composite {
|
||||||
//
|
//
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// layersDDB.setToggle(true);
|
// layersDDB.setToggle(true);
|
||||||
bindEvents();
|
bindEvents();
|
||||||
|
|
||||||
|
@ -196,15 +215,17 @@ public class GeonaDataViewMainPanel extends Composite {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
searchFacilityButton.addDomHandler(new ClickHandler() {
|
|
||||||
|
|
||||||
@Override
|
// TODO Search
|
||||||
public void onClick(ClickEvent event) {
|
// searchFacilityButton.addDomHandler(new ClickHandler() {
|
||||||
//event.preventDefault();
|
//
|
||||||
event.stopPropagation();
|
// @Override
|
||||||
|
// public void onClick(ClickEvent event) {
|
||||||
}
|
// //event.preventDefault();
|
||||||
}, ClickEvent.getType());
|
// event.stopPropagation();
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }, ClickEvent.getType());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,16 +334,19 @@ public class GeonaDataViewMainPanel extends Composite {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Show as details.
|
|
||||||
*
|
|
||||||
* @param concessioneDV the concessione DV
|
|
||||||
* @param geonaItemRef the geona item ref
|
|
||||||
*/
|
|
||||||
public void showAsDetails(ConcessioneDV concessioneDV, GeoNaItemRef geonaItemRef) {
|
|
||||||
detailsPanel.showDetailsFor(concessioneDV, geonaItemRef);
|
|
||||||
|
|
||||||
}
|
// TODO Generic Open Details
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * Show as details.
|
||||||
|
// *
|
||||||
|
// * @param concessioneDV the concessione DV
|
||||||
|
// * @param geonaItemRef the geona item ref
|
||||||
|
// */
|
||||||
|
// public void showAsDetails(ConcessioneDV concessioneDV, GeoNaItemRef geonaItemRef) {
|
||||||
|
// detailsPanel.showDetailsFor(concessioneDV, geonaItemRef);
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide panel details.
|
* Hide panel details.
|
||||||
|
@ -332,6 +356,9 @@ public class GeonaDataViewMainPanel extends Composite {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// TODO Check method
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the displyed record.
|
* Gets the displyed record.
|
||||||
*
|
*
|
||||||
|
@ -399,6 +426,27 @@ public class GeonaDataViewMainPanel extends Composite {
|
||||||
panelAttribution.add(p);
|
panelAttribution.add(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setAvailableCollections(List<GCubeCollection> toSetAvailableCollections) {
|
||||||
|
GWT.log("Init Available collections menu");
|
||||||
|
if(toSetAvailableCollections == null || toSetAvailableCollections.isEmpty())
|
||||||
|
GWT.log("!!! No Available collections");
|
||||||
|
|
||||||
|
|
||||||
|
for(GCubeCollection coll : toSetAvailableCollections) {
|
||||||
|
String label = coll.getUcd().getName();
|
||||||
|
String id=coll.getUcd().getId();
|
||||||
|
|
||||||
|
CheckBox checkbox = new CheckBox(label);
|
||||||
|
checkbox.setId("gcubeCollectionSelector_"+id);
|
||||||
|
openCollectionPanel.add(checkbox);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void setBaseLayers(List<BaseMapLayer> listBaseLayers) {
|
public void setBaseLayers(List<BaseMapLayer> listBaseLayers) {
|
||||||
|
|
||||||
if(listBaseLayers==null)
|
if(listBaseLayers==null)
|
||||||
|
|
|
@ -35,16 +35,29 @@
|
||||||
</g:HTMLPanel>
|
</g:HTMLPanel>
|
||||||
</g:HTMLPanel>
|
</g:HTMLPanel>
|
||||||
</b:DropdownButton>
|
</b:DropdownButton>
|
||||||
<b:DropdownButton type="LINK" text="Search"
|
|
||||||
|
<!-- <b:DropdownButton type="LINK" text="Search"
|
||||||
ui:field="searchFacilityButton">
|
ui:field="searchFacilityButton">
|
||||||
<g:ScrollPanel ui:field="searchFacilityPanel"
|
<g:ScrollPanel ui:field="searchFacilityPanel"
|
||||||
addStyleNames="search-facility"></g:ScrollPanel>
|
addStyleNames="search-facility"></g:ScrollPanel>
|
||||||
|
</b:DropdownButton> -->
|
||||||
|
|
||||||
|
|
||||||
|
<b:DropdownButton type="LINK" text="Open Collection"
|
||||||
|
ui:field="openCollectionDropDown">
|
||||||
|
<g:HTMLPanel ui:field="openCollectionPanel">
|
||||||
|
</g:HTMLPanel>
|
||||||
</b:DropdownButton>
|
</b:DropdownButton>
|
||||||
|
|
||||||
|
|
||||||
<b:DropdownButton type="LINK"
|
<b:DropdownButton type="LINK"
|
||||||
title="Select the Map" text="Map" ui:field="linkMap">
|
title="Select the Map" text="Map" ui:field="linkMap">
|
||||||
<g:HTMLPanel ui:field="panelBaseLayers">
|
<g:HTMLPanel ui:field="panelBaseLayers">
|
||||||
</g:HTMLPanel>
|
</g:HTMLPanel>
|
||||||
</b:DropdownButton>
|
</b:DropdownButton>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<b:DropdownButton type="LINK"
|
<b:DropdownButton type="LINK"
|
||||||
title="Center Map to Location" text="Preset Location"
|
title="Center Map to Location" text="Preset Location"
|
||||||
ui:field="linkPresetLocation">
|
ui:field="linkPresetLocation">
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
package org.gcube.portlets.user.geoportaldataviewer.server.mongoservice;
|
|
||||||
|
|
||||||
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.statefulMongoConcessioni;
|
|
||||||
|
|
||||||
import org.gcube.application.geoportal.client.legacy.ConcessioniManagerI;
|
|
||||||
import org.gcube.application.geoportal.common.model.legacy.Concessione;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Class ConcessioniMongoService.
|
|
||||||
*
|
|
||||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
|
||||||
*
|
|
||||||
* Sep 23, 2021
|
|
||||||
*/
|
|
||||||
public class ConcessioniMongoService {
|
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(ConcessioniMongoService.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instantiates a new concessioni mongo service.
|
|
||||||
*/
|
|
||||||
protected ConcessioniMongoService() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the item by id.
|
|
||||||
*
|
|
||||||
* @param mongoItemId the mongo item id
|
|
||||||
* @return the item by id
|
|
||||||
* @throws Exception the exception
|
|
||||||
*/
|
|
||||||
protected Concessione getItemById(String mongoItemId) throws Exception {
|
|
||||||
LOG.info("called getItemById: " + mongoItemId);
|
|
||||||
ConcessioniManagerI concessioniManager = statefulMongoConcessioni().build();
|
|
||||||
// Returning item by Id
|
|
||||||
return concessioniManager.getById(mongoItemId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To concessione.
|
|
||||||
*
|
|
||||||
* @param jsonString the json string
|
|
||||||
* @return the concessione
|
|
||||||
*/
|
|
||||||
protected Concessione toConcessione(String jsonString) {
|
|
||||||
LOG.info("toConcessione called");
|
|
||||||
try {
|
|
||||||
return org.gcube.application.geoportal.client.utils.Serialization.read(jsonString, Concessione.class);
|
|
||||||
} catch (Exception e) {
|
|
||||||
LOG.warn("Error on serializing: ", e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* For testing public Concessione iamClientGetItemBy(HttpServletRequest request,
|
|
||||||
* String mongoItemId, String clientId, String secret) throws Exception { String
|
|
||||||
* scope = SessionUtil.getCurrentContext(request, true); return
|
|
||||||
* iamClientGetItemBy(scope, mongoItemId, clientId, secret); }
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
|
|
@ -67,9 +67,10 @@ public class ConcessioniMongoServiceIdentityProxy {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Obtain the client
|
// Obtain the client
|
||||||
ConcessioniMongoService concessioniManager = new ConcessioniMongoService();
|
// ConcessioniMongoService concessioniManager = new ConcessioniMongoService();
|
||||||
// Returning item by Id
|
// Returning item by Id
|
||||||
return concessioniManager.getItemById(mongoItemId);
|
// return concessioniManager.getItemById(mongoItemId);
|
||||||
|
return null;
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
LOG.error("Error on reading itemById: "+mongoItemId, e);
|
LOG.error("Error on reading itemById: "+mongoItemId, e);
|
||||||
throw(e);
|
throw(e);
|
||||||
|
|
|
@ -2,13 +2,24 @@ package org.gcube.portlets.user.geoportaldataviewer.shared;
|
||||||
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||||
|
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.IndexLayer;
|
||||||
|
|
||||||
|
|
||||||
public class GCubeCollection implements Serializable {
|
public class GCubeCollection implements Serializable {
|
||||||
|
|
||||||
// private Document ucd;
|
private UseCaseDescriptor ucd;
|
||||||
// private List<IndexLayer> indexes;
|
private List<IndexLayer> indexes;
|
||||||
|
|
||||||
|
|
||||||
|
public UseCaseDescriptor getUcd() {
|
||||||
|
return ucd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<IndexLayer> getIndexes() {
|
||||||
|
return indexes;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
|
||||||
|
|
||||||
|
public class IndexLayer {
|
||||||
|
|
||||||
|
}
|
|
@ -1,60 +0,0 @@
|
||||||
package org.gcube.portlets.user.geoportaldataviewer;
|
|
||||||
|
|
||||||
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.statefulMongoConcessioni;
|
|
||||||
|
|
||||||
import org.gcube.application.geoportal.client.legacy.ConcessioniManagerI;
|
|
||||||
import org.gcube.application.geoportal.common.model.legacy.Concessione;
|
|
||||||
import org.gcube.application.geoportalcommon.ConvertToDataViewModel;
|
|
||||||
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
|
||||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
|
||||||
|
|
||||||
public class ConcessioneReader {
|
|
||||||
|
|
||||||
private static final String YOUR_TOKEN = "";
|
|
||||||
|
|
||||||
public static String SCOPE = "/gcube/devsec/devVRE";
|
|
||||||
public static String mongoConcessioneID = "6102c07002ad3d05b5f81ddc";
|
|
||||||
|
|
||||||
//@Before
|
|
||||||
public void setEnviroment() {
|
|
||||||
ScopeProvider.instance.set(SCOPE);
|
|
||||||
SecurityTokenProvider.instance.set(YOUR_TOKEN);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Test
|
|
||||||
public void readConcessione() throws Exception {
|
|
||||||
System.out.println("getConcessioneForId " + mongoConcessioneID + "called");
|
|
||||||
|
|
||||||
ConcessioneDV concessionDV = null;
|
|
||||||
|
|
||||||
if (mongoConcessioneID == null)
|
|
||||||
throw new Exception("Invalid parameter. The Id is null");
|
|
||||||
|
|
||||||
try {
|
|
||||||
System.out.println("Trying to get record for id " + mongoConcessioneID);
|
|
||||||
ConcessioniManagerI concessioniManager = statefulMongoConcessioni().build();
|
|
||||||
Concessione concessione = concessioniManager.getById(mongoConcessioneID);
|
|
||||||
System.out.println("For id " + mongoConcessioneID + ", got concessione " + concessione);
|
|
||||||
System.out.println("Immagini Rappresentative are: " + concessione.getImmaginiRappresentative());
|
|
||||||
System.out.println("Relazione scavo: " + concessione.getRelazioneScavo());
|
|
||||||
System.out.println("Pianta Fine scavo: " + concessione.getPianteFineScavo());
|
|
||||||
System.out.println("Posizionamento scavo: " + concessione.getPosizionamentoScavo());
|
|
||||||
|
|
||||||
if (concessione != null) {
|
|
||||||
concessionDV = ConvertToDataViewModel.toConcessione(concessione);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (concessionDV == null)
|
|
||||||
throw new Exception("Concessione not retrieved");
|
|
||||||
|
|
||||||
System.out.println("Got concessione: " + concessionDV);
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
String erroMsg = Concessione.class.getSimpleName() + " with id " + mongoConcessioneID + " not available";
|
|
||||||
throw new Exception(erroMsg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue