Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support retirement of classes #7 #14

Merged
merged 5 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")));

}
}
Loading