Mercurial > hg > ltpda
comparison m-toolbox/classes/tests/database/@ltpda_database/ltpda_database.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children | 79dc7091dbbc |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 classdef ltpda_database < ltpda_utp | |
2 | |
3 properties | |
4 objIds = []; | |
5 sinfoPlist = []; | |
6 conn = []; | |
7 end | |
8 | |
9 methods | |
10 | |
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
12 % Constructor % | |
13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
14 function utp = ltpda_database(varargin) | |
15 utp = utp@ltpda_utp(); | |
16 | |
17 t = time(); | |
18 tStr = t.format('dd-mmm-yyyy HH:MM (z)'); | |
19 | |
20 experiment_title = 'Unit test - My experiment title'; | |
21 experiment_description = 'Unit test - My experiment description'; | |
22 analysis_description = 'Unit test - My analysis description'; | |
23 quantity = 'Unit test - My quantity'; | |
24 keywords = 'Unit test - My keywords'; | |
25 reference_ids = 'Unit test - My reference IDs'; | |
26 additional_comments = 'Unit test - My additional comments'; | |
27 additional_authors = 'Unit test - My additional authors'; | |
28 | |
29 plSinfo = plist(... | |
30 'experiment_title', sprintf('%s with a PLIST - %s', experiment_title, tStr), ... | |
31 'experiment_description', sprintf('%s with a PLIST - %s', experiment_description, tStr), ... | |
32 'analysis_description', sprintf('%s with a PLIST - %s', analysis_description, tStr), ... | |
33 'quantity', sprintf('%s with a PLIST - %s', quantity, tStr), ... | |
34 'keywords', sprintf('%s with a PLIST - %s', keywords, tStr), ... | |
35 'reference_ids', sprintf('%s with a PLIST - %s', reference_ids, tStr), ... | |
36 'additional_comments', sprintf('%s with a PLIST - %s', additional_comments, tStr), ... | |
37 'additional_authors', sprintf('%s with a PLIST - %s', additional_authors, tStr)); | |
38 | |
39 utp.sinfoPlist = plSinfo; | |
40 end | |
41 | |
42 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
43 % Destructor % | |
44 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
45 function delete(varargin) | |
46 utp = varargin{1}; | |
47 % Make sure that we remove the connection from the object and that it | |
48 % is not locked. | |
49 if isa(utp.conn, 'mpipeline.repository.RepositoryConnection') | |
50 utp.conn.setLocked(false); | |
51 end | |
52 utp.conn = []; | |
53 end | |
54 end | |
55 | |
56 methods | |
57 function varargout = submitTestData(varargin) | |
58 utp = varargin{1}; | |
59 if ~utp.testRunner.skipRepoTests() | |
60 utp.objIds = utp.testData.submit(utp.testRunner.repositoryPlist, utp.sinfoPlist); | |
61 end | |
62 end | |
63 end | |
64 | |
65 end |