Submitting LTPDA objects to a repository
Any of the user objects can be submitted to an LTPDA repository
There are three different methods which submit/update object(s) to the repository:
submit
Submits the given collection of objects to an LTPDA Repository. If multiple objects
are submitted together, a corresponding collection entry will be made. The objects
are stored as a XML representation and if possible a binary representation
(see bsubmit).
bsubmit
Submits the given collection of objects to an LTPDA Repository. If multiple objects
are submitted together, a corresponding collection entry will be made. The objects
are stored only as a binary representation.
In order to retrieve this object by calling a constructor it is necessary to
set the key 'BINARY' to 'yes' because the XML representation doesn't exist.
For example the AO constructor
'From Repository'
update
Updates the specified object with a new object.
The submission process
When an object is submitted, the following steps are taken:
- The userid of the user connecting is retrieved from the Users table of the repository
- For each object to be submitted:
- The object to be submitted is checked to be one of the types listed above
- The name, created, and version fields are read from the object
- The object is converted to an XML text string
- An MD5 hash sum is computed for the XML string
- The XML string and the hash code are inserted in to the objs table
- The automatically assigned ID of the object is retrieved from the objs table
- An attempt is made to create a binary representation of the object (.MAT). If this is possible, the binary data is inserted in the bobjs table.
- Various pieces of meta-data (object name, object type, created time, client IP address, etc.) are submitted to the objmeta table
- Additional meta-data is entered into the table matching the object class (ao, tsdata, etc.)
- An 'in' entry is made in the transaction table recording the user ID and the object ID
- A entry is then made in the collections table, even if this is a single object submission
- The object IDs and the collection ID are returned to the user
Submitting objects
Objects can be submitted using the command submit. This command takes at least two inputs:
object | The object(s) to submit |
pl | A plist containing various pieces of information (see below) |
The plist details can be found at: Parameter Sets
The following example script connects to a repository and submits an AO:
a = ao('result.xml');
pl = plist(...
'hostname', 'localhost', ...
'database', 'test', ...
'experiment title', 'Interferometer noise', ...
'experiment description', 'Spectral estimation of interferometer output signal', ...
'analysis description', 'Spectrum of the recorded signal', ...
'quantity', 'photodiode output', ...
'keywords', 'interferometer, noise, spectrum', ...
'reference ids', '', ...
'additional comments', 'none', ...
'additional authors', 'no one');
[ids, cid] = submit(a, pl);
The ID assigned to the submitted object is contained in the first output of the submit function:
If the plist contains sufficient information, it is possible to overide the appearance of the
'submission' dialog by giving the key/value pair: 'no dialog', true.
Submitting collections
Collections of LTPDA objects can also be submitted. Here a collection is defined as a group of objects
submitted at the same time. In this way, a single information structure describing the collection is
assigned to all the objects. The collection is just a virtual object; it is defined by a list of object IDs in the database.
|
Connecting to an LTPDA Repository |
|
Exploring an LTPDA Repository |
 |
©LTP Team