- Timestamp:
- 2009-01-12T11:18:22+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/branches/rtl-gli/src/org/greenstone/gatherer/collection/Collection.java
r13819 r18358 62 62 /** A reference to the import ScriptOptions. */ 63 63 public ScriptOptions import_options; 64 /** A reference to the schedule ScriptOptions */ 65 public ScriptOptions schedule_options; 64 66 /** true if an error has occurred during construction */ 65 67 public boolean error = false; … … 86 88 /** The name of the import element. */ 87 89 static final private String IMPORT = "Import"; 90 /** The name of the schedule element. */ 91 static final private String SCHEDULE = "Schedule"; 92 /** The name of the export element. */ 93 static final private String EXPORT = "Export"; 88 94 /** The name of the imported attribute. */ 89 95 static final private String IMPORTED = "imported"; … … 111 117 } 112 118 // Finally create all of the child managers that are directly dependant on a collection 113 build_options = new ScriptOptions(getBuildValues(), "buildcol.pl"); 114 import_options = new ScriptOptions(getImportValues(), "import.pl"); 119 120 if (Configuration.fedora_info.isActive()) { 121 build_options = new ScriptOptions(getValues(BUILD), "g2f-buildcol.pl"); 122 import_options = new ScriptOptions(getValues(IMPORT), "g2f-import.pl"); 123 } 124 else { 125 build_options = new ScriptOptions(getBuildValues(), "buildcol.pl"); 126 import_options = new ScriptOptions(getImportValues(), "import.pl"); 127 schedule_options = new ScriptOptions(getScheduleValues(), "schedule.pl"); 128 } 115 129 } 116 130 … … 334 348 335 349 350 /** Method to retrieve the current import/build/export/whatever options associated with this Collection. */ 351 private Element getValues(String val_type) { 352 Element values_element = null; 353 try { 354 Element document_element = document.getDocumentElement(); 355 Element config_element = (Element) XMLTools.getNodeFromNamed(document_element, BUILD_CONFIG); 356 values_element = (Element) XMLTools.getNodeFromNamed(config_element, val_type); 357 config_element = null; 358 document_element = null; 359 } 360 catch (Exception error) { 361 DebugStream.printStackTrace(error); 362 } 363 return values_element; 364 } 365 336 366 337 367 /** Method to retrieve the current build options associated with this Collection. */ … … 349 379 } 350 380 return build_values_element; 381 } 382 383 private Element getScheduleValues() { 384 Element schedule_values_element = null; 385 try { 386 Element document_element = document.getDocumentElement(); 387 Element build_config_element = (Element) XMLTools.getNodeFromNamed(document_element, BUILD_CONFIG); 388 schedule_values_element = (Element) XMLTools.getNodeFromNamed(build_config_element, SCHEDULE); 389 build_config_element = null; 390 document_element = null; 391 } 392 catch (Exception error) { 393 DebugStream.printStackTrace(error); 394 } 395 return schedule_values_element; 351 396 } 352 397
Note:
See TracChangeset
for help on using the changeset viewer.