From 35d0f442827ef6c3cef765ddd36caadf07970cd0 Mon Sep 17 00:00:00 2001 From: gakin <gakin> Date: Mon, 26 Sep 2016 13:35:44 +0000 Subject: [PATCH] SSDM-4151 : Add CRC32 checksum attribute to DataSetFile SVN: 37115 --- .../server/dssapi/v3/DataStoreServerApi.java | 1 + .../v3/dto/datasetfile/DataSetFile.java | 20 ++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dssapi/v3/DataStoreServerApi.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dssapi/v3/DataStoreServerApi.java index ce1aa5e080a..ed34d8ac924 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dssapi/v3/DataStoreServerApi.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dssapi/v3/DataStoreServerApi.java @@ -184,6 +184,7 @@ public class DataStoreServerApi extends AbstractDssServiceRpc<IDataStoreServerAp if (node.isDirectory() == false) { file.setFileLength(node.getFileLength()); + file.setChecksumCRC32(node.getChecksumCRC32()); } result.add(file); } diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/datasetfile/DataSetFile.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/datasetfile/DataSetFile.java index 73427cddc99..c4f207b8d2b 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/datasetfile/DataSetFile.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/dssapi/v3/dto/datasetfile/DataSetFile.java @@ -18,13 +18,13 @@ package ch.ethz.sis.openbis.generic.dssapi.v3.dto.datasetfile; import java.io.Serializable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.DataSetPermId; import ch.ethz.sis.openbis.generic.dssapi.v3.dto.datasetfile.id.DataSetFilePermId; import ch.systemsx.cisd.base.annotation.JsonObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * @author Jakub Straszewski */ @@ -48,6 +48,9 @@ public class DataSetFile implements Serializable @JsonProperty private long fileLength; + @JsonProperty + private int checksumCRC32; + @JsonIgnore public DataSetFilePermId getPermId() { @@ -108,4 +111,15 @@ public class DataSetFile implements Serializable { return "DataSetFile: " + path + ", " + dataSetPermId; } + + @JsonIgnore + public int getChecksumCRC32() + { + return checksumCRC32; + } + + public void setChecksumCRC32(int checksumCRC32) + { + this.checksumCRC32 = checksumCRC32; + } } -- GitLab