Skip to content

Commit

Permalink
move jsonproperties to display file
Browse files Browse the repository at this point in the history
  • Loading branch information
Dert1129 committed Nov 8, 2024
1 parent dd326ea commit e35dc35
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public void setRace(String race) {
this.race = race;
}

@JsonProperty("externallink")

public String getExternalLink() {
return externalLink;
}
Expand All @@ -170,7 +170,6 @@ public void setExternalLink(String externalLink) {
this.externalLink = externalLink;
}

@JsonProperty("configtype")
public String getConfigType() {
return configType;
}
Expand All @@ -179,7 +178,7 @@ public void setConfigType(String configType) {
this.configType = configType;
}

@JsonProperty("imagetype")

public String getImageType() {
return imageType;
}
Expand All @@ -188,7 +187,7 @@ public void setImageType(String imageType) {
this.imageType = imageType;
}

@JsonProperty("datatype")

public String getDataType() {
return dataType;
}
Expand All @@ -197,8 +196,7 @@ public void setDataType(String dataType) {
this.dataType = dataType;
}

@Nullable
@JsonProperty("spectracksampleid")

public String getSpectrackSampleId() {
return spectrackSampleId;
}
Expand All @@ -207,8 +205,7 @@ public void setSpectrackSampleId(String spectrackSampleId) {
this.spectrackSampleId = spectrackSampleId;
}

@Nullable
@JsonProperty("redcapid")

public String getRedcapId() {
return redcapId;
}
Expand All @@ -217,7 +214,7 @@ public void setRedcapId(String redcapId) {
this.redcapId = redcapId;
}

@JsonProperty("participantid")

public int getParticipantId() {
return participantId;
}
Expand All @@ -226,8 +223,7 @@ public void setParticipantId(int participantId) {
this.participantId = participantId;
}

@Nullable
@JsonProperty("age")

public String getAge() {
return age;
}
Expand All @@ -236,8 +232,7 @@ public void setAge(String age) {
this.age = age;
}

@Nullable
@JsonProperty("protocol")

public String getProtocol() {
return protocol;
}
Expand All @@ -246,8 +241,7 @@ public void setProtocol(String protocol) {
this.protocol = protocol;
}

@Nullable
@JsonProperty("sampletype")

public String getSampleType() {
return sampleType;
}
Expand All @@ -256,8 +250,7 @@ public void setSampleType(String sampleType) {
this.sampleType = sampleType;
}

@Nullable
@JsonProperty("sex")

public String getSex() {
return sex;
}
Expand All @@ -266,8 +259,7 @@ public void setSex(String sex) {
this.sex = sex;
}

@Nullable
@JsonProperty("tissuesource")

public String getTissueSource() {
return tissueSource;
}
Expand All @@ -276,8 +268,7 @@ public void setTissueSource(String tissueSource) {
this.tissueSource = tissueSource;
}

@Nullable
@JsonProperty("enrollmentcategory")

public String getEnrollmentCategory(){
return enrollmentCategory;
}
Expand All @@ -286,7 +277,7 @@ public void setEnrollmentCategory(String enrollmentCategory){
this.enrollmentCategory = enrollmentCategory;
}

@JsonIgnore

public Double getReleaseVersion(){
return releaseVersion;
}
Expand All @@ -295,7 +286,7 @@ public void setReleaseVersion(Double releaseVersion){
this.releaseVersion = releaseVersion;
}

@JsonProperty("releaseversion")

public String getReleaseVersionDisplay() {
return releaseVersionDisplay;
}
Expand All @@ -304,10 +295,11 @@ public void setReleaseVersionDisplay(String releaseVersionDisplay) {
this.releaseVersionDisplay = releaseVersionDisplay;
}

@JsonProperty("dlfileid")

public String getDlFileId() {
return null;
}

@Nullable
@JsonProperty("relatedfiles")
public List<File> getRelatedFiles() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
package org.kpmp.spatialViewerDataset;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import org.kpmp.file.File;
import org.springframework.lang.Nullable;

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

