Changeset 6590 for trunk/gli/src/org/greenstone/gatherer/file
- Timestamp:
- 2004-01-22T16:19:34+13:00 (20 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/file
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/file/FileSystemModel.java
r6255 r6590 58 58 FileNode first_node = (FileNode)path.getPathComponent(0); 59 59 if(current.equals(first_node)) { 60 ///atherer.println("First path component matches root node.");60 Gatherer.println("First path component matches root node."); 61 61 // For each path with this tree path 62 62 for(int i = 1; current != null && i < path.getPathCount(); i++) { 63 63 // Retrieve the stale path 64 FileNode stale_node = (FileNode) path.getPathComponent(i); 65 ///atherer.print("Searching for '" + stale_node + "': "); 64 Object stale_object = path.getPathComponent(i); 65 FileNode stale_node = null; 66 if(stale_object instanceof FileNode) { 67 stale_node = (FileNode) stale_object; 68 } 69 Gatherer.print("Searching for '" + stale_node + "': "); 66 70 // Locate the fresh node by searching current's children. Remember to ensure that current is mapped. 67 71 current.map(); … … 71 75 for(int j = 0; !found && j < current.getChildCount(); j++) { 72 76 FileNode child_node = (FileNode) current.getChildAt(j); 73 ///atherer.print(child_node + " ");74 if( stale_node.equals(child_node)) {77 Gatherer.print(child_node + " "); 78 if((stale_node != null && stale_node.equals(child_node)) || stale_object.toString().equals(child_node.toString())) { 75 79 found = true; 76 80 current = child_node; 77 ///atherer.println("Found!");81 Gatherer.println("Found!"); 78 82 } 79 83 child_node = null; … … 82 86 for(int j = 0; !found && j < current.size(); j++) { 83 87 FileNode child_node = (FileNode) current.get(j); 84 ///atherer.print(child_node + " ");85 if( stale_node.equals(child_node)) {88 Gatherer.print(child_node + " "); 89 if((stale_node != null && stale_node.equals(child_node)) || stale_object.toString().equals(child_node.toString())) { 86 90 found = true; 87 91 current = child_node; 88 ///atherer.println("Found!");92 Gatherer.println("Found!"); 89 93 } 90 94 child_node = null; … … 93 97 if(!found) { 94 98 current = null; 95 ///atherer.println("Not Found!");99 Gatherer.println("Not Found!"); 96 100 } 97 101 // Repeat as necessary 98 102 } 99 103 } 100 ///atherer.println("Returning node: " + new TreePath(current.getPath()));104 Gatherer.println("Returning node: " + new TreePath(current.getPath())); 101 105 return current; 102 106 } -
trunk/gli/src/org/greenstone/gatherer/file/WorkspaceTreeModel.java
r6582 r6590 91 91 92 92 loadWebCacheMappings(); 93 93 94 } 94 95
Note:
See TracChangeset
for help on using the changeset viewer.