comparison m-toolbox/classes/@ltpda_uo/convertSinfo2Plist.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % CONVERTSINFO2PLIST Converts the 'old' sinfo structure to a PLIST-object.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: CONVERTSINFO2PLIST Converts the 'old' sinfo structure to a
5 % PLIST-object.
6 % The information in the structure will overwrite the
7 % information in the PLIST-object.
8 %
9 % CALL: pl = convertSinfo2Plist(pl, sinfo);
10 %
11 % INPUTS: pl - plist
12 % sinfo - structure with the submission information
13 %
14 % INFO: The submission information are:
15 %
16 % 'experiment_title' - a title for the submission (Mandatory, >4 characters)
17 % 'experiment_description' - a description of this submission (Mandatory, >10 characters)
18 % 'analysis_description' - a description of the analysis performed (Mandatory, >10 characters));
19 % 'quantity' - the physical quantity represented by the data);
20 % 'keywords' - a comma-delimited list of keywords);
21 % 'reference_ids' - a string containing any reference object id numbers
22 % 'additional_comments' - any additional comments
23 % 'additional_authors' - any additional author names
24 %
25 % VERSION: $Id: convertSinfo2Plist.m,v 1.1 2010/01/14 19:02:28 ingo Exp $
26 %
27 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
28
29 function pl = convertSinfo2Plist(pl, sinfo)
30
31 fields = {...
32 'experiment_title', ...
33 'experiment_description', ...
34 'analysis_description', ...
35 'quantity', ...
36 'keywords', ...
37 'reference_ids', ...
38 'additional_comments', ...
39 'additional_authors'};
40
41 for ii = 1:numel(fields)
42 if isfield(sinfo, fields{ii})
43 pl.pset(strrep(fields{ii}, '_', ' '), sinfo.(fields{ii}));
44 end
45 end
46
47 end
48