Subversion Repositories svn.mios

Rev

Rev 709 | Rev 722 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
709 adamjking 1
package org.midibox.mios.xml;
2
 
721 adamjking 3
import org.midibox.mios.DebugFunctionParameters;
4
import org.midibox.utils.xml.XMLUtils;
5
import org.w3c.dom.Node;
709 adamjking 6
 
721 adamjking 7
public class DebugFunctionParametersXML extends XMLUtils {
8
 
9
    protected DebugFunctionParameters debugFunctionParameters;
10
 
11
    public DebugFunctionParametersXML(
12
            DebugFunctionParameters debugFunctionParameters,
13
            String rootElementTag) {
14
 
15
        super(rootElementTag);
16
 
17
        this.debugFunctionParameters = debugFunctionParameters;
18
    }
19
 
20
    String addressAttr = "address";
21
 
22
    String wregAttr = "wreg";
23
 
24
    String param1Attr = "param1";
25
 
26
    String param2Attr = "param2";
27
 
28
    String param3Attr = "param3";
29
 
30
    public void saveXML(Node node) {
31
 
32
        super.saveXML(node);
33
 
34
        rootElement.setAttribute(addressAttr, ""
35
                + debugFunctionParameters.getAddress());
36
 
37
        rootElement.setAttribute(wregAttr, ""
38
                + debugFunctionParameters.getWreg());
39
 
40
        rootElement.setAttribute(param1Attr, ""
41
                + debugFunctionParameters.getParam1());
42
 
43
        rootElement.setAttribute(param2Attr, ""
44
                + debugFunctionParameters.getParam2());
45
 
46
        rootElement.setAttribute(param3Attr, ""
47
                + debugFunctionParameters.getParam3());
48
    }
709 adamjking 49
}