2020-11-19 15:19:27 +01:00
|
|
|
package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
2022-10-13 16:53:33 +02:00
|
|
|
import org.gcube.portlets.user.geoportaldataviewer.shared.cl.document.materialization.GCubeSDILayerDV;
|
2021-09-09 11:38:25 +02:00
|
|
|
|
|
|
|
|
2020-11-19 15:19:27 +01:00
|
|
|
/**
|
2022-10-13 16:53:33 +02:00
|
|
|
* Represents a layer,
|
|
|
|
* holds the layer item and the related Collection info if existing
|
|
|
|
*
|
2020-11-19 15:19:27 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class LayerObject implements Serializable {
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
private static final long serialVersionUID = -2282478701630148774L;
|
2022-10-13 16:53:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
private LayerObjectType type;
|
|
|
|
|
|
|
|
private IndexLayer indexLayer; // expected for INDEX_LAYER type
|
|
|
|
private String ucid; // expected for collection layers
|
|
|
|
private GCubeSDILayerDV projectLayer; // expected for PROJECT_LAYER
|
|
|
|
private String projectId; // expected for PROJECT_LAYER
|
|
|
|
|
2020-11-19 15:19:27 +01:00
|
|
|
private LayerItem layerItem;
|
|
|
|
|
|
|
|
public LayerObject() {
|
2022-10-13 16:53:33 +02:00
|
|
|
super();
|
2021-09-07 17:29:56 +02:00
|
|
|
}
|
|
|
|
|
2022-10-13 16:53:33 +02:00
|
|
|
public LayerObject(LayerObjectType type,LayerItem item) {
|
|
|
|
this.setType(type);
|
|
|
|
this.setLayerItem(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public LayerObject(String ucid, IndexLayer indexLayer, LayerItem item) {
|
|
|
|
this(LayerObjectType.INDEX_LAYER,item);
|
|
|
|
this.ucid=ucid;
|
|
|
|
this.indexLayer=indexLayer;
|
|
|
|
}
|
|
|
|
|
|
|
|
public LayerObject(String ucid, String projectId, GCubeSDILayerDV projectLayer, LayerItem item) {
|
|
|
|
this(LayerObjectType.PROJECT_LAYER,item);
|
|
|
|
this.ucid=ucid;
|
|
|
|
this.projectId=projectId;
|
|
|
|
this.projectLayer = projectLayer;
|
2020-11-19 15:19:27 +01:00
|
|
|
}
|
|
|
|
|
2022-10-13 16:53:33 +02:00
|
|
|
|
|
|
|
public LayerObjectType getType() {
|
|
|
|
return type;
|
2020-11-19 15:19:27 +01:00
|
|
|
}
|
|
|
|
|
2022-10-13 16:53:33 +02:00
|
|
|
|
|
|
|
public void setType(LayerObjectType type) {
|
|
|
|
this.type = type;
|
2020-11-19 15:19:27 +01:00
|
|
|
}
|
|
|
|
|
2022-10-13 16:53:33 +02:00
|
|
|
|
|
|
|
public IndexLayer getIndexLayer() {
|
|
|
|
return indexLayer;
|
2021-09-09 11:38:25 +02:00
|
|
|
}
|
|
|
|
|
2022-10-13 16:53:33 +02:00
|
|
|
|
|
|
|
public void setIndexLayer(IndexLayer indexLayer) {
|
|
|
|
this.indexLayer = indexLayer;
|
2020-11-19 15:19:27 +01:00
|
|
|
}
|
|
|
|
|
2022-10-13 16:53:33 +02:00
|
|
|
|
|
|
|
public String getUcid() {
|
|
|
|
return ucid;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setUcid(String ucid) {
|
|
|
|
this.ucid = ucid;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public GCubeSDILayerDV getProjectLayer() {
|
|
|
|
return projectLayer;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setProjectLayer(GCubeSDILayerDV projectLayer) {
|
|
|
|
this.projectLayer = projectLayer;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String getProjectId() {
|
|
|
|
return projectId;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setProjectId(String projectId) {
|
|
|
|
this.projectId = projectId;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public LayerItem getLayerItem() {
|
|
|
|
return layerItem;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-19 15:19:27 +01:00
|
|
|
public void setLayerItem(LayerItem layerItem) {
|
|
|
|
this.layerItem = layerItem;
|
|
|
|
}
|
|
|
|
|
2021-09-09 11:38:25 +02:00
|
|
|
|
2022-10-13 16:53:33 +02:00
|
|
|
public static long getSerialversionuid() {
|
|
|
|
return serialVersionUID;
|
2020-11-19 15:19:27 +01:00
|
|
|
}
|
2022-10-13 16:53:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-19 15:19:27 +01:00
|
|
|
|
2021-09-09 11:38:25 +02:00
|
|
|
}
|