jsonNode 변환 로직 수정

This commit is contained in:
2026-01-23 09:51:18 +09:00
parent cbbb0cadab
commit 5f9bfaa656

View File

@@ -313,21 +313,6 @@ public class InferenceDetailDto {
String pnu;
String fitState;
@JsonProperty("fitState")
public String getFitState() {
return this.fitState == null ? null : this.fitState;
}
@JsonProperty("fitStateName")
public String fitStateName() {
return ImageryFitStatus.getDescByCode(this.fitState);
}
// @JsonIgnore String gemoStr;
// @JsonIgnore String geomCenterStr;
// JsonNode gemo;
// JsonNode geomCenter;
public Geom(
UUID uuid,
String uid,
@@ -360,6 +345,21 @@ public class InferenceDetailDto {
this.pnu = pnu;
this.fitState = fitState;
}
@JsonProperty("fitState")
public String getFitState() {
return this.fitState == null ? null : this.fitState;
}
// @JsonIgnore String gemoStr;
// @JsonIgnore String geomCenterStr;
// JsonNode gemo;
// JsonNode geomCenter;
@JsonProperty("fitStateName")
public String fitStateName() {
return ImageryFitStatus.getDescByCode(this.fitState);
}
}
@Schema(name = "InferenceResultSearchReq", description = "분석결과 목록 요청 정보")
@@ -458,26 +458,6 @@ public class InferenceDetailDto {
private String bboxGeom;
private String bboxCenterPoint;
@JsonProperty("bboxGeom")
public JsonNode getBboxGeom() {
ObjectMapper mapper = new ObjectMapper();
try {
return mapper.readTree(this.bboxGeom);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
}
@JsonProperty("bboxCenterPoint")
public JsonNode getBboxCenterPoint() {
ObjectMapper mapper = new ObjectMapper();
try {
return mapper.readTree(this.bboxCenterPoint);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
}
public AnalResultInfo(
String analTitle,
String modelVer1,
@@ -523,6 +503,34 @@ public class InferenceDetailDto {
this.elapsedDuration = String.format("%02d:%02d:%02d", h, m, s);
}
}
@JsonProperty("bboxGeom")
public JsonNode getBboxGeom() {
ObjectMapper mapper = new ObjectMapper();
try {
if (this.bboxGeom != null) {
return mapper.readTree(this.bboxGeom);
} else {
return null;
}
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
}
@JsonProperty("bboxCenterPoint")
public JsonNode getBboxCenterPoint() {
ObjectMapper mapper = new ObjectMapper();
try {
if (this.bboxCenterPoint != null) {
return mapper.readTree(this.bboxCenterPoint);
} else {
return null;
}
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
}
}
@Getter