package seedu.tasklist.storage;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlElement;

import seedu.tasklist.commons.exceptions.IllegalValueException;
import seedu.tasklist.model.tag.Tag;
import seedu.tasklist.model.tag.UniqueTagList;
import seedu.tasklist.model.task.Comment;
import seedu.tasklist.model.task.Name;
import seedu.tasklist.model.task.ReadOnlyTask;
import seedu.tasklist.model.task.Task;


/**
 * JAXB-friendly version of the Task.
 */
public class XmlAdaptedTask {

    @XmlElement(required = true)
    private String name;
    @XmlElement(required = true)
    private String comment;

    @XmlElement
    private List<XmlAdaptedTag> tagged = new ArrayList<>();

    /**
     * Constructs an XmlAdaptedTask.
     * This is the no-arg constructor that is required by JAXB.
     */
    public XmlAdaptedTask() {}


    /**
     * Converts a given Task into this class for JAXB use.
     *
     * @param source future changes to this will not affect the created XmlAdaptedTask
     */
    public XmlAdaptedTask(ReadOnlyTask source) {
        name = source.getName().fullName;
        comment = source.getComment().value;
        tagged = new ArrayList<>();
        for (Tag tag : source.getTags()) {
            tagged.add(new XmlAdaptedTag(tag));
        }
    }

    /**
     * Converts this jaxb-friendly adapted person object into the model's Task object.
     *
     * @throws IllegalValueException if there were any data constraints violated in the adapted person
     */
    public Task toModelType() throws IllegalValueException {
        final List<Tag> taskTags = new ArrayList<>();
        for (XmlAdaptedTag tag : tagged) {
            taskTags.add(tag.toModelType());
        }
        final Name name = new Name(this.name);
        final Comment comment = new Comment(this.comment);
        final UniqueTagList tags = new UniqueTagList(taskTags);
        return new Task(name, comment, tags);
    }
}

@@ -386,28 +386,112 @@
 el.task.
-ReadOnlyTask
+Priority;%0Aimport seedu.tasklist.model.task.ReadOnlyTask;%0Aimport seedu.tasklist.model.task.Status
 ;%0Aimport
@@ -721,16 +721,145 @@
 omment;%0A
+    @XmlElement(required = false)%0A    private String priority;%0A    @XmlElement(required = false)%0A    private boolean status;%0A    
 %0A    @Xm
@@ -2059,16 +2059,134 @@
 mment);%0A
+        final Priority priority = new Priority(this.priority);%0A        final Status status = new Status(this.status);%0A
         
@@ -2279,16 +2279,34 @@
 comment,
+ priority, status,
  tags);%0A

Update XmlAdaptedTask.java