From 53d68348f21c33e846ba1dd9ef483468d13f3228 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期六, 02 九月 2023 15:11:01 +0800 Subject: [PATCH] 添加查询数简颜色表接口 --- src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java | 156 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 142 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java b/src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java index c96493f..057d912 100644 --- a/src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java +++ b/src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java @@ -1,6 +1,12 @@ package com.moon.server.entity.shujian; +import com.moon.server.helper.StringHelper; + import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * 鏁扮畝.鍒涘缓鍥惧眰绫� @@ -19,12 +25,12 @@ /** * 褰卞儚鐩綍鍒楄〃 */ - private ImagePathList[] image_path_list; + private List<ImagePathList> image_path_list; /** * 褰卞儚鍒楄〃 */ - private ImageList[] image_list; + private List<ImageList> image_list; /** * 閲戝瓧濉旈厤缃� @@ -44,8 +50,8 @@ public CreateLayerEntity(int pathCount, int imageCount) { this(); - image_list = new ImageList[imageCount]; - image_path_list = new ImagePathList[pathCount]; + image_list = new ArrayList<>(); + image_path_list = new ArrayList<>(); } public Layer getLayer() { @@ -56,19 +62,19 @@ this.layer = layer; } - public ImagePathList[] getImage_path_list() { + public List<ImagePathList> getImage_path_list() { return image_path_list; } - public void setImage_path_list(ImagePathList[] image_path_list) { + public void setImage_path_list(List<ImagePathList> image_path_list) { this.image_path_list = image_path_list; } - public ImageList[] getImage_list() { + public List<ImageList> getImage_list() { return image_list; } - public void setImage_list(ImageList[] image_list) { + public void setImage_list(List<ImageList> image_list) { this.image_list = image_list; } @@ -150,7 +156,7 @@ /** * 鍥惧眰鍜屽奖鍍忕浉鍏崇殑閰嶇疆锛岄粯璁�"{}"锛岄厤缃唴瀹瑰寘鎷絾涓嶉檺浜庯細澶勭悊杩囩▼銆佽竟鐣屾帶鍒舵柟娉� */ - private Object config; + private Config config; /** * 鎷変几鍥犲瓙锛岄厤鍚� enhance_factor浣跨敤 @@ -165,10 +171,9 @@ public Layer() { end_scale = 1.0; start_scale = 1000000000.0; - stats_type = 0; + stats_type = 1; enhance_type = 0; boundary_cal_mode = 0; - config = new Object(); pub_config = new Object(); } @@ -260,11 +265,11 @@ this.pub_config = pub_config; } - public Object getConfig() { + public Config getConfig() { return config; } - public void setConfig(Object config) { + public void setConfig(Config config) { this.config = config; } @@ -321,7 +326,7 @@ public ImagePathList() { datasource = "Local"; - recursion = 1; + recursion = 0; image_time = null; } @@ -483,4 +488,127 @@ this.sample_type = sample_type; } } + + /** + * 棰滆壊琛ㄩ厤缃� + */ + public class Config { + private Process process; + + public Config(Integer type, List<GradientColorTableEntity> levels) { + process = new Process(type, levels); + } + + public Process getProcess() { + return process; + } + + public void setProcess(Process process) { + this.process = process; + } + } + + /** + * 澶勭悊灞傜骇 + */ + public class Process { + private String uuid; + + private String name; + + private Map<String, Object> config; + + public Process() { + uuid = StringHelper.getGuid(); + name = "color_table"; + + config = new HashMap<>(); + config.put("default", new Default()); + } + + /** + * 澶勭悊杩囩▼ + * + * @param type 0-榛樿鑹叉澘锛�1-娓愬彉鑹叉澘 + * @param levels 灞傜骇 + */ + public Process(Integer type, List<?> levels) { + this(); + config.put("type", type); + config.put("levels", levels); + } + + /** + * 璁剧疆棰滆壊琛� + */ + public void SetColorTable(Integer type, List<?> levels) { + config.put("type", type); + config.put("levels", levels); + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Map<String, Object> getConfig() { + return config; + } + + public void setConfig(Map<String, Object> config) { + this.config = config; + } + } + + /** + * 棰滆壊琛ㄩ粯璁ら厤缃� + */ + public class Default { + private Short r; + + private Short g; + + private Short b; + + public Default() { + r = -1; + b = -1; + g = -1; + } + + public Short getR() { + return r; + } + + public void setR(Short r) { + this.r = r; + } + + public Short getG() { + return g; + } + + public void setG(Short g) { + this.g = g; + } + + public Short getB() { + return b; + } + + public void setB(Short b) { + this.b = b; + } + } } -- Gitblit v1.9.3