diff m-toolbox/classes/@ltpda_uoh/fromDom.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m-toolbox/classes/@ltpda_uoh/fromDom.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,36 @@
+
+function fromDom(obj, node, inhists)
+  
+  %%%%%%%%%% Call super-class
+  
+  fromDom@ltpda_uo(obj, node, inhists);
+  
+  %%%%%%%%%% Get properties from the node attributes
+  
+  %%%%%%%%%% Get properties from the child nodes
+  
+  % Get hist
+  histNode = utils.xml.getChildByName(node, 'hist');
+  if ~isempty(histNode)
+    inhistUUIDs = utils.xml.mchar(histNode.getAttribute('hist_UUID'));
+    if ~isempty(inhistUUIDs)
+      inhistUUIDs = regexp(inhistUUIDs, ' ', 'split');
+      for uu = 1:numel(inhistUUIDs)
+        obj.hist = [obj.hist utils.xml.getHistoryFromUUID(inhists, inhistUUIDs{uu})];
+      end
+    end
+  end
+  
+  % Get procinfo
+  childNode = utils.xml.getChildByName(node, 'procinfo');
+  if ~isempty(childNode)
+    obj.procinfo = utils.xml.getObject(childNode, inhists);
+  end
+  
+  % Get plotinfo
+  childNode = utils.xml.getChildByName(node, 'plotinfo');
+  if ~isempty(childNode)
+    obj.plotinfo = utils.xml.getObject(childNode, inhists);
+  end
+  
+end