Any of the following
When an object is submitted, the following steps are taken:
Objects can be submitted using the command ltpda_obj_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 = 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] = ltpda_obj_submit(a, sinfo); % Close the connection close(conn);
% Connect to a repository conn = mysql_connect('localhost', 'ltpda_test'); % Create objects to submit o1 = ao(plist('waveform', 'sine wave', 'f', 1, 'phi', 0, 'nsecs', 10, 'fs', 100)); o2 = specwin('Hanning', 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] = ltpda_obj_submit(o1, o2, o3, sinfo); % Close connection close(conn); % END
Running this script yields the following output:
** Connecting to 129.75.117.67 as hewitson... ** Connection status: DatabaseProductName: 'MySQL' DatabaseProductVersion: '5.0.45' JDBCDriverName: 'MySQL-AB JDBC Driver' JDBCDriverVersion: [1x103 char] MaxDatabaseConnections: 0 CurrentUserName: 'bob@129.75.117.45' DatabaseURL: 'jdbc:mysql://129.75.117.67/ltpda_test' AutoCommitTransactions: 'True' *** sinfo structure is valid. *** Submitting objects to repository... ** got user id 2 for user: bob ** submitting object: ao / sine wave %%%%% Write property [x] %%%%% %%%%% real data %%%%% Write [1000] data samples %%%%% Write property [y] %%%%% %%%%% real data %%%%% Write [1000] data samples + Uploading XML data...done. + submitted object ao with id 1254 + made meta-data entry + making meta data entry for ao + making meta data entry for tsdata + made meta-data entry for tsdata + made meta-data entry in tsdata table with id 1116 + made meta-data entry for ao + made meta-data entry in ao table with id 1134 + updated transactions table ** submitting object: specwin / Hanning + Uploading XML data...done. + submitted object specwin with id 1255 + made meta-data entry + making meta data entry for specwin # no special table for objects of type specwin + updated transactions table ** submitting object: plist / None + Uploading XML data...done. + submitted object plist with id 1256 + made meta-data entry + making meta data entry for plist # no special table for objects of type plist + updated transactions table ** made collection entry *** submission complete.