Updated javadoc to compile within java8

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/gis-viewer-app@148787 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2017-05-17 13:46:55 +00:00
parent a39d9014be
commit 1452ac37c8
10 changed files with 167 additions and 106 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/gis-viewer-app-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/gis-viewer-app-1.4.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@ -30,5 +30,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/gis-viewer-app-1.4.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/gis-viewer-app-1.4.1-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -31,10 +31,12 @@ import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.RootPanel;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* @Oct 8, 2014
* The Class ApplicationController.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* May 17, 2017
*/
public class ApplicationController {
@ -56,8 +58,9 @@ public class ApplicationController {
private static final String GCUBE_COOKIE_SHOW_WARNING_FOR_WPS_DATA_POINT_QUERY= "GCUBE-Cookie_GeoWPSQuery_DataPoint_Authorization";
private static final String GCUBE_COOKIE_SHOW_WARNING_FOR_WPS_BOX_QUERY = "GCUBE-Cookie_GeoWPSQuery_Box_Authorization";
public static final long MILLISECS_PER_DAY = 1000L * 60L * 60L * 24L;
/**
*
* Instantiates a new application controller.
*/
public ApplicationController() {
mainPanel = new LayoutContainer();
@ -71,6 +74,9 @@ public class ApplicationController {
mainPanel.add(gisViewerContentPanel);
}
/**
* Inits the gis viewer parameters.
*/
private void initGisViewerParameters(){
gisViewerParameters = new GisViewerParameters();
@ -95,6 +101,9 @@ public class ApplicationController {
}
/**
* Inits the gis viewer content panel.
*/
private void initGisViewerContentPanel(){
gisViewerContentPanel = new ContentPanel() {
@ -121,8 +130,11 @@ public class ApplicationController {
@SuppressWarnings("unused")
Resizable r = new Resizable(gisViewerContentPanel, "s");
}
/**
* @param rootPanel
* Go.
*
* @param rootPanel the root panel
*/
public void go(final RootPanel rootPanel) {
this.gwtRootPanel = rootPanel;
@ -223,6 +235,13 @@ public class ApplicationController {
}
/**
* Show warning for wps service.
*
* @param title the title
* @param msg the msg
* @param cookieName the cookie name
*/
private void showWarningForWPSService(String title, String msg, final String cookieName){
final DialogResult dialog = new DialogResult(Images.iconWarning().createImage(), title, msg);
@ -243,6 +262,7 @@ public class ApplicationController {
/**
* Read cookie workspace available features.
*
* @param cookieName the cookie name
* @return true if exists a cookie with msg as true value (or not exists the cookie), false otherwise
*/
private boolean readCookieWPSQueryAuthorization(String cookieName) {
@ -284,27 +304,37 @@ public class ApplicationController {
/**
* Decode url with param delimiter.
*
* @param wmsRequest
* @return
* @param wmsRequest the wms request
* @param delimiter the delimiter
* @return the string
*/
@SuppressWarnings("unused")
private String decodeURLWithParamDelimiter(String wmsRequest, String delimiter){
return wmsRequest.replaceAll(delimiter, "&");
}
/**
* @return
* Gets the main panel.
*
* @return the main panel
*/
public LayoutContainer getMainPanel() {
return mainPanel;
}
/**
* Gets the gis viewer panel.
*
* @return the gis viewer panel
*/
public GisViewerPanel getGisViewerPanel() {
return gisViewerPanel;
}
/**
*
* Move wms balloon position.
*/
public void moveWMSBalloonPosition(){
balloonWMS.hide();
@ -314,6 +344,8 @@ public class ApplicationController {
}
/**
* Gets the baloon wms.
*
* @return the baloonWMS
*/
public BaloonPanel getBaloonWMS() {
@ -348,10 +380,26 @@ public class ApplicationController {
}
}
/**
* The Interface Function.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* May 17, 2017
*/
public interface Function {
/**
* Execute.
*/
public void execute();
}
/**
* The Class SetZIndex.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* May 17, 2017
*/
class SetZIndex implements Function {
/*

View File

@ -1,5 +1,5 @@
/**
*
*
*/
package org.gcube.portlets.user.gisviewerapp.client;
@ -9,10 +9,12 @@ import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.PopupPanel;
/**
* The Class BaloonPanel.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* @Mar 21, 2014
*
* May 17, 2017
*/
public class BaloonPanel extends PopupPanel{
@ -20,9 +22,10 @@ public class BaloonPanel extends PopupPanel{
private Command command;
/**
*
* @param baloonText
* @param shouldHide
* Instantiates a new baloon panel.
*
* @param baloonText the baloon text
* @param shouldHide the should hide
* @param cmd on Click
*/
public BaloonPanel(String baloonText, boolean shouldHide, Command cmd) {
@ -33,18 +36,21 @@ public class BaloonPanel extends PopupPanel{
setStyleName("baloonPanel");
// some sample widget will be content of the balloon
HTML text = new HTML(baloonText);
text.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
command.execute();
}
});
setWidget(text);
}
/* (non-Javadoc)
* @see com.google.gwt.user.client.ui.PopupPanel#show()
*/
@Override
public void show() {
super.show();

View File

@ -18,11 +18,12 @@ import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
/**
* The Class DialogResult.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Feb 19, 2015
* May 17, 2017
*/
public class DialogResult extends DialogBox implements ClickHandler {
@ -34,6 +35,7 @@ public class DialogResult extends DialogBox implements ClickHandler {
* Instantiates a new dialog result.
*
* @param img the img
* @param title the title
* @param text the text
*/
public DialogResult(Image img, String title, String text) {
@ -69,6 +71,8 @@ public class DialogResult extends DialogBox implements ClickHandler {
/**
* Gets the check show again.
*
* @return the checkShowAgain
*/
public CheckBox getCheckShowAgain() {
@ -77,6 +81,8 @@ public class DialogResult extends DialogBox implements ClickHandler {
}
/**
* Gets the close button.
*
* @return the closeButton
*/
public Button getCloseButton() {

View File

@ -1,5 +1,5 @@
/**
*
*
*/
package org.gcube.portlets.user.gisviewerapp.client;
@ -24,65 +24,70 @@ import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Widget;
/**
* The Class AbstractFormRelease.
* The Class WmsForm.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Feb 19, 2015
* May 17, 2017
*/
public abstract class WmsForm extends Composite {
@UiField
TextBox input_WMS_URI;
@UiField
TextBox input_layer_name;
@UiField
TextBox input_layer_title;
@UiField
Button submit_add_layer;
@UiField
Button close_dialog;
@UiField
Form form_wms_add_layer;
@UiField
ControlGroup input_WMS_URI_group;
@UiField
ControlGroup input_layer_title_group;
@UiField
ControlGroup input_layer_name_group;
@UiField
FluidRow validator_field;
@UiField
HorizontalPanel hp_form_actions;
private Alert alertError = new Alert("Required Field");
private Alert alertSubmitResult = new Alert("");
private static AbstractFormReleaseUiBinder uiBinder = GWT.create(AbstractFormReleaseUiBinder.class);
private int width = 300;
/**
* Subtmit handler.
*
* @param title the title
* @param name the name
* @param wmsRequest the wms request
*/
public abstract void subtmitHandler(String title, String name, String wmsRequest);
/**
* Close handler.
*/
public abstract void closeHandler();
/**
* The Interface AbstractFormReleaseUiBinder.
@ -92,39 +97,39 @@ public abstract class WmsForm extends Composite {
*/
interface AbstractFormReleaseUiBinder extends UiBinder<Widget, WmsForm> {
}
/**
* Instantiates a new abstract form release.
*/
public WmsForm() {
initWidget(uiBinder.createAndBindUi(this));
// setSize(width+"px", "200px");
input_layer_name.setWidth((width-10)+"px");
input_layer_title.setWidth((width-10)+"px");
input_WMS_URI.setWidth((width-10)+"px");
input_layer_name.setWidth(width-10+"px");
input_layer_title.setWidth(width-10+"px");
input_WMS_URI.setWidth(width-10+"px");
close_dialog.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
closeHandler();
}
});
submit_add_layer.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if(validateForm()){
subtmitHandler(getInputLayerTitle().getValue(), getInputLayerName().getValue(), getInputWMSURI().getValue());
}
}
});
input_WMS_URI.addKeyDownHandler(new KeyDownHandler() {
@Override
public void onKeyDown(KeyDownEvent event) {
// super.componentKeyDown(event);
@ -134,59 +139,59 @@ public abstract class WmsForm extends Composite {
}
}
});
input_layer_name_group.addStyleName("marginTop10");
input_layer_title_group.addStyleName("marginTop10");
input_WMS_URI_group.addStyleName("marginTop10");
alertError.addStyleName("marginTop10");
alertError.setType(AlertType.ERROR);
alertError.setVisible(false);
alertError.setClose(false);
validator_field.add(alertError);
// alertSubmitResult.addStyleName("marginTop10");
alertSubmitResult.setType(AlertType.INFO);
alertSubmitResult.setVisible(false);
alertSubmitResult.setClose(false);
hp_form_actions.setCellHorizontalAlignment(close_dialog, HasHorizontalAlignment.ALIGN_RIGHT);
showAlertSubmitResult(false, "");
form_wms_add_layer.add(alertSubmitResult);
}
/**
* Validate form.
*
* @return true, if successful
*/
public boolean validateForm(){
boolean valid = true;
// input_layer_name.setType(ControlGroupType.NONE);
input_layer_name_group.setType(ControlGroupType.NONE);
input_WMS_URI_group.setType(ControlGroupType.NONE);
if(input_layer_name.getValue()==null || input_layer_name.getValue().isEmpty()){
input_layer_name.setControlGroup(input_layer_name_group);
input_layer_name_group.setType(ControlGroupType.ERROR);
valid = false;
}
if(input_WMS_URI.getValue()==null || input_WMS_URI.getValue().isEmpty()){
input_WMS_URI.setControlGroup(input_WMS_URI_group);
input_WMS_URI_group.setType(ControlGroupType.ERROR);
valid = false;
}
// alertError.setVisible(!valid);
setAlertErrorVisible(!valid);
return valid;
}
/**
* Show alert submit result.
*
@ -233,7 +238,7 @@ public abstract class WmsForm extends Composite {
public Alert getAlertSubmitResult() {
return alertSubmitResult;
}
/**
* Sets the alert error visible.
*
@ -272,6 +277,6 @@ public abstract class WmsForm extends Composite {
public TextBox getInputLayerTitle() {
return input_layer_title;
}
}

View File

@ -11,11 +11,12 @@ import org.gcube.portlets.user.gisviewer.client.commons.utils.WmsUrlValidator;
import com.google.gwt.user.client.Window;
/**
* The Class WmsRequestConverter.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Dec 10, 2015
* May 17, 2017
*/
public class WmsRequestConverter {
@ -65,40 +66,8 @@ public class WmsRequestConverter {
String layerName = WmsUrlValidator.getValueOfParameter(WmsParameters.LAYERS, wmsRequest);
displayName= displayName==null || displayName.isEmpty()?layerName:"No Title";
gisViewer.addLayerByWmsRequest(displayName, layerName, wmsRequest, isBase, displayInLayerSwitcher, layerUUID, onTop);
/*GisViewerAppServiceAsync.Util.getInstance().getParametersForWmsRequest(wmsRequest, displayName, new AsyncCallback<GeoInformation>() {
@Override
public void onFailure(Throwable caught) {
Window.alert(caught.getMessage());
}
@Override
public void onSuccess(GeoInformation result) {
addRequestToGisViewer(result);
}
});*/
/*this.listStyles = new ArrayList<String>();
String style = urlValidator.getValueOfParsedWMSParameter(org.gcube.portlets.user.gisviewer.client.commons.utils.WmsParameters.STYLES);
GWT.log("Wms request, style "+style);
if(style!=null) {
this.listStyles.add(style);
}
Map<String, String> noWms = urlValidator.getMapWmsNotStandardParams();
this.noWMSParams = new HashMap<String, String>();
if(noWms!=null && noWms.size()>0){
this.noWMSParams.putAll(noWms);
this.isNcWMS = true;
}*/
}
/*
private void addRequestToGisViewer(GeoInformation result) {
gisViewer.addLayerByWms(GisViewerPanel.LayerType.FEATURE_TYPE, result.getTitle(), result.getLayerName(), url, isExternal, isBase, displayInLayerSwitcher, (ArrayList<String>)result.getGeoStyle().getStyles(), wmsRequest, onTop, (HashMap<String, String>) result.getMapWmsNoStandardParams(), result.getGeoStyle().isNcWMS(), null);
}*/
/**
* Gets the wms request.

View File

@ -14,11 +14,12 @@ import org.gcube.spatial.data.geoutility.wms.WmsUrlValidator;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
/**
* The server side implementation of the RPC service.
* The Class GisViewerAppServiceImpl.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Jan 22, 2016
* May 17, 2017
*/
@SuppressWarnings("serial")
public class GisViewerAppServiceImpl extends RemoteServiceServlet implements GisViewerAppService {
@ -28,6 +29,12 @@ public class GisViewerAppServiceImpl extends RemoteServiceServlet implements Gis
/* (non-Javadoc)
* @see org.gcube.portlets.user.gisviewerapp.client.rpc.GisViewerAppService#getStylesForWmsRequest(java.lang.String)
*/
/**
* Gets the styles for wms request.
*
* @param wmsRequest the wms request
* @return the styles for wms request
*/
@Deprecated
public GeoStyles getStylesForWmsRequest(String wmsRequest) {
@ -47,6 +54,14 @@ public class GisViewerAppServiceImpl extends RemoteServiceServlet implements Gis
}
}
/**
* Gets the parameters for wms request.
*
* @param wmsRequest the wms request
* @param displayName the display name
* @return the parameters for wms request
* @throws Exception the exception
*/
@Deprecated
public GeoInformation getParametersForWmsRequest(String wmsRequest, String displayName) throws Exception {

View File

@ -4,8 +4,12 @@
package org.gcube.portlets.user.gisviewerapp.server;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jan 22, 2016
* The Class LayerNameNotFound.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* May 17, 2017
*/
public class LayerNameNotFound extends Exception {
@ -15,7 +19,9 @@ public class LayerNameNotFound extends Exception {
private static final long serialVersionUID = 1L;
/**
* @param string
* Instantiates a new layer name not found.
*
* @param string the string
*/
public LayerNameNotFound(String string) {

View File

@ -8,11 +8,12 @@ import java.io.Serializable;
import java.util.Map;
/**
* The Class GeoInformation.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Jan 25, 2016
* May 17, 2017
*/
public class GeoInformation implements Serializable {

View File

@ -10,11 +10,12 @@ import java.util.List;
import java.util.Map;
/**
* The Class GeoStyles.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Jan 22, 2016
* May 17, 2017
*/
public class GeoStyles implements Serializable {
@ -91,6 +92,8 @@ public class GeoStyles implements Serializable {
}
/**
* Sets the map nc wms styles.
*
* @param mapNcWmsStyles the mapNcWmsStandardStyles to set
*/
public void setMapNcWmsStyles(Map<String, String> mapNcWmsStyles) {
@ -99,6 +102,8 @@ public class GeoStyles implements Serializable {
}
/**
* Gets the map nc wms styles.
*
* @return the mapNcWmsStyles
*/
public Map<String, String> getMapNcWmsStyles() {