getMapWmsNoStandardParams() {
+ return mapWmsNoStandardParams;
+ }
+
+ /**
+ * The main method.
+ *
+ * @param args the arguments
+ */
+ public static void main(String[] args) {
+
+// String baseGeoserverUrl = "http://repoigg.services.iit.cnr.it:8080/geoserver/IGG/ows";
+// String baseGeoserverUrl = "http://www.fao.org/figis/geoserver/species";
+// String fullPath = "http://www.fao.org/figis/geoserver/species?SERVICE=WMS&BBOX=-176.0,-90.0,180.0,90&styles=Species_prob, puppa&layers=layerName&FORMAT=image/gif";
+// String fullPath = "http://repoigg.services.iit.cnr.it:8080/geoserver/IGG/ows?service=wms&version=1.1.0&request=GetMap&layers==IGG:area_temp_1000&width=676&height=330&srs=EPSG:4326&crs=EPSG:4326&format=application/openlayers&bbox=-85.5,-180.0,90.0,180.0";
+// String baseGeoserverUrl = "http://thredds-d-d4s.d4science.org/thredds/wms/public/netcdf/test20.nc";
+// String fullPath = "http://thredds-d-d4s.d4science.org/thredds/wms/public/netcdf/test20.nc?service=wms&version=1.3.0&request=GetMap&layers=analyzed_field&bbox=-85.0,-180.0,85.0,180.0&styles=&width=640&height=480&srs=EPSG:4326&CRS=EPSG:4326&format=image/png&COLORSCALERANGE=auto";
+// WmsUrlValidator validator = new WmsUrlValidator(baseGeoserverUrl, fullPath , "", false);
+// logger.trace("base wms service url: "+validator.getBaseWmsServiceUrl());
+// logger.trace("layer name: "+validator.getLayerName());
+// logger.trace("full wms url: "+validator.getFullWmsUrlRequest(false, true));
+// logger.trace("style: "+validator.getStyles());
+// logger.trace("not standard parameter: "+validator.getWmsNotStandardParameters());
+// String[] arrayStyle = validator.getStyles().split(",");
+//
+// if(arrayStyle!=null && arrayStyle.length>0){
+//
+// for (String style : arrayStyle) {
+// if(style!=null && !style.isEmpty())
+//
+// System.out.println("Style: "+style.trim());
+// }
+// }
+//
+// String fullPath = "http://thredds-d-d4s.d4science.org/thredds/wms/public/netcdf/test20.nc?service=wms&version=1.3.0&request=GetMap&layers=analyzed_field&bbox=-85.0,-180.0,85.0,180.0&styles=&width=640&height=480&srs=EPSG:4326&CRS=EPSG:4326&format=image/png&COLORSCALERANGE=auto";
+//
+// WmsGeoExplorerUrlValidator validator = new WmsGeoExplorerUrlValidator("http://thredds-d-d4s.d4science.org/thredds/wms/public/netcdf/test20.nc", fullPath , "", false);
+// validator.getFullWmsUrlRequest(false,true);
+//
+// System.out.println(validator.getWmsNoStandardParameters());
+// System.out.println(validator.getMapWmsNoStandardParams());
+
+// fullPath = WmsUrlValidator.setValueOfParameter(WmsParameters.STYLES, fullPath, "123", true);
+//
+
+// MapPreviewGenerator map = new MapPreviewGenerator();
+// fullPath = map.buildWmsRequestMapPreview(fullPath, "-85.0,-180.0,85.0,180.0");
+// System.out.println(fullPath);
+
+ String wmsRequest = "http://geoserver-dev.d4science-ii.research-infrastructures.eu/geoserver/wms?CRS=EPSG:4326&BBOX=-85.5,-180.0,90.0,180.0&VERSION=1.1.0&FORMAT=application/openlayers&SERVICE=wms&HEIGHT=330&LAYERS=aquamaps:lsoleasolea20130716162322254cest&REQUEST=GetMap&STYLES=Species_prob&SRS=EPSG:4326&WIDTH=676";
+// String wmsRequest = "http://thredds-d-d4s.d4science.org/thredds/wms/public/netcdf/test20.nc?service=wms&version=1.3.0&request=GetMap&layers=analyzed_field&styles=&width=640&height=480&srs=EPSG:4326&CRS=EPSG:4326&format=image/png&COLORSCALERANGE=auto&bbox=-85.0,-180.0,85.0,180.0";
+ WmsUrlValidator wms;
+ try {
+ wms = new WmsUrlValidator(wmsRequest);
+ System.out.println("Returned wms: "+wms.toString());
+ }
+ catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+
+ }
+
+}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/gis/WebMapServerHost.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/gis/WebMapServerHost.java
new file mode 100644
index 0000000..cdf8108
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/gis/WebMapServerHost.java
@@ -0,0 +1,85 @@
+/**
+ *
+ */
+package org.gcube.portlets.user.geoportaldataviewer.server.gis;
+
+
+/**
+ * The Class GeoserverBaseUri.
+ *
+ * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
+ * Jan 28, 2016
+ */
+public class WebMapServerHost {
+
+ private String host = "";
+ private String scope = "";
+
+ /**
+ * Instantiates a new geoserver base uri.
+ */
+ public WebMapServerHost() {
+ }
+
+ /**
+ * Instantiates a new geoserver base uri.
+ *
+ * @param host the base url
+ * @param scope the scope
+ */
+ public WebMapServerHost(String host, String scope) {
+ this.host = host;
+ this.scope = scope;
+ }
+
+
+ /**
+ * @return the host
+ */
+ public String getHost() {
+
+ return host;
+ }
+
+
+ /**
+ * @return the scope
+ */
+ public String getScope() {
+
+ return scope;
+ }
+
+
+ /**
+ * @param host the host to set
+ */
+ public void setHost(String host) {
+
+ this.host = host;
+ }
+
+
+ /**
+ * @param scope the scope to set
+ */
+ public void setScope(String scope) {
+
+ this.scope = scope;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+
+ StringBuilder builder = new StringBuilder();
+ builder.append("WebMapServerHost [host=");
+ builder.append(host);
+ builder.append(", scope=");
+ builder.append(scope);
+ builder.append("]");
+ return builder.toString();
+ }
+}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/FieldVerifier.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/FieldVerifier.java
deleted file mode 100644
index a3d90bd..0000000
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/FieldVerifier.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.gcube.portlets.user.geoportaldataviewer.shared;
-
-/**
- *
- * FieldVerifier validates that the name the user enters is valid.
- *
- *
- * This class is in the shared
packing because we use it in both
- * the client code and on the server. On the client, we verify that the name is
- * valid before sending an RPC request so the user doesn't have to wait for a
- * network round trip to get feedback. On the server, we verify that the name is
- * correct to ensure that the input is correct regardless of where the RPC
- * originates.
- *
- *
- * When creating a class that is used on both the client and the server, be sure
- * that all code is translatable and does not use native JavaScript. Code that
- * is note translatable (such as code that interacts with a database or the file
- * system) cannot be compiled into client side JavaScript. Code that uses native
- * JavaScript (such as Widgets) cannot be run on the server.
- *
- */
-public class FieldVerifier {
-
- /**
- * Verifies that the specified name is valid for our service.
- *
- * In this example, we only require that the name is at least four
- * characters. In your application, you can use more complex checks to ensure
- * that usernames, passwords, email addresses, URLs, and other fields have the
- * proper syntax.
- *
- * @param name the name to validate
- * @return true if valid, false if invalid
- */
- public static boolean isValidName(String name) {
- if (name == null) {
- return false;
- }
- return name.length() > 3;
- }
-}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/BoundsMap.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/BoundsMap.java
new file mode 100644
index 0000000..7e0b5ff
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/BoundsMap.java
@@ -0,0 +1,156 @@
+package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
+
+import java.io.Serializable;
+
+/**
+ * The Class BoundsMap.
+ *
+ * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
+ *
+ * Oct 27, 2020
+ */
+public class BoundsMap implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 69005924452960006L;
+
+ /** The lower left X. */
+ private double lowerLeftX = 0.0;
+
+ /** The lower left Y. */
+ private double lowerLeftY = 0.0;
+
+ /** The upper right X. */
+ private double upperRightX = 0.0;
+
+ /** The upper right Y. */
+ private double upperRightY = 0.0;
+
+ /** The crs. */
+ private String crs = "";
+
+ /**
+ * Instantiates a new bounds map.
+ */
+ public BoundsMap() {
+ }
+
+ /**
+ * Instantiates a new bounds map.
+ *
+ * @param lowerLeftX the lower left X
+ * @param lowerLeftY the lower left Y
+ * @param upperRightX the upper right X
+ * @param upperRightY the upper right Y
+ * @param crs the crs
+ */
+ public BoundsMap(double lowerLeftX, double lowerLeftY, double upperRightX,
+ double upperRightY, String crs) {
+ super();
+ this.lowerLeftX = lowerLeftX;
+ this.lowerLeftY = lowerLeftY;
+ this.upperRightX = upperRightX;
+ this.upperRightY = upperRightY;
+ this.crs = crs;
+ }
+
+ /**
+ * Gets the lower left X.
+ *
+ * @return the lower left X
+ */
+ public double getLowerLeftX() {
+ return lowerLeftX;
+ }
+
+ /**
+ * Sets the lower left X.
+ *
+ * @param lowerLeftX the new lower left X
+ */
+ public void setLowerLeftX(double lowerLeftX) {
+ this.lowerLeftX = lowerLeftX;
+ }
+
+ /**
+ * Gets the lower left Y.
+ *
+ * @return the lower left Y
+ */
+ public double getLowerLeftY() {
+ return lowerLeftY;
+ }
+
+ /**
+ * Sets the lower left Y.
+ *
+ * @param lowerLeftY the new lower left Y
+ */
+ public void setLowerLeftY(double lowerLeftY) {
+ this.lowerLeftY = lowerLeftY;
+ }
+
+ /**
+ * Gets the upper right X.
+ *
+ * @return the upper right X
+ */
+ public double getUpperRightX() {
+ return upperRightX;
+ }
+
+ /**
+ * Sets the upper right X.
+ *
+ * @param upperRightX the new upper right X
+ */
+ public void setUpperRightX(double upperRightX) {
+ this.upperRightX = upperRightX;
+ }
+
+ /**
+ * Gets the upper right Y.
+ *
+ * @return the upper right Y
+ */
+ public double getUpperRightY() {
+ return upperRightY;
+ }
+
+ /**
+ * Sets the upper right Y.
+ *
+ * @param upperRightY the new upper right Y
+ */
+ public void setUpperRightY(double upperRightY) {
+ this.upperRightY = upperRightY;
+ }
+
+ /**
+ * Gets the crs.
+ *
+ * @return the crs
+ */
+ public String getCrs() {
+ return crs;
+ }
+
+ /**
+ * Sets the crs.
+ *
+ * @param crs the new crs
+ */
+ public void setCrs(String crs) {
+ this.crs = crs;
+ }
+
+ @Override
+ public String toString() {
+ return "BoundsMap [lowerLeftX=" + lowerLeftX + ", lowerLeftY=" + lowerLeftY + ", upperRightX=" + upperRightX
+ + ", upperRightY=" + upperRightY + ", crs=" + crs + "]";
+ }
+
+
+}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/GeoInformationForWMSRequest.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/GeoInformationForWMSRequest.java
new file mode 100644
index 0000000..c54f3f7
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/GeoInformationForWMSRequest.java
@@ -0,0 +1,296 @@
+package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
+
+import java.io.Serializable;
+import java.util.HashMap;
+
+/**
+ * The Class GeoInformationForWMSRequest.
+ *
+ * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
+ *
+ * Oct 27, 2020
+ */
+public class GeoInformationForWMSRequest implements Serializable {
+
+ /** The Constant serialVersionUID. */
+ private static final long serialVersionUID = -6846636281073641003L;
+
+ /** The base wms service host. */
+ private String baseWmsServiceHost;
+
+ /** The wms request. */
+ private String wmsRequest;
+
+ /** The layer name. */
+ private String layerName;
+
+ /** The version WMS. */
+ private String versionWMS;
+
+ /** The crs. */
+ private String crs;
+
+ /** The map WMS no standard params. */
+ private HashMap mapWMSNoStandardParams;
+
+ /** The styles. */
+ private Styles styles;
+
+ /** The is nc WMS. */
+ // TODO TO BE REMOVED
+ private boolean isNcWMS;
+
+ /** The z axis. */
+ private ZAxis zAxis;
+
+ /**
+ * Instantiates a new geo information for wms request.
+ */
+ public GeoInformationForWMSRequest() {
+
+ }
+
+ /**
+ * Instantiates a new geo information for wms request.
+ *
+ * @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 baseWmsServiceHost, String wmsRequest, String layerName,
+ String versionWms, String crs, HashMap mapWmsNoStandard, Styles styles, boolean isNcWMS,
+ ZAxis zAxis) {
+ this.baseWmsServiceHost = baseWmsServiceHost;
+ this.wmsRequest = wmsRequest;
+ this.layerName = layerName;
+ this.versionWMS = versionWms;
+ this.crs = crs;
+ this.mapWMSNoStandardParams = mapWmsNoStandard;
+ this.styles = styles;
+ this.zAxis = zAxis;
+ this.isNcWMS = isNcWMS;
+ }
+
+ /**
+ * Gets the z axis.
+ *
+ * @return the zAxis
+ */
+ public ZAxis getZAxis() {
+
+ return zAxis;
+ }
+
+ /**
+ * Sets the z axis.
+ *
+ * @param zAxis the zAxis to set
+ */
+ public void setZAxis(ZAxis zAxis) {
+
+ this.zAxis = zAxis;
+ }
+
+ /**
+ * Gets the base wms service host.
+ *
+ * @return the baseWmsServiceHost
+ */
+ public String getBaseWmsServiceHost() {
+
+ return baseWmsServiceHost;
+ }
+
+ /**
+ * Gets the wms request.
+ *
+ * @return the wmsRequest
+ */
+ public String getWmsRequest() {
+
+ return wmsRequest;
+ }
+
+ /**
+ * Gets the layer name.
+ *
+ * @return the layerName
+ */
+ public String getLayerName() {
+
+ return layerName;
+ }
+
+ /**
+ * Gets the version wms.
+ *
+ * @return the versionWMS
+ */
+ public String getVersionWMS() {
+
+ return versionWMS;
+ }
+
+ /**
+ * Gets the crs.
+ *
+ * @return the crs
+ */
+ public String getCrs() {
+
+ return crs;
+ }
+
+ /**
+ * Gets the map wms no standard.
+ *
+ * @return the mapWMSNoStandard
+ */
+ public HashMap getMapWMSNoStandard() {
+
+ return mapWMSNoStandardParams;
+ }
+
+ /**
+ * Gets the styles.
+ *
+ * @return the styles
+ */
+ public Styles getStyles() {
+
+ return styles;
+ }
+
+ /**
+ * Checks if is nc wms.
+ *
+ * @return the isNcWMS
+ */
+ public boolean isNcWMS() {
+
+ return isNcWMS;
+ }
+
+ /**
+ * Sets the base wms service host.
+ *
+ * @param baseWmsServiceHost the baseWmsServiceHost to set
+ */
+ public void setBaseWmsServiceHost(String baseWmsServiceHost) {
+
+ this.baseWmsServiceHost = baseWmsServiceHost;
+ }
+
+ /**
+ * Sets the wms request.
+ *
+ * @param wmsRequest the wmsRequest to set
+ */
+ public void setWmsRequest(String wmsRequest) {
+
+ this.wmsRequest = wmsRequest;
+ }
+
+ /**
+ * Sets the layer name.
+ *
+ * @param layerName the layerName to set
+ */
+ public void setLayerName(String layerName) {
+
+ this.layerName = layerName;
+ }
+
+ /**
+ * Sets the version wms.
+ *
+ * @param versionWMS the versionWMS to set
+ */
+ public void setVersionWMS(String versionWMS) {
+
+ this.versionWMS = versionWMS;
+ }
+
+ /**
+ * Sets the crs.
+ *
+ * @param crs the crs to set
+ */
+ public void setCrs(String crs) {
+
+ this.crs = crs;
+ }
+
+ /**
+ * Sets the map wms no standard.
+ *
+ * @param mapWMSNoStandard the mapWMSNoStandard to set
+ */
+ public void setMapWMSNoStandard(HashMap mapWMSNoStandard) {
+
+ this.mapWMSNoStandardParams = mapWMSNoStandard;
+ }
+
+ /**
+ * Sets the styles.
+ *
+ * @param styles the styles to set
+ */
+ public void setStyles(Styles styles) {
+
+ this.styles = styles;
+ }
+
+ /**
+ * Sets the nc wms.
+ *
+ * @param isNcWMS the isNcWMS to set
+ */
+ public void setNcWMS(boolean isNcWMS) {
+
+ this.isNcWMS = isNcWMS;
+ }
+
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+
+ StringBuilder builder = new StringBuilder();
+ builder.append("GeoInformationForWMSRequest [baseWmsServiceHost=");
+ builder.append(baseWmsServiceHost);
+ builder.append(", wmsRequest=");
+ builder.append(wmsRequest);
+ builder.append(", layerName=");
+ builder.append(layerName);
+ builder.append(", versionWMS=");
+ builder.append(versionWMS);
+ builder.append(", crs=");
+ builder.append(crs);
+ builder.append(", mapWMSNoStandardParams=");
+ builder.append(mapWMSNoStandardParams);
+ builder.append(", styles=");
+ builder.append(styles);
+ builder.append(", isNcWMS=");
+ builder.append(isNcWMS);
+ builder.append(", zAxis=");
+ builder.append(zAxis);
+ builder.append("]");
+ return builder.toString();
+ }
+
+}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/LayerItem.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/LayerItem.java
new file mode 100644
index 0000000..5753694
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/LayerItem.java
@@ -0,0 +1,918 @@
+package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class LayerItem.
+ *
+ * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
+ *
+ * Oct 27, 2020
+ */
+public class LayerItem implements Serializable, Cloneable {
+
+ /** The Constant serialVersionUID. */
+ private static final long serialVersionUID = 1664082688635256899L;
+
+ /** The name. */
+ private String name;
+
+ /** The title. */
+ private String title = null;
+
+ /** The url. */
+ private String url;
+
+ /** The base map server URL. */
+ private String mapServerHost;
+
+ /** The style. */
+ private String style;
+
+ /** The is trasparent. */
+ private boolean isTrasparent;
+
+ /** The is base layer. */
+ private boolean isBaseLayer;
+
+ /** The is feature type. */
+ private boolean isFeatureType;
+
+ /** The buffer. */
+ private int buffer = 0;
+
+ /** The has legend. */
+ private boolean hasLegend;
+
+ /** The is visible. */
+ private boolean isVisible;
+
+ /** The is on map. */
+ private boolean isOnMap;
+
+ /** The click data. */
+ private boolean clickData;
+
+ /** The max extent. */
+ private BoundsMap maxExtent;
+
+ /** The default style. */
+ private String defaultStyle = "";
+
+ /** The opacity. */
+ private double opacity = -1;
+
+ /** The styles. */
+ private ArrayList styles = new ArrayList();
+
+ /** The properties. */
+ private List properties = new ArrayList();
+
+ /** The data store. */
+ private String dataStore;
+
+ /** The cql filter. */
+ private String cqlFilter;
+
+ /** The id. */
+ private long id;
+
+ /** The order. */
+ private long order;
+
+ /** The wms not standard params. */
+ private Map wmsNotStandardParams = null;
+
+ /** The is nc wms. */
+ private boolean isNcWms = false;
+
+ /** The server wms request. */
+ public String serverWmsRequest;
+
+ /** The cql filter available. */
+ private boolean cqlFilterAvailable = false;
+
+ /** The uuid. */
+ private String UUID;
+
+ /** The z axis. */
+ private ZAxis zAxis = null;
+
+ /** The z axis selected. */
+ private Double zAxisSelected = null;
+
+ /** The Constant FLOAT_TYPE. */
+ public static final String FLOAT_TYPE = "xsd:float";
+
+ /** The Constant INT_TYPE. */
+ public static final String INT_TYPE = "xsd:int";
+
+ /**
+ * Instantiates a new layer item.
+ */
+ public LayerItem() {
+ }
+
+ /**
+ * Checks if is checks for legend.
+ *
+ * @return true, if is checks for legend
+ */
+ public boolean isHasLegend() {
+ return hasLegend;
+ }
+
+ /**
+ * Sets the checks for legend.
+ *
+ * @param hasLegend the new checks for legend
+ */
+ public void setHasLegend(boolean hasLegend) {
+ this.hasLegend = hasLegend;
+ }
+
+ /**
+ * Gets the max extent.
+ *
+ * @return the max extent
+ */
+ public BoundsMap getMaxExtent() {
+ return maxExtent;
+ }
+
+ /**
+ * Sets the max extent.
+ *
+ * @param maxExtent the new max extent
+ */
+ public void setMaxExtent(BoundsMap maxExtent) {
+ this.maxExtent = maxExtent;
+ }
+
+ /**
+ * Sets the max extent.
+ *
+ * @param lowerLeftX the lower left x
+ * @param lowerLeftY the lower left y
+ * @param upperRightX the upper right x
+ * @param upperRightY the upper right y
+ * @param crs the crs
+ */
+ public void setMaxExtent(double lowerLeftX, double lowerLeftY, double upperRightX, double upperRightY, String crs) {
+ this.maxExtent = new BoundsMap(lowerLeftX, lowerLeftY, upperRightX, upperRightY, crs);
+ }
+
+ /**
+ * Checks if is feature type.
+ *
+ * @return true, if is feature type
+ */
+ public boolean isFeatureType() {
+ return isFeatureType;
+ }
+
+ /**
+ * Sets the feature type.
+ *
+ * @param isFeatureType the new feature type
+ */
+ public void setFeatureType(boolean isFeatureType) {
+ this.isFeatureType = isFeatureType;
+ }
+
+ /**
+ * Gets the name.
+ *
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the name.
+ *
+ * @param name the new name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Gets the url.
+ *
+ * @return the url
+ */
+ public String getUrl() {
+ return url;
+ }
+
+ /**
+ * Sets the url.
+ *
+ * @param url the new url
+ */
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ /**
+ * Gets the style.
+ *
+ * @return the style
+ */
+ public String getStyle() {
+ return style;
+ }
+
+ /**
+ * Sets the style.
+ *
+ * @param style the new style
+ */
+ public void setStyle(String style) {
+ this.style = style;
+ }
+
+ /**
+ * Checks if is trasparent.
+ *
+ * @return true, if is trasparent
+ */
+ public boolean isTrasparent() {
+ return isTrasparent;
+ }
+
+ /**
+ * Sets the trasparent.
+ *
+ * @param isTrasparent the new trasparent
+ */
+ public void setTrasparent(boolean isTrasparent) {
+ this.isTrasparent = isTrasparent;
+ }
+
+ /**
+ * Checks if is base layer.
+ *
+ * @return true, if is base layer
+ */
+ public boolean isBaseLayer() {
+ return isBaseLayer;
+ }
+
+ /**
+ * Sets the base layer.
+ *
+ * @param isBaseLayer the new base layer
+ */
+ public void setBaseLayer(boolean isBaseLayer) {
+ this.isBaseLayer = isBaseLayer;
+ }
+
+ /**
+ * Gets the buffer.
+ *
+ * @return the buffer
+ */
+ public int getBuffer() {
+ return buffer;
+ }
+
+ /**
+ * Sets the buffer.
+ *
+ * @param buffer the new buffer
+ */
+ public void setBuffer(int buffer) {
+ this.buffer = buffer;
+ }
+
+ /**
+ * Checks if is visible.
+ *
+ * @return true, if is visible
+ */
+ public boolean isVisible() {
+ return isVisible;
+ }
+
+ /**
+ * Sets the visible.
+ *
+ * @param isVisible the new visible
+ */
+ public void setVisible(boolean isVisible) {
+ this.isVisible = isVisible;
+ }
+
+ /**
+ * Checks if is on map.
+ *
+ * @return true, if is on map
+ */
+ public boolean isOnMap() {
+ return isOnMap;
+ }
+
+ /**
+ * Sets the on map.
+ *
+ * @param isOnMap the new on map
+ */
+ public void setOnMap(boolean isOnMap) {
+ this.isOnMap = isOnMap;
+ }
+
+ /**
+ * Checks if is click data.
+ *
+ * @return true, if is click data
+ */
+ public boolean isClickData() {
+ return clickData;
+ }
+
+ /**
+ * Sets the click data.
+ *
+ * @param clickData the new click data
+ */
+ public void setClickData(boolean clickData) {
+ this.clickData = clickData;
+ }
+
+ /**
+ * Gets the default style.
+ *
+ * @return the default style
+ */
+ public String getDefaultStyle() {
+ return defaultStyle;
+ }
+
+ /**
+ * Sets the default style.
+ *
+ * @param defaultStyle the new default style
+ */
+ public void setDefaultStyle(String defaultStyle) {
+ this.defaultStyle = defaultStyle;
+ }
+
+ /**
+ * Gets the styles.
+ *
+ * @return the styles
+ */
+ public ArrayList getStyles() {
+ return styles;
+ }
+
+ /**
+ * Sets the styles.
+ *
+ * @param styles the new styles
+ */
+ public void setStyles(ArrayList styles) {
+ this.styles = styles;
+ }
+
+ /**
+ * Gets the opacity.
+ *
+ * @return the opacity
+ */
+ public double getOpacity() {
+ return opacity;
+ }
+
+ /**
+ * Sets the opacity.
+ *
+ * @param opacity the new opacity
+ */
+ public void setOpacity(double opacity) {
+ this.opacity = opacity;
+ }
+
+// @Override
+ /**
+ * Clone.
+ *
+ * @return the layer item
+ */
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#clone()
+ */
+ public LayerItem clone() {
+ LayerItem ele = new LayerItem();
+ ele.setBaseLayer(this.isBaseLayer);
+ ele.setClickData(this.clickData);
+ ele.setBuffer(this.buffer);
+ ele.setDefaultStyle(this.defaultStyle);
+ ele.setHasLegend(this.hasLegend);
+ ele.setMaxExtent(maxExtent);
+ ele.setName(this.name);
+ ele.setOnMap(this.isOnMap);
+ ele.setOpacity(this.opacity);
+ ele.setStyle(this.style);
+ ele.setStyles(this.styles);
+ ele.setTrasparent(this.isTrasparent);
+ ele.setUrl(this.url);
+ ele.setVisible(this.isVisible);
+ ele.setProperties(this.getProperties());
+ ele.setWmsNotStandardParams(this.wmsNotStandardParams);
+// ele.setUUID(this.UUID);
+ return ele;
+ }
+
+ /**
+ * Checks if is nc wms.
+ *
+ * @return the isNcWms
+ */
+ public boolean isNcWms() {
+ return isNcWms;
+ }
+
+ /**
+ * Sets the nc wms.
+ *
+ * @param isNcWms the isNcWms to set
+ */
+ public void setNcWms(boolean isNcWms) {
+ this.isNcWms = isNcWms;
+ }
+
+ /**
+ * Gets the properties.
+ *
+ * @return the properties
+ */
+ public List getProperties() {
+ return properties;
+ }
+
+ /**
+ * Sets the properties.
+ *
+ * @param properties the new properties
+ */
+ public void setProperties(List properties) {
+ this.properties = properties;
+ }
+
+ // search a float property in the layer's feature type
+ /**
+ * Contains property.
+ *
+ * @param propertyName the property name
+ * @return true, if successful
+ */
+ public boolean containsProperty(String propertyName) {
+ boolean contains = false;
+ for (Property p : properties) {
+ if (p.getName().equals(propertyName) && (p.getType().equals(FLOAT_TYPE) || p.getType().equals(INT_TYPE))) {
+ contains = true;
+ }
+ }
+ return contains;
+ }
+
+ // search a property in the layer's feature type, giving property name and
+ // property type
+ /**
+ * Contains property.
+ *
+ * @param propertyName the property name
+ * @param propertyType the property type
+ * @return true, if successful
+ */
+ public boolean containsProperty(String propertyName, String propertyType) {
+ if (properties == null) {
+ return false;
+ }
+
+ boolean contains = false;
+ for (Property p : properties) {
+ if (p.getName().equals(propertyName) && p.getType().equals(propertyType)) {
+ contains = true;
+ }
+ }
+ return contains;
+ }
+
+ // search a property in the layer's feature type, giving a property object
+ /**
+ * Contains property.
+ *
+ * @param property the property
+ * @return true, if successful
+ */
+ public boolean containsProperty(Property property) {
+ if (properties == null) {
+ return false;
+ }
+
+ boolean contains = false;
+ for (Property p : properties) {
+ if (p.getName().equals(property.getName()) && p.getType().equals(property.getType())) {
+ contains = true;
+ }
+ }
+ return contains;
+ }
+
+ // search for float Property objects belongs to the layer
+ /**
+ * Gets the all float properties.
+ *
+ * @return the all float properties
+ */
+ public List getAllFloatProperties() {
+ if (properties == null) {
+ return null;
+ }
+
+ List floatProperties = new ArrayList();
+ for (Property p : properties) {
+ if (p.getType().equals(FLOAT_TYPE)) {
+ floatProperties.add(p);
+ }
+ }
+ return floatProperties;
+ }
+
+ // search for float Property names belongs to the layer
+ /**
+ * Gets the all float property names.
+ *
+ * @return the all float property names
+ */
+ public List getAllFloatPropertyNames() {
+ if (properties == null) {
+ return null;
+ }
+
+ List floatPropertyNames = new ArrayList();
+ for (Property p : properties) {
+ if (p.getType().equals(FLOAT_TYPE)) {
+ floatPropertyNames.add(p.getName());
+ }
+ }
+
+ return floatPropertyNames;
+ }
+
+ // get the first float Property names belongs to the layer
+ /**
+ * Gets the first float property name.
+ *
+ * @return the first float property name
+ */
+ public String getFirstFloatPropertyName() {
+ if (properties == null) {
+ return null;
+ }
+
+ for (Property p : properties) {
+ if (p.getType().equals(FLOAT_TYPE)) {
+ return p.getName();
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Sets the z axis selected.
+ *
+ * @param value the new z axis selected
+ */
+ public void setZAxisSelected(Double value) {
+ this.zAxisSelected = value;
+ }
+
+ /**
+ * Gets the z axis selected.
+ *
+ * @return the zAxisSelected
+ */
+ public Double getZAxisSelected() {
+
+ return zAxisSelected;
+ }
+
+ /**
+ * Sets the list z axis.
+ *
+ * @param zAxis the new list z axis
+ */
+ public void setZAxis(ZAxis zAxis) {
+ this.zAxis = zAxis;
+ }
+
+ /**
+ * Gets the list z axis.
+ *
+ * @return the zAxis
+ */
+ public ZAxis getZAxis() {
+
+ return zAxis;
+ }
+
+ /**
+ * Sets the data store.
+ *
+ * @param dataStore the new data store
+ */
+ public void setDataStore(String dataStore) {
+ this.dataStore = dataStore;
+ }
+
+ /**
+ * Gets the data store.
+ *
+ * @return the data store
+ */
+ public String getDataStore() {
+ return dataStore;
+ }
+
+ /**
+ * Sets the title.
+ *
+ * @param title the new title
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * Gets the title.
+ *
+ * @return the title
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * Gets the id.
+ *
+ * @return the id
+ */
+ public long getId() {
+ return id;
+ }
+
+ /**
+ * Sets the id.
+ *
+ * @param id the new id
+ */
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ /**
+ * Sets the order.
+ *
+ * @param order the new order
+ */
+ public void setOrder(long order) {
+ this.order = order;
+ }
+
+ /**
+ * Gets the order.
+ *
+ * @return the order
+ */
+ public long getOrder() {
+ return order;
+ }
+
+ /**
+ * Gets the cql filter.
+ *
+ * @return the cql filter
+ */
+ public String getCqlFilter() {
+ return cqlFilter;
+ }
+
+ /**
+ * Sets the cql filter.
+ *
+ * @param cqlFilter the new cql filter
+ */
+ public void setCqlFilter(String cqlFilter) {
+ this.cqlFilter = cqlFilter;
+ }
+
+ /**
+ * Sets the uuid.
+ *
+ * @param uUID the new uuid
+ */
+ public void setUUID(String uUID) {
+ this.UUID = uUID;
+ }
+
+ /**
+ * Gets the uuid.
+ *
+ * @return the uUID
+ */
+ public String getUUID() {
+ return UUID;
+ }
+
+ /**
+ * Checks if is cql filter available.
+ *
+ * @return true, if is cql filter available
+ */
+ public boolean isCqlFilterAvailable() {
+ return cqlFilterAvailable;
+ }
+
+ /**
+ * Sets the cql filter available.
+ *
+ * @param cqlFilterAvailable the new cql filter available
+ */
+ public void setCqlFilterAvailable(boolean cqlFilterAvailable) {
+ this.cqlFilterAvailable = cqlFilterAvailable;
+ }
+
+ /**
+ * Gets the server wms request.
+ *
+ * @return the server wms request
+ */
+ public String getServerWmsRequest() {
+ return serverWmsRequest;
+ }
+
+ /**
+ * Sets the server wms request.
+ *
+ * @param serverWmsRequest the new server wms request
+ */
+ public void setServerWmsRequest(String serverWmsRequest) {
+ this.serverWmsRequest = serverWmsRequest;
+ }
+
+ /**
+ * Gets the map server host.
+ *
+ * @return the map server host
+ */
+ public String getMapServerHost() {
+ return mapServerHost;
+ }
+
+ /**
+ * Sets the map server host.
+ *
+ * @param mapServerHost the new map server host
+ */
+ public void setMapServerHost(String mapServerHost) {
+ this.mapServerHost = mapServerHost;
+ }
+
+ /**
+ * Gets the wms not standard params.
+ *
+ * @return the wmsNotStandardParams
+ */
+ public Map getWmsNotStandardParams() {
+ return wmsNotStandardParams;
+ }
+
+ /**
+ * Sets the wms not standard params.
+ *
+ * @param wmsNotStandardParams the wmsNotStandardParams to set
+ */
+ public void setWmsNotStandardParams(Map wmsNotStandardParams) {
+ this.wmsNotStandardParams = wmsNotStandardParams;
+ }
+
+ /**
+ * Gets the z axis.
+ *
+ * @return the z axis
+ */
+ public ZAxis getzAxis() {
+ return zAxis;
+ }
+
+ /**
+ * Sets the z axis.
+ *
+ * @param zAxis the new z axis
+ */
+ public void setzAxis(ZAxis zAxis) {
+ this.zAxis = zAxis;
+ }
+
+ /**
+ * Gets the z axis selected.
+ *
+ * @return the z axis selected
+ */
+ public Double getzAxisSelected() {
+ return zAxisSelected;
+ }
+
+ /**
+ * Sets the z axis selected.
+ *
+ * @param zAxisSelected the new z axis selected
+ */
+ public void setzAxisSelected(Double zAxisSelected) {
+ this.zAxisSelected = zAxisSelected;
+ }
+
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("LayerItem [name=");
+ builder.append(name);
+ builder.append(", title=");
+ builder.append(title);
+ builder.append(", url=");
+ builder.append(url);
+ builder.append(", mapServerHost=");
+ builder.append(mapServerHost);
+ builder.append(", style=");
+ builder.append(style);
+ builder.append(", isTrasparent=");
+ builder.append(isTrasparent);
+ builder.append(", isBaseLayer=");
+ builder.append(isBaseLayer);
+ builder.append(", isFeatureType=");
+ builder.append(isFeatureType);
+ builder.append(", buffer=");
+ builder.append(buffer);
+ builder.append(", hasLegend=");
+ builder.append(hasLegend);
+ builder.append(", isVisible=");
+ builder.append(isVisible);
+ builder.append(", isOnMap=");
+ builder.append(isOnMap);
+ builder.append(", clickData=");
+ builder.append(clickData);
+ builder.append(", maxExtent=");
+ builder.append(maxExtent);
+ builder.append(", defaultStyle=");
+ builder.append(defaultStyle);
+ builder.append(", opacity=");
+ builder.append(opacity);
+ builder.append(", styles=");
+ builder.append(styles);
+ builder.append(", properties=");
+ builder.append(properties);
+ builder.append(", dataStore=");
+ builder.append(dataStore);
+ builder.append(", cqlFilter=");
+ builder.append(cqlFilter);
+ builder.append(", id=");
+ builder.append(id);
+ builder.append(", order=");
+ builder.append(order);
+ builder.append(", wmsNotStandardParams=");
+ builder.append(wmsNotStandardParams);
+ builder.append(", isNcWms=");
+ builder.append(isNcWms);
+ builder.append(", serverWmsRequest=");
+ builder.append(serverWmsRequest);
+ builder.append(", cqlFilterAvailable=");
+ builder.append(cqlFilterAvailable);
+ builder.append(", UUID=");
+ builder.append(UUID);
+ builder.append(", zAxis=");
+ builder.append(zAxis);
+ builder.append(", zAxisSelected=");
+ builder.append(zAxisSelected);
+ builder.append("]");
+ return builder.toString();
+ }
+
+}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/Property.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/Property.java
new file mode 100644
index 0000000..d45aeac
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/Property.java
@@ -0,0 +1,188 @@
+package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
+
+import java.io.Serializable;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Property.
+ *
+ * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
+ *
+ * Oct 27, 2020
+ */
+public class Property implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8289583721513187916L;
+
+ /** The name. */
+ private String name;
+
+ /** The type. */
+ private String type;
+
+ /** The nillable. */
+ private boolean nillable=true;
+
+ /** The max occours. */
+ private int maxOccours=1;
+
+ /** The min occours. */
+ private int minOccours=0;
+
+ /**
+ * Instantiates a new property.
+ */
+ public Property() {
+ super();
+ }
+
+ /**
+ * Instantiates a new property.
+ *
+ * @param name the name
+ * @param type the type
+ * @param nillable the nillable
+ * @param maxOccours the max occours
+ * @param minOccours the min occours
+ */
+ public Property(String name, String type, boolean nillable,
+ int maxOccours, int minOccours) {
+ super();
+
+ this.name = name;
+ this.type = type;
+ this.nillable = nillable;
+ this.maxOccours = maxOccours;
+ this.minOccours = minOccours;
+ }
+
+ /**
+ * Instantiates a new property.
+ *
+ * @param name the name
+ * @param type the type
+ */
+ public Property(String name, String type) {
+ super();
+ this.name = name;
+ this.type = type;
+ }
+
+ /**
+ * Gets the name.
+ *
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the name.
+ *
+ * @param name the new name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Gets the type.
+ *
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Sets the type.
+ *
+ * @param type the new type
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * Checks if is nillable.
+ *
+ * @return true, if is nillable
+ */
+ public boolean isNillable() {
+ return nillable;
+ }
+
+ /**
+ * Sets the nillable.
+ *
+ * @param nillable the new nillable
+ */
+ public void setNillable(boolean nillable) {
+ this.nillable = nillable;
+ }
+
+ /**
+ * Gets the max occours.
+ *
+ * @return the max occours
+ */
+ public int getMaxOccours() {
+ return maxOccours;
+ }
+
+ /**
+ * Sets the max occours.
+ *
+ * @param maxOccours the new max occours
+ */
+ public void setMaxOccours(int maxOccours) {
+ this.maxOccours = maxOccours;
+ }
+
+ /**
+ * Gets the min occours.
+ *
+ * @return the min occours
+ */
+ public int getMinOccours() {
+ return minOccours;
+ }
+
+ /**
+ * Sets the min occours.
+ *
+ * @param minOccours the new min occours
+ */
+ public void setMinOccours(int minOccours) {
+ this.minOccours = minOccours;
+ }
+
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("Property [name=");
+ builder.append(name);
+ builder.append(", type=");
+ builder.append(type);
+ builder.append(", nillable=");
+ builder.append(nillable);
+ builder.append(", maxOccours=");
+ builder.append(maxOccours);
+ builder.append(", minOccours=");
+ builder.append(minOccours);
+ builder.append("]");
+ return builder.toString();
+ }
+
+
+}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/Styles.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/Styles.java
new file mode 100644
index 0000000..ab79254
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/Styles.java
@@ -0,0 +1,126 @@
+/**
+ *
+ */
+package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
+
+import java.util.List;
+import java.util.Map;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+
+/**
+ * The Class LayerStyles.
+ *
+ * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
+ * Feb 10, 2016
+ */
+public class Styles implements IsSerializable{
+
+ private List geoStyles;
+ private Map mapNcWmsStyles;
+ boolean isNcWms = false;
+
+ /**
+ * Instantiates a new layer styles.
+ */
+ public Styles() {
+ }
+
+ /**
+ * Instantiates a new layer styles.
+ *
+ * @param geoStyles the geo styles
+ * @param mapNcWmsStyles the map nc wms styles
+ * @param isNcWms the is nc wms
+ */
+ public Styles(List geoStyles, Map mapNcWmsStyles,boolean isNcWms) {
+
+ this.geoStyles = geoStyles;
+ this.mapNcWmsStyles = mapNcWmsStyles;
+ this.isNcWms = isNcWms;
+ }
+
+
+ /**
+ * Gets the geo styles.
+ *
+ * @return the geoStyles
+ */
+ public List getGeoStyles() {
+
+ return geoStyles;
+ }
+
+
+ /**
+ * Gets the map nc wms styles.
+ *
+ * @return the mapNcWmsStyles
+ */
+ public Map getMapNcWmsStyles() {
+
+ return mapNcWmsStyles;
+ }
+
+
+ /**
+ * Checks if is nc wms.
+ *
+ * @return the isNcWms
+ */
+ public boolean isNcWms() {
+
+ return isNcWms;
+ }
+
+
+ /**
+ * Sets the geo styles.
+ *
+ * @param geoStyles the geoStyles to set
+ */
+ public void setGeoStyles(List geoStyles) {
+
+ this.geoStyles = geoStyles;
+ }
+
+
+ /**
+ * Sets the map nc wms styles.
+ *
+ * @param mapNcWmsStyles the mapNcWmsStyles to set
+ */
+ public void setMapNcWmsStyles(Map mapNcWmsStyles) {
+
+ this.mapNcWmsStyles = mapNcWmsStyles;
+ }
+
+
+ /**
+ * Sets the nc wms.
+ *
+ * @param isNcWms the isNcWms to set
+ */
+ public void setNcWms(boolean isNcWms) {
+
+ this.isNcWms = isNcWms;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+
+ StringBuilder builder = new StringBuilder();
+ builder.append("Styles [geoStyles=");
+ builder.append(geoStyles);
+ builder.append(", mapNcWmsStyles=");
+ builder.append(mapNcWmsStyles);
+ builder.append(", isNcWms=");
+ builder.append(isNcWms);
+ builder.append("]");
+ return builder.toString();
+ }
+}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/ZAxis.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/ZAxis.java
new file mode 100644
index 0000000..f5eff19
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/shared/gis/ZAxis.java
@@ -0,0 +1,140 @@
+/**
+ *
+ */
+package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ZAxis.
+ *
+ * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
+ *
+ * Oct 27, 2020
+ */
+public class ZAxis implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1669690469240944967L;
+
+ /** The units. */
+ private String units;
+
+ /** The positive. */
+ private boolean positive;
+
+ /** The values. */
+ private List values;
+
+ /**
+ * Instantiates a new layer z axis.
+ */
+ public ZAxis() {
+ }
+
+ /**
+ * Instantiates a new layer z axis.
+ *
+ * @param units the units
+ * @param positive the positive
+ * @param values the values
+ */
+ public ZAxis(String units, boolean positive, List values) {
+ this.units = units;
+ this.positive = positive;
+ this.values = values;
+ }
+
+
+ /**
+ * Gets the units.
+ *
+ * @return the units
+ */
+ public String getUnits() {
+
+ return units;
+ }
+
+
+ /**
+ * Checks if is positive.
+ *
+ * @return the positive
+ */
+ public boolean isPositive() {
+
+ return positive;
+ }
+
+
+ /**
+ * Gets the values.
+ *
+ * @return the values
+ */
+ public List getValues() {
+
+ return values;
+ }
+
+
+ /**
+ * Sets the units.
+ *
+ * @param units the units to set
+ */
+ public void setUnits(String units) {
+
+ this.units = units;
+ }
+
+
+ /**
+ * Sets the positive.
+ *
+ * @param positive the positive to set
+ */
+ public void setPositive(boolean positive) {
+
+ this.positive = positive;
+ }
+
+
+ /**
+ * Sets the values.
+ *
+ * @param values the values to set
+ */
+ public void setValues(List values) {
+
+ this.values = values;
+ }
+
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+
+ StringBuilder builder = new StringBuilder();
+ builder.append("ZAxis [units=");
+ builder.append(units);
+ builder.append(", positive=");
+ builder.append(positive);
+ builder.append(", values=");
+ builder.append(values);
+ builder.append("]");
+ return builder.toString();
+ }
+}
diff --git a/src/test/java/org/gcube/portlets/user/geoportaldataviewer/client/GwtTestGeoportalDataViewer.java b/src/test/java/org/gcube/portlets/user/geoportaldataviewer/client/GwtTestGeoportalDataViewer.java
index fd9ec48..570334e 100644
--- a/src/test/java/org/gcube/portlets/user/geoportaldataviewer/client/GwtTestGeoportalDataViewer.java
+++ b/src/test/java/org/gcube/portlets/user/geoportaldataviewer/client/GwtTestGeoportalDataViewer.java
@@ -1,10 +1,6 @@
package org.gcube.portlets.user.geoportaldataviewer.client;
-import org.gcube.portlets.user.geoportaldataviewer.shared.FieldVerifier;
-import com.google.gwt.core.client.GWT;
import com.google.gwt.junit.client.GWTTestCase;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
/**
* GWT JUnit integration tests must extend GWTTestCase.
@@ -29,12 +25,6 @@ public class GwtTestGeoportalDataViewer extends GWTTestCase {
* Tests the FieldVerifier.
*/
public void testFieldVerifier() {
- assertFalse(FieldVerifier.isValidName(null));
- assertFalse(FieldVerifier.isValidName(""));
- assertFalse(FieldVerifier.isValidName("a"));
- assertFalse(FieldVerifier.isValidName("ab"));
- assertFalse(FieldVerifier.isValidName("abc"));
- assertTrue(FieldVerifier.isValidName("abcd"));
}
/**
@@ -42,33 +32,7 @@ public class GwtTestGeoportalDataViewer extends GWTTestCase {
* GreetingService and verify the response.
*/
public void testGreetingService() {
- // Create the service that we will test.
- GeoportalDataViewerServiceAsync greetingService = GWT.create(GeoportalDataViewerService.class);
- ServiceDefTarget target = (ServiceDefTarget) greetingService;
- target.setServiceEntryPoint(GWT.getModuleBaseURL() + "GeoportalDataViewer/greet");
-
- // Since RPC calls are asynchronous, we will need to wait for a response
- // after this test method returns. This line tells the test runner to wait
- // up to 10 seconds before timing out.
- delayTestFinish(10000);
-
- // Send a request to the server.
- greetingService.greetServer("GWT User", new AsyncCallback() {
- public void onFailure(Throwable caught) {
- // The request resulted in an unexpected error.
- fail("Request failure: " + caught.getMessage());
- }
-
- public void onSuccess(String result) {
- // Verify that the response is correct.
- assertTrue(result.startsWith("Hello, GWT User!"));
-
- // Now that we have received a response, we need to tell the test runner
- // that the test is complete. You must call finishTest() after an
- // asynchronous test finishes successfully, or the test will time out.
- finishTest();
- }
- });
+
}