Mercurial > hg > ltpda
changeset 49:0bcdf74587d1 database-connection-manager
Cleanup
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:24:36 +0100 |
parents | 16aa66670d74 |
children | 7d2e2e065cf1 |
files | m-toolbox/classes/@ltpda_uo/retrieve.m |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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);