From f8a608e0e6172a26ecfd30624eff2d4bc3e03245 Mon Sep 17 00:00:00 2001 From: cramakri <cramakri> Date: Tue, 10 Aug 2010 10:55:56 +0000 Subject: [PATCH] LMS-1632 Create an interface that represents tabular data from a file or the DB. SVN: 17376 --- .../plugins/tasks/DatasetFileLines.java | 2 +- .../server/plugins/tasks/ITabularData.java | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/tasks/ITabularData.java diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/tasks/DatasetFileLines.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/tasks/DatasetFileLines.java index 8183906d728..f4bc033b27f 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/tasks/DatasetFileLines.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/tasks/DatasetFileLines.java @@ -30,7 +30,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.DatasetDescription; * * @author Bernd Rinn */ -public class DatasetFileLines +public class DatasetFileLines implements ITabularData { private final String[] headerTokens; diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/tasks/ITabularData.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/tasks/ITabularData.java new file mode 100644 index 00000000000..f24f0e806fe --- /dev/null +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/tasks/ITabularData.java @@ -0,0 +1,33 @@ +/* + * Copyright 2010 ETH Zuerich, CISD + * + * 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.systemsx.cisd.openbis.dss.generic.server.plugins.tasks; + +import java.util.List; + +/** + * + * + * @author Chandrasekhar Ramakrishnan + */ +public interface ITabularData +{ + + public abstract String[] getHeaderTokens(); + + public abstract List<String[]> getDataLines(); + +} \ No newline at end of file -- GitLab