Mercurial > hg > ltpda
changeset 10:75007001cbfe database-connection-manager
Check for binary only objects
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | fbbfcd56e449 |
children | 9174aadb93a5 |
files | m-toolbox/classes/@ltpda_uo/retrieve.m |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/m-toolbox/classes/@ltpda_uo/retrieve.m Mon Dec 05 16:20:06 2011 +0100 +++ b/m-toolbox/classes/@ltpda_uo/retrieve.m Mon Dec 05 16:20:06 2011 +0100 @@ -156,7 +156,12 @@ error('### failed to get data for object %d', ids(j)); end - % parse xml + % check xml + if strcmp(rows{1}(1:13), 'binary submit') + error('### object %d has binary representation only', ids(j)); + end + + % parse xml stream = java.io.StringBufferInputStream(java.lang.String(rows{1})); builder = javax.xml.parsers.DocumentBuilderFactory.newInstance.newDocumentBuilder(); xdoc = builder.parse(stream);