- Timestamp:
- 2003-12-02T17:15:47+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r6061 r6086 139 139 */ 140 140 public void addDirectoryMapping(String name, File file) { 141 if(ready()) { 142 // Update the information stored in the collection 143 collection.addDirectoryMapping(name, file); 144 // Now update the tree 145 Gatherer.g_man.collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED); 146 } 141 // Update the information stored in the Gatherer config 142 Gatherer.config.addDirectoryMapping(name, file); 143 // Now update the tree 144 Gatherer.g_man.collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED); 147 145 } 148 146 /** This method calls the builcol.pl scripts via a GShell so as to not lock up the processor. … … 667 665 static public FileNode[] getCollectionSpecificMappings() 668 666 { 669 if (!ready()) {670 return null;671 }672 673 667 // Return any predefined special directories 674 HashMap mappings = collection.getDirectoryMappings();668 HashMap mappings = Gatherer.config.getDirectoryMappings(); 675 669 FileNode[] mapping_nodes = new FileNode[mappings.size()]; 676 670 Iterator mappings_iterator = mappings.keySet().iterator(); … … 680 674 mapping_nodes[i] = new FileNode(mapping_file, mapping_name); 681 675 } 682 683 676 return mapping_nodes; 684 677 } … … 1136 1129 */ 1137 1130 public File removeDirectoryMapping(FileNode target) { 1138 File file = null; 1139 if(ready()) { 1140 // Remove from collection, remembering file 1141 file = collection.removeDirectoryMapping(target.toString()); 1142 // Update tree. 1143 Gatherer.g_man.collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED); 1144 } 1131 // Remove from config, remembering file 1132 File file = Gatherer.config.removeDirectoryMapping(target.toString()); 1133 // Update tree. 1134 Gatherer.g_man.collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED); 1145 1135 return file; 1146 1136 }
Note:
See TracChangeset
for help on using the changeset viewer.