- Timestamp:
- 2009-05-13T14:14:42+12:00 (15 years ago)
- Location:
- gli/trunk/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java
r19404 r19430 89 89 90 90 /** This indicates whether a minimal or complete build is required. 91 Minimal means do everything with the -incremental flag. Complete means do everything with -removeold */ 91 Minimal means do everything with the -incremental flag. Complete means do everything with -removeold 92 Note: This stores preceisely whether the user selected the minimal or full build radio button. 93 Its value does not indicate anything about what gli eventually chose as a result of that "suggestion" */ 92 94 static private boolean isCompleteBuild = false; 93 95 96 /** These remember which scripts were run for the last build. 97 true indicated 'full-' prefix, false indicates 'incremental-' prefix to the given perl script (import.pl or buildcol.pl) 98 Note: This stores what gli did, regardless of whether minimal or full was requested by the user */ 99 static private boolean importWasFull = false; 100 static private boolean buildcolWasFull = false; 94 101 95 102 /** Constructor. Loads a certain collection configuration file, which is parsed into a DOM. This model is then registered with the command information managers, each of whom knows how to, and provides controls to, alter certain commands. … … 225 232 } 226 233 234 public static void setImportWasFull( boolean wasFull ) { 235 importWasFull = wasFull; 236 } 237 public static boolean importWasFull() { 238 return importWasFull; 239 } 240 public static void setBuildcolWasFull( boolean wasFull ) { 241 buildcolWasFull = wasFull; 242 } 243 public static boolean buildcolWasFull() { 244 return buildcolWasFull; 245 } 246 227 247 /** 228 248 * What exactly does this do? -
gli/trunk/src/org/greenstone/gatherer/collection/CollectionManager.java
r19404 r19430 189 189 } 190 190 else { 191 String buildType = (new CollectionMeta( CollectionDesignManager.collect_config.getBuildType() )).getValue(CollectionMeta.TEXT);192 if ( !CollectionDesignManager.isCompleteBuild() && buildType.equals( BuildTypeManager.BUILD_TYPE_LUCENE) ) {191 192 if ( !CollectionDesignManager.isCompleteBuild() && CollectionDesignManager.index_manager.isLucene() ) { 193 193 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "incremental-buildcol.pl"); 194 CollectionDesignManager.setBuildcolWasFull(false); 194 195 } else { 195 196 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "full-buildcol.pl"); 196 } 197 } 197 CollectionDesignManager.setBuildcolWasFull(true); 198 } 199 } 200 198 201 command_parts_list.add("-gli"); 199 202 command_parts_list.add("-language"); … … 1047 1050 } 1048 1051 else { 1049 String cmdPrefix = CollectionDesignManager.isCompleteBuild() ? "full-" : "incremental-"; 1052 String cmdPrefix = null; 1053 if ( CollectionDesignManager.isCompleteBuild() ) { 1054 cmdPrefix = "full-"; 1055 CollectionDesignManager.setImportWasFull( true ); 1056 } else { 1057 cmdPrefix = "incremental-"; 1058 CollectionDesignManager.setImportWasFull( false ); 1059 } 1050 1060 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + cmdPrefix + "import.pl"); 1051 1061 } … … 1536 1546 else if(event.getType() == GShell.BUILD && event.getStatus() == GShell.OK) { 1537 1547 1538 if ( CollectionDesignManager. isCompleteBuild() ) {1548 if ( CollectionDesignManager.buildcolWasFull() ) { 1539 1549 if(installCollection()) { 1540 1550 // If we have a local library running then ask it to add our newly create collection
Note:
See TracChangeset
for help on using the changeset viewer.