package jaxb.classes;
import javax.xml.bind.annotation.*;
@XmlAccessorType(XmlAccessType.FIELD)
public class Task {
@XmlElement(name="input")
private String input; // String representing the input file
@XmlElement(name="output")
private String output; // String representing the output file
@XmlElement(name="format")
private Format format; // a jaxb.classes.Format representing the format of conversion
@XmlElement(name="taskID")
private long taskID; // a unique ID for each task.
@XmlElement(name="isReady")
public boolean isReady; // boolean value representing whether the task is ready for conversion
public boolean isChanging; // boolean representing if the user is changing the task DO NOT MARSHALL
public boolean isExecuting; // boolean representing whether the task is being executed DO NOT MARSHALL
public long getTaskID(){
return taskID;
}
public String getInput(){
return input;
}
public String getOutput(){
return output;
}
public Format getFormat(){
return format;
}
public void setOutput(String out){
output = out;
}
public void setFormat(Format f){
format = f;
}
}
因此,这是一个代表待转换任务的类。这将被转换为包含保存数据的 XML。但是,
我不希望被制成 XML。我希望他们在被读回时成为。 isChanging
isExecuting
false
我怎样才能做到这一点 ?