Skip to content

Commit

Permalink
Support retirement of classes #7 (#14)
Browse files Browse the repository at this point in the history
Co-authored-by: Gheorghe Soimu <soimugeo@gmail.com>
  • Loading branch information
soimugeoWB and soimugeo authored Jun 18, 2024
1 parent 4085be6 commit ce3e479
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@


@JsonTypeName("webprotege.entities.ChangeEntityParents")
public record ChangeEntityParentsResult(@JsonProperty("classesWithCycle") @Nonnull Set<OWLEntityData> classesWithCycle) implements Result {
public record ChangeEntityParentsResult(@JsonProperty("classesWithCycle") @Nonnull Set<OWLEntityData> classesWithCycle,
@JsonProperty("classesWithRetiredParents") @Nonnull Set<OWLEntityData> classesWithRetiredParents) implements Result {

}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -9,17 +10,18 @@
@AutoValue
public abstract class EntityStatus implements Serializable, Comparable<EntityStatus> {

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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")));

}
}

0 comments on commit ce3e479

Please sign in to comment.