comparison m-toolbox/classes/@fsdata/attachToDom.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1
2 function collectedHist = attachToDom(objs, dom, parent, collectedHist)
3
4 if isempty(objs)
5
6 % Create empty fsdata node with the attribute 'shape'
7 utils.xml.attachEmptyObjectNode(objs, dom, parent);
8
9 else
10 for oo = 1:numel(objs)
11 obj = objs(oo);
12
13 % Create object node
14 fsdataNode = dom.createElement('fsdata');
15 fsdataNode.setAttribute('shape', sprintf('%dx%d', size(objs)));
16
17 % Call superclass
18 collectedHist = attachToDom@data2D(obj, dom, fsdataNode, collectedHist);
19
20 % Add t0
21 if isa(obj.t0, 'time')
22 t0Node = dom.createElement('t0');
23 collectedHist = obj.t0.attachToDom(dom, t0Node, collectedHist);
24 fsdataNode.appendChild(t0Node);
25 end
26
27 % Add fs
28 fsNode = dom.createElement('fs');
29 utils.xml.attachNumberToDom(obj.fs, dom, fsNode)
30 fsdataNode.appendChild(fsNode);
31
32 % Add navs
33 navsNode = dom.createElement('navs');
34 utils.xml.attachNumberToDom(obj.navs, dom, navsNode)
35 fsdataNode.appendChild(navsNode);
36
37 % Add enbw
38 enbwNode = dom.createElement('enbw');
39 utils.xml.attachNumberToDom(obj.enbw, dom, enbwNode)
40 fsdataNode.appendChild(enbwNode);
41
42 % Add to parent node
43 parent.appendChild(fsdataNode);
44
45 end
46 end
47
48 end