Skip to content

Commit

Permalink
fixed serialization issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsilaghi committed Apr 17, 2024
1 parent 7086f21 commit a263e4e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>edu.stanford.protege</groupId>
<artifactId>webprotege-backend-api</artifactId>
<version>0.9.5-SNAPSHOT</version>
<version>0.9.7</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -76,7 +76,7 @@
<dependency>
<groupId>edu.stanford.protege</groupId>
<artifactId>webprotege-common</artifactId>
<version>0.9.4</version>
<version>0.9.5</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -106,7 +106,7 @@
<dependency>
<groupId>edu.stanford.protege</groupId>
<artifactId>webprotege-ontology-change</artifactId>
<version>0.9.2</version>
<version>0.9.3-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package edu.stanford.protege.webprotege.event;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import edu.stanford.protege.webprotege.common.EventId;
import edu.stanford.protege.webprotege.common.ProjectEvent;
Expand All @@ -19,6 +20,7 @@
*/

@JsonTypeName("webprotege.events.ontologies.OntologyBrowserTextChanged")
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "type")
public record OntologyBrowserTextChangedEvent(EventId eventId,
ProjectId projectId,
OWLOntologyID ontologyID,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
package edu.stanford.protege.webprotege.hierarchy;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonSubTypes;

import java.util.function.Consumer;

/**
* Matthew Horridge
* Stanford Center for Biomedical Informatics Research
* 2021-04-20
*/
@JsonSubTypes({
@JsonSubTypes.Type(AddEdge.class),
@JsonSubTypes.Type(RemoveEdge.class)
})
public abstract class EdgeChange<U> extends GraphModelChange<U> {

private final GraphEdge<U> edge;

private GraphEdge<U> edge;

protected EdgeChange() {

}

protected EdgeChange(GraphEdge<U> edge) {
this.edge = edge;
}

@JsonIgnore
public GraphNode<U> getPredecessor() {
return edge.getPredecessor();
}

@JsonIgnore
public GraphNode<U> getSuccessor() {
return edge.getSuccessor();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
* 2021-04-20
*/
@JsonSubTypes({
@Type(AddEdge.class),
@Type(RemoveEdge.class),
@Type(EdgeChange.class),
@Type(AddRootNode.class),
@Type(UpdateUserObject.class),
@Type(RemoveRootNode.class)
})
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "changeType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
public abstract class GraphModelChange<U> {

public GraphModelChange() {
Expand Down

0 comments on commit a263e4e

Please sign in to comment.