From a1f04d4ba1836ade5a5990f60f7d266b6a2e752d Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Mon, 7 Jun 2010 14:56:56 +0000 Subject: [PATCH] implement toString() SVN: 16311 --- .../shared/basic/DataSetUploadInfo.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/DataSetUploadInfo.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/DataSetUploadInfo.java index 4bffbd944c7..edc53cb9092 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/DataSetUploadInfo.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/DataSetUploadInfo.java @@ -16,6 +16,8 @@ package ch.systemsx.cisd.openbis.generic.shared.basic; +import java.util.Arrays; + /** * @author Izabela Adamczyk */ @@ -99,6 +101,30 @@ public class DataSetUploadInfo { this.parents = parents; } + + + @Override + public String toString() + { + // TODO Auto-generated method stub + StringBuilder builder = new StringBuilder(); + if (sample != null) + { + builder.append("sample:").append(sample).append(", "); + } + if (experiment != null) + { + builder.append("experiment:").append(experiment).append(", "); + } + if (parents != null && parents.length > 0) + { + builder.append("parent data set:").append(Arrays.asList(parents)).append(", "); + } + builder.append("data set type:").append(dataSetType).append(", "); + builder.append("file type:").append(fileType); + return builder.toString(); + } + public static class DataSetUploadInfoHelper { -- GitLab