From b3dd366a1a99f971084433a6e1c70b5ff973a516 Mon Sep 17 00:00:00 2001 From: alaskowski <alaskowski@ethz.ch> Date: Mon, 16 Oct 2023 20:08:58 +0200 Subject: [PATCH] BIS-711: Added DTOs for ImagingDataSets --- .../v3/dto/imaging/ImagingDataSetConfig.java | 147 ++++++++++++++++++ .../v3/dto/imaging/ImagingDataSetControl.java | 144 +++++++++++++++++ .../v3/dto/imaging/ImagingDataSetImage.java | 62 ++++++++ .../v3/dto/imaging/ImagingDataSetPreview.java | 104 +++++++++++++ .../dss/dto/imaging/ImagingDataSetConfig.js | 88 +++++++++++ .../dss/dto/imaging/ImagingDataSetControl.js | 84 ++++++++++ .../v3/dss/dto/imaging/ImagingDataSetImage.js | 34 ++++ .../dss/dto/imaging/ImagingDataSetPreview.js | 55 +++++++ 8 files changed, 718 insertions(+) create mode 100644 api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetConfig.java create mode 100644 api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetControl.java create mode 100644 api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetImage.java create mode 100644 api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetPreview.java create mode 100644 api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetConfig.js create mode 100644 api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetControl.js create mode 100644 api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetImage.js create mode 100644 api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetPreview.js diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetConfig.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetConfig.java new file mode 100644 index 00000000000..c7a1354a927 --- /dev/null +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetConfig.java @@ -0,0 +1,147 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package ch.ethz.sis.openbis.generic.dssapi.v3.dto.imaging; + +import ch.systemsx.cisd.base.annotation.JsonObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +@JsonObject("dss.dto.imaging.ImagingDataSetConfig") +public class ImagingDataSetConfig implements Serializable +{ + private static final long serialVersionUID = 1L; + + + @JsonProperty + private String adaptor; + + @JsonProperty + private Double version; + + @JsonProperty + private List<Integer> speeds; + + @JsonProperty + private List<String> resolutions; + + @JsonProperty + private boolean playable; + + @JsonProperty + private List<ImagingDataSetControl> exports; + + @JsonProperty + private List<ImagingDataSetControl> inputs; + + @JsonProperty + private Map<String, String> metaData; + + @JsonIgnore + public String getAdaptor() + { + return adaptor; + } + + public void setAdaptor(String adaptor) + { + this.adaptor = adaptor; + } + + @JsonIgnore + public Double getVersion() + { + return version; + } + + public void setVersion(Double version) + { + this.version = version; + } + + @JsonIgnore + public List<Integer> getSpeeds() + { + return speeds; + } + + public void setSpeeds(List<Integer> speeds) + { + this.speeds = speeds; + } + + @JsonIgnore + public List<String> getResolutions() + { + return resolutions; + } + + public void setResolutions(List<String> resolutions) + { + this.resolutions = resolutions; + } + + @JsonIgnore + public boolean isPlayable() + { + return playable; + } + + public void setPlayable(boolean playable) + { + this.playable = playable; + } + + @JsonIgnore + public List<ImagingDataSetControl> getExports() + { + return exports; + } + + public void setExports( + List<ImagingDataSetControl> exports) + { + this.exports = exports; + } + + @JsonIgnore + public List<ImagingDataSetControl> getInputs() + { + return inputs; + } + + public void setInputs( + List<ImagingDataSetControl> inputs) + { + this.inputs = inputs; + } + + @JsonIgnore + public Map<String, String> getMetaData() + { + return metaData; + } + + public void setMetaData(Map<String, String> metaData) + { + this.metaData = metaData; + } +} diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetControl.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetControl.java new file mode 100644 index 00000000000..685f67a411a --- /dev/null +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetControl.java @@ -0,0 +1,144 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package ch.ethz.sis.openbis.generic.dssapi.v3.dto.imaging; + +import ch.systemsx.cisd.base.annotation.JsonObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +@JsonObject("dss.dto.imaging.ImagingDataSetControl") +public class ImagingDataSetControl implements Serializable +{ + private static final long serialVersionUID = 1L; + + @JsonProperty + private String label; + + @JsonProperty + private String type; + + @JsonProperty + private List<String> values; + + @JsonProperty + private List<Integer> range; + + @JsonProperty + private boolean multiselect; + + @JsonProperty + private Boolean playable; + + @JsonProperty + private List<Integer> speeds; + + @JsonProperty + private Map<String, String> metaData; + + @JsonIgnore + public String getLabel() + { + return label; + } + + public void setLabel(String label) + { + this.label = label; + } + + @JsonIgnore + public String getType() + { + return type; + } + + public void setType(String type) + { + this.type = type; + } + + @JsonIgnore + public List<String> getValues() + { + return values; + } + + public void setValues(List<String> values) + { + this.values = values; + } + + @JsonIgnore + public boolean isMultiselect() + { + return multiselect; + } + + public void setMultiselect(boolean multiselect) + { + this.multiselect = multiselect; + } + + @JsonIgnore + public Boolean getPlayable() + { + return playable; + } + + public void setPlayable(Boolean playable) + { + this.playable = playable; + } + + @JsonIgnore + public List<Integer> getSpeeds() + { + return speeds; + } + + public void setSpeeds(List<Integer> speeds) + { + this.speeds = speeds; + } + + @JsonIgnore + public List<Integer> getRange() + { + return range; + } + + public void setRange(List<Integer> range) + { + this.range = range; + } + + @JsonIgnore + public Map<String, String> getMetaData() + { + return metaData; + } + + public void setMetaData(Map<String, String> metaData) + { + this.metaData = metaData; + } +} diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetImage.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetImage.java new file mode 100644 index 00000000000..cd495e81399 --- /dev/null +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetImage.java @@ -0,0 +1,62 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package ch.ethz.sis.openbis.generic.dssapi.v3.dto.imaging; + +import ch.systemsx.cisd.base.annotation.JsonObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +@JsonObject("dss.dto.imaging.ImagingDataSetImage") +public class ImagingDataSetImage implements Serializable +{ + private static final long serialVersionUID = 1L; + + @JsonProperty + private List<ImagingDataSetPreview> previews; + + @JsonProperty + private Map<String, String> metaData; + + @JsonIgnore + public List<ImagingDataSetPreview> getPreviews() + { + return previews; + } + + public void setPreviews( + List<ImagingDataSetPreview> previews) + { + this.previews = previews; + } + + @JsonIgnore + public Map<String, String> getMetaData() + { + return metaData; + } + + public void setMetaData(Map<String, String> metaData) + { + this.metaData = metaData; + } + +} diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetPreview.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetPreview.java new file mode 100644 index 00000000000..5bbbf46e88a --- /dev/null +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/imaging/ImagingDataSetPreview.java @@ -0,0 +1,104 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package ch.ethz.sis.openbis.generic.dssapi.v3.dto.imaging; + +import ch.systemsx.cisd.base.annotation.JsonObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +@JsonObject("dss.dto.imaging.ImagingDataSetPreview") +public class ImagingDataSetPreview implements Serializable +{ + private static final long serialVersionUID = 1L; + + @JsonProperty + private Map<String, List<Serializable>> config; + + @JsonProperty + private String format; + + @JsonProperty + private String bytes; + + @JsonProperty + private boolean show; + + @JsonProperty + private Map<String, String> metaData; + + + @JsonIgnore + public Map<String, List<Serializable>> getConfig() + { + return config; + } + + public void setConfig(Map<String, List<Serializable>> config) + { + this.config = config; + } + + @JsonIgnore + public String getFormat() + { + return format; + } + + public void setFormat(String format) + { + this.format = format; + } + + @JsonIgnore + public String getBytes() + { + return bytes; + } + + public void setBytes(String bytes) + { + this.bytes = bytes; + } + + @JsonIgnore + public boolean isShow() + { + return show; + } + + public void setShow(boolean show) + { + this.show = show; + } + + @JsonIgnore + public Map<String, String> getMetaData() + { + return metaData; + } + + public void setMetaData(Map<String, String> metaData) + { + this.metaData = metaData; + } + +} diff --git a/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetConfig.js b/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetConfig.js new file mode 100644 index 00000000000..d1d907591d1 --- /dev/null +++ b/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetConfig.js @@ -0,0 +1,88 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var ImagingDataSetConfig = function() { + }; + stjs.extend(ImagingDataSetConfig, null, [], function(constructor, prototype) { + prototype['@type'] = 'dss.dto.imaging.ImagingDataSetConfig'; + constructor.serialVersionUID = 1; + prototype.adaptor = null; + prototype.version = null; + prototype.speeds = null; + prototype.resolutions = null; + prototype.playable = null; + prototype.exports = null; + prototype.inputs = null; + prototype.metaData = null; + + prototype.getAdaptor = function() { + return this.adaptor; + }; + prototype.setAdaptor = function(adaptor) { + this.adaptor = adaptor; + }; + prototype.getVersion = function() { + return this.version; + }; + prototype.setVersion = function(version) { + this.version = version; + }; + prototype.getSpeeds = function() { + return this.speeds; + }; + prototype.setSpeeds = function(speeds) { + this.speeds = speeds; + }; + prototype.getResolutions = function() { + return this.resolutions; + }; + prototype.setResolutions = function(resolutions) { + this.resolutions = resolutions; + }; + prototype.getPlayable = function() { + return this.playable; + }; + prototype.setPlayable = function(playable) { + this.playable = playable; + }; + prototype.getExports = function() { + return this.exports; + }; + prototype.setExports = function(exports) { + this.exports = exports; + }; + prototype.getInputs = function() { + return this.inputs; + }; + prototype.setInputs = function(inputs) { + this.inputs = inputs; + }; + prototype.getMetaData = function() { + return this.metaData; + }; + prototype.setMetaData = function(metaData) { + this.metaData = metaData; + }; + + }, { + resolutions : { + name : "List", + arguments : [ "String"] + }, + speeds : { + name : "List", + arguments : [ "Integer"] + }, + exports : { + name : "List", + arguments : [ "ImagingDataSetControl"] + }, + inputs : { + name : "List", + arguments : [ "ImagingDataSetControl"] + }, + metaData : { + name : "Map", + arguments : [ "String", "String" ] + } + }); + return ImagingDataSetConfig; +}) \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetControl.js b/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetControl.js new file mode 100644 index 00000000000..8033508ad59 --- /dev/null +++ b/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetControl.js @@ -0,0 +1,84 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var ImagingDataSetControl = function() { + }; + stjs.extend(ImagingDataSetControl, null, [], function(constructor, prototype) { + prototype['@type'] = 'dss.dto.imaging.ImagingDataSetControl'; + constructor.serialVersionUID = 1; + prototype.label = null; + prototype.type = null; + prototype.values = null; + prototype.range = null; + prototype.multiselect = null; + prototype.playable = null; + prototype.speeds = null; + prototype.metaData = null; + + prototype.getLabel = function() { + return this.label; + }; + prototype.setLabel = function(label) { + this.label = label; + }; + prototype.getType = function() { + return this.type; + }; + prototype.setType = function(type) { + this.type = type; + }; + prototype.getValues = function() { + return this.values; + }; + prototype.setValues = function(values) { + this.values = values; + }; + prototype.getRange = function() { + return this.range; + }; + prototype.setRange = function(range) { + this.range = range; + }; + prototype.getMultiselect = function() { + return this.multiselect; + }; + prototype.setMultiselect = function(multiselect) { + this.multiselect = multiselect; + }; + prototype.getPlayable = function() { + return this.playable; + }; + prototype.setPlayable = function(playable) { + this.playable = playable; + }; + prototype.getSpeeds = function() { + return this.speeds; + }; + prototype.setSpeeds = function(speeds) { + this.speeds = speeds; + }; + prototype.getMetaData = function() { + return this.metaData; + }; + prototype.setMetaData = function(metaData) { + this.metaData = metaData; + }; + + }, { + values : { + name : "List", + arguments : [ "String"] + }, + range : { + name : "List", + arguments : [ "Integer"] + }, + speeds : { + name : "List", + arguments : [ "Integer"] + }, + metaData : { + name : "Map", + arguments : [ "String", "String" ] + } + }); + return ImagingDataSetControl; +}) \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetImage.js b/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetImage.js new file mode 100644 index 00000000000..d7906ab8bee --- /dev/null +++ b/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetImage.js @@ -0,0 +1,34 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var ImagingDataSetImage = function() { + }; + stjs.extend(ImagingDataSetImage, null, [], function(constructor, prototype) { + prototype['@type'] = 'dss.dto.imaging.ImagingDataSetImage'; + constructor.serialVersionUID = 1; + prototype.previews = null; + prototype.metaData = null; + + prototype.getPreviews = function() { + return this.previews; + }; + prototype.setPreviews = function(previews) { + this.previews = previews; + }; + prototype.getMetaData = function() { + return this.metaData; + }; + prototype.setMetaData = function(metaData) { + this.metaData = metaData; + }; + + }, { + previews : { + name : "List", + arguments : [ "ImagingDataSetPreview"] + }, + metaData : { + name : "Map", + arguments : [ "String", "String" ] + } + }); + return ImagingDataSetImage; +}) \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetPreview.js b/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetPreview.js new file mode 100644 index 00000000000..dbf83517ea0 --- /dev/null +++ b/api-openbis-javascript/src/v3/dss/dto/imaging/ImagingDataSetPreview.js @@ -0,0 +1,55 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var ImagingDataSetPreview = function() { + }; + stjs.extend(ImagingDataSetPreview, null, [], function(constructor, prototype) { + prototype['@type'] = 'dss.dto.imaging.ImagingDataSetPreview'; + constructor.serialVersionUID = 1; + prototype.config = null; + prototype.format = null; + prototype.bytes = null; + prototype.show = null; + prototype.metaData = null; + + prototype.getConfig = function() { + return this.config; + }; + prototype.setConfig = function(config) { + this.config = config; + }; + prototype.getFormat = function() { + return this.format; + }; + prototype.setFormat = function(format) { + this.format = format; + }; + prototype.getBytes = function() { + return this.bytes; + }; + prototype.setBytes = function(bytes) { + this.bytes = bytes; + }; + prototype.isShow = function() { + return this.show; + }; + prototype.setShow = function(show) { + this.show = show; + }; + prototype.getMetaData = function() { + return this.metaData; + }; + prototype.setMetaData = function(metaData) { + this.metaData = metaData; + }; + + }, { + config : { + name : "Map", + arguments : [ "String", "List" ] + }, + metaData : { + name : "Map", + arguments : [ "String", "String" ] + } + }); + return ImagingDataSetPreview; +}) \ No newline at end of file -- GitLab