# HG changeset patch # User Daniele Nicolodi # Date 1323275076 -3600 # Node ID 0bcdf74587d1bc7c27280da0dfb67cdcebf9da6f # Parent 16aa66670d747a1483f3206220c7762a54bce260 Cleanup diff -r 16aa66670d74 -r 0bcdf74587d1 m-toolbox/classes/@ltpda_uo/retrieve.m --- a/m-toolbox/classes/@ltpda_uo/retrieve.m Tue Dec 06 19:07:27 2011 +0100 +++ b/m-toolbox/classes/@ltpda_uo/retrieve.m Wed Dec 07 17:24:36 2011 +0100 @@ -32,7 +32,7 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function varargout = retrieve(varargin) +function varargout = retrieve(conn, varargin) import utils.const.* utils.helper.msg(msg.MNAME, 'running %s/%s', mfilename('class'), mfilename); @@ -42,8 +42,6 @@ end % connection - conn = varargin{1}; - varargin = varargin(2:end); if ~isa(conn, 'java.sql.Connection') error('### the first argument should be a java.sql.Connection object'); end @@ -67,7 +65,7 @@ % get list of object IDs from the collection ID ids = utils.repository.getCollectionIDs(conn, cid); - + else % IDs list if isnumeric([varargin{:}]) @@ -150,8 +148,8 @@ if strcmp(rows{1}(1:13), 'binary submit') error('### object %d has binary representation only', ids(j)); end - - % parse xml + + % parse xml stream = java.io.StringBufferInputStream(java.lang.String(rows{1})); builder = javax.xml.parsers.DocumentBuilderFactory.newInstance.newDocumentBuilder(); xdoc = builder.parse(stream);