package ge.edu.freeuni.sdp.iot.simulator.bath.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * Created by khrak on 6/25/16.
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class VentSwitch {
    @JsonProperty("status")
    private String status;

    @JsonProperty("houseid")
    private String houseid;

    public VentSwitch(String houseid) {
        this.houseid = houseid;
        status = "off";
    }

    public String getHouseid() {
        return houseid;
    }

    public String getStatus() {
        return status;
    }

    public void ventOn() {
        status = "on";
    }

    public void ventOff() {
        status = "off";
    }
}

@@ -295,49 +295,22 @@
 */%0A@
-JsonInclude(JsonInclude.Include.NON_NULL)
+XmlRootElement
 %0Apub
@@ -336,35 +336,24 @@
 h %7B%0A
+%0A
     @
-JsonProperty(%22status%22)
+XmlElement
 %0A   
@@ -386,31 +386,18 @@
    @
-JsonProperty(%22houseid%22)
+XmlElement
 %0A   
@@ -422,16 +422,69 @@
 useid;%0A%0A
+    @XmlElement%0A    private boolean succeed = true;%0A%0A
     publ

add succeed field