Changeset 4799 for trunk/gli/src
- Timestamp:
- 2003-06-25T13:54:46+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r4686 r4799 625 625 current_collection_directory = Utility.getCollectionDir(Gatherer.config.gsdl_path) + collection.getName(); 626 626 } 627 628 627 // Create the workspace tree. 629 628 FileNode workspace_root = new FileNode("ABS_ROOT"); … … 631 630 // Create and add Greenstone collections node. 632 631 // Starting at the collection directory of gsdl... 633 File start = new File(Utility.getCollectionDir(Gatherer.config.gsdl_path));634 632 FileNode world_root = new FileNode(get("Tree.World")); 633 world_root.unmap(); 635 634 workspace_root.insert(world_root); 636 // For each of the children directories, which are collections...637 File cols[] = start.listFiles();638 ArrayTools.sort(cols);639 // We add their import and gimport directories, but only if its not our current collection.640 for(int i = 0; cols != null && i < cols.length; i++) {641 ///ystem.err.print("Collection: " + collection);642 ///ystem.err.print(" Current collection dir: " + current_collection_directory);643 ///ystem.err.print(" Col " + i + " : " + cols[i] + "\n");644 if(collection == null || (!current_collection_directory.equals(cols[i].getAbsolutePath()) && !cols[i].getName().equals("modelcol"))) {645 File dirs[] = cols[i].listFiles();646 ArrayTools.sort(dirs);647 File import_dir = new File(cols[i], "gimport");648 if(!import_dir.exists()) {649 import_dir = new File(cols[i], "import");650 }651 if(import_dir.exists()) {652 FileNode collection_root = new FileNode(import_dir, cols[i].getName(), true);653 world_root.insert(collection_root);654 collection_root = null;655 }656 import_dir = null;657 }658 }659 635 // Create Local File space. 660 636 // Get all the available roots mounted on the system.
Note:
See TracChangeset
for help on using the changeset viewer.