public Object read(Element elem) throws IOException {
return readJob(elem);
}
public JobSubmission readJob(Element elem) throws IOException {
JobSubmission submission = new JobSubmission();
List children = elem.getChildren();
Element child;
for(int i=0; i<children.size(); i++) {
child = (Element)children.get(i);
String name = child.getName().toLowerCase();
if (name.equals("task"))
submission.setTaskId(child.getText());
else if (name.equals("parameters")) {
Map params = (Map)mapSerializer.read(child);
submission.setInputs(params);
}
}
return submission;
}