- Timestamp:
- 2005-04-27T11:17:29+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/ExplodeMetadataPrompt.java
r9677 r9755 53 53 import org.greenstone.gatherer.shell.GShellEvent; 54 54 import org.greenstone.gatherer.shell.GShellListener; 55 import org.greenstone.gatherer.util.ArrayTools;56 55 import org.greenstone.gatherer.util.Utility; 57 56 import org.greenstone.gatherer.util.XMLTools; … … 226 225 } 227 226 228 private int explodeMetadata() { 229 230 String [] args; 227 private int explodeMetadata() 228 { 231 229 if (Gatherer.isGsdlRemote) { 232 230 // what here?? 233 231 return -1; 234 232 } 235 if(Utility.isWindows()){ 236 args = new String[5]; 237 args[0] = Configuration.perl_path; 238 args[1] = "-S"; 239 args[2] = Configuration.getScriptPath() + "explode_metadata_database.pl"; 240 args[3] = "-plugin"; 241 args[4] = plugin_name; 242 } else { 243 args = new String[3]; 244 args[0] = Configuration.getScriptPath() + "explode_metadata_database.pl"; 245 args[1] = "-plugin"; 246 args[2] = plugin_name; 247 248 } 249 // add in all the options from the user 250 args = ArrayTools.add(args, options.getValues()); 251 // add in the filename 252 args = ArrayTools.add(args, metadata_file.getPath()); 253 233 234 // Generate the explode_metadata_database.pl command 235 ArrayList command_parts_list = new ArrayList(); 236 if (Utility.isWindows() && (!Gatherer.isGsdlRemote)) { 237 command_parts_list.add(Configuration.perl_path); 238 command_parts_list.add("-S"); 239 } 240 command_parts_list.add(Configuration.getScriptPath() + "explode_metadata_database.pl"); 241 command_parts_list.add("-plugin"); 242 command_parts_list.add(plugin_name); 243 244 // Add in all the options from the user 245 String[] explode_options = options.getValues(); 246 for (int i = 0; i < explode_options.length; i++) { 247 command_parts_list.add(explode_options[i]); 248 } 249 250 // Add in the filename 251 command_parts_list.add(metadata_file.getPath()); 252 253 // Run the explode_metadata_database.pl command 254 String[] command_parts = (String[]) command_parts_list.toArray(new String[0]); 254 255 this.error_message = new StringBuffer(); 255 GShell process = new GShell( args, GShell.EXPLODE, 3, this, null, GShell.GSHELL_EXPLODE);256 GShell process = new GShell(command_parts, GShell.EXPLODE, 3, this, null, GShell.GSHELL_EXPLODE); 256 257 //process.start(); 257 258 process.run();
Note:
See TracChangeset
for help on using the changeset viewer.