Any of the following
When an object is submitted, the following steps are taken:
Objects can be submitted using the command submit. This command takes at least two inputs:
object | The LTPDA object to submit |
sinfo | An information structure (see below) |
'conn' - database connection object 'experiment_title' - a title for the submission (Mandatory, >4 characters) 'experiment_description' - a description of this submission (Mandatory, >10 characters) 'analysis_description - a description of the analysis performed (Mandatory, >10 characters)); 'quantity' - the physical quantity represented by the data); 'keywords' - a comma-delimited list of keywords); 'reference_ids' - a string containing any reference object id numbers 'additional_comments' - any additional comments 'additional_authors' - any additional author names
% Connect to a repository conn = utils.mysql.connect('localhost', 'ltpda_test'); % Load the AO a = ao('result.xml'); % Build an information structure sinfo.conn = conn; sinfo.experiment_title = 'Interferometer noise'; sinfo.experiment_description = 'Spectral estimation of interferometer output signal'; sinfo.analysis_description = 'Spectrum of the recorded signal'; sinfo.quantity = 'photodiode output'; sinfo.keywords = 'interferometer, noise, spectrum'; sinfo.reference_ids = ''; sinfo.additional_comments = 'none'; sinfo.additional_authors = 'no one'; % Submit the AO [ids, cid] = submit(a, sinfo); % Close the connection close(conn);
% Connect to a repository conn = utils.mysql.connect('localhost', 'ltpda_test'); % Create objects to submit o1 = ao(plist('waveform', 'sine wave', 'f', 1, 'phi', 0, 'nsecs', 10, 'fs', 100)); o2 = pzmodel(1, 10, 100); o3 = plist('b', 2, 'c', 'asd'); % Create an information structure sinfo.conn = conn; sinfo.experiment_title = 'submit multiple objects'; sinfo.experiment_description = 'this is just a test of the whole thing'; sinfo.analysis_description = 'no analysis this time'; sinfo.quantity = ''; sinfo.keywords = ''; sinfo.reference_ids = ''; sinfo.additional_comments = 'none'; sinfo.additional_authors = 'no one'; % Submit the objects [ids, cid] = submit(o1, o2, o3, sinfo); % Close connection close(conn); % END
Running this script yields the following output:
** Connecting to 130.75.117.67 as hewitson... ** Connection status: DatabaseProductName: 'MySQL' DatabaseProductVersion: '5.0.45' JDBCDriverName: 'MySQL-AB JDBC Driver' JDBCDriverVersion: [1x56 char] MaxDatabaseConnections: 0 CurrentUserName: 'hewitson@pixfirewall.aei.uni-hannover.de' DatabaseURL: 'jdbc:mysql://130.75.117.67/ltpda_test' AutoCommitTransactions: 'True' M: running ao/ao M: constructing from plist M: running ltpda_uo/submit M: sinfo structure is valid. M: submitting objects to repository. M: got user id 2 for user: hewitson M: submitting object: ao / sine wave M: uploading XML data... M: done. M: submitted object ao with id 1624 M: running query INSERT INTO objmeta SET obj_id=1624,obj_type='ao',name='sine wave',created='2008-09-02 17:25:52',version='$Id: repo_submit_content.html,v 1.4 2008/09/02 17:56:59 hewitson Exp $',ip='192.168.2.100',hostname='martin-hewitsons-macbook-pro.local',os='MACI',submitted='2008-09-02 19:25:53',experiment_title='submit multiple objects',experiment_desc='this is just a test of the whole thing',reference_ids='',additional_comments='none',additional_authors='no one',keywords='',quantity='',analysis_desc='no analysis this time'; M: made meta-data entry M: running query INSERT INTO tsdata SET xunits='s',yunits='V',fs=100,nsecs=10,t0='1970-01-01 00:00:00'; M: running query INSERT INTO ao SET obj_id=1624,data_type='tsdata',data_id=1263,description='',mfilename='',mdlfilename=''; M: running query INSERT INTO transactions SET obj_id=1624,user_id=2,transdate='2008-09-02 17:25:52',direction='in'; M: updated transactions table M: submitting object: pzmodel / None M: uploading XML data... M: done. M: submitted object pzmodel with id 1625 M: running query INSERT INTO objmeta SET obj_id=1625,obj_type='pzmodel',name='None',created='2008-09-02 17:25:52',version='$Id: repo_submit_content.html,v 1.4 2008/09/02 17:56:59 hewitson Exp $',ip='192.168.2.100',hostname='martin-hewitsons-macbook-pro.local',os='MACI',submitted='2008-09-02 19:25:54',experiment_title='submit multiple objects',experiment_desc='this is just a test of the whole thing',reference_ids='',additional_comments='none',additional_authors='no one',keywords='',quantity='',analysis_desc='no analysis this time'; M: made meta-data entry M: running query INSERT INTO transactions SET obj_id=1625,user_id=2,transdate='2008-09-02 17:25:52',direction='in'; M: updated transactions table M: submitting object: plist / none M: uploading XML data... M: done. M: submitted object plist with id 1626 M: running query INSERT INTO objmeta SET obj_id=1626,obj_type='plist',name='none',created='2008-09-02 17:25:52',version='$Id: repo_submit_content.html,v 1.4 2008/09/02 17:56:59 hewitson Exp $',ip='192.168.2.100',hostname='martin-hewitsons-macbook-pro.local',os='MACI',submitted='2008-09-02 19:25:54',experiment_title='submit multiple objects',experiment_desc='this is just a test of the whole thing',reference_ids='',additional_comments='none',additional_authors='no one',keywords='',quantity='',analysis_desc='no analysis this time'; M: made meta-data entry M: running query INSERT INTO transactions SET obj_id=1626,user_id=2,transdate='2008-09-02 17:25:52',direction='in'; M: updated transactions table M: running query INSERT INTO collections SET nobjs=3,obj_ids='1624,1625,1626'; M: made collection entry M: submission complete.