- Timestamp:
- 2013-11-28T14:45:34+13:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/gui/ExportAsPrompt.java
r26573 r28702 466 466 String export_dir = LocalGreenstone.getTmpDirectoryPath(); 467 467 if (cd_title.equals("")) { 468 export_dir += "exported_" + export_type;468 export_dir += "exported_" + selected_collection.getShortName()+ "_" +export_type; 469 469 } 470 470 else { 471 471 File cd_file = new File(cd_title); 472 472 if (cd_file.isAbsolute()) 473 export_dir = cd_title + File.separator + "exported_" + export_type;473 export_dir = cd_title + File.separator + "exported_" + selected_collection.getShortName()+ "_"+ export_type; 474 474 else{ 475 475 cd_title = cd_title.replaceAll("\\s+",""); … … 482 482 command_parts_list.add(export_dir); 483 483 484 if (!export_type.endsWith("METS") && xsl_file1 !=null){ 485 command_parts_list.add("-xsltfile"); 486 command_parts_list.add(xsl_file1.getPath()); 487 } 488 489 //add command specific to MARCXML 484 // check the xslt/mapping file values. 485 486 // now we build up the saveas options 487 StringBuffer saveas_options = new StringBuffer(); 488 490 489 if (export_type.equals("MARCXML")){ 491 //add default transformation file 492 if (xsl_file1 == null){ 493 command_parts_list.add("-xsltfile"); 494 command_parts_list.add(Configuration.gsdl_path+"etc"+File.separator+"dc2marc.xsl"); 495 } 496 497 command_parts_list.add("-mapping_file"); 498 //default mapping file 499 if (mapping_file == null){ 500 command_parts_list.add(Configuration.gsdl_path+"etc"+File.separator+"dc2marc-mapping.xml"); 501 } 502 else{ 503 command_parts_list.add(mapping_file.getPath()); 504 } 505 490 if (!convert_xml_field1.getText().equals("")) { 491 saveas_options.append("-xslt_file "); 492 saveas_options.append(convert_xml_field1.getText()+" "); 493 } 494 if (!mapping_xml_field.getText().equals("")) { 495 saveas_options.append("-mapping_file "); 496 saveas_options.append(mapping_xml_field.getText()+" "); 497 } 506 498 if (output_single_checkbox.isSelected()){ 507 command_parts_list.add("-group_marc"); 508 } 509 510 } 511 512 513 if (export_type.endsWith("METS") && xsl_file1 !=null){ 514 command_parts_list.add("-xslt_txt"); 515 command_parts_list.add(xsl_file1.getPath()); 516 } 517 518 if (export_type.endsWith("METS") && xsl_file2 !=null){ 519 command_parts_list.add("-xslt_mets"); 520 command_parts_list.add(xsl_file2.getPath()); 499 saveas_options.append("-group "); 500 } 501 } 502 else if (export_type.endsWith("METS")) { 503 if (!convert_xml_field1.getText().equals("")) { 504 saveas_options.append("-xslt_txt "); 505 saveas_options.append(convert_xml_field1.getText()+" "); 506 } 507 if (!convert_xml_field2.getText().equals("")) { 508 saveas_options.append("-xslt_mets "); 509 saveas_options.append(convert_xml_field2.getText()+" "); 510 } 511 } 512 else if (export_type.equals("DSpace")) { 513 if (!convert_xml_field1.getText().equals("")) { 514 saveas_options.append("-xslt_file "); 515 saveas_options.append(convert_xml_field1.getText()+" "); 516 } 521 517 } 522 518 519 if (saveas_options.length()>0) { 520 command_parts_list.add("-saveas_options"); 521 command_parts_list.add(saveas_options.toString()); 522 } 523 523 524 command_parts_list.add( selected_collection.getShortName()); 524 525 … … 527 528 for (int i = 0; i < command_parts_list.size(); i++) { 528 529 DebugStream.print(command_parts_list.get(i) + " "); 529 //System.err.print( command_parts_list.get(i)+ " ");530 //System.err.print("'"+command_parts_list.get(i)+"'" + " "); 530 531 } 531 532 DebugStream.println(""); … … 562 563 args[1] = LocalGreenstone.getTmpDirectoryPath(); 563 564 if (cd_title.equals("")) { 564 args[1] += "exported_" + export_type;565 args[1] += "exported_" + selected_collection.getShortName()+"_"+export_type; 565 566 } 566 567 else { 567 568 File cd_file = new File(cd_title); 568 569 if (cd_file.isAbsolute()) 569 args[1] = cd_title + File.separator + "exported_" + export_type;570 args[1] = cd_title + File.separator + "exported_" + selected_collection.getShortName()+"_"+export_type; 570 571 else{ 571 572 cd_title = cd_title.replaceAll("\\s+","");
Note:
See TracChangeset
for help on using the changeset viewer.