if (extDescription.getPackageName() != null)
elem.addContent(Util.createElement("package", extDescription.getPackageName()));
}
}
public TaskDescription readDescription(Element elem) {
ExtendedTaskDescription description = new ExtendedTaskDescription();
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("name"))
description.setName(child.getText());
else if (name.equals("description"))
description.setDescription(child.getText());
else if (name.equals("type"))
description.setType(child.getText());
else if (name.equals("group"))
description.setGroup(child.getText());
else if (name.equals("package"))
description.setPackageName(child.getText());
}
return description;
}