| | |
| | | |
| | | private String name; |
| | | |
| | | private Integer dataType; |
| | | |
| | | private List<SeField> fields; |
| | | |
| | | private JSONArray data; |
| | | |
| | | private String queryType; |
| | | |
| | | private String shpName; |
| | | |
| | | private SeDb db; |
| | | |
| | | private JSONArray data; |
| | | |
| | | public SeLayer() { |
| | | this.data = new JSONArray(); |
| | |
| | | this(); |
| | | this.id = id; |
| | | this.name = name; |
| | | this.data = new JSONArray(); |
| | | } |
| | | |
| | | public SeLayer(String id, String name, String shpName, Integer dataType, List<SeField> fields) { |
| | | public SeLayer(String id, String name, String queryType, List<SeField> fields, String shpName, SeDb db) { |
| | | this(); |
| | | this.id = id; |
| | | this.name = name; |
| | | this.shpName = shpName; |
| | | this.dataType = dataType; |
| | | this.queryType = queryType; |
| | | 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"; |
| | | } |
| | | this.shpName = shpName; |
| | | this.db = db; |
| | | } |
| | | |
| | | public void addData(JSONArray arr) { |
| | |
| | | |
| | | 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() { |
| | |
| | | public void setShpName(String shpName) { |
| | | this.shpName = shpName; |
| | | } |
| | | |
| | | public SeDb getDb() { |
| | | return db; |
| | | } |
| | | |
| | | public void setDb(SeDb db) { |
| | | this.db = db; |
| | | } |
| | | } |