Home > classes > @miir > private > retrieve.m

retrieve

PURPOSE ^

RETRIEVE miir objects with given ids from the LTPDA repository specified by the input

SYNOPSIS ^

function objs = retrieve(conn, ids)

DESCRIPTION ^

 RETRIEVE miir objects with given ids from the LTPDA repository specified by the input
 database connection.
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: RETRIEVE miir objects with given ids from the LTPDA 
              repository specified by the input database connection.
 
 CALL:        p = retrieve(conn, ids)
 
 

 VERSION:     $Id: submit.m,v 1.14 2007/08/16 06:55:25 hewitson Exp $

 HISTORY: 30-08-07 M Hewitson
             Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function objs = retrieve(conn, ids)
0002 
0003 % RETRIEVE miir objects with given ids from the LTPDA repository specified by the input
0004 % database connection.
0005 %
0006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0007 %
0008 % DESCRIPTION: RETRIEVE miir objects with given ids from the LTPDA
0009 %              repository specified by the input database connection.
0010 %
0011 % CALL:        p = retrieve(conn, ids)
0012 %
0013 %
0014 %
0015 % VERSION:     $Id: submit.m,v 1.14 2007/08/16 06:55:25 hewitson Exp $
0016 %
0017 % HISTORY: 30-08-07 M Hewitson
0018 %             Creation
0019 %
0020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0021 
0022 type = 'miir';
0023 
0024 %%%%%%%%%% Get each object
0025 objs = [];
0026 for j=1:length(ids)
0027   % Get object
0028   xdoc = mysql_getXdoc(conn, ids(j));  
0029   % get child
0030   obj = [];
0031   c   = xdoc.getChildNodes;
0032   for k = 1:c.getLength
0033     cc = c.item(k-1);
0034     if strcmp(char(cc.getNodeName), type)
0035       ccc = cc.getChildNodes;
0036       for l=1:ccc.getLength
0037         cccc = ccc.item(l-1);
0038         if strcmp(char(cccc.getNodeName), 'Object')
0039           ccccc = cccc.getChildNodes;
0040           for m=1:ccccc.getLength
0041             cccccc = ccccc.item(m-1);
0042             if strcmp(char(cccccc.getNodeName), type)
0043               obj  = fromxml(cccccc);
0044             end
0045           end
0046         end
0047       end
0048     end
0049   end
0050   
0051   objs = [objs obj];
0052 end
0053 
0054 
0055 
0056 
0057 
0058 
0059 
0060 
0061 % END

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003