package br.usp.each.saeg.jaguar.model;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * This class represents the Dua Requirement.
 *
 * Created by henrique on 7/9/17.
 */
@XmlRootElement(name = "duaRequirement")
public class DuaRequirement extends Requirement {

    @Override
    public Type getType() {
        return Type.DUA;
    }

    private Integer index;
    private Integer def;
    private Integer use;
    private Integer target;
    private String var;

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public Integer getDef() {
        return def;
    }

    public void setDef(Integer def) {
        this.def = def;
    }

    public Integer getUse() {
        return use;
    }

    public void setUse(Integer use) {
        this.use = use;
    }

    public Integer getTarget() {
        return target;
    }

    public void setTarget(Integer target) {
        this.target = target;
    }

    public String getVar() {
        return var;
    }

    public void setVar(String var) {
        this.var = var;
    }

    @Override
    public String toString() {
        return "DuaRequirement{" +
                "location='" + location + '\'' +
                ", position=" + position +
                ", suspiciousValue=" + suspiciousValue +
                ", def=" + def +
                ", use=" + use +
                ", target=" + target +
                ", var='" + var + '\'' +
                ", index=" + index +
                ", cef=" + cef +
                ", cep=" + cep +
                ", cnf=" + cnf +
                ", cnp=" + cnp +
                '}';
    }
//    @Override
//    public String toString() {
//        return "DuaRequirement{" +
//                "Type='" + getType() + '\'' +
//                ", location='" + location + '\'' +
//                ", position=" + position +
//                ", suspiciousValue=" + suspiciousValue +
//                ", cef=" + cef +
//                ", cep=" + cep +
//                ", cnf=" + cnf +
//                ", cnp=" + cnp +
//                '}';
//    }
}
@@ -33,16 +33,63 @@
 model;%0A%0A
+import javax.xml.bind.annotation.XmlAttribute;%0A
 import j
@@ -129,16 +129,16 @@
 lement;%0A
-
 %0A/**%0A * 
@@ -240,33 +240,8 @@
 ment
-(name = %22duaRequirement%22)
 %0Apub
@@ -492,16 +492,34 @@
 g var;%0A%0A
+    @XmlAttribute%0A
     publ
@@ -640,32 +640,50 @@
 = index;%0A    %7D%0A%0A
+    @XmlAttribute%0A
     public Integ
@@ -784,32 +784,50 @@
 f = def;%0A    %7D%0A%0A
+    @XmlAttribute%0A
     public Integ
@@ -928,32 +928,50 @@
 e = use;%0A    %7D%0A%0A
+    @XmlAttribute%0A
     public Integ
@@ -1090,32 +1090,50 @@
  target;%0A    %7D%0A%0A
+    @XmlAttribute%0A
     public Strin
@@ -1815,467 +1815,5 @@
   %7D%0A
-//    @Override%0A//    public String toString() %7B%0A//        return %22DuaRequirement%7B%22 +%0A//                %22Type='%22 + getType() + '%5C'' +%0A//                %22, location='%22 + location + '%5C'' +%0A//                %22, position=%22 + position +%0A//                %22, suspiciousValue=%22 + suspiciousValue +%0A//                %22, cef=%22 + cef +%0A//                %22, cep=%22 + cep +%0A//                %22, cnf=%22 + cnf +%0A//                %22, cnp=%22 + cnp +%0A//                '%7D';%0A//    %7D%0A
 %7D

Add fields to xmlattributes