refactoring
This commit is contained in:
parent
5298fb95f7
commit
5b7ae7de86
|
@ -9,6 +9,7 @@ import org.gcube.application.geoportalcommon.shared.GNADataViewerConfigProfile;
|
||||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.DocumentDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.DocumentDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
|
||||||
|
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.IndexLayer;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
|
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
|
||||||
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
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;
|
||||||
|
@ -48,7 +49,6 @@ import org.gcube.portlets.user.geoportaldataviewer.shared.GCubeCollection;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.ViewerConfiguration;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.ViewerConfiguration;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.BaseMapLayer;
|
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;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.IndexLayer;
|
|
||||||
|
|
||||||
import com.google.gwt.core.client.EntryPoint;
|
import com.google.gwt.core.client.EntryPoint;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
|
|
|
@ -9,6 +9,7 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.IndexLayer;
|
||||||
import org.gcube.application.geoportalcommon.shared.gis.BoundsMap;
|
import org.gcube.application.geoportalcommon.shared.gis.BoundsMap;
|
||||||
import org.gcube.application.geoportalcommon.shared.products.content.WorkspaceContentDV;
|
import org.gcube.application.geoportalcommon.shared.products.content.WorkspaceContentDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV;
|
import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV;
|
||||||
|
@ -29,7 +30,6 @@ import org.gcube.portlets.user.geoportaldataviewer.client.util.StringUtil;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.URLUtil;
|
import org.gcube.portlets.user.geoportaldataviewer.client.util.URLUtil;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoNaSpatialQueryResult;
|
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.GeoQuery;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.IndexLayer;
|
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerItem;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerItem;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerObject;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerObject;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerObjectType;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerObjectType;
|
||||||
|
|
|
@ -42,6 +42,7 @@ import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.config.FilePathDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.config.FilePathDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.config.GcubeProfileDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.config.GcubeProfileDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
|
||||||
|
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.IndexLayer;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.GEOPORTAL_CONFIGURATION_TYPE;
|
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.GEOPORTAL_CONFIGURATION_TYPE;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.GEOPORTAL_DATA_HANDLER;
|
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.GEOPORTAL_DATA_HANDLER;
|
||||||
|
@ -58,19 +59,16 @@ import org.gcube.application.geoportalcommon.shared.products.model.LayerConcessi
|
||||||
import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV;
|
import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV;
|
||||||
import org.gcube.application.geoportalcommon.util.URLParserUtil;
|
import org.gcube.application.geoportalcommon.util.URLParserUtil;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerService;
|
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerService;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.server.faults.InvalidObjectException;
|
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.server.gis.FeatureParser;
|
import org.gcube.portlets.user.geoportaldataviewer.server.gis.FeatureParser;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.server.gis.WMSUrlValidator;
|
import org.gcube.portlets.user.geoportaldataviewer.server.gis.WMSUrlValidator;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.server.mongoservice.GeoportalServiceIdentityProxy;
|
import org.gcube.portlets.user.geoportaldataviewer.server.mongoservice.GeoportalServiceIdentityProxy;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.server.util.ContextRequest;
|
import org.gcube.portlets.user.geoportaldataviewer.server.util.ContextRequest;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.server.util.DVConversion;
|
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.server.util.SessionUtil;
|
import org.gcube.portlets.user.geoportaldataviewer.server.util.SessionUtil;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GCubeCollection;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.GCubeCollection;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoNaSpatialQueryResult;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoNaSpatialQueryResult;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.ViewerConfiguration;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.ViewerConfiguration;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.faults.ControlledError;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.faults.ControlledError;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.BaseMapLayer;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.BaseMapLayer;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.IndexLayer;
|
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerObject;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerObject;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wfs.FeatureRow;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wfs.FeatureRow;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wms.GeoInformationForWMSRequest;
|
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wms.GeoInformationForWMSRequest;
|
||||||
|
@ -773,10 +771,11 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
||||||
|
|
||||||
for (Index index : ucdConfig.getIndexes()) {
|
for (Index index : ucdConfig.getIndexes()) {
|
||||||
try {
|
try {
|
||||||
IndexLayer toAdd = DVConversion.convert(index);
|
IndexLayer toAdd = ConvertToDataValueObjectModel.convert(index);
|
||||||
if (toAdd.getFlag().equals(toCheckFlag))
|
if (toAdd.getFlag().equals(toCheckFlag)) {
|
||||||
coll.getIndexes().add(toAdd);
|
coll.getIndexes().add(toAdd);
|
||||||
} catch (InvalidObjectException e) {
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
LOG.debug("Skipping invalid index ", e);
|
LOG.debug("Skipping invalid index ", e);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
LOG.error("Unable to check index ", t);
|
LOG.error("Unable to check index ", t);
|
||||||
|
|
|
@ -1,68 +1,68 @@
|
||||||
package org.gcube.portlets.user.geoportaldataviewer.server.util;
|
//package org.gcube.portlets.user.geoportaldataviewer.server.util;
|
||||||
|
//
|
||||||
import org.gcube.application.geoportal.client.utils.Serialization;
|
//import org.gcube.application.geoportal.client.utils.Serialization;
|
||||||
import org.gcube.application.geoportal.common.model.configuration.Index;
|
//import org.gcube.application.geoportal.common.model.configuration.Index;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.server.faults.InvalidObjectException;
|
//import org.gcube.portlets.user.geoportaldataviewer.server.faults.InvalidObjectException;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.IndexLayer;
|
//import org.gcube.portlets.user.geoportaldataviewer.shared.gis.IndexLayer;
|
||||||
|
//
|
||||||
public class DVConversion {
|
//public class DVConversion {
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
*
|
// *
|
||||||
* {
|
// * {
|
||||||
"_type": "GIS-CENTROIDS",
|
// "_type": "GIS-CENTROIDS",
|
||||||
"layer": {
|
// "layer": {
|
||||||
"_type": "gcube-sdi-layer",
|
// "_type": "gcube-sdi-layer",
|
||||||
"_platformInfo": [
|
// "_platformInfo": [
|
||||||
{
|
// {
|
||||||
"_type": "Geoserver",
|
// "_type": "Geoserver",
|
||||||
"workspace": "profiledconcessioni_devvre",
|
// "workspace": "profiledconcessioni_devvre",
|
||||||
"storeName": "profiledconcessioni_devvre_centroids",
|
// "storeName": "profiledconcessioni_devvre_centroids",
|
||||||
"_host": "geoserver-218.dev.d4science.org"
|
// "_host": "geoserver-218.dev.d4science.org"
|
||||||
}
|
// }
|
||||||
],
|
// ],
|
||||||
"_bbox": {
|
// "_bbox": {
|
||||||
"_maxX": 180.0,
|
// "_maxX": 180.0,
|
||||||
"_minX": -180.0,
|
// "_minX": -180.0,
|
||||||
"_maxY": 90.0,
|
// "_maxY": 90.0,
|
||||||
"_minY": -90.0
|
// "_minY": -90.0
|
||||||
},
|
// },
|
||||||
"_ogcLinks": {
|
// "_ogcLinks": {
|
||||||
"wms": {
|
// "wms": {
|
||||||
"wms": "https://geoserver-218.dev.d4science.org/geoserver/profiledconcessioni_devvre/wms?service=WMS&version=1.1.0&request=GetMap&layers=profiledconcessioni_devvre:null&styles=&bbox=-180.000000,-90.000000,180.000000,90.000000&srs=EPSG:4326&format=application/openlayers&width=400&height=400"
|
// "wms": "https://geoserver-218.dev.d4science.org/geoserver/profiledconcessioni_devvre/wms?service=WMS&version=1.1.0&request=GetMap&layers=profiledconcessioni_devvre:null&styles=&bbox=-180.000000,-90.000000,180.000000,90.000000&srs=EPSG:4326&format=application/openlayers&width=400&height=400"
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
"indexName": "profiledconcessioni_devvre_centroids",
|
// "indexName": "profiledconcessioni_devvre_centroids",
|
||||||
"records": 4,
|
// "records": 4,
|
||||||
"crossReferencedLayers": {},
|
// "crossReferencedLayers": {},
|
||||||
"flag": "public"
|
// "flag": "public"
|
||||||
}
|
// }
|
||||||
* @throws InvalidObjectException
|
// * @throws InvalidObjectException
|
||||||
*
|
// *
|
||||||
*/
|
// */
|
||||||
|
//
|
||||||
public static IndexLayer convert(Index toConvert) throws InvalidObjectException {
|
// public static IndexLayer convert(Index toConvert) throws InvalidObjectException {
|
||||||
IndexLayer toReturn = null;
|
// IndexLayer toReturn = null;
|
||||||
|
//
|
||||||
|
//
|
||||||
switch(toConvert.getType()) {
|
// switch(toConvert.getType()) {
|
||||||
case "GIS-CENTROIDS" : {
|
// case "GIS-CENTROIDS" : {
|
||||||
toReturn = Serialization.convert(toConvert,IndexLayer.class);
|
// toReturn = Serialization.convert(toConvert,IndexLayer.class);
|
||||||
// toReturn.setLayer(Serialization.read(toConvert.get("layer"), GCubeSDILayer.class));
|
// // toReturn.setLayer(Serialization.read(toConvert.get("layer"), GCubeSDILayer.class));
|
||||||
// toReturn.setFlag(toConvert.getString("flag"));
|
// // toReturn.setFlag(toConvert.getString("flag"));
|
||||||
// toReturn.setIndexName(toConvert.getString());
|
// // toReturn.setIndexName(toConvert.getString());
|
||||||
break;
|
// break;
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
default:{
|
// default:{
|
||||||
throw new InvalidObjectException("Unable to convert Index. Unknown type : "+toConvert.getType());
|
// throw new InvalidObjectException("Unable to convert Index. Unknown type : "+toConvert.getType());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return toReturn;
|
// return toReturn;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|
|
@ -4,8 +4,8 @@ package org.gcube.portlets.user.geoportaldataviewer.shared;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.IndexLayer;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.IndexLayer;
|
|
||||||
|
|
||||||
|
|
||||||
public class GCubeCollection implements Serializable {
|
public class GCubeCollection implements Serializable {
|
||||||
|
|
|
@ -1,109 +1,109 @@
|
||||||
package org.gcube.portlets.user.geoportaldataviewer.shared.cl.document.materialization;
|
//package org.gcube.portlets.user.geoportaldataviewer.shared.cl.document.materialization;
|
||||||
|
//
|
||||||
import java.util.HashMap;
|
//import java.util.HashMap;
|
||||||
|
//
|
||||||
public class BBOXDV extends HashMap<String,Double>{
|
//public class BBOXDV extends HashMap<String,Double>{
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
*
|
// *
|
||||||
*/
|
// */
|
||||||
private static final long serialVersionUID = -160255589938251081L;
|
// private static final long serialVersionUID = -160255589938251081L;
|
||||||
|
//
|
||||||
public BBOXDV() {
|
// public BBOXDV() {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
public final String asGeoJSONBBox(){
|
// public final String asGeoJSONBBox(){
|
||||||
StringBuilder builder = new StringBuilder("[");
|
// StringBuilder builder = new StringBuilder("[");
|
||||||
builder.append(getMaxX()+","); // W
|
// builder.append(getMaxX()+","); // W
|
||||||
builder.append(getMinY()+","); // S
|
// builder.append(getMinY()+","); // S
|
||||||
if(is3d()) builder.append(getMinZ()+","); // Z
|
// if(is3d()) builder.append(getMinZ()+","); // Z
|
||||||
|
//
|
||||||
builder.append(getMinX()+","); // E
|
// builder.append(getMinX()+","); // E
|
||||||
builder.append(getMaxY()+","); // N
|
// builder.append(getMaxY()+","); // N
|
||||||
if(is3d()) builder.append(getMaxZ()+","); // Z
|
// if(is3d()) builder.append(getMaxZ()+","); // Z
|
||||||
|
//
|
||||||
|
//
|
||||||
builder.deleteCharAt(builder.length());
|
// builder.deleteCharAt(builder.length());
|
||||||
builder.append("]");
|
// builder.append("]");
|
||||||
return builder.toString();
|
// return builder.toString();
|
||||||
}
|
// }
|
||||||
public double[] asGeoJSONArray(){
|
// public double[] asGeoJSONArray(){
|
||||||
if(is3d()){
|
// if(is3d()){
|
||||||
return new double[]{getMaxX(),getMinY(),getMinZ(),getMinX(),getMaxY(),getMaxZ()};
|
// return new double[]{getMaxX(),getMinY(),getMinZ(),getMinX(),getMaxY(),getMaxZ()};
|
||||||
}else return new double[]{getMaxX(),getMinY(),getMinX(),getMaxY()};
|
// }else return new double[]{getMaxX(),getMinY(),getMinX(),getMaxY()};
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public static final BBOXDV fromGeoJSON(double[] coords){
|
// public static final BBOXDV fromGeoJSON(double[] coords){
|
||||||
BBOXDV toReturn = new BBOXDV();
|
// BBOXDV toReturn = new BBOXDV();
|
||||||
toReturn.setMaxX(coords[0]);
|
// toReturn.setMaxX(coords[0]);
|
||||||
toReturn.setMinY(coords[1]);
|
// toReturn.setMinY(coords[1]);
|
||||||
|
//
|
||||||
if(coords.length == 6){
|
// if(coords.length == 6){
|
||||||
// 3D
|
// // 3D
|
||||||
toReturn.setMinZ(coords[2]);
|
// toReturn.setMinZ(coords[2]);
|
||||||
toReturn.setMinX(coords[3]);
|
// toReturn.setMinX(coords[3]);
|
||||||
toReturn.setMaxY(coords[4]);
|
// toReturn.setMaxY(coords[4]);
|
||||||
toReturn.setMaxZ(coords[5]);
|
// toReturn.setMaxZ(coords[5]);
|
||||||
}else {
|
// }else {
|
||||||
toReturn.setMinX(coords[2]);
|
// toReturn.setMinX(coords[2]);
|
||||||
toReturn.setMaxY(coords[3]);
|
// toReturn.setMaxY(coords[3]);
|
||||||
}
|
// }
|
||||||
return toReturn;
|
// return toReturn;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public static final BBOXDV WORLD=new BBOXDV(180d,-180d,90d,-90d);
|
// public static final BBOXDV WORLD=new BBOXDV(180d,-180d,90d,-90d);
|
||||||
|
//
|
||||||
public static final BBOXDV WORLD_3D=new BBOXDV(180d,-180d,90d,-90d);
|
// public static final BBOXDV WORLD_3D=new BBOXDV(180d,-180d,90d,-90d);
|
||||||
|
//
|
||||||
public static final String MAX_X="_maxX";
|
// public static final String MAX_X="_maxX";
|
||||||
public static final String MAX_Y="_maxY";
|
// public static final String MAX_Y="_maxY";
|
||||||
public static final String MAX_Z="_maxZ";
|
// public static final String MAX_Z="_maxZ";
|
||||||
public static final String MIN_X="_minX";
|
// public static final String MIN_X="_minX";
|
||||||
public static final String MIN_Y="_minY";
|
// public static final String MIN_Y="_minY";
|
||||||
public static final String MIN_Z="_minZ";
|
// public static final String MIN_Z="_minZ";
|
||||||
|
//
|
||||||
|
//
|
||||||
public BBOXDV(Double maxX,Double minX,Double maxY,Double minY,Double maxZ,Double minZ){
|
// public BBOXDV(Double maxX,Double minX,Double maxY,Double minY,Double maxZ,Double minZ){
|
||||||
this(maxX,minX,maxY,minY);
|
// this(maxX,minX,maxY,minY);
|
||||||
setMaxZ(maxZ);
|
// setMaxZ(maxZ);
|
||||||
setMinZ(minZ);
|
// setMinZ(minZ);
|
||||||
}
|
// }
|
||||||
public BBOXDV(Double maxX,Double minX,Double maxY,Double minY){
|
// public BBOXDV(Double maxX,Double minX,Double maxY,Double minY){
|
||||||
setMaxX(maxX);
|
// setMaxX(maxX);
|
||||||
setMinX(minX);
|
// setMinX(minX);
|
||||||
setMaxY(maxY);
|
// setMaxY(maxY);
|
||||||
setMinY(minY);
|
// setMinY(minY);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
public BBOXDV setMaxX(Double d){this.put(MAX_X,d);return this;}
|
// public BBOXDV setMaxX(Double d){this.put(MAX_X,d);return this;}
|
||||||
|
//
|
||||||
public BBOXDV setMaxY(Double d){this.put(MAX_Y,d);return this;}
|
// public BBOXDV setMaxY(Double d){this.put(MAX_Y,d);return this;}
|
||||||
|
//
|
||||||
public BBOXDV setMaxZ(Double d){this.put(MAX_Z,d);return this;}
|
// public BBOXDV setMaxZ(Double d){this.put(MAX_Z,d);return this;}
|
||||||
|
//
|
||||||
public BBOXDV setMinX(Double d){this.put(MIN_X,d);return this;}
|
// public BBOXDV setMinX(Double d){this.put(MIN_X,d);return this;}
|
||||||
|
//
|
||||||
public BBOXDV setMinY(Double d){this.put(MIN_Y,d);return this;}
|
// public BBOXDV setMinY(Double d){this.put(MIN_Y,d);return this;}
|
||||||
|
//
|
||||||
public BBOXDV setMinZ(Double d){this.put(MIN_Z,d);return this;}
|
// public BBOXDV setMinZ(Double d){this.put(MIN_Z,d);return this;}
|
||||||
|
//
|
||||||
public Double getMinY(){return (Double) this.getOrDefault(MIN_Y,-90d);}
|
// public Double getMinY(){return (Double) this.getOrDefault(MIN_Y,-90d);}
|
||||||
|
//
|
||||||
public Double getMaxY(){return (Double) this.getOrDefault(MAX_Y,90d);}
|
// public Double getMaxY(){return (Double) this.getOrDefault(MAX_Y,90d);}
|
||||||
|
//
|
||||||
public Double getMinX(){return (Double) this.getOrDefault(MIN_X,-180d);}
|
// public Double getMinX(){return (Double) this.getOrDefault(MIN_X,-180d);}
|
||||||
|
//
|
||||||
public Double getMaxX(){return (Double) this.getOrDefault(MAX_X,180d);}
|
// public Double getMaxX(){return (Double) this.getOrDefault(MAX_X,180d);}
|
||||||
|
//
|
||||||
public Double getMinZ(){return (Double) this.getOrDefault(MIN_Z,null);}
|
// public Double getMinZ(){return (Double) this.getOrDefault(MIN_Z,null);}
|
||||||
|
//
|
||||||
public Double getMaxZ(){return (Double) this.getOrDefault(MAX_Z,null);}
|
// public Double getMaxZ(){return (Double) this.getOrDefault(MAX_Z,null);}
|
||||||
|
//
|
||||||
|
//
|
||||||
public Boolean is3d(){
|
// public Boolean is3d(){
|
||||||
return getMinZ()!=null && getMaxZ() !=null;
|
// return getMinZ()!=null && getMaxZ() !=null;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
|
@ -1,77 +1,77 @@
|
||||||
package org.gcube.portlets.user.geoportaldataviewer.shared.cl.document.materialization;
|
//package org.gcube.portlets.user.geoportaldataviewer.shared.cl.document.materialization;
|
||||||
|
//
|
||||||
import java.io.Serializable;
|
//import java.io.Serializable;
|
||||||
import java.util.HashMap;
|
//import java.util.HashMap;
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
|
//
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
//import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
//
|
||||||
public class GCubeSDILayerDV implements Serializable {
|
//public class GCubeSDILayerDV implements Serializable {
|
||||||
|
//
|
||||||
// TODO manage heterogeneus collection
|
// // TODO manage heterogeneus collection
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
*
|
// *
|
||||||
*/
|
// */
|
||||||
private static final long serialVersionUID = 5317964084778336268L;
|
// private static final long serialVersionUID = 5317964084778336268L;
|
||||||
@JsonProperty(value = "_type")
|
// @JsonProperty(value = "_type")
|
||||||
private String type;
|
// private String type;
|
||||||
@JsonProperty(value = "_platformInfo")
|
// @JsonProperty(value = "_platformInfo")
|
||||||
private List<GeoServerPlatformInfoDV> platformInfos;
|
// private List<GeoServerPlatformInfoDV> platformInfos;
|
||||||
@JsonProperty(value = "_bbox")
|
// @JsonProperty(value = "_bbox")
|
||||||
private BBOXDV bbox;
|
// private BBOXDV bbox;
|
||||||
@JsonProperty(value = "_ogcLinks")
|
// @JsonProperty(value = "_ogcLinks")
|
||||||
private HashMap<String, String> ogcLinks;
|
// private HashMap<String, String> ogcLinks;
|
||||||
|
//
|
||||||
public GCubeSDILayerDV() {
|
// public GCubeSDILayerDV() {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public String getType() {
|
// public String getType() {
|
||||||
return type;
|
// return type;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public List<GeoServerPlatformInfoDV> getPlatformInfos() {
|
// public List<GeoServerPlatformInfoDV> getPlatformInfos() {
|
||||||
return platformInfos;
|
// return platformInfos;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public BBOXDV getBbox() {
|
// public BBOXDV getBbox() {
|
||||||
return bbox;
|
// return bbox;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public HashMap<String, String> getOgcLinks() {
|
// public HashMap<String, String> getOgcLinks() {
|
||||||
return ogcLinks;
|
// return ogcLinks;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void setType(String type) {
|
// public void setType(String type) {
|
||||||
this.type = type;
|
// this.type = type;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void setPlatformInfos(List<GeoServerPlatformInfoDV> platformInfos) {
|
// public void setPlatformInfos(List<GeoServerPlatformInfoDV> platformInfos) {
|
||||||
this.platformInfos = platformInfos;
|
// this.platformInfos = platformInfos;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void setBbox(BBOXDV bbox) {
|
// public void setBbox(BBOXDV bbox) {
|
||||||
this.bbox = bbox;
|
// this.bbox = bbox;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void setOgcLinks(HashMap<String, String> ogcLinks) {
|
// public void setOgcLinks(HashMap<String, String> ogcLinks) {
|
||||||
this.ogcLinks = ogcLinks;
|
// this.ogcLinks = ogcLinks;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public String toString() {
|
// public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
// StringBuilder builder = new StringBuilder();
|
||||||
builder.append("GCubeSDILayerDV [type=");
|
// builder.append("GCubeSDILayerDV [type=");
|
||||||
builder.append(type);
|
// builder.append(type);
|
||||||
builder.append(", platformInfos=");
|
// builder.append(", platformInfos=");
|
||||||
builder.append(platformInfos);
|
// builder.append(platformInfos);
|
||||||
builder.append(", bbox=");
|
// builder.append(", bbox=");
|
||||||
builder.append(bbox);
|
// builder.append(bbox);
|
||||||
builder.append(", ogcLinks=");
|
// builder.append(", ogcLinks=");
|
||||||
builder.append(ogcLinks);
|
// builder.append(ogcLinks);
|
||||||
builder.append("]");
|
// builder.append("]");
|
||||||
return builder.toString();
|
// return builder.toString();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|
|
@ -1,85 +1,85 @@
|
||||||
package org.gcube.portlets.user.geoportaldataviewer.shared.cl.document.materialization;
|
//package org.gcube.portlets.user.geoportaldataviewer.shared.cl.document.materialization;
|
||||||
|
//
|
||||||
import java.io.Serializable;
|
//import java.io.Serializable;
|
||||||
import java.util.Map;
|
//import java.util.Map;
|
||||||
|
//
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
//import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
//
|
||||||
public class GeoServerPlatformInfoDV implements Serializable {
|
//public class GeoServerPlatformInfoDV implements Serializable {
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
*
|
// *
|
||||||
*/
|
// */
|
||||||
private static final long serialVersionUID = -2630467451758269625L;
|
// private static final long serialVersionUID = -2630467451758269625L;
|
||||||
|
//
|
||||||
@JsonProperty(value = "_type")
|
// @JsonProperty(value = "_type")
|
||||||
private String type;
|
// private String type;
|
||||||
private String workspace;
|
// private String workspace;
|
||||||
private String storeName;
|
// private String storeName;
|
||||||
|
//
|
||||||
public GeoServerPlatformInfoDV() {
|
// public GeoServerPlatformInfoDV() {
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@JsonProperty(value = "_host")
|
// @JsonProperty(value = "_host")
|
||||||
private String host;
|
// private String host;
|
||||||
|
//
|
||||||
private Map<String, String> ogcLinks;
|
// private Map<String, String> ogcLinks;
|
||||||
|
//
|
||||||
public String getType() {
|
// public String getType() {
|
||||||
return type;
|
// return type;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void setType(String type) {
|
// public void setType(String type) {
|
||||||
this.type = type;
|
// this.type = type;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public String getWorkspace() {
|
// public String getWorkspace() {
|
||||||
return workspace;
|
// return workspace;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void setWorkspace(String workspace) {
|
// public void setWorkspace(String workspace) {
|
||||||
this.workspace = workspace;
|
// this.workspace = workspace;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public String getStoreName() {
|
// public String getStoreName() {
|
||||||
return storeName;
|
// return storeName;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void setStoreName(String storeName) {
|
// public void setStoreName(String storeName) {
|
||||||
this.storeName = storeName;
|
// this.storeName = storeName;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public String getHost() {
|
// public String getHost() {
|
||||||
return host;
|
// return host;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void setHost(String host) {
|
// public void setHost(String host) {
|
||||||
this.host = host;
|
// this.host = host;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public Map<String, String> getOgcLinks() {
|
// public Map<String, String> getOgcLinks() {
|
||||||
return ogcLinks;
|
// return ogcLinks;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void setOgcLinks(Map<String, String> ogcLinks) {
|
// public void setOgcLinks(Map<String, String> ogcLinks) {
|
||||||
this.ogcLinks = ogcLinks;
|
// this.ogcLinks = ogcLinks;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public String toString() {
|
// public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
// StringBuilder builder = new StringBuilder();
|
||||||
builder.append("GeoServerPlatformInfoDV [type=");
|
// builder.append("GeoServerPlatformInfoDV [type=");
|
||||||
builder.append(type);
|
// builder.append(type);
|
||||||
builder.append(", workspace=");
|
// builder.append(", workspace=");
|
||||||
builder.append(workspace);
|
// builder.append(workspace);
|
||||||
builder.append(", storeName=");
|
// builder.append(", storeName=");
|
||||||
builder.append(storeName);
|
// builder.append(storeName);
|
||||||
builder.append(", host=");
|
// builder.append(", host=");
|
||||||
builder.append(host);
|
// builder.append(host);
|
||||||
builder.append(", ogcLinks=");
|
// builder.append(", ogcLinks=");
|
||||||
builder.append(ogcLinks);
|
// builder.append(ogcLinks);
|
||||||
builder.append("]");
|
// builder.append("]");
|
||||||
return builder.toString();
|
// return builder.toString();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|
|
@ -1,85 +0,0 @@
|
||||||
package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.cl.document.materialization.GCubeSDILayerDV;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
|
|
||||||
public class IndexLayer implements Serializable {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = 5352754312327975329L;
|
|
||||||
|
|
||||||
@JsonProperty(value = "_type")
|
|
||||||
private String type;
|
|
||||||
private GCubeSDILayerDV layer;
|
|
||||||
private String indexName;
|
|
||||||
private int records;
|
|
||||||
private String flag;
|
|
||||||
|
|
||||||
public IndexLayer() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GCubeSDILayerDV getLayer() {
|
|
||||||
return layer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLayer(GCubeSDILayerDV layer) {
|
|
||||||
this.layer = layer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIndexName() {
|
|
||||||
return indexName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIndexName(String indexName) {
|
|
||||||
this.indexName = indexName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getRecords() {
|
|
||||||
return records;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRecords(int records) {
|
|
||||||
this.records = records;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFlag() {
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFlag(String flag) {
|
|
||||||
this.flag = flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
StringBuilder builder = new StringBuilder();
|
|
||||||
builder.append("IndexLayer [type=");
|
|
||||||
builder.append(type);
|
|
||||||
builder.append(", layer=");
|
|
||||||
builder.append(layer);
|
|
||||||
builder.append(", indexName=");
|
|
||||||
builder.append(indexName);
|
|
||||||
builder.append(", records=");
|
|
||||||
builder.append(records);
|
|
||||||
builder.append(", flag=");
|
|
||||||
builder.append(flag);
|
|
||||||
builder.append("]");
|
|
||||||
return builder.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -2,7 +2,8 @@ package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.shared.cl.document.materialization.GCubeSDILayerDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.GCubeSDILayerDV;
|
||||||
|
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.IndexLayer;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -111,13 +112,24 @@ public class LayerObject implements Serializable {
|
||||||
this.layerItem = layerItem;
|
this.layerItem = layerItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public static long getSerialversionuid() {
|
public String toString() {
|
||||||
return serialVersionUID;
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("LayerObject [type=");
|
||||||
|
builder.append(type);
|
||||||
|
builder.append(", indexLayer=");
|
||||||
|
builder.append(indexLayer);
|
||||||
|
builder.append(", ucid=");
|
||||||
|
builder.append(ucid);
|
||||||
|
builder.append(", projectLayer=");
|
||||||
|
builder.append(projectLayer);
|
||||||
|
builder.append(", projectId=");
|
||||||
|
builder.append(projectId);
|
||||||
|
builder.append(", layerItem=");
|
||||||
|
builder.append(layerItem);
|
||||||
|
builder.append("]");
|
||||||
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue