greenstone.org greenstone wiki greenstone trac planet greenstone

Changeset 15362

Show
Ignore:
Timestamp:
2008-05-07 18:49:05 (5 months ago)
Author:
ak19
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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();