Ignore:
Timestamp:
2009-01-12T11:19:54+13:00 (15 years ago)
Author:
kjdon
Message:

updated the rtl-gli branch with files from trunk. Result of a merge 14807:18318

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/branches/rtl-gli/src/org/greenstone/gatherer/GathererApplet.java

    r13599 r18363  
    8787    // Ensure platform specific LAF
    8888    try {
    89         UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
     89        //UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
     90        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    9091    }
    9192    catch (Exception exception) {
     
    115116    Gatherer.isApplet = true;
    116117    String library_url_string = fullLibraryURL(getParameter("gwcgi"));
    117     String gliserver_url_string = library_url_string.substring(0, library_url_string.lastIndexOf('/') + 1) + "gliserver.pl";
     118
     119    String gs3 = getParameter("gsdl3");
     120    boolean isGS3 = (gs3 == null || !gs3.equals("true")) ? false : true;
     121
     122    String gliserver_url_string;
     123    if(!isGS3) {
     124        gliserver_url_string = library_url_string.substring(0, library_url_string.lastIndexOf('/') + 1) + "gliserver.pl";
     125    } else {
     126        gliserver_url_string = library_url_string + "/cgi-bin/gliserver.pl";
     127    }
    118128
    119129        // String debug_param = getParameter("debug");
     
    122132        // }
    123133
    124     String[] args = { "-use_remote_greenstone",
    125               "-gliserver_url", gliserver_url_string,
    126               "-library_url", library_url_string,
    127               // "-debug",
    128                     };
    129 
     134    String[] args;
     135    if(!isGS3) {
     136        String[] gs2_args = {
     137        "-use_remote_greenstone",
     138        "-gliserver_url", gliserver_url_string,
     139        "-library_url", library_url_string,
     140        // "-debug",
     141        };
     142        args = gs2_args;
     143    } else { // >= GS3
     144        String[] gs3_args = {
     145        "-use_remote_greenstone",
     146        "-gliserver_url", gliserver_url_string,
     147        "-library_url", library_url_string,
     148        "-gsdl3",
     149        //"-debug",
     150        };
     151        args = gs3_args;
     152    }
     153   
    130154    File collect_directory = new File(Gatherer.getCollectDirectoryPath());
    131155    if (!collect_directory.exists()) {
     
    178202    System.err.println("Destroy called");
    179203    gatherer.exit();
     204    gatherer = null;
    180205    System.err.println("Done gatherer exit.");
    181206    }
     
    189214
    190215    /**
    191      * Method which unzips a given metadata resoure.
     216     * Method which unzips a given metadata resource.
    192217     * @param jar_zip_fname The name of the jar file as a <strong>String</strong>.
    193218     * @param dst_dir The destination directory for unzipping, also as a <strong>String</strong>.
Note: See TracChangeset for help on using the changeset viewer.