Skip to content

Commit

Permalink
wip fixing serialization issues
Browse files Browse the repository at this point in the history
  • Loading branch information
soimugeo committed Oct 1, 2024
1 parent 43c2a0d commit e1f6525
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@
@Type(value = GetPostCoordinationTableConfigurationAction.class),
@Type(value = GetProjectChangesForHistoryViewAction.class),
@Type(value = ProcessUploadedLinearizationAction.class),
@Type(value = ProcessUploadedPostCoordinationAction.class)
@Type(value = ProcessUploadedPostCoordinationAction.class),
@Type(value = GetPostCoordinationAxisToGenericScaleAction.class)
})
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME)
public interface Action<R extends Result> extends IsSerializable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@
@JsonSubTypes.Type(ProcessUploadedPostCoordinationResult.class),
@JsonSubTypes.Type(GetPostCoordinationTableConfigurationResult.class),
@JsonSubTypes.Type(GetProjectChangesForHistoryViewResult.class),
@JsonSubTypes.Type(ProcessUploadedLinearizationResult.class)
@JsonSubTypes.Type(ProcessUploadedLinearizationResult.class),
@JsonSubTypes.Type(GetPostCoordinationAxisToGenericScaleResult.class),
})
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME)
public interface Result extends IsSerializable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,10 @@ public class RpcWhiteList implements IsSerializable, Action, Result {
ProcessUploadedLinearizationAction _ProcessUploadedLinearizationAction;
ProcessUploadedLinearizationResult _ProcessUploadedLinearizationResult;


GetPostCoordinationAxisToGenericScaleAction _GetPostCoordinationAxisToGenericScaleAction;
GetPostCoordinationAxisToGenericScaleResult _GetPostCoordinationAxisToGenericScaleResult;

public RpcWhiteList() {
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package edu.stanford.bmir.protege.web.shared.postcoordination;

import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.*;
import com.google.auto.value.AutoValue;
import com.google.common.annotations.GwtCompatible;
import edu.stanford.bmir.protege.web.shared.dispatch.Result;
Expand All @@ -13,4 +13,10 @@
public abstract class GetPostCoordinationAxisToGenericScaleResult implements Result {

public abstract List<PostCoordinationAxisToGenericScale> getPostCoordinationAxisToGenericScales();


@JsonCreator
public static GetPostCoordinationAxisToGenericScaleResult create(@JsonProperty("postcoordinationAxisToGenericScales") List<PostCoordinationAxisToGenericScale> postCoordinationAxisToGenericScales) {
return new AutoValue_GetPostCoordinationAxisToGenericScaleResult(postCoordinationAxisToGenericScales);
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
package edu.stanford.bmir.protege.web.shared.postcoordination;

public class PostCoordinationAxisToGenericScale {
private final String postcoordinationAxis;
private final String genericPostcoordinationScaleTopClass;
private final String allowMultiValue;
import com.fasterxml.jackson.annotation.*;
import com.google.common.annotations.GwtCompatible;
import com.google.gwt.user.client.rpc.IsSerializable;
import edu.stanford.bmir.protege.web.shared.annotations.GwtSerializationConstructor;

import java.io.Serializable;

@GwtCompatible(serializable = true)
public class PostCoordinationAxisToGenericScale implements IsSerializable, Serializable {

private String postcoordinationAxis;
private String genericPostcoordinationScaleTopClass;
private String allowMultiValue;

@GwtSerializationConstructor
private PostCoordinationAxisToGenericScale() {
}

public PostCoordinationAxisToGenericScale(String postcoordinationAxis,
String genericPostcoordinationScaleTopClass,
Expand All @@ -13,20 +26,24 @@ public PostCoordinationAxisToGenericScale(String postcoordinationAxis,
this.allowMultiValue = allowMultiValue;
}

public PostCoordinationAxisToGenericScale create(String postcoordinationAxis,
String genericPostcoordinationScaleTopClass,
String allowMultiValue) {
@JsonCreator
public PostCoordinationAxisToGenericScale create(@JsonProperty("postcoordinationAxis") String postcoordinationAxis,
@JsonProperty("genericPostcoordinationScaleTopClass") String genericPostcoordinationScaleTopClass,
@JsonProperty("allowMultiValue") String allowMultiValue) {
return new PostCoordinationAxisToGenericScale(postcoordinationAxis, genericPostcoordinationScaleTopClass, allowMultiValue);
}

@JsonProperty("postcoordinationAxis")
public String getPostcoordinationAxis() {
return postcoordinationAxis;
}

@JsonProperty("genericPostcoordinationScaleTopClass")
public String getGenericPostcoordinationScaleTopClass() {
return genericPostcoordinationScaleTopClass;
}

@JsonProperty("allowMultiValue")
public String getAllowMultiValue() {
return allowMultiValue;
}
Expand Down

0 comments on commit e1f6525

Please sign in to comment.