package com.se.simu.domain;
|
|
import cn.hutool.json.JSONArray;
|
|
import java.util.List;
|
|
/**
|
* SE图层实体类
|
*
|
* @author WWW
|
* @date 2024-09-13
|
*/
|
public class SeLayer {
|
private String id;
|
|
private String name;
|
|
private Integer dataType;
|
|
private List<SeField> fields;
|
|
private JSONArray data;
|
|
private String queryType;
|
|
public SeLayer() {
|
this.data = new JSONArray();
|
}
|
|
public SeLayer(String id, String name) {
|
this();
|
this.id = id;
|
this.name = name;
|
this.data = new JSONArray();
|
}
|
|
public SeLayer(String id, String name, Integer dataType, List<SeField> fields) {
|
this();
|
this.id = id;
|
this.name = name;
|
this.dataType = dataType;
|
this.fields = fields;
|
this.queryType = getQueryType(dataType);
|
}
|
|
public String getQueryType(Integer dataType) {
|
switch (dataType) {
|
case 2:
|
case 4:
|
return "point";
|
case 1:
|
case 3:
|
return "polyline";
|
default:
|
return "polygon";
|
}
|
}
|
|
public void addData(JSONArray arr){
|
this.data.addAll(arr);
|
}
|
|
public String getId() {
|
return id;
|
}
|
|
public void setId(String id) {
|
this.id = id;
|
}
|
|
public String getName() {
|
return name;
|
}
|
|
public void setName(String name) {
|
this.name = name;
|
}
|
|
public Integer getDataType() {
|
return dataType;
|
}
|
|
public void setDataType(Integer dataType) {
|
this.dataType = dataType;
|
}
|
|
public List<SeField> getFields() {
|
return fields;
|
}
|
|
public void setFields(List<SeField> fields) {
|
this.fields = fields;
|
}
|
|
public JSONArray getData() {
|
return data;
|
}
|
|
public void setData(JSONArray data) {
|
this.data = data;
|
}
|
|
public String getQueryType() {
|
return queryType;
|
}
|
|
public void setQueryType(String queryType) {
|
this.queryType = queryType;
|
}
|
}
|