}
public AWorkspaceTreeNode getNode(XMLElement data) {
String type = data.getAttribute("type", AFolderNode.FOLDER_TYPE_PHYSICAL);
FolderLinkNode node = new FolderLinkNode(type);
String path = data.getAttribute("path", null);
if (path == null) {
return null;
}
node.setPath(URIUtils.createURI(path));
File file = URIUtils.getAbsoluteFile(node.getPath());
if (file == null) {
return null;
}
boolean monitor = Boolean.parseBoolean(data.getAttribute("monitor", "false"));
node.enableMonitoring(monitor);
boolean descending = Boolean.parseBoolean(data.getAttribute("orderDescending", "false"));
node.orderDescending(descending);
String name = data.getAttribute("name", file.getName());
node.setName(name);
return node;
}