Skip to content
Snippets Groups Projects
Commit cb2cf1cc authored by Adam Laskowski's avatar Adam Laskowski
Browse files

BIS-711: Added DTOs for ImagingDataSets

parent 8bdec9f7
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
/*
* 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.ethz.sis.openbis.generic.asapi.v3.dto.common.property.PropertiesDeserializer;
import ch.systemsx.cisd.base.annotation.JsonObject;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
@JsonObject("dss.dto.imaging.ImagingDataSetExport")
public class ImagingDataSetExport implements Serializable
{
private static final long serialVersionUID = 1L;
@JsonProperty
@JsonDeserialize(contentUsing = PropertiesDeserializer.class)
private Map<String, Serializable> config;
@JsonProperty
private String format;
@JsonProperty
private String bytes;
@JsonProperty
private boolean show;
@JsonProperty
private Map<String, String> metaData;
@JsonIgnore
public Map<String, Serializable> getConfig()
{
return config;
}
public void setConfig(Map<String, 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;
}
@Override
public String toString()
{
return "ImagingDataSetExport";
}
}
......@@ -17,9 +17,11 @@
package ch.ethz.sis.openbis.generic.dssapi.v3.dto.imaging;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.property.PropertiesDeserializer;
import ch.systemsx.cisd.base.annotation.JsonObject;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.io.Serializable;
import java.util.List;
......@@ -31,7 +33,8 @@ public class ImagingDataSetPreview implements Serializable
private static final long serialVersionUID = 1L;
@JsonProperty
private Map<String, List<Serializable>> config;
@JsonDeserialize(contentUsing = PropertiesDeserializer.class)
private Map<String, Serializable> config;
@JsonProperty
private String format;
......@@ -47,12 +50,12 @@ public class ImagingDataSetPreview implements Serializable
@JsonIgnore
public Map<String, List<Serializable>> getConfig()
public Map<String, Serializable> getConfig()
{
return config;
}
public void setConfig(Map<String, List<Serializable>> config)
public void setConfig(Map<String, Serializable> config)
{
this.config = config;
}
......@@ -104,7 +107,7 @@ public class ImagingDataSetPreview implements Serializable
@Override
public String toString()
{
return "ImagingDataSetPreview:";
return "ImagingDataSetPreview";
}
}
......@@ -1268,6 +1268,7 @@ IImportData
ILocatorTypeId
ImagingDataSetConfig
ImagingDataSetControl
ImagingDataSetExport
ImagingDataSetImage
ImagingDataSetPreview
IMaterialId
......
define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) {
var ImagingDataSetExport = function() {
};
stjs.extend(ImagingDataSetExport, null, [], function(constructor, prototype) {
prototype['@type'] = 'dss.dto.imaging.ImagingDataSetExport';
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;
};
prototype.toString = function() {
return "ImagingDataSetExport: " + this.config;
};
}, {
config : {
name : "Map",
arguments : [ "String", "Serializable>" ]
},
metaData : {
name : "Map",
arguments : [ "String", "String" ]
}
});
return ImagingDataSetExport;
})
\ No newline at end of file
......@@ -987,6 +987,7 @@ var fullTypes = [
"dss/dto/service/id/ICustomDSSServiceId",
"dss/dto/imaging/ImagingDataSetConfig",
"dss/dto/imaging/ImagingDataSetControl",
"dss/dto/imaging/ImagingDataSetExport",
"dss/dto/imaging/ImagingDataSetImage",
"dss/dto/imaging/ImagingDataSetPreview",
"util/DateFormat",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment