diff --git a/src/main/java/com/yj/earth/common/service/SourceDataGenerator.java b/src/main/java/com/yj/earth/common/service/SourceDataGenerator.java new file mode 100644 index 0000000..f862d24 --- /dev/null +++ b/src/main/java/com/yj/earth/common/service/SourceDataGenerator.java @@ -0,0 +1,256 @@ +package com.yj.earth.common.service; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.lang.reflect.*; +import java.util.*; + +@Component +public class SourceDataGenerator { + + @Resource + private SourceParamsValidator sourceParamsValidator; + + private static final ObjectMapper objectMapper; + + static { + // 初始化ObjectMapper并配置 + objectMapper = new ObjectMapper(); + // 允许序列化空对象 + objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); + // 格式化输出 + objectMapper.enable(SerializationFeature.INDENT_OUTPUT); + } + + /** + * 生成包含完整层级结构的默认JSON + */ + public String generateDefaultJson(String sourceType) throws JsonProcessingException { + // 获取目标类 + Class targetClass = sourceParamsValidator.getSourceTypeMap().get(sourceType); + if (targetClass == null) { + throw new IllegalArgumentException("不支持的资源类型: " + sourceType); + } + return generateJsonStructure(targetClass); + } + + /** + * 根据类生成JSON结构字符串 + * @param clazz 目标类 + * @return 完整结构的JSON字符串 + */ + public static String generateJsonStructure(Class clazz) throws JsonProcessingException { + Object instance = initializeObject(clazz); + return objectMapper.writeValueAsString(instance); + } + + /** + * 递归初始化对象(包括嵌套类、集合、数组) + */ + private static Object initializeObject(Class clazz) { + try { + // 处理数组类型 + if (clazz.isArray()) { + return initializeArray(clazz); + } + + // 处理基本类型包装类或字符串(直接返回默认值) + if (isPrimitiveOrWrapper(clazz) || clazz.equals(String.class)) { + return getDefaultValue(clazz); + } + + // 处理集合接口(直接实例化为ArrayList/HashSet等) + if (clazz.isInterface()) { + if (List.class.isAssignableFrom(clazz)) { + clazz = ArrayList.class; + } else if (Set.class.isAssignableFrom(clazz)) { + clazz = HashSet.class; + } else if (Map.class.isAssignableFrom(clazz)) { + clazz = HashMap.class; + } else { + // 其他接口默认返回null(避免无法实例化) + return null; + } + } + + // 创建类实例(支持static内部类) + Constructor constructor = clazz.getDeclaredConstructor(); + constructor.setAccessible(true); // 允许访问私有构造函数 + Object instance = constructor.newInstance(); + + // 初始化所有字段 + for (Field field : clazz.getDeclaredFields()) { + field.setAccessible(true); + Class fieldType = field.getType(); + + // 跳过静态字段(通常不需要序列化静态成员) + if (Modifier.isStatic(field.getModifiers())) { + continue; + } + + // 基本类型、包装类、字符串:直接设默认值 + if (isPrimitiveOrWrapper(fieldType) || fieldType.equals(String.class)) { + field.set(instance, getDefaultValue(fieldType)); + continue; + } + + // 处理数组 + if (fieldType.isArray()) { + field.set(instance, initializeArray(fieldType)); + continue; + } + + // 处理集合 + if (Collection.class.isAssignableFrom(fieldType)) { + field.set(instance, initializeCollection(field)); + continue; + } + + // 处理Map + if (Map.class.isAssignableFrom(fieldType)) { + field.set(instance, initializeMap(field)); + continue; + } + + // 处理嵌套对象(包括static内部类) + field.set(instance, initializeObject(fieldType)); + } + + return instance; + } catch (Exception e) { + throw new RuntimeException("初始化对象失败: " + clazz.getName(), e); + } + } + + /** + * 初始化数组 + */ + private static Object initializeArray(Class arrayType) { + Class componentType = arrayType.getComponentType(); + // 创建长度为1的数组 + Object array = Array.newInstance(componentType, 1); + + // 初始化数组元素(字符串类型会返回空字符串) + try { + Object element = initializeObject(componentType); + Array.set(array, 0, element); + } catch (Exception e) { + // 初始化失败时设置为对应类型的默认值(字符串为"") + Array.set(array, 0, getDefaultValue(componentType)); + } + return array; + } + + /** + * 初始化集合 + */ + private static Collection initializeCollection(Field field) { + Class fieldType = field.getType(); + Type genericType = field.getGenericType(); + Collection collection; + + // 创建具体集合实例 + try { + if (fieldType.isInterface()) { + collection = new ArrayList<>(); + } else { + collection = (Collection) fieldType.getDeclaredConstructor().newInstance(); + } + } catch (Exception e) { + collection = new ArrayList<>(); + } + + // 处理泛型元素(字符串类型会添加空字符串) + if (genericType instanceof ParameterizedType) { + Type[] actualTypeArguments = ((ParameterizedType) genericType).getActualTypeArguments(); + if (actualTypeArguments.length > 0 && actualTypeArguments[0] instanceof Class) { + Class elementType = (Class) actualTypeArguments[0]; + try { + Object element = initializeObject(elementType); + collection.add(element); + } catch (Exception e) { + // 元素初始化失败时添加默认值(字符串为"") + collection.add(getDefaultValue(elementType)); + } + } + } + + return collection; + } + + /** + * 初始化Map + */ + private static Map initializeMap(Field field) { + Class fieldType = field.getType(); + Type genericType = field.getGenericType(); + Map map; + + // 创建具体Map实例 + try { + if (fieldType.isInterface()) { + map = new HashMap<>(); + } else { + map = (Map) fieldType.getDeclaredConstructor().newInstance(); + } + } catch (Exception e) { + map = new HashMap<>(); + } + + // 处理泛型键值对(value为字符串时设为空字符串) + if (genericType instanceof ParameterizedType) { + Type[] actualTypeArguments = ((ParameterizedType) genericType).getActualTypeArguments(); + if (actualTypeArguments.length == 2) { + try { + // key默认用字符串"key",value按泛型类型设默认值(字符串为"") + Object key = "key"; + Object value = actualTypeArguments[1] instanceof Class + ? initializeObject((Class) actualTypeArguments[1]) + : getDefaultValue(String.class); // 非Class类型默认空字符串 + map.put(key, value); + } catch (Exception e) { + // 初始化失败时value设为对应类型默认值(字符串为"") + map.put("key", getDefaultValue(actualTypeArguments[1] instanceof Class ? (Class) actualTypeArguments[1] : String.class)); + } + } + } + + return map; + } + + /** + * 判断是否为基本类型或包装类 + */ + private static boolean isPrimitiveOrWrapper(Class type) { + return type.isPrimitive() + || type.equals(Boolean.class) + || type.equals(Byte.class) + || type.equals(Short.class) + || type.equals(Integer.class) + || type.equals(Long.class) + || type.equals(Float.class) + || type.equals(Double.class) + || type.equals(Character.class); + } + + /** + * 获取类型默认值:字符串返回空字符串,其他类型按原有逻辑 + */ + private static Object getDefaultValue(Class type) { + if (type.equals(String.class)) { + return ""; + } + // 原有逻辑:基本类型返回对应默认值(boolean=false/数值=0/char='\0') + if (type.isPrimitive()) { + if (type == boolean.class) return false; + if (type == char.class) return '\0'; + return 0; // 所有数值类型(byte/short/int/long/float/double)默认0 + } + // 包装类(如Integer/Boolean)默认返回null(保持原有逻辑) + return null; + } +} diff --git a/src/main/java/com/yj/earth/dto/source/DeleteSourceDto.java b/src/main/java/com/yj/earth/dto/source/DeleteSourceDto.java new file mode 100644 index 0000000..bc234b5 --- /dev/null +++ b/src/main/java/com/yj/earth/dto/source/DeleteSourceDto.java @@ -0,0 +1,12 @@ +package com.yj.earth.dto.source; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Data +public class DeleteSourceDto { + @Schema(description = "资源ID列表") + private List ids; +} diff --git a/src/main/java/com/yj/earth/params/AttackArrow.java b/src/main/java/com/yj/earth/params/AttackArrow.java new file mode 100644 index 0000000..5c5e50d --- /dev/null +++ b/src/main/java/com/yj/earth/params/AttackArrow.java @@ -0,0 +1,92 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import java.util.List; + +@Data +@SourceType("attackArrow") +public class AttackArrow { + private String id; + private boolean show; + private String name; + private String color; + private double height; + private int heightMode; + private String areaUnit; + private Line line; + private List positions; + private boolean spreadState; + private boolean loop; + private int spreadTime; + private Label label; + private Attribute attribute; + private String richTextContent; + private CustomView customView; + + @Data + public static class Line { + private double width; + private String color; + } + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } + + @Data + public static class Label { + private String text; + private Boolean show; + private Position position; + private int fontSize; + private int fontFamily; + private String color; + private double lineWidth; + private String lineColor; + private double pixelOffset; + private String[] backgroundColor; + private boolean scaleByDistance; + private int near; + private int far; + } + + @Data + public static class Attribute { + private Link link; + + @Data + public static class Link { + private List content; + + @Data + public static class LinkContent { + private String name; + private String url; + } + } + } + + @Data + public static class CustomView { + private Orientation orientation; + private RelativePosition relativePosition; + + @Data + public static class Orientation { + private double heading; + private double pitch; + private double roll; + } + + @Data + public static class RelativePosition { + private double lng; + private double lat; + private double alt; + } + } +} diff --git a/src/main/java/com/yj/earth/params/Curve.java b/src/main/java/com/yj/earth/params/Curve.java new file mode 100644 index 0000000..73c326d --- /dev/null +++ b/src/main/java/com/yj/earth/params/Curve.java @@ -0,0 +1,91 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import java.util.List; + +@Data +@SourceType("curve") +public class Curve { + private String id; + private String name; + private boolean rotate; + private int space; + private String speed; + private String wordsName; + private String lengthUnit; + private double width; + private String color; + private int type; + private int heightMode; + private boolean noseToTail; + private boolean extend; + private double extendWidth; + private String extendColor; + private boolean show; + private List positions; + private Label label; + private Attribute attribute; + private String richTextContent; + private CustomView customView; + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } + + @Data + public static class Label { + private String text; + private Boolean show; + private Position position; + private int fontSize; + private int fontFamily; + private String color; + private double lineWidth; + private String lineColor; + private double pixelOffset; + private String[] backgroundColor; + private Boolean scaleByDistance; + private int near; + private int far; + } + + @Data + public static class Attribute { + private Link link; + + @Data + public static class Link { + private List content; + + @Data + public static class LinkContent { + private String name; + private String url; + } + } + } + + @Data + public static class CustomView { + private Orientation orientation; + private RelativePosition relativePosition; + + @Data + public static class Orientation { + private double heading; + private double pitch; + private double roll; + } + + @Data + public static class RelativePosition { + private double lng; + private double lat; + private double alt; + } + } +} diff --git a/src/main/java/com/yj/earth/params/DiffuseScan.java b/src/main/java/com/yj/earth/params/DiffuseScan.java new file mode 100644 index 0000000..bf8bda2 --- /dev/null +++ b/src/main/java/com/yj/earth/params/DiffuseScan.java @@ -0,0 +1,69 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import java.util.List; + +@Data +@SourceType("diffuseScan") +public class DiffuseScan { + private String id; + private String name; + private double lng; + private double lat; + private List circle; + private boolean show; + private String color; + private double transparency; + private int speed; + private int count; + private boolean positionEditin; + private CustomView customView; + private String richTextContent; + private Label label; + private Attribute attribute; + + @Data + public static class Circle { + private double radius; + private String color; + } + + @Data + public static class CustomView { + // 空对象,暂无需字段 + } + + @Data + public static class Label { + private boolean show; + private Position position; + private int fontSize; + private int fontFamily; + private String color; + private int lineWidth; + private int pixelOffset; + private List backgroundColor; + private String lineColor; + private boolean scaleByDistance; + private int near; + private int far; + } + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } + + @Data + public static class Attribute { + private Link link; + } + + @Data + public static class Link { + private List content; + } +} diff --git a/src/main/java/com/yj/earth/params/Line.java b/src/main/java/com/yj/earth/params/Line.java new file mode 100644 index 0000000..a460917 --- /dev/null +++ b/src/main/java/com/yj/earth/params/Line.java @@ -0,0 +1,92 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import java.util.List; + +@Data +@SourceType("line") +public class Line { + private String id; + private String name; + private boolean rotate; + private int space; + private String speed; + private String wordsName; + private String lengthUnit; + private double width; + private String color; + private int type; + private int heightMode; + private boolean noseToTail; + private boolean smooth; + private boolean extend; + private double extendWidth; + private String extendColor; + private boolean show; + private List positions; + private Label label; + private Attribute attribute; + private String richTextContent; + private CustomView customView; + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } + + @Data + public static class Label { + private String text; + private Boolean show; + private Position position; + private int fontSize; + private int fontFamily; + private String color; + private double lineWidth; + private String lineColor; + private double pixelOffset; + private String[] backgroundColor; + private Boolean scaleByDistance; + private int near; + private int far; + } + + @Data + public static class Attribute { + private Link link; + + @Data + public static class Link { + private List content; + + @Data + public static class LinkContent { + private String name; + private String url; + } + } + } + + @Data + public static class CustomView { + private Orientation orientation; + private RelativePosition relativePosition; + + @Data + public static class Orientation { + private double heading; + private double pitch; + private double roll; + } + + @Data + public static class RelativePosition { + private double lng; + private double lat; + private double alt; + } + } +} diff --git a/src/main/java/com/yj/earth/params/Panel.java b/src/main/java/com/yj/earth/params/Panel.java new file mode 100644 index 0000000..b43c209 --- /dev/null +++ b/src/main/java/com/yj/earth/params/Panel.java @@ -0,0 +1,89 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import java.util.List; + +@Data +@SourceType("panel") +public class Panel { + private String id; + private boolean show; + private String name; + private String color; + private double height; + private int heightMode; + private String areaUnit; + private Line line; + private List positions; + private Label label; + private Attribute attribute; + private String richTextContent; + private CustomView customView; + + @Data + public static class Line { + private double width; + private String color; + } + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } + + @Data + public static class Label { + private String text; + private Boolean show; + private Position position; + private int fontSize; + private int fontFamily; + private String color; + private double lineWidth; + private String lineColor; + private double pixelOffset; + private String[] backgroundColor; + private boolean scaleByDistance; + private int near; + private int far; + } + + @Data + public static class Attribute { + private Link link; + + @Data + public static class Link { + private List content; + + @Data + public static class LinkContent { + private String name; + private String url; + } + } + } + + @Data + public static class CustomView { + private Orientation orientation; + private RelativePosition relativePosition; + + @Data + public static class Orientation { + private double heading; + private double pitch; + private double roll; + } + + @Data + public static class RelativePosition { + private double lng; + private double lat; + private double alt; + } + } +} diff --git a/src/main/java/com/yj/earth/params/Path.java b/src/main/java/com/yj/earth/params/Path.java new file mode 100644 index 0000000..a7e3f24 --- /dev/null +++ b/src/main/java/com/yj/earth/params/Path.java @@ -0,0 +1,73 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import java.util.List; + +@Data +@SourceType("path") +public class Path { + private String id; + private String name; + private Model model; + private Line line; + private CustomView customView; + private boolean show; + private int speed; + private int delay; + private boolean loop; + private int height; + private boolean ground; + private boolean state; + private boolean routeDirection; + private Label label; + private boolean viewFollow; + private boolean firstPersonView; + private boolean realTimeRoute; + + @Data + public static class Model { + private boolean show; + private String url; + private int pixelSize; + private double heading; + private double pitch; + private double roll; + private int scale; + private String animate; + } + + @Data + public static class Line { + private boolean show; + private List positions; + private boolean smooth; + private boolean noseToTail; + } + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } + + @Data + public static class CustomView { + } + + @Data + public static class Label { + private boolean show; + private int fontSize; + private int fontFamily; + private String color; + private int lineWidth; + private int pixelOffset; + private List backgroundColor; + private String lineColor; + private boolean scaleByDistance; + private int near; + private int far; + } +} diff --git a/src/main/java/com/yj/earth/params/PincerArrow.java b/src/main/java/com/yj/earth/params/PincerArrow.java new file mode 100644 index 0000000..6baa560 --- /dev/null +++ b/src/main/java/com/yj/earth/params/PincerArrow.java @@ -0,0 +1,92 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import java.util.List; + +@Data +@SourceType("pincerArrow") +public class PincerArrow { + private String id; + private boolean show; + private String name; + private String color; + private double height; + private int heightMode; + private String areaUnit; + private Line line; + private List positions; + private boolean spreadState; + private boolean loop; + private int spreadTime; + private Label label; + private Attribute attribute; + private String richTextContent; + private CustomView customView; + + @Data + public static class Line { + private double width; + private String color; + } + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } + + @Data + public static class Label { + private String text; + private Boolean show; + private Position position; + private int fontSize; + private int fontFamily; + private String color; + private double lineWidth; + private String lineColor; + private double pixelOffset; + private String[] backgroundColor; + private boolean scaleByDistance; + private int near; + private int far; + } + + @Data + public static class Attribute { + private Link link; + + @Data + public static class Link { + private List content; + + @Data + public static class LinkContent { + private String name; + private String url; + } + } + } + + @Data + public static class CustomView { + private Orientation orientation; + private RelativePosition relativePosition; + + @Data + public static class Orientation { + private double heading; + private double pitch; + private double roll; + } + + @Data + public static class RelativePosition { + private double lng; + private double lat; + private double alt; + } + } +} diff --git a/src/main/java/com/yj/earth/params/Point.java b/src/main/java/com/yj/earth/params/Point.java new file mode 100644 index 0000000..67659bc --- /dev/null +++ b/src/main/java/com/yj/earth/params/Point.java @@ -0,0 +1,116 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import java.util.List; + +@Data +@SourceType("point") +public class Point { + private String id; + private boolean show; + private String name; + private Position position; + private int heightMode; + private boolean scaleByDistance; + private int near; + private int far; + private Billboard billboard; + private Label label; + private Attribute attribute; + private String richTextContent; + private CustomView customView; + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } + + @Data + public static class Billboard { + private boolean show; + private String image; + private String defaultImage; + private int scale; + } + + @Data + public static class Label { + private String text; + private boolean show; + private int fontFamily; + private int fontSize; + private String color; + } + + @Data + public static class Attribute { + private Link link; + private Vr vr; + private Camera camera; + private Isc isc; + private Goods goods; + + @Data + public static class Link { + private List content; + @Data + public static class LinkContent { + private String name; + private String url; + } + } + + @Data + public static class Vr { + private List content; + @Data + public static class VrContent { + private String name; + private String url; + } + } + + @Data + public static class Camera { + private List content; + } + + @Data + public static class Isc { + private List content; + } + + @Data + public static class Goods { + private List content; + @Data + public static class GoodsContent { + private String id; + private String name; + private String cnt; + } + } + } + + @Data + public static class CustomView { + private Orientation orientation; + private RelativePosition relativePosition; + @Data + public static class Orientation { + private double heading; + private double pitch; + private double roll; + } + + @Data + public static class RelativePosition { + private double lng; + private double lat; + private double alt; + } + } +} diff --git a/src/main/java/com/yj/earth/params/PressModel.java b/src/main/java/com/yj/earth/params/PressModel.java new file mode 100644 index 0000000..5c9a310 --- /dev/null +++ b/src/main/java/com/yj/earth/params/PressModel.java @@ -0,0 +1,21 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +@Data +@SourceType("pressModel") +public class PressModel { + private String modelId; + private double height; + private List positions; + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } +} diff --git a/src/main/java/com/yj/earth/params/RadarScan.java b/src/main/java/com/yj/earth/params/RadarScan.java new file mode 100644 index 0000000..5c4e665 --- /dev/null +++ b/src/main/java/com/yj/earth/params/RadarScan.java @@ -0,0 +1,60 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import java.util.List; + +@Data +@SourceType("radarScan") +public class RadarScan { + private String id; + private String name; + private double lng; + private double lat; + private double radius; + private boolean show; + private String color; + private int speed; + private CustomView customView; + private Label label; + private Attribute attribute; + private String richTextContent; + + @Data + public static class CustomView { + // 空对象,暂无需字段 + } + + @Data + public static class Label { + private boolean show; + private Position position; + private int fontSize; + private int fontFamily; + private String color; + private int lineWidth; + private int pixelOffset; + private List backgroundColor; + private String lineColor; + private boolean scaleByDistance; + private int near; + private int far; + } + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } + + @Data + public static class Attribute { + private Link link; + } + + @Data + public static class Link { + private List content; + } +} diff --git a/src/main/java/com/yj/earth/params/Rectangle.java b/src/main/java/com/yj/earth/params/Rectangle.java new file mode 100644 index 0000000..7f35244 --- /dev/null +++ b/src/main/java/com/yj/earth/params/Rectangle.java @@ -0,0 +1,89 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import java.util.List; + +@Data +@SourceType("rectangle") +public class Rectangle { + private String id; + private boolean show; + private String name; + private String color; + private double height; + private int heightMode; + private String areaUnit; + private Line line; + private List positions; + private Label label; + private Attribute attribute; + private String richTextContent; + private CustomView customView; + + @Data + public static class Line { + private double width; + private String color; + } + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } + + @Data + public static class Label { + private String text; + private Boolean show; + private Position position; + private int fontSize; + private int fontFamily; + private String color; + private double lineWidth; + private String lineColor; + private double pixelOffset; + private String[] backgroundColor; + private boolean scaleByDistance; + private int near; + private int far; + } + + @Data + public static class Attribute { + private Link link; + + @Data + public static class Link { + private List content; + + @Data + public static class LinkContent { + private String name; + private String url; + } + } + } + + @Data + public static class CustomView { + private Orientation orientation; + private RelativePosition relativePosition; + + @Data + public static class Orientation { + private double heading; + private double pitch; + private double roll; + } + + @Data + public static class RelativePosition { + private double lng; + private double lat; + private double alt; + } + } +} diff --git a/src/main/java/com/yj/earth/params/Rendezvous.java b/src/main/java/com/yj/earth/params/Rendezvous.java new file mode 100644 index 0000000..07e5e12 --- /dev/null +++ b/src/main/java/com/yj/earth/params/Rendezvous.java @@ -0,0 +1,89 @@ +package com.yj.earth.params; + +import com.yj.earth.annotation.SourceType; +import lombok.Data; +import java.util.List; + +@Data +@SourceType("rendezvous") +public class Rendezvous { + private String id; + private boolean show; + private String name; + private String color; + private double height; + private int heightMode; + private String areaUnit; + private Line line; + private List positions; + private Label label; + private Attribute attribute; + private String richTextContent; + private CustomView customView; + + @Data + public static class Line { + private double width; + private String color; + } + + @Data + public static class Position { + private double lng; + private double lat; + private double alt; + } + + @Data + public static class Label { + private String text; + private Boolean show; + private Position position; + private int fontSize; + private int fontFamily; + private String color; + private double lineWidth; + private String lineColor; + private double pixelOffset; + private String[] backgroundColor; + private boolean scaleByDistance; + private int near; + private int far; + } + + @Data + public static class Attribute { + private Link link; + + @Data + public static class Link { + private List content; + + @Data + public static class LinkContent { + private String name; + private String url; + } + } + } + + @Data + public static class CustomView { + private Orientation orientation; + private RelativePosition relativePosition; + + @Data + public static class Orientation { + private double heading; + private double pitch; + private double roll; + } + + @Data + public static class RelativePosition { + private double lng; + private double lat; + private double alt; + } + } +}