diff m-toolbox/classes/@ltpda_uo/retrieve.m @ 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 86aabb42dd84
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);