Changeset 15362 for gli


Ignore:
Timestamp:
05/07/08 18:49:05 (13 years ago)
Author:
ak19
Message:

Modified built() to check whether FLI collection has been built for greenstone 3 (not just for greenstone 2)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/collection/CollectionManager.java

    r15155 r15362  
    215215    public boolean built() {
    216216    if(collection != null) {
    217         // Determine if the collection has been built by looking for the build.cfg (gs20 buildConfig.xml (gs3) or export.inf (fedora) file
     217        // Determine if the collection has been built by looking for the build.cfg (gs2)
     218        // buildConfig.xml (gs3) or export.inf (fedora) file
    218219        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 
     220       
     221        if (Configuration.fedora_info.isActive()) { // FLI case
     222        // Fedora build
     223        //file_name = getLoadedCollectionArchivesDirectoryPath() + "import.inf";
     224        file_name = getLoadedCollectionExportDirectoryPath() + "export.inf";
     225        } else {
     226        // GLI is running, check if it's greenstone 3 or greenstone 2
     227        if (Gatherer.GS3) { // GS3 GLI
     228            file_name = getLoadedCollectionIndexDirectoryPath() + Utility.BUILD_CONFIG_XML;
     229        }
     230        else { // greenstone 2 GLI
     231            file_name = getLoadedCollectionIndexDirectoryPath() + Utility.BUILD_CFG;           
     232        }
     233        }
    234234        File test_file = new File(file_name);
    235235        return test_file.exists();
Note: See TracChangeset for help on using the changeset viewer.