Skip to content
Snippets Groups Projects
Commit 8017c3ca authored by Fuentes Serna  Juan Mariano (ID SIS)'s avatar Fuentes Serna Juan Mariano (ID SIS)
Browse files

Merge branch 'master' of sissource.ethz.ch:sispub/openbis

parents 671058ad b66bd752
No related branches found
No related tags found
No related merge requests found
Showing
with 4164 additions and 21 deletions
...@@ -215,6 +215,9 @@ public class DataSetHistoryTranslator extends HistoryTranslator implements IData ...@@ -215,6 +215,9 @@ public class DataSetHistoryTranslator extends HistoryTranslator implements IData
entry.setGitCommitHash(contentCopyRecord.gitCommitHash); entry.setGitCommitHash(contentCopyRecord.gitCommitHash);
entry.setGitRepositoryId(contentCopyRecord.gitRepositoryId); entry.setGitRepositoryId(contentCopyRecord.gitRepositoryId);
entry.setExternalDmsId(contentCopyRecord.externalDmsId); entry.setExternalDmsId(contentCopyRecord.externalDmsId);
entry.setExternalDmsCode(contentCopyRecord.externalDmsCode);
entry.setExternalDmsLabel(contentCopyRecord.externalDmsLabel);
entry.setExternalDmsAddress(contentCopyRecord.externalDmsAddress);
entry.setValidFrom(contentCopyRecord.validFrom); entry.setValidFrom(contentCopyRecord.validFrom);
entry.setValidTo(contentCopyRecord.validTo); entry.setValidTo(contentCopyRecord.validTo);
if (fetchOptions.hasAuthor()) if (fetchOptions.hasAuthor())
......
...@@ -123,8 +123,9 @@ public interface DataSetQuery extends ObjectQuery ...@@ -123,8 +123,9 @@ public interface DataSetQuery extends ObjectQuery
LongSetMapper.class }, fetchSize = FETCH_SIZE) LongSetMapper.class }, fetchSize = FETCH_SIZE)
public List<DataSetRelationshipRecord> getRelationshipsHistory(LongSet dataSetIds); public List<DataSetRelationshipRecord> getRelationshipsHistory(LongSet dataSetIds);
@Select(sql = "select dsch.id as id, dsch.data_id as dataSetId, dsch.external_code as externalCode, dsch.path as path, dsch.git_commit_hash as gitCommitHash, dsch.git_repository_id as gitRepositoryId, " @Select(sql = "select dsch.id as id, dsch.data_id as dataSetId, dsch.external_code as externalCode, dsch.path as path, dsch.git_commit_hash as gitCommitHash, "
+ "dsch.edms_id as externalDmsId, dsch.pers_id_author as authorId, dsch.valid_from_timestamp as validFrom, dsch.valid_until_timestamp as validTo " + "dsch.git_repository_id as gitRepositoryId, dsch.edms_id as externalDmsId, dsch.edms_code as externalDmsCode, dsch.edms_label as externalDmsLabel, "
+ "dsch.edms_address as externalDmsAddress, dsch.pers_id_author as authorId, dsch.valid_from_timestamp as validFrom, dsch.valid_until_timestamp as validTo "
+ "from data_set_copies_history dsch " + "from data_set_copies_history dsch "
+ "where dsch.valid_until_timestamp is not null and dsch.data_id = any(?{1})", + "where dsch.valid_until_timestamp is not null and dsch.data_id = any(?{1})",
parameterBindings = { parameterBindings = {
......
...@@ -31,4 +31,10 @@ public class HistoryContentCopyRecord extends HistoryRecord ...@@ -31,4 +31,10 @@ public class HistoryContentCopyRecord extends HistoryRecord
public Long externalDmsId; public Long externalDmsId;
public String externalDmsCode;
public String externalDmsLabel;
public String externalDmsAddress;
} }
...@@ -24,7 +24,7 @@ package ch.systemsx.cisd.openbis.generic.server.dataaccess.db; ...@@ -24,7 +24,7 @@ package ch.systemsx.cisd.openbis.generic.server.dataaccess.db;
public final class DatabaseVersionHolder public final class DatabaseVersionHolder
{ {
/** Current version of the database. */ /** Current version of the database. */
private static final String DATABASE_VERSION = "170"; private static final String DATABASE_VERSION = "171";
private DatabaseVersionHolder() private DatabaseVersionHolder()
{ {
......
...@@ -106,6 +106,12 @@ public final class ColumnNames ...@@ -106,6 +106,12 @@ public final class ColumnNames
public static final String EXTERNAL_DATA_MANAGEMENT_SYSTEM_ID_COLUMN = "edms_id"; public static final String EXTERNAL_DATA_MANAGEMENT_SYSTEM_ID_COLUMN = "edms_id";
public static final String EXTERNAL_DATA_MANAGEMENT_SYSTEM_CODE_COLUMN = "edms_code";
public static final String EXTERNAL_DATA_MANAGEMENT_SYSTEM_LABEL_COLUMN = "edms_label";
public static final String EXTERNAL_DATA_MANAGEMENT_SYSTEM_ADDRESS_COLUMN = "edms_address";
public static final String EXTERNAL_CODE_COLUMN = "external_code"; public static final String EXTERNAL_CODE_COLUMN = "external_code";
public static final String FILE_FORMAT_TYPE = "ffty_id"; public static final String FILE_FORMAT_TYPE = "ffty_id";
......
...@@ -45,6 +45,12 @@ public class DataSetHistoryPE extends AbstractEntityHistoryPE ...@@ -45,6 +45,12 @@ public class DataSetHistoryPE extends AbstractEntityHistoryPE
private Long externalDmsId; private Long externalDmsId;
private String externalDmsCode;
private String externalDmsLabel;
private String externalDmsAddress;
private String externalCode; private String externalCode;
private String path; private String path;
...@@ -123,6 +129,39 @@ public class DataSetHistoryPE extends AbstractEntityHistoryPE ...@@ -123,6 +129,39 @@ public class DataSetHistoryPE extends AbstractEntityHistoryPE
this.externalDmsId = externalDmsId; this.externalDmsId = externalDmsId;
} }
@Column(name = ColumnNames.EXTERNAL_DATA_MANAGEMENT_SYSTEM_CODE_COLUMN)
public String getExternalDmsCode()
{
return externalDmsCode;
}
public void setExternalDmsCode(String externalDmsCode)
{
this.externalDmsCode = externalDmsCode;
}
@Column(name = ColumnNames.EXTERNAL_DATA_MANAGEMENT_SYSTEM_LABEL_COLUMN)
public String getExternalDmsLabel()
{
return externalDmsLabel;
}
public void setExternalDmsLabel(String externalDmsLabel)
{
this.externalDmsLabel = externalDmsLabel;
}
@Column(name = ColumnNames.EXTERNAL_DATA_MANAGEMENT_SYSTEM_ADDRESS_COLUMN)
public String getExternalDmsAddress()
{
return externalDmsAddress;
}
public void setExternalDmsAddress(String externalDmsAddress)
{
this.externalDmsAddress = externalDmsAddress;
}
@Column(name = ColumnNames.EXTERNAL_CODE_COLUMN) @Column(name = ColumnNames.EXTERNAL_CODE_COLUMN)
public String getExternalCode() public String getExternalCode()
{ {
......
...@@ -17,15 +17,28 @@ public class MatchingContentCopy implements IRelatedEntity ...@@ -17,15 +17,28 @@ public class MatchingContentCopy implements IRelatedEntity
@SuppressWarnings("unused") @SuppressWarnings("unused")
private String gitRepositoryId; private String gitRepositoryId;
@SuppressWarnings("unused")
private String externalDmsCode;
@SuppressWarnings("unused")
private String externalDmsLabel;
@SuppressWarnings("unused")
private String externalDmsAddress;
@SuppressWarnings("unused")
private ExternalDataManagementSystemPE externalDms; private ExternalDataManagementSystemPE externalDms;
public MatchingContentCopy(String externalCode, String path, String gitCommitHash, String gitRepositoryId, public MatchingContentCopy(String externalCode, String path, String gitCommitHash, String gitRepositoryId,
ExternalDataManagementSystemPE externalDms) String externalDmsCode, String externalDmsLabel, String externalDmsAddress, ExternalDataManagementSystemPE externalDms)
{ {
this.externalCode = externalCode; this.externalCode = externalCode;
this.path = path; this.path = path;
this.gitCommitHash = gitCommitHash; this.gitCommitHash = gitCommitHash;
this.gitRepositoryId = gitRepositoryId; this.gitRepositoryId = gitRepositoryId;
this.externalDmsCode = externalDmsCode;
this.externalDmsLabel = externalDmsLabel;
this.externalDmsAddress = externalDmsAddress;
this.externalDms = externalDms; this.externalDms = externalDms;
} }
...@@ -34,10 +47,10 @@ public class MatchingContentCopy implements IRelatedEntity ...@@ -34,10 +47,10 @@ public class MatchingContentCopy implements IRelatedEntity
{ {
if (externalDms.getAddressType().equals(ExternalDataManagementSystemType.FILE_SYSTEM)) if (externalDms.getAddressType().equals(ExternalDataManagementSystemType.FILE_SYSTEM))
{ {
return externalDms.getAddress() + path; return externalDmsAddress + path;
} else } else
{ {
return externalDms.getAddress().replaceAll(Pattern.quote("${") + ".*" + Pattern.quote("}"), externalCode); return externalDmsAddress.replaceAll(Pattern.quote("${") + ".*" + Pattern.quote("}"), externalCode);
} }
} }
......
...@@ -269,7 +269,8 @@ public class EntityHistoryTranslator ...@@ -269,7 +269,8 @@ public class EntityHistoryTranslator
DataSetHistoryPE dsHistoryPE = (DataSetHistoryPE) historyPE; DataSetHistoryPE dsHistoryPE = (DataSetHistoryPE) historyPE;
MatchingContentCopy contentCopy = new MatchingContentCopy(dsHistoryPE.getExternalCode(), dsHistoryPE.getPath(), MatchingContentCopy contentCopy = new MatchingContentCopy(dsHistoryPE.getExternalCode(), dsHistoryPE.getPath(),
dsHistoryPE.getGitCommitHash(), dsHistoryPE.getGitRepositoryId(), relatedPE); dsHistoryPE.getGitCommitHash(), dsHistoryPE.getGitRepositoryId(), dsHistoryPE.getExternalDmsCode(),
dsHistoryPE.getExternalDmsLabel(), dsHistoryPE.getExternalDmsAddress(), relatedPE);
history.setValue(contentCopy.toString()); history.setValue(contentCopy.toString());
PropertyType pt = new PropertyType(); PropertyType pt = new PropertyType();
......
...@@ -10,6 +10,9 @@ define([ "stjs", "util/Exceptions", "as/dto/history/HistoryEntry" ], function(st ...@@ -10,6 +10,9 @@ define([ "stjs", "util/Exceptions", "as/dto/history/HistoryEntry" ], function(st
prototype.gitCommitHash = null; prototype.gitCommitHash = null;
prototype.gitRepositoryId = null; prototype.gitRepositoryId = null;
prototype.externalDmsId = null; prototype.externalDmsId = null;
prototype.externalDmsCode = null;
prototype.externalDmsLabel = null;
prototype.externalDmsAddress = null;
prototype.getExternalCode = function() { prototype.getExternalCode = function() {
return this.externalCode; return this.externalCode;
...@@ -41,6 +44,24 @@ define([ "stjs", "util/Exceptions", "as/dto/history/HistoryEntry" ], function(st ...@@ -41,6 +44,24 @@ define([ "stjs", "util/Exceptions", "as/dto/history/HistoryEntry" ], function(st
prototype.setExternalDmsId = function(externalDmsId) { prototype.setExternalDmsId = function(externalDmsId) {
this.externalDmsId = externalDmsId; this.externalDmsId = externalDmsId;
}; };
prototype.getExternalDmsCode = function() {
return this.externalDmsCode;
};
prototype.setExternalDmsCode = function(externalDmsCode) {
this.externalDmsCode = externalDmsCode;
};
prototype.getExternalDmsLabel = function() {
return this.externalDmsLabel;
};
prototype.setExternalDmsLabel = function(externalDmsLabel) {
this.externalDmsLabel = externalDmsLabel;
};
prototype.getExternalDmsAddress = function() {
return this.externalDmsAddress;
};
prototype.setExternalDmsAddress = function(externalDmsAddress) {
this.externalDmsAddress = externalDmsAddress;
};
}, {}); }, {});
return ContentCopyHistoryEntry; return ContentCopyHistoryEntry;
}) })
\ No newline at end of file
----------------------------------------------------------------------
-- Purpose: Insert an initial data set into the table PERSONS
-----------------------------------------------------------------------
insert into persons
(id
,first_name
,last_name
,user_id
,email)
values
(nextval('PERSON_ID_SEQ')
,''
,'System User'
,'system'
,'');
-----------------------------------------------------------------------------------
-- Purpose: Create Controlled Vocabulary STORAGE_FORMAT
-----------------------------------------------------------------------------------
insert into controlled_vocabularies
( id
, code
, is_internal_namespace
, description
, pers_id_registerer
, is_managed_internally)
values (nextval('CONTROLLED_VOCABULARY_ID_SEQ')
, 'STORAGE_FORMAT'
, true
, 'The on-disk storage format of a data set'
, (select id from persons where user_id ='system')
, true);
-----------------------------------------------------------------------------------
-- Purpose: Create Controlled Vocabulary Terms for STORAGE_FORMAT
-----------------------------------------------------------------------------------
insert into controlled_vocabulary_terms
( id
, code
, covo_id
, pers_id_registerer
, ordinal )
values (nextval('CVTE_ID_SEQ')
, 'PROPRIETARY'
, (select id from controlled_vocabularies where code = 'STORAGE_FORMAT' and is_internal_namespace = true)
, (select id from persons where user_id ='system')
, 1);
insert into controlled_vocabulary_terms
( id
, code
, covo_id
, pers_id_registerer
, ordinal)
values (nextval('CVTE_ID_SEQ')
, 'BDS_DIRECTORY'
, (select id from controlled_vocabularies where code = 'STORAGE_FORMAT' and is_internal_namespace = true)
, (select id from persons where user_id ='system')
, 2);
------------------------------------------------------------------
-- Purpose: Insert an initial data set into the table DATA_TYPES
------------------------------------------------------------------
insert into data_types
(id
,code
,description)
values
(nextval('DATA_TYPE_ID_SEQ')
,'VARCHAR'
,'Short text'
);
insert into data_types
(id
,code
,description)
values
(nextval('DATA_TYPE_ID_SEQ')
,'MULTILINE_VARCHAR'
,'Long text'
);
insert into data_types
(id
,code
,description)
values
(nextval('DATA_TYPE_ID_SEQ')
,'INTEGER'
,'Integer number'
);
insert into data_types
(id
,code
,description)
values
(nextval('DATA_TYPE_ID_SEQ')
,'REAL'
,'Real number, i.e. an inexact, variable-precision numeric type'
);
insert into data_types
(id
,code
,description)
values
(nextval('DATA_TYPE_ID_SEQ')
,'BOOLEAN'
,'True or False'
);
insert into data_types
(id
,code
,description)
values
(nextval('DATA_TYPE_ID_SEQ')
,'TIMESTAMP'
,'Both date and time. Format: yyyy-mm-dd hh:mm:ss'
);
insert into data_types
(id
,code
,description)
values
(nextval('DATA_TYPE_ID_SEQ')
,'CONTROLLEDVOCABULARY'
,'Controlled Vocabulary'
);
insert into data_types
(id
,code
,description)
values
(nextval('DATA_TYPE_ID_SEQ')
,'MATERIAL'
,'Reference to a material'
);
insert into data_types
(id
,code
,description)
values
(nextval('DATA_TYPE_ID_SEQ')
,'HYPERLINK'
,'Address of a web page'
);
insert into data_types
(id
,code
,description)
values
(nextval('DATA_TYPE_ID_SEQ')
,'XML'
,'XML document'
);
----------------------------------------------------------------------
-- Purpose: Insert an initial data set into the table PROPERTY_TYPES
-----------------------------------------------------------------------
insert into property_types
(id
,code
,description
,label
,daty_id
,pers_id_registerer)
values
(nextval('PROPERTY_TYPE_ID_SEQ')
,'DESCRIPTION'
,'A Description'
,'Description'
,(select id from data_types where code ='VARCHAR')
,(select id from persons where user_id ='system')
);
--------------------------------------------------------------------------
-- Purpose: Insert an initial data set into the table EXPERIMENT_TYPES
--------------------------------------------------------------------------
insert into experiment_types
(id
,code
,description)
values
(nextval('EXPERIMENT_TYPE_ID_SEQ')
,'UNKNOWN'
,'Unknown'
);
--------------------------------------------------------------------------
-- Purpose: Insert an initial data set into the table SAMPLE_TYPES
--------------------------------------------------------------------------
insert into sample_types
(id
,code
,description)
values
(nextval('SAMPLE_TYPE_ID_SEQ')
,'UNKNOWN'
,'Unknown'
);
--------------------------------------------------------------------------
-- Purpose: Insert an initial data set into the table DATA_SET_TYPES
--------------------------------------------------------------------------
insert into data_set_types
(id
,code
,description)
values
(nextval('DATA_SET_TYPE_ID_SEQ')
,'UNKNOWN'
,'Unknown'
);
-------------------------------------------------------------------------
-- Purpose: Insert an initial data set into the table FILE_FORMAT_TYPES
-------------------------------------------------------------------------
insert into file_format_types
(id
,code
,description)
values
(nextval('FILE_FORMAT_TYPE_ID_SEQ')
,'HDF5'
,'Hierarchical Data Format File, version 5'
);
insert into file_format_types
(id
,code
,description)
values
(nextval('FILE_FORMAT_TYPE_ID_SEQ')
,'PROPRIETARY'
,'Proprietary Format File'
);
insert into file_format_types
(id
,code
,description
)
values
(nextval('FILE_FORMAT_TYPE_ID_SEQ')
,'SRF'
,'Sequence Read Format File'
);
insert into file_format_types
(id
,code
,description
)
values
(nextval('FILE_FORMAT_TYPE_ID_SEQ')
,'TIFF'
,'TIFF File'
);
insert into file_format_types
(id
,code
,description
)
values
(nextval('FILE_FORMAT_TYPE_ID_SEQ')
,'TSV'
,'Tab Separated Values File'
);
insert into file_format_types
(id
,code
,description
)
values
(nextval('FILE_FORMAT_TYPE_ID_SEQ')
,'XML'
,'XML File'
);
---------------------------------------------------------------------
-- Purpose: Insert an initial data set into the table LOCATOR_TYPES
---------------------------------------------------------------------
insert into locator_types
(id
,code
,description)
values
(nextval('LOCATOR_TYPE_ID_SEQ')
,'RELATIVE_LOCATION'
,'Relative Location'
);
---------------------------------------------------------------------
-- Purpose: Insert an initial data into table RELATIONSHIP_TYPES
---------------------------------------------------------------------
insert into relationship_types
(id,
code,
label,
parent_label,
child_label,
description,
pers_id_registerer,
is_managed_internally,
is_internal_namespace
)
values
(
nextval('RELATIONSHIP_TYPE_ID_SEQ'),
'PARENT_CHILD',
'Parent - Child',
'Parent',
'Child',
'Parent - Child relationship',
(select id from persons where user_id ='system'),
'T',
'T'
);
insert into relationship_types
(id,
code,
label,
parent_label,
child_label,
description,
pers_id_registerer,
is_managed_internally,
is_internal_namespace)
values
(
nextval('RELATIONSHIP_TYPE_ID_SEQ'),
'PLATE_CONTROL_LAYOUT',
'Plate - Control Layout',
'Plate',
'Control Layout',
'Plate - Control Layout relationship',
(select id from persons where user_id ='system'),
'T',
'T'
);
insert into relationship_types
(id,
code,
label,
parent_label,
child_label,
description,
pers_id_registerer,
is_managed_internally,
is_internal_namespace)
values
(
nextval('RELATIONSHIP_TYPE_ID_SEQ'),
'CONTAINER_COMPONENT',
'Container - Component',
'Container',
'Component',
'Container - Component relationship',
(select id from persons where user_id ='system'),
'T',
'T');
---------------------------------------------------------------------
-- Purpose: Create default space
---------------------------------------------------------------------
insert into spaces
(id,
code,
pers_id_registerer)
values
(
nextval('SPACE_ID_SEQ'),
'DEFAULT',
(select id from persons where user_id ='system')
);
---------------------------------------------------------------------
-- Purpose: Create default project
---------------------------------------------------------------------
select nextval('PROJECT_ID_SEQ');
insert into projects
(id,
perm_id,
code,
space_id,
pers_id_registerer)
values
(
currval('PROJECT_ID_SEQ'),
to_char(now(), 'YYYYMMDDHH24MISSMS')||'-'||currval('PROJECT_ID_SEQ'),
'DEFAULT',
(select id from spaces where code = 'DEFAULT'),
(select id from persons where user_id ='system')
);
---------------------------------------------------------------------
-- Purpose: Create default experiment
---------------------------------------------------------------------
select nextval('EXPERIMENT_ID_SEQ');
insert into experiments_all
(id,
perm_id,
code,
proj_id,
exty_id,
pers_id_registerer)
values
(
currval('EXPERIMENT_ID_SEQ'),
to_char(now(), 'YYYYMMDDHH24MISSMS')||'-'||currval('EXPERIMENT_ID_SEQ'),
'DEFAULT',
(select id from projects where code = 'DEFAULT'),
(select id from experiment_types where code = 'UNKNOWN'),
(select id from persons where user_id ='system')
);
---------------------------------------------------------------------
-- Purpose: Create default sample
---------------------------------------------------------------------
select nextval('SAMPLE_ID_SEQ');
insert into samples_all
(id,
perm_id,
code,
expe_id,
space_id,
saty_id,
pers_id_registerer)
values
(
currval('SAMPLE_ID_SEQ'),
to_char(now(), 'YYYYMMDDHH24MISSMS')||'-'||currval('SAMPLE_ID_SEQ'),
'DEFAULT',
(select id from experiments where code = 'DEFAULT'),
(select id from spaces where code = 'DEFAULT'),
(select id from sample_types where code = 'UNKNOWN'),
(select id from persons where user_id ='system')
);
This diff is collapsed.
-- Creating domains
CREATE DOMAIN AUTHORIZATION_ROLE AS VARCHAR(40) CHECK (VALUE IN ('ADMIN', 'POWER_USER', 'USER', 'OBSERVER', 'ETL_SERVER'));
CREATE DOMAIN BOOLEAN_CHAR AS BOOLEAN DEFAULT FALSE;
CREATE DOMAIN BOOLEAN_CHAR_OR_UNKNOWN AS CHAR(1) DEFAULT 'U' CHECK (VALUE IN ('F', 'T', 'U'));
CREATE DOMAIN CODE AS VARCHAR(100);
CREATE DOMAIN COLUMN_LABEL AS VARCHAR(128);
CREATE DOMAIN DATA_STORE_SERVICE_KIND AS VARCHAR(40) CHECK (VALUE IN ('PROCESSING', 'QUERIES'));
CREATE DOMAIN DATA_STORE_SERVICE_REPORTING_PLUGIN_TYPE AS VARCHAR(40) CHECK (VALUE IN ('TABLE_MODEL', 'DSS_LINK', 'AGGREGATION_TABLE_MODEL'));
CREATE DOMAIN EVENT_TYPE AS VARCHAR(40) CHECK (VALUE IN ('DELETION', 'MOVEMENT'));
CREATE DOMAIN FILE AS BYTEA;
CREATE DOMAIN FILE_NAME AS VARCHAR(255);
CREATE DOMAIN TEXT_VALUE AS TEXT;
CREATE DOMAIN OBJECT_NAME AS VARCHAR(50);
CREATE DOMAIN REAL_VALUE AS REAL;
CREATE DOMAIN TECH_ID AS BIGINT;
CREATE DOMAIN TIME_STAMP AS TIMESTAMP WITH TIME ZONE;
CREATE DOMAIN TIME_STAMP_DFL AS TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP;
CREATE DOMAIN USER_ID AS VARCHAR(50);
CREATE DOMAIN TITLE_100 AS VARCHAR(100);
CREATE DOMAIN GRID_EXPRESSION AS VARCHAR(2000);
CREATE DOMAIN GRID_ID AS VARCHAR(200);
CREATE DOMAIN ORDINAL_INT AS BIGINT CHECK (VALUE > 0);
CREATE DOMAIN DESCRIPTION_2000 AS VARCHAR(2000);
CREATE DOMAIN ARCHIVING_STATUS AS VARCHAR(100) CHECK (VALUE IN ('LOCKED', 'AVAILABLE', 'ARCHIVED', 'ARCHIVE_PENDING', 'UNARCHIVE_PENDING', 'BACKUP_PENDING'));
CREATE DOMAIN QUERY_TYPE AS VARCHAR(40) CHECK (VALUE IN ('GENERIC', 'EXPERIMENT', 'SAMPLE', 'DATA_SET', 'MATERIAL'));
CREATE DOMAIN ENTITY_KIND AS VARCHAR(40) CHECK (VALUE IN ('SAMPLE', 'EXPERIMENT', 'DATA_SET', 'MATERIAL'));
CREATE DOMAIN SCRIPT_TYPE AS VARCHAR(40) CHECK (VALUE IN ('DYNAMIC_PROPERTY', 'MANAGED_PROPERTY', 'ENTITY_VALIDATION'));
CREATE DOMAIN IDENTIFIER AS VARCHAR(200);
CREATE DOMAIN DATA_SET_KIND AS VARCHAR(40) CHECK (VALUE IN ('PHYSICAL', 'LINK', 'CONTAINER'));
CREATE DOMAIN PLUGIN_TYPE AS VARCHAR(40) CHECK (VALUE IN ('JYTHON', 'PREDEPLOYED'));
CREATE DOMAIN OPERATION_EXECUTION_STATE AS VARCHAR(40) CHECK (VALUE IN ('NEW', 'SCHEDULED', 'RUNNING', 'FINISHED', 'FAILED'));
CREATE DOMAIN OPERATION_EXECUTION_AVAILABILITY AS VARCHAR(40) CHECK (VALUE IN ('AVAILABLE','DELETE_PENDING','DELETED','TIME_OUT_PENDING','TIMED_OUT'));
CREATE DOMAIN EDMS_ADDRESS_TYPE AS TEXT CHECK (VALUE IN ('OPENBIS', 'URL', 'FILE_SYSTEM'));
CREATE DOMAIN LOCATION_TYPE AS TEXT CHECK (VALUE IN ('OPENBIS', 'URL', 'FILE_SYSTEM_PLAIN', 'FILE_SYSTEM_GIT'));
\ No newline at end of file
This diff is collapsed.
-- Granting SELECT privilege to group OPENBIS_READONLY
GRANT SELECT ON SEQUENCE attachment_content_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE attachment_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE code_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE experiment_code_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE sample_code_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE controlled_vocabulary_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE core_plugin_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE cvte_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE data_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE data_set_property_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE data_set_relationship_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE data_set_type_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE data_store_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE DATA_STORE_SERVICES_ID_SEQ TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE data_type_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE database_instance_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE dstpt_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE etpt_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE event_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE experiment_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE experiment_property_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE experiment_type_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE file_format_type_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE space_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE deletion_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE locator_type_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE material_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE material_property_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE material_type_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE mtpt_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE perm_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE person_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE project_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE property_type_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE role_assignment_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE sample_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE sample_property_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE sample_type_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE stpt_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE authorization_group_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE filter_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE query_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE POST_REGISTRATION_DATASET_QUEUE_ID_SEQ TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE ENTITY_OPERATIONS_LOG_ID_SEQ TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE EXPERIMENT_RELATIONSHIPS_HISTORY_ID_SEQ TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE SAMPLE_RELATIONSHIPS_HISTORY_ID_SEQ TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE DATA_SET_RELATIONSHIPS_HISTORY_ID_SEQ TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE PROJECT_RELATIONSHIPS_HISTORY_ID_SEQ TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE EXTERNAL_DATA_MANAGEMENT_SYSTEM_ID_SEQ TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE METAPROJECT_ID_SEQ TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE METAPROJECT_ASSIGNMENT_ID_SEQ TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE grid_custom_columns_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE sample_relationship_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE script_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON SEQUENCE relationship_type_id_seq TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE attachment_contents TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE attachments TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE controlled_vocabularies TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE controlled_vocabulary_terms TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE core_plugins TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE data_all TO GROUP OPENBIS_READONLY;
GRANT SELECT ON data TO GROUP OPENBIS_READONLY;
GRANT SELECT ON data_deleted TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE data_set_properties TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE data_set_properties_history TO GROUP OPENBIS_READONLY;
GRANT SELECT ON data_set_relationships TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE data_set_relationships_all TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE data_set_type_property_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE data_set_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE data_stores TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE data_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE DATA_STORE_SERVICES TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE DATA_STORE_SERVICE_DATA_SET_TYPES TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE database_version_logs TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE events TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE experiment_properties TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE experiment_properties_history TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE experiment_type_property_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE experiment_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE experiments_all TO GROUP OPENBIS_READONLY;
GRANT SELECT ON experiments TO GROUP OPENBIS_READONLY;
GRANT SELECT ON experiments_deleted TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE external_data TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE file_format_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE spaces TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE deletions TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE locator_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE material_properties TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE material_properties_history TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE material_type_property_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE material_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE materials TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE persons TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE projects TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE property_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE role_assignments TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE sample_properties TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE sample_properties_history TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE sample_type_property_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE sample_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE samples_all TO GROUP OPENBIS_READONLY;
GRANT SELECT ON samples TO GROUP OPENBIS_READONLY;
GRANT SELECT ON samples_deleted TO GROUP OPENBIS_READONLY;
GRANT SELECT ON sample_relationships TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE sample_relationships_all TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE authorization_groups TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE authorization_group_persons TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE filters TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE queries TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE scripts TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE POST_REGISTRATION_DATASET_QUEUE TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE ENTITY_OPERATIONS_LOG TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE EXPERIMENT_RELATIONSHIPS_HISTORY TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE SAMPLE_RELATIONSHIPS_HISTORY TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE DATA_SET_RELATIONSHIPS_HISTORY TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE PROJECT_RELATIONSHIPS_HISTORY TO GROUP OPENBIS_READONLY;
GRANT SELECT ON sample_history_view TO GROUP OPENBIS_READONLY;
GRANT SELECT ON data_set_history_view TO GROUP OPENBIS_READONLY;
GRANT SELECT ON experiment_history_view TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE EXTERNAL_DATA_MANAGEMENT_SYSTEMS TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE LINK_DATA TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE grid_custom_columns TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE relationship_types TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE METAPROJECTS TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE METAPROJECT_ASSIGNMENTS_ALL TO GROUP OPENBIS_READONLY;
GRANT SELECT ON METAPROJECT_ASSIGNMENTS TO GROUP OPENBIS_READONLY;
GRANT SELECT ON TABLE OPERATION_EXECUTIONS TO GROUP OPENBIS_READONLY;
-- Migration from 170 to 171
------------------------------------------------------------------------------------
-- Purpose: add external dms fields to content copy history
------------------------------------------------------------------------------------
ALTER TABLE data_set_copies_history ADD COLUMN edms_code CODE;
ALTER TABLE data_set_copies_history ADD COLUMN edms_label TEXT_VALUE;
ALTER TABLE data_set_copies_history ADD COLUMN edms_address TEXT_VALUE;
CREATE OR REPLACE RULE content_copies_history_insert AS
ON INSERT TO content_copies
DO ALSO (
INSERT INTO data_set_copies_history (
id,
cc_id,
data_id,
external_code,
path,
git_commit_hash,
git_repository_id,
edms_id,
edms_code,
edms_label,
edms_address,
pers_id_author,
valid_from_timestamp
) VALUES (
nextval('data_set_copies_history_id_seq'),
NEW.id,
NEW.data_id,
NEW.external_code,
NEW.path,
NEW.git_commit_hash,
NEW.git_repository_id,
NEW.edms_id,
(SELECT code FROM external_data_management_systems WHERE id = NEW.edms_id),
(SELECT label FROM external_data_management_systems WHERE id = NEW.edms_id),
(SELECT address FROM external_data_management_systems WHERE id = NEW.edms_id),
NEW.pers_id_registerer,
NEW.registration_timestamp);
);
-- create content copy history entry on external dms change
CREATE OR REPLACE RULE edms_a_insert_content_copy_history AS
ON UPDATE TO external_data_management_systems
DO ALSO (
INSERT INTO data_set_copies_history (
id,
cc_id,
data_id,
external_code,
path,
git_commit_hash,
git_repository_id,
edms_id,
edms_code,
edms_label,
edms_address,
pers_id_author,
valid_from_timestamp
)
SELECT
nextval('data_set_copies_history_id_seq'),
dsch.cc_id,
dsch.data_id,
dsch.external_code,
dsch.path,
dsch.git_commit_hash,
dsch.git_repository_id,
dsch.edms_id,
NEW.code,
NEW.label,
NEW.address,
dsch.pers_id_author,
CURRENT_TIMESTAMP
FROM data_set_copies_history dsch
JOIN external_data_management_systems edms
ON edms.id = dsch.edms_id
WHERE NEW.id = dsch.edms_id AND dsch.valid_until_timestamp IS NULL;
);
-- expire content copy history entry on external dms change
CREATE OR REPLACE RULE edms_b_expire_content_copy_history AS
ON UPDATE TO external_data_management_systems
DO ALSO (
UPDATE
data_set_copies_history SET valid_until_timestamp = CURRENT_TIMESTAMP
WHERE valid_until_timestamp IS NULL
AND edms_id = NEW.id
AND valid_from_timestamp <> CURRENT_TIMESTAMP;
);
DROP VIEW data_set_history_view;
CREATE VIEW data_set_history_view AS (
SELECT
3*id as id,
main_data_id,
relation_type,
ordinal,
expe_id,
samp_id,
data_id,
entity_perm_id,
null as dstpt_id,
null as value,
null as vocabulary_term,
null as material,
null as external_code,
null as path,
null as git_commit_hash,
null as git_repository_id,
null::TECH_ID as edms_id,
null as edms_code,
null as edms_label,
null as edms_address,
pers_id_author,
valid_from_timestamp,
valid_until_timestamp
FROM
data_set_relationships_history
WHERE
valid_until_timestamp IS NOT NULL)
UNION
SELECT
3*id+1 as id,
ds_id as main_data_id,
null as relation_type,
null as ordinal,
null as expe_id,
null as samp_id,
null as data_id,
null as entity_perm_id,
dstpt_id,
value,
vocabulary_term,
material,
null as external_code,
null as path,
null as git_commit_hash,
null as git_repository_id,
null as edms_id,
null as edms_code,
null as edms_label,
null as edms_address,
pers_id_author,
valid_from_timestamp,
valid_until_timestamp
FROM
data_set_properties_history
UNION
(SELECT
3*id+2 as id,
data_id as main_data_id,
null as relation_type,
null as ordinal,
null as expe_id,
null as samp_id,
null as data_id,
null as entity_perm_id,
null as dstpt_id,
null as value,
null as vocabulary_term,
null as material,
external_code,
path,
git_commit_hash,
git_repository_id,
edms_id,
edms_code,
edms_label,
edms_address,
pers_id_author,
valid_from_timestamp,
valid_until_timestamp
FROM
data_set_copies_history
WHERE
valid_until_timestamp IS NOT NULL);
...@@ -53,7 +53,11 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.datastore.id.DataStorePermId; ...@@ -53,7 +53,11 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.datastore.id.DataStorePermId;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.id.EntityTypePermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.id.EntityTypePermId;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.ExperimentIdentifier; import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.ExperimentIdentifier;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.ExperimentPermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.ExperimentPermId;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.externaldms.ExternalDms;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.externaldms.fetchoptions.ExternalDmsFetchOptions;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.externaldms.id.ExternalDmsPermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.externaldms.id.ExternalDmsPermId;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.externaldms.id.IExternalDmsId;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.externaldms.update.ExternalDmsUpdate;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.history.ContentCopyHistoryEntry; import ch.ethz.sis.openbis.generic.asapi.v3.dto.history.ContentCopyHistoryEntry;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.history.HistoryEntry; import ch.ethz.sis.openbis.generic.asapi.v3.dto.history.HistoryEntry;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.history.PropertyHistoryEntry; import ch.ethz.sis.openbis.generic.asapi.v3.dto.history.PropertyHistoryEntry;
...@@ -902,20 +906,8 @@ public class GetDataSetTest extends AbstractDataSetTest ...@@ -902,20 +906,8 @@ public class GetDataSetTest extends AbstractDataSetTest
String sessionToken = v3api.login(TEST_USER, PASSWORD); String sessionToken = v3api.login(TEST_USER, PASSWORD);
// given - data set with content copy // given - data set with content copy
DataSetCreation dataSetCreation = new DataSetCreation(); ContentCopyCreation contentCopyCreation = getContentCopyCreation();
LinkedDataCreation linkedData = new LinkedDataCreation(); DataSetCreation dataSetCreation = getDataSetCreation(contentCopyCreation, "testGetWithHistoryContentCopy-01");
ContentCopyCreation contentCopyCreation = new ContentCopyCreation();
contentCopyCreation.setExternalDmsId(new ExternalDmsPermId("DMS_3"));
contentCopyCreation.setPath("/path");
contentCopyCreation.setGitCommitHash("0");
contentCopyCreation.setGitRepositoryId("0");
linkedData.setContentCopies(Arrays.asList(contentCopyCreation));
dataSetCreation.setCode("testGetWithHistoryContentCopy-01");
dataSetCreation.setLinkedData(linkedData);
dataSetCreation.setDataSetKind(DataSetKind.LINK);
dataSetCreation.setTypeId(new EntityTypePermId("UNKNOWN"));
dataSetCreation.setSampleId(new SampleIdentifier("//CL1:A01"));
dataSetCreation.setDataStoreId(new DataStorePermId("STANDARD"));
List<DataSetPermId> dataSetIds = v3api.createDataSets(sessionToken, Arrays.asList(dataSetCreation)); List<DataSetPermId> dataSetIds = v3api.createDataSets(sessionToken, Arrays.asList(dataSetCreation));
assertEquals(dataSetIds.size(), 1); assertEquals(dataSetIds.size(), 1);
...@@ -952,10 +944,35 @@ public class GetDataSetTest extends AbstractDataSetTest ...@@ -952,10 +944,35 @@ public class GetDataSetTest extends AbstractDataSetTest
ContentCopyHistoryEntry historyEntry = (ContentCopyHistoryEntry) dataSet.getHistory().get(0); ContentCopyHistoryEntry historyEntry = (ContentCopyHistoryEntry) dataSet.getHistory().get(0);
assertEquals(historyEntry.getPath(), contentCopyCreation.getPath()); assertEquals(historyEntry.getPath(), contentCopyCreation.getPath());
assertEquals(historyEntry.getGitCommitHash(), contentCopyCreation.getGitCommitHash()); assertEquals(historyEntry.getGitCommitHash(), contentCopyCreation.getGitCommitHash());
assertEquals(historyEntry.getExternalDmsAddress(), "sprint:/path/to/location");
v3api.logout(sessionToken); v3api.logout(sessionToken);
} }
private DataSetCreation getDataSetCreation(ContentCopyCreation contentCopyCreation, String code)
{
LinkedDataCreation linkedData = new LinkedDataCreation();
linkedData.setContentCopies(Arrays.asList(contentCopyCreation));
DataSetCreation dataSetCreation = new DataSetCreation();
dataSetCreation.setCode(code);
dataSetCreation.setLinkedData(linkedData);
dataSetCreation.setDataSetKind(DataSetKind.LINK);
dataSetCreation.setTypeId(new EntityTypePermId("UNKNOWN"));
dataSetCreation.setSampleId(new SampleIdentifier("//CL1:A01"));
dataSetCreation.setDataStoreId(new DataStorePermId("STANDARD"));
return dataSetCreation;
}
private ContentCopyCreation getContentCopyCreation()
{
ContentCopyCreation contentCopyCreation = new ContentCopyCreation();
contentCopyCreation.setExternalDmsId(new ExternalDmsPermId("DMS_3"));
contentCopyCreation.setPath("/path");
contentCopyCreation.setGitCommitHash("0");
contentCopyCreation.setGitRepositoryId("0");
return contentCopyCreation;
}
@Test @Test
public void testGetWithHistoryExperiment() public void testGetWithHistoryExperiment()
{ {
......
1 \\x636f646509555345522e6465736372697074696f6e0973747564795f4f626a6563740973747564795f6f626a6563745f547970650970726f6a6563740970726f63657373696e675f696e737472756374696f6e730963656c6c5f706c617465730a4558503509412073696d706c65206578706572696d656e7409564952555331095649525553095959093e2070726f63657373696e672d696e737472756374696f6e732e747874093e2063656c6c506c617465732e7478740a4558503609616e6f74686572206578706572696d656e7409564952555331095649525553096b6f6b6f09090a
2 \\x636f646509555345522e6465736372697074696f6e0973747564795f4f626a6563740973747564795f6f626a6563745f547970650970726f6a6563740970726f63657373696e675f696e737472756374696f6e730963656c6c5f706c617465730a4558503509412073696d706c65206578706572696d656e7409564952555331095649525553095959093e2070726f63657373696e672d696e737472756374696f6e732e747874093e2063656c6c506c617465732e7478740a4558503609616e6f74686572206578706572696d656e7409564952555331095649525553096b6f6b6f0909
3 \\x636f646509555345522e6465736372697074696f6e0973747564795f4f626a6563740973747564795f6f626a6563745f547970650970726f6a6563740970726f63657373696e675f696e737472756374696f6e730963656c6c5f706c617465730a4558503509412073696d706c65206578706572696d656e7409564952555331095649525553095959093e2070726f63657373696e672d696e737472756374696f6e732e747874093e2063656c6c506c617465732e7478740a4558503609616e6f74686572206578706572696d656e7409564952555331095649525553096b6f6b6f09
4 \\x636f646509555345522e6465736372697074696f6e0973747564795f4f626a6563740973747564795f6f626a6563745f547970650970726f6a6563740970726f63657373696e675f696e737472756374696f6e730963656c6c5f706c617465730a4558503509412073696d706c65206578706572696d656e7409564952555331095649525553095959093e2070726f63657373696e672d696e737472756374696f6e732e747874093e2063656c6c506c617465732e7478740a4558503609616e6f74686572206578706572696d656e7409564952555331095649525553096b6f6b6f
5 \\x636f646509555345522e6465736372697074696f6e0973747564795f4f626a6563740973747564795f6f626a6563745f547970650970726f6a6563740970726f63657373696e675f696e737472756374696f6e730963656c6c5f706c617465730a4558503509412073696d706c65206578706572696d656e7409564952555331095649525553095959093e2070726f63657373696e672d696e737472756374696f6e732e747874093e2063656c6c506c617465732e7478740a4558503609616e6f74686572206578706572696d656e7409564952555331095649525553096b6f
6 \\x33564350310a33564350320a3356435033
7 \\x616c610a6d610a6b6f74610a610a6b6f740a6a6573740a6964696f7461
8 \\x33564350310a33564350320a3356435033
9 \\x33564350310a33564350320a3356435033
10 \\x33564350310a33564350320a3356435033
11 \\x33564350310a33564350320a3356435033
12 \\x33564350310a33564350320a3356435033
1 2 exampleExperiments.txt 2008-12-10 13:48:17.996703+01 1 2 1 \N \N \N \N
2 2 exampleExperiments.txt 2008-12-10 13:49:14.564025+01 2 2 2 \N \N \N \N
3 2 exampleExperiments.txt 2008-12-10 13:49:20.23603+01 3 2 3 \N \N \N Second latest version
4 2 exampleExperiments.txt 2008-12-10 13:49:27.90141+01 4 2 4 \N \N Latest version \N
5 8 exampleExperiments.txt 2008-12-10 13:49:48.879301+01 1 2 5 \N \N \N \N
6 8 cellPlates.txt 2008-12-10 13:51:10.050748+01 1 2 6 \N \N \N \N
7 \N sampleHistory.txt 2009-06-09 17:00:00+02 1 2 7 987 \N \N \N
8 22 cellPlates.txt 2008-12-10 13:51:10.050748+01 1 2 8 \N \N \N \N
9 \N projectDescription.txt 2012-01-03 08:27:57.123+01 1 2 9 \N 3 The Project All about it.
10 23 testExperiment.txt 2012-01-03 08:27:57.123+01 1 2 10 \N \N \N \N
11 \N testProject.txt 2012-01-03 08:27:57.123+01 1 2 11 \N 5 \N \N
12 \N testSample.txt 2009-06-09 17:00:00+02 1 2 12 1054 \N \N Test sample description
1 21
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