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.HexFileUpload;
4
import org.w3c.dom.Node;
709 adamjking 5
 
721 adamjking 6
public class HexFileUploadXML extends MIOSSysexSendReceiveXML {
7
 
8
    protected HexFileUpload hexFileUpload;
9
 
10
    protected String waitForUploadRequestAttr = "waitForUploadRequest";
11
 
12
    protected String uploadModeAttr = "uploadMode";
13
 
14
    protected String delayTimeAttr = "delayTime";
15
 
16
    public HexFileUploadXML(HexFileUpload hexFileUpload, String rootElementTag) {
17
 
18
        super(hexFileUpload, rootElementTag);
19
 
20
        this.hexFileUpload = hexFileUpload;
21
    }
22
 
23
    public void saveXML(Node node) {
24
 
25
        super.saveXML(node);
26
 
27
        rootElement.setAttribute(waitForUploadRequestAttr, hexFileUpload
28
                .isWaitForUploadRequest() ? "true" : "false");
29
 
30
        rootElement.setAttribute(uploadModeAttr, ""
31
                + hexFileUpload.getUploadMode());
32
 
33
        rootElement.setAttribute(delayTimeAttr, ""
34
                + hexFileUpload.getDelayTime());
35
    }
709 adamjking 36
}