diff --git a/src/main/java/edu/stanford/protege/webprotege/bulkop/ChangeEntityParentsResult.java b/src/main/java/edu/stanford/protege/webprotege/bulkop/ChangeEntityParentsResult.java index fcd9954..2568f71 100644 --- a/src/main/java/edu/stanford/protege/webprotege/bulkop/ChangeEntityParentsResult.java +++ b/src/main/java/edu/stanford/protege/webprotege/bulkop/ChangeEntityParentsResult.java @@ -16,6 +16,7 @@ @JsonTypeName("webprotege.entities.ChangeEntityParents") -public record ChangeEntityParentsResult(@JsonProperty("classesWithCycle") @Nonnull Set classesWithCycle) implements Result { +public record ChangeEntityParentsResult(@JsonProperty("classesWithCycle") @Nonnull Set classesWithCycle, + @JsonProperty("classesWithRetiredParents") @Nonnull Set classesWithRetiredParents) implements Result { } diff --git a/src/main/java/edu/stanford/protege/webprotege/entity/EntityStatus.java b/src/main/java/edu/stanford/protege/webprotege/entity/EntityStatus.java index 46f3ff7..57708cb 100644 --- a/src/main/java/edu/stanford/protege/webprotege/entity/EntityStatus.java +++ b/src/main/java/edu/stanford/protege/webprotege/entity/EntityStatus.java @@ -1,6 +1,7 @@ package edu.stanford.protege.webprotege.entity; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.google.auto.value.AutoValue; import javax.annotation.Nonnull; @@ -9,17 +10,18 @@ @AutoValue public abstract class EntityStatus implements Serializable, Comparable { + public static final String STATUS = "status"; + @JsonCreator - public static EntityStatus get(@Nonnull @JsonProperty("status") String status) { + public static EntityStatus get(@Nonnull @JsonProperty(STATUS) String status) { return new AutoValue_EntityStatus(status); } - @JsonProperty("status") + @JsonProperty(STATUS) @Nonnull public abstract String getStatus(); - @Override public int compareTo(EntityStatus o) { return this.getStatus().compareToIgnoreCase(o.getStatus()); diff --git a/src/test/java/edu/stanford/protege/webprotege/entity/EntityNode_Serialization_TestCase.java b/src/test/java/edu/stanford/protege/webprotege/entity/EntityNode_Serialization_TestCase.java index 33fd951..8c00564 100644 --- a/src/test/java/edu/stanford/protege/webprotege/entity/EntityNode_Serialization_TestCase.java +++ b/src/test/java/edu/stanford/protege/webprotege/entity/EntityNode_Serialization_TestCase.java @@ -36,7 +36,7 @@ public void shouldSerializeNode() throws IOException { "The tag description", Color.getWhite(), Color.getWhite(), ImmutableList.of())), - ImmutableSet.of()); + ImmutableSet.of(EntityStatus.get("status"))); } }