- project.setDescription(projectNode.getNode("description").getValue());
- project.setIndexFile(projectNode.getNode("index-file").getValue());
- project.setLastInsertionTime(Long.parseLong(projectNode.getNode("last-insertion-time").getValue()));
- project.setLocalPath(projectNode.getNode("local-path").getValue());
- project.setName(projectNode.getNode("name").getValue());
- project.setPath(projectNode.getNode("path").getValue());
- project.setInsertURI(projectNode.getNode("insert-uri").getValue());
- project.setRequestURI(projectNode.getNode("request-uri").getValue());
+ project.setDescription(projectNode.getNode("description").getValue(""));
+ String indexFile = projectNode.getNode("index-file").getValue("");
+ if (indexFile.indexOf('/') > -1) {
+ indexFile = "";
+ }
+ project.setIndexFile(indexFile);
+ project.setLastInsertionTime(Long.parseLong(projectNode.getNode("last-insertion-time").getValue("0")));
+ project.setLocalPath(projectNode.getNode("local-path").getValue(""));
+ project.setName(projectNode.getNode("name").getValue(""));
+ project.setPath(projectNode.getNode("path").getValue(""));
+ if ((project.getPath() != null) && (project.getPath().indexOf("/") != -1)) {
+ project.setPath(project.getPath().replaceAll("/", ""));
+ }
+ project.setEdition(Integer.parseInt(projectNode.getNode("edition").getValue("0")));
+ project.setInsertURI(projectNode.getNode("insert-uri").getValue(""));
+ project.setRequestURI(projectNode.getNode("request-uri").getValue(""));
+ if (projectNode.getNode("ignore-hidden-files") != null) {
+ project.setIgnoreHiddenFiles(Boolean.parseBoolean(projectNode.getNode("ignore-hidden-files").getValue("true")));
+ } else {
+ project.setIgnoreHiddenFiles(true);
+ }