Changeset 10370


Ignore:
Timestamp:
2005-08-01T13:40:37+12:00 (19 years ago)
Author:
mdewsnip
Message:

Added a new LocalGreenstone class which contains functions that only make sense with a local Greenstone.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
1 added
9 edited

Legend:

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

    r10368 r10370  
    674674    }
    675675
    676     /** Retrieve the path to the PERL scripts within the Greenstone directory.
    677      * @return A <strong>String</strong> containing the path.
    678      */
    679     static public String getScriptPath() {
    680     return gsdl_path + "bin" + File.separator + "script" + File.separator;
    681     }
    682 
    683676    static public String getGS3ScriptPath() {
    684677    return gsdl3_src_path + "bin" + File.separator + "script" + File.separator;
    685     }
    686 
    687     static public String getTmpDirectoryPath()
    688     {
    689     return gsdl_path + "tmp" + File.separator;
    690678    }
    691679
  • trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r10369 r10370  
    144144    }
    145145
     146    // We have a local Greenstone
     147    if (!isGsdlRemote) {
     148        LocalGreenstone.setDirectoryPath(go.gsdl_path);
     149    }
     150
    146151    // Users may specify a non-standard collect directory (eg. when running one GLI in a network environment)
    147152    if (go.collect_directory_path != null) {
  • trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java

    r10343 r10370  
    4040import org.greenstone.gatherer.Dictionary;
    4141import org.greenstone.gatherer.Gatherer;
     42import org.greenstone.gatherer.LocalGreenstone;
    4243import org.greenstone.gatherer.gui.GComboBox;
    4344import org.greenstone.gatherer.gui.GLIButton;
     
    330331            args[0] = "Perl.exe";
    331332            }
    332             args[1] = Configuration.gsdl_path + "bin" + File.separator + "script" + File.separator + "classinfo.pl";
     333            args[1] = LocalGreenstone.getBinScriptDirectoryPath() + "classinfo.pl";
    333334            args[2] = "-xml";
    334335            args[3] = "-language";
     
    408409
    409410        // Retrieve the gsdl home directory...
    410         String directory = Configuration.gsdl_path;
     411        String directory = LocalGreenstone.getDirectoryPath();
    411412        directory = directory + "perllib" + File.separator + "classify" + File.separator;
    412413
  • trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java

    r10342 r10370  
    4141import org.greenstone.gatherer.Dictionary;
    4242import org.greenstone.gatherer.Gatherer;
     43import org.greenstone.gatherer.LocalGreenstone;
    4344import org.greenstone.gatherer.collection.CollectionContentsChangedListener;
    4445import org.greenstone.gatherer.gui.GComboBox;
     
    462463            args[0] = "Perl.exe";
    463464            }
    464             args[1] = Configuration.gsdl_path + "bin" + File.separator + "script" + File.separator + "pluginfo.pl";
     465            args[1] = LocalGreenstone.getBinScriptDirectoryPath() + "pluginfo.pl";
    465466            args[2] = "-xml";
    466467            args[3] = "-language";
     
    536537        else {
    537538        // Retrieve the gsdl home directory...
    538         String directory = Configuration.gsdl_path;
     539        String directory = LocalGreenstone.getDirectoryPath();
    539540        directory = directory + "perllib" + File.separator + "plugins" + File.separator;
    540541        loadPlugins(new File(directory));
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r10345 r10370  
    4747import org.greenstone.gatherer.Dictionary;
    4848import org.greenstone.gatherer.Gatherer;
     49import org.greenstone.gatherer.LocalGreenstone;
    4950import org.greenstone.gatherer.LocalLibraryServer;
    5051import org.greenstone.gatherer.ServletConfiguration;
     
    144145        command_parts_list.add("-S");
    145146    }
    146     command_parts_list.add(Configuration.getScriptPath() + "buildcol.pl");
     147    command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "buildcol.pl");
    147148    command_parts_list.add("-gli");
    148149    command_parts_list.add("-language");
     
    655656        command_parts_list.add("-S");
    656657    }
    657     command_parts_list.add(Configuration.getScriptPath() + "import.pl");
     658    command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "import.pl");
    658659    command_parts_list.add("-gli");
    659660    command_parts_list.add("-language");
     
    913914        command_parts_list.add("-S");
    914915    }
    915     command_parts_list.add(Configuration.getScriptPath() + "mkcol.pl");
     916    command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "mkcol.pl");
    916917
    917918    command_parts_list.add("-collectdir");
  • trunk/gli/src/org/greenstone/gatherer/collection/ScriptOptions.java

    r10006 r10370  
    99import org.greenstone.gatherer.DebugStream;
    1010import org.greenstone.gatherer.Gatherer;
     11import org.greenstone.gatherer.LocalGreenstone;
    1112import org.greenstone.gatherer.cdm.Argument;
    1213import org.greenstone.gatherer.util.ArrayTools;
     
    305306            args[0] = Configuration.perl_path;
    306307            args[1] = "-S";
    307             args[2] = Configuration.getScriptPath() + filename;
     308            args[2] = LocalGreenstone.getBinScriptDirectoryPath() + filename;
    308309            args[3] = "-xml";
    309310            args[4] = "-language";
     
    312313        else {
    313314            args = new String[4];
    314             args[0] = Configuration.getScriptPath() + filename;
     315            args[0] = LocalGreenstone.getBinScriptDirectoryPath() + filename;
    315316            args[1] = "-xml";
    316317            args[2] = "-language";
  • trunk/gli/src/org/greenstone/gatherer/gui/ExplodeMetadataPrompt.java

    r10239 r10370  
    4040import org.greenstone.gatherer.Configuration;
    4141import org.greenstone.gatherer.Gatherer;
     42import org.greenstone.gatherer.LocalGreenstone;
    4243import org.greenstone.gatherer.cdm.Argument;
    4344import org.greenstone.gatherer.cdm.CollectionDesignManager;
     
    238239        command_parts_list.add("-S");
    239240    }
    240     command_parts_list.add(Configuration.getScriptPath() + "explode_metadata_database.pl");
     241    command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "explode_metadata_database.pl");
    241242    command_parts_list.add("-plugin");
    242243    command_parts_list.add(plugin_name);
  • trunk/gli/src/org/greenstone/gatherer/gui/ExportAsPrompt.java

    r10368 r10370  
    4747import org.greenstone.gatherer.Dictionary;
    4848import org.greenstone.gatherer.Gatherer;
     49import org.greenstone.gatherer.LocalGreenstone;
    4950import org.greenstone.gatherer.collection.BasicCollectionConfiguration;
    5051import org.greenstone.gatherer.shell.GShell;
     
    288289        command_parts_list.add("-S");
    289290    }
    290     command_parts_list.add(Configuration.getScriptPath() + "export.pl");
     291    command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "export.pl");
    291292    command_parts_list.add("-gli");
    292293    command_parts_list.add("-language");
     
    296297    command_parts_list.add(export_type);
    297298    command_parts_list.add("-exportdir");
    298     command_parts_list.add(Configuration.getTmpDirectoryPath());
     299    command_parts_list.add(LocalGreenstone.getTmpDirectoryPath());
    299300
    300301    if (cd_title.equals("")) {
     
    344345    args[0] = coll_names.toString();
    345346
    346     args[1] = Configuration.getTmpDirectoryPath();
     347    args[1] = LocalGreenstone.getTmpDirectoryPath();
    347348    if(cd_title.equals("")) {
    348349        String export_type = (String)saveas_combobox.getSelectedItem();
  • trunk/gli/src/org/greenstone/gatherer/gui/WriteCDImagePrompt.java

    r10368 r10370  
    4747import org.greenstone.gatherer.Dictionary;
    4848import org.greenstone.gatherer.Gatherer;
     49import org.greenstone.gatherer.LocalGreenstone;
    4950import org.greenstone.gatherer.collection.BasicCollectionConfiguration;
    5051import org.greenstone.gatherer.shell.GShell;
     
    256257        command_parts_list.add("-S");
    257258    }
    258     command_parts_list.add(Configuration.getScriptPath() + "exportcol.pl");
     259    command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "exportcol.pl");
    259260
    260261    if (Gatherer.isGsdlRemote) {
     
    318319   
    319320    args[0] = coll_names.toString();
    320     args[1] = Configuration.getTmpDirectoryPath();
     321    args[1] = LocalGreenstone.getTmpDirectoryPath();
    321322    if(cd_title.equals("")) {
    322323        args[1] += "exported_collections";
Note: See TracChangeset for help on using the changeset viewer.