LTPDA Toolbox™ | contents | ![]() ![]() |
Objects can be retrieved from the repository either by specifying an object ID or a collection ID. The LTPDA Toolbox provides class construtors to retrieve objects. In additon, to retrieve a collection of objects, the collection class can be used.
When an object is retrieved, the following steps are taken:
To retrieve an object, you must know its object ID, or the ID of the collection that contains that object. If you don't know the class of the object, you can use the collection class as a container, as follows:
a = collection(plist('hostname', 'localhost', 'database', 'ltpda_test', 'id', 1)) ---- collection 1 ---- name: none num objs: 1 01: ao | New Block/tsdataNdata=[10x1], fs=1, nsecs=10, t0=1970-01-01 00:00:00.000 description: UUID: 9ec7a613-9442-4451-9b40-af18f4afea00 ----------------------
If you already know the class of the object (for example, ao), you can directly call the class constructor method:
% Define the hostname and database hostname = 'localhost'; database = 'ltpda_test'; % Retrieve the object q = ao(plist('hostname', hostname, 'database', dbname, 'ID', 12));
Multiple objects can be retrieved simultaneously by giving a list of object IDs. For example
a = ao(plist('hostname', 'localhost', 'database', 'ltpda_test', 'id', [1 2 3]));
Collections of objects can be retrieved by specifying the collection ID. The following script retrieves a collection:
a = collection(plist('hostname', 'localhost', 'database', 'ltpda_test', 'cid', 1));
The retrieval process may be speeded up by taking advantage of the fact that the objects are stored in the databases also in binary form. This can be achieved by using the parameter 'binary', that will build the object from the corresponding binary representation, if stored in the database.
% Retrieve the collection q = ao(plist('hostname', hostname, 'database', dbname, 'ID', 12, 'binary', 'yes'));
![]() |
Exploring an LTPDA Repository | Using the LTPDA Repository GUI | ![]() |
©LTP Team