Changeset 9137
- Timestamp:
- 2005-02-22T15:40:26+13:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java
r8812 r9137 48 48 import org.greenstone.gatherer.Gatherer; 49 49 import org.greenstone.gatherer.cdm.SearchTypeManager; 50 import org.greenstone.gatherer.collection.BuildOptions;51 50 import org.greenstone.gatherer.collection.Collection; 52 51 import org.greenstone.gatherer.shell.GBasicProgressMonitor; … … 519 518 Collection current_collection = Gatherer.c_man.getCollection(); 520 519 if (current_collection != previous_collection && !Gatherer.c_man.isImporting()) { 521 this.options_pane = new OptionsPane(current_collection. build_options);520 this.options_pane = new OptionsPane(current_collection.import_options, current_collection.build_options); 522 521 if (previous_collection != null) { 523 522 // clear the log … … 627 626 // Set removeold automatically. 628 627 if(Gatherer.c_man.ready() && Gatherer.c_man.built()) { 629 Gatherer.c_man.getCollection(). build_options.setImportValue("removeold", true, null);628 Gatherer.c_man.getCollection().import_options.setValue("removeold", true, null); 630 629 } 631 630 // Call CollectionManagers method to build collection. … … 664 663 build_monitor.reset(); 665 664 // Set removeold automatically. 666 Gatherer.c_man.getCollection(). build_options.setImportValue("removeold", true, null);665 Gatherer.c_man.getCollection().import_options.setValue("removeold", true, null); 667 666 // Remove the collection lock. 668 667 //Gatherer.g_man.lockCollection(false, false); -
trunk/gli/src/org/greenstone/gatherer/gui/OptionsPane.java
r9045 r9137 49 49 import org.greenstone.gatherer.Gatherer; 50 50 import org.greenstone.gatherer.cdm.Argument; 51 import org.greenstone.gatherer.collection. BuildOptions;51 import org.greenstone.gatherer.collection.ScriptOptions; 52 52 import org.greenstone.gatherer.collection.Collection; 53 53 import org.greenstone.gatherer.collection.CollectionManager; … … 83 83 private ArrayList current_controls; 84 84 85 /** The <strong>BuildOptions</strong> data object contains all the option settings we wish to persist between Gatherer sessions (and thus is stored in <strong>Collection</strong>). */ 86 private BuildOptions build_options = null; 85 /** The <strong>ScriptOptions</strong> data object contains all the option settings we wish to persist between Gatherer sessions (and thus is stored in <strong>Collection</strong>). */ 86 private ScriptOptions build_options = null; 87 private ScriptOptions import_options = null; 87 88 88 89 private FileEntry file_entry = null; … … 96 97 97 98 /** The default constructor creates the few session length options, but either retrieves the rest from the current collection, or creates a default set of options. */ 98 public OptionsPane( BuildOptions build_options) {99 public OptionsPane(ScriptOptions import_options, ScriptOptions build_options) { 99 100 this.build_options = build_options; 101 this.import_options = import_options; 100 102 this.current_controls = new ArrayList(); 101 103 this.writing_documents = new Vector(); … … 127 129 ArrayList build_arguments = new ArrayList(); 128 130 int current_mode = Configuration.getMode(); 129 int total_build_argument_count = build_options.getBuildArgumentCount(); 131 int total_build_argument_count = build_options.getArgumentCount(); 132 130 133 for(int i = 0; i < total_build_argument_count; i++) { 131 134 // Retrieve the argument so we know how to format the control. 132 Argument argument = build_options.get BuildArgument(i);135 Argument argument = build_options.getArgument(i); 133 136 if(!argument.isHiddenGLI() && argument.getModeLevel() <= current_mode) { 134 137 // Now attempt to retrieve any existing value for this argument. 135 boolean enabled = build_options.get BuildValueEnabled(argument.getName());136 String value = build_options.get BuildValue(argument.getName());138 boolean enabled = build_options.getValueEnabled(argument.getName()); 139 String value = build_options.getValue(argument.getName()); 137 140 ArgumentControl argument_control = new ArgumentControl(BUILD, argument, enabled, value); 138 141 build_arguments.add(argument_control); … … 187 190 ArrayList import_arguments = new ArrayList(); 188 191 int current_mode = Configuration.getMode(); 189 int total_import_argument_count = build_options.getImportArgumentCount();192 int total_import_argument_count = import_options.getArgumentCount(); 190 193 for(int i = 0; i < total_import_argument_count; i++) { 191 194 // Retrieve the argument so we know how to format the control. 192 Argument argument = build_options.getImportArgument(i);195 Argument argument = import_options.getArgument(i); 193 196 if(!argument.isHiddenGLI() && argument.getModeLevel() <= current_mode) { 194 197 // Now attempt to retrieve any existing value for this argument. 195 boolean enabled = build_options.getImportValueEnabled(argument.getName());196 String value = build_options.getImportValue(argument.getName());198 boolean enabled = import_options.getValueEnabled(argument.getName()); 199 String value = import_options.getValue(argument.getName()); 197 200 ArgumentControl argument_control = new ArgumentControl(IMPORT, argument, enabled, value); 198 201 import_arguments.add(argument_control); … … 573 576 if(!enable && value == null) { 574 577 if(type == BUILD) { 575 build_options.remove BuildValue(name);578 build_options.removeValue(name); 576 579 } 577 580 else { 578 build_options.removeImportValue(name);581 import_options.removeValue(name); 579 582 } 580 583 } … … 582 585 else { 583 586 if(type == BUILD) { 584 build_options.set BuildValue(name, enable, value);587 build_options.setValue(name, enable, value); 585 588 } 586 589 else { 587 build_options.setImportValue(name, enable, value);590 import_options.setValue(name, enable, value); 588 591 } 589 592 } -
trunk/gli/src/org/greenstone/gatherer/shell/GShell.java
r9095 r9137 504 504 if(type == IMPORT || type == BUILD) { 505 505 if(type == IMPORT) { 506 out_name = (String) Gatherer.c_man.getCollection(). build_options.getImportValue("out");506 out_name = (String) Gatherer.c_man.getCollection().import_options.getValue("out"); 507 507 } 508 508 else { 509 out_name = (String) Gatherer.c_man.getCollection().build_options.get BuildValue("out");509 out_name = (String) Gatherer.c_man.getCollection().build_options.getValue("out"); 510 510 } 511 511 if(out_name != null && out_name.length() > 0) {
Note:
See TracChangeset
for help on using the changeset viewer.