Ignore:
Timestamp:
2008-09-04T11:16:50+12:00 (16 years ago)
Author:
kjdon
Message:

added GreenstoneMETS and FedoraMETS instead of METS in the saveas list. changed all .equals(METS) tests to .endsWith(METS)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/gui/ExportAsPrompt.java

    r14045 r17132  
    159159    plugoutMap.put("DSpace","dublin-core.xml");
    160160        plugoutMap.put("MARCXML","doc.xml");   
    161     plugoutMap.put("METS","doctxt.xml,docmets.xml");     
     161    plugoutMap.put("GreenstoneMETS","doctxt.xml,docmets.xml");     
     162    plugoutMap.put("FedoraMETS","doctxt.xml,docmets.xml");     
    162163    plugoutMap.put("GA","doc.xml");
    163164
     165    // this is the order we want them to appear in the list
     166    String [] saveas_formats = {"GA", "GreenstoneMETS", "FedoraMETS", "MARCXML", "DSpace"};
    164167        cancel_button = new GLIButton(Dictionary.get("General.Close"), Dictionary.get("General.Close_Tooltip"));
    165168   
     
    178181   
    179182             
    180         // Save As
    181     ArrayList saveas_formats = new ArrayList(plugoutMap.keySet());
    182183       
    183184        saveas_label = new JLabel(Dictionary.get("ExportAsPrompt.SaveAs")
     
    185186        //saveas_label.setPreferredSize(LABEL_SIZE);
    186187       
    187         saveas_combobox = new JComboBox(saveas_formats.toArray());
     188    saveas_combobox = new JComboBox(saveas_formats);
    188189    saveas_combobox.setOpaque(false);
    189190    saveas_combobox.setToolTipText(Dictionary.get("ExportAsPrompt.SaveAs_Tooltip"));
     
    334335    }
    335336        else{
    336         if (saveas.equals("METS")){
     337        if (saveas.endsWith("METS")){
    337338        convert_xml_pane.add(convert_xml_pane2);
    338339        }
     
    448449        command_parts_list.add(export_dir);
    449450
    450         if (!export_type.equals("METS") && xsl_file1 !=null){
     451        if (!export_type.endsWith("METS") && xsl_file1 !=null){
    451452             command_parts_list.add("-xsltfile");
    452453             command_parts_list.add(xsl_file1.getPath());
     
    477478
    478479           
    479         if (export_type.equals("METS") && xsl_file1 !=null){
     480        if (export_type.endsWith("METS") && xsl_file1 !=null){
    480481             command_parts_list.add("-xslt_txt");
    481482             command_parts_list.add(xsl_file1.getPath());
    482483    }
    483484
    484          if (export_type.equals("METS") && xsl_file2 !=null){
     485         if (export_type.endsWith("METS") && xsl_file2 !=null){
    485486             command_parts_list.add("-xslt_mets");
    486487             command_parts_list.add(xsl_file2.getPath());
     
    575576        details = Dictionary.get("ExportAsPrompt.Failed_Details", args);
    576577    }
    577     SimpleResultDialog result_dialog = new SimpleResultDialog(title, label, details);
     578    SimpleResultDialog result_dialog = new SimpleResultDialog(this, title, label, details);
    578579    result_dialog.setVisible(true); // Blocks
    579580    result_dialog.dispose();
     
    840841        }
    841842
    842         if (!saveas.equals("METS")){
     843        if (!saveas.endsWith("METS")){
    843844   
    844845        convert_xml_checkbox1.setText(Dictionary.get("ExportAsPrompt.ApplyXSL",(String)plugoutMap.get(saveas)));   
Note: See TracChangeset for help on using the changeset viewer.