- Timestamp:
- 2008-02-12T16:13:13+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/collection/CollectionManager.java
r14817 r14974 159 159 command_parts_list.add("-S"); 160 160 } 161 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "buildcol.pl"); 161 162 if (Configuration.fedora_info.isActive()) { 163 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "g2f-buildcol.pl"); 164 165 command_parts_list.add("-hostname"); 166 command_parts_list.add(Configuration.fedora_info.getHostname()); 167 168 command_parts_list.add("-port"); 169 command_parts_list.add(Configuration.fedora_info.getPort()); 170 171 command_parts_list.add("-username"); 172 command_parts_list.add(Configuration.fedora_info.getUsername()); 173 174 command_parts_list.add("-password"); 175 command_parts_list.add(Configuration.fedora_info.getPassword()); 176 177 command_parts_list.add("-protocol"); 178 command_parts_list.add(Configuration.fedora_info.getProtocol()); 179 180 } 181 else { 182 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "buildcol.pl"); 183 } 162 184 command_parts_list.add("-gli"); 163 185 command_parts_list.add("-language"); … … 193 215 public boolean built() { 194 216 if(collection != null) { 195 // Determine if the collection has been built by looking for the build.cfg or buildConfig.xml file 196 String file_name = (Gatherer.GS3)? Utility.BUILD_CONFIG_XML : Utility.BUILD_CFG; 197 File build_cfg_file = new File(getLoadedCollectionIndexDirectoryPath() + file_name); 198 return build_cfg_file.exists(); 217 // Determine if the collection has been built by looking for the build.cfg (gs20 buildConfig.xml (gs3) or export.inf (fedora) file 218 String file_name = ""; 219 220 if (Gatherer.GS3) { 221 file_name = getLoadedCollectionIndexDirectoryPath() + Utility.BUILD_CONFIG_XML; 222 } 223 else { 224 if (Configuration.fedora_info.isActive()) { 225 // Fedora build 226 //file_name = getLoadedCollectionArchivesDirectoryPath() + "import.inf"; 227 file_name = getLoadedCollectionExportDirectoryPath() + "export.inf"; 228 } 229 else { 230 file_name = getLoadedCollectionIndexDirectoryPath() + Utility.BUILD_CFG; 231 } 232 } 233 234 File test_file = new File(file_name); 235 return test_file.exists(); 199 236 } 200 237 return false; … … 592 629 } 593 630 631 /** Returns the absolute filename of the loaded collection's export directory. 632 */ 633 static public String getLoadedCollectionExportDirectoryPath() 634 { 635 return getLoadedCollectionDirectoryPath() + "export" + File.separator; 636 } 637 638 594 639 595 640 /** Returns the absolute filename of the loaded collection's building directory. … … 764 809 command_parts_list.add("-S"); 765 810 } 766 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "import.pl"); 811 812 if (Configuration.fedora_info.isActive()) { 813 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "g2f-import.pl"); 814 815 command_parts_list.add("-hostname"); 816 command_parts_list.add(Configuration.fedora_info.getHostname()); 817 818 command_parts_list.add("-port"); 819 command_parts_list.add(Configuration.fedora_info.getPort()); 820 821 command_parts_list.add("-username"); 822 command_parts_list.add(Configuration.fedora_info.getUsername()); 823 824 command_parts_list.add("-password"); 825 command_parts_list.add(Configuration.fedora_info.getPassword()); 826 827 command_parts_list.add("-protocol"); 828 command_parts_list.add(Configuration.fedora_info.getProtocol()); 829 } 830 else { 831 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "import.pl"); 832 } 833 767 834 command_parts_list.add("-gli"); 768 835 command_parts_list.add("-language"); … … 1339 1406 private boolean installCollection() 1340 1407 { 1408 if (Configuration.fedora_info.isActive()) { 1409 DebugStream.println("Fedora build complete. No need to move files."); 1410 return true; 1411 } 1412 1413 1341 1414 DebugStream.println("Build complete. Moving files."); 1342 1415
Note:
See TracChangeset
for help on using the changeset viewer.