public class SpatialViewerExternalLinkDatasetDisplay {
private String externalLink;
private String configType;
private String imageType;
private String dataType;
private String spectrackSampleId;
private int participantId;
private Double releaseVersion;
private String releaseVersionDisplay;
private Set<String> redcapId;
private Set<String> age;
private Set<String> protocol;
Expand Down Expand Up @@ -95,7 +105,81 @@ public SpatialViewerExternalLinkDatasetDisplay(SpatialViewerExternalLinkDataset

}

@JsonProperty("image_type_sort")
public String getImageTypeSort() {
return imageType.toLowerCase();
}

@JsonProperty("participant_id_sort")
public String getParticipantIdSort() {
if (redcapId.size() == 1) {
return redcapId.toString().replace("-", "").replace("[", "").replace("]", "");
} else {
return "Multiple Participants";
}
}

@JsonIgnore
public int getFileId() {
return (Integer) null;
}
@JsonIgnore

public Long getFileSize() {
return null;
}
@JsonIgnore

public String getPackageId() {
return null;
}
@JsonIgnore

public String getLevel() {
return null;
}

@JsonIgnore
public String getFileName() {
return null;
}
@JsonIgnore

public String getFileNameSort() {
return null;
}

@Nullable
@JsonProperty("relatedfiles")
public List<File> getRelatedFiles() {
return new ArrayList<>();
}

@JsonProperty("dlfileid")
public String getDlFileId() {
return null;
}

@JsonProperty("releaseversion")
public String getReleaseVersionDisplay() {
return releaseVersionDisplay;
}

public void setReleaseVersionDisplay(String releaseVersionDisplay){
this.releaseVersionDisplay = releaseVersionDisplay;
}

@JsonIgnore
public Double getReleaseVersion() {
return releaseVersion;
}

public void setReleaseVersion(Double releaseVersion){
this.releaseVersion = releaseVersion;
}


@JsonProperty("externallink")
public String getExternalLink() {
return this.externalLink;
}
Expand All @@ -104,6 +188,7 @@ public void setExternalLink(String externalLink) {
this.externalLink = externalLink;
}

@JsonProperty("configtype")
public String getConfigType() {
return this.configType;
}
Expand All @@ -112,6 +197,7 @@ public void setConfigType(String configType) {
this.configType = configType;
}

@JsonProperty("imagetype")
public String getImageType() {
return this.imageType;
}
Expand All @@ -120,6 +206,7 @@ public void setImageType(String imageType) {
this.imageType = imageType;
}

@JsonProperty("datatype")
public String getDataType() {
return this.dataType;
}
Expand All @@ -128,6 +215,8 @@ public void setDataType(String dataType) {
this.dataType = dataType;
}

@Nullable
@JsonProperty("spectracksampleid")
public String getSpectrackSampleId() {
return this.spectrackSampleId;
}
Expand All @@ -136,6 +225,7 @@ public void setSpectrackSampleId(String spectrackSampleId) {
this.spectrackSampleId = spectrackSampleId;
}

@JsonProperty("participantid")
public int getParticipantId() {
return this.participantId;
}
Expand All @@ -144,7 +234,8 @@ public void setParticipantId(int participantId) {
this.participantId = participantId;
}


@Nullable
@JsonProperty("redcapid")
public Set<String> getRedcapId() {
if(redcapId.isEmpty()){
return null;
Expand All @@ -157,6 +248,8 @@ public void setRedcapId(Set<String> redcapId) {
this.redcapId = redcapId;
}

@Nullable
@JsonProperty("age")
public Set<String> getAge() {
if(redcapId.isEmpty()){
return null;
Expand All @@ -169,6 +262,8 @@ public void setAge(Set<String> age) {
this.age = age;
}

@Nullable
@JsonProperty("protocol")
public Set<String> getProtocol() {
if(protocol.isEmpty()) {
return null;
Expand All @@ -181,6 +276,8 @@ public void setProtocol(Set<String> protocol) {
this.protocol = protocol;
}

@Nullable
@JsonProperty("sampletype")
public Set<String> getSampleType() {
if(sampleType.isEmpty()){
return null;
Expand All @@ -193,6 +290,8 @@ public void setSampleType(Set<String> sampleType) {
this.sampleType = sampleType;
}

@Nullable
@JsonProperty("sex")
public Set<String> getSex() {
if(sex.isEmpty()){
return null;
Expand All @@ -205,6 +304,8 @@ public void setSex(Set<String> sex) {
this.sex = sex;
}

@Nullable
@JsonProperty("tissuesource")
public Set<String> getTissueSource() {
if(tissueSource.isEmpty()){
return null;
Expand All @@ -217,6 +318,8 @@ public void setTissueSource(Set<String> tissueSource) {
this.tissueSource = tissueSource;
}

@Nullable
@JsonProperty("enrollmentcategory")
public Set<String> getEnrollmentCategory() {
if(enrollmentCategory.isEmpty()){
return null;
Expand Down

0 comments on commit e35dc35

Please sign in to comment.