Ignore:
Timestamp:
2008-02-12T16:13:13+13:00 (16 years ago)
Author:
davidb
Message:

Changes to GLI to support export into Fedora. New utility called flisvn diff gems/MetadataSetManager.java

File:
1 edited

Legend:

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

    r14302 r14974  
    6969    /** The name of the general Gatherer configuration file for running with GS3. */
    7070    static public String GS3_CONFIG_XML = "config3.xml";
     71    static public String FEDORA_CONFIG_PREFIX = "fedora-";
    7172
    7273    /** The name of the root element of the subtree containing gatherer configuration options. This is required as the document itself may contain several other subtrees of settings (such as in the case of a '.col' file). */
     
    101102    /** If we are using GLI in Greenstone 3, the path to gsdl3 src directory (== gsdl3 dir)*/
    102103    static public String gsdl3_src_path = "";
     104
     105    static public FedoraInfo fedora_info = null;
     106   
    103107    /** The path to the PERL executable, up to and including Perl.exe. */
    104108    static public String perl_path = "";
     
    134138     * @param site_name The name of the Greenstone 3 site currently in use.
    135139     */
    136     public Configuration(String gli_user_directory_path, String gsdl_path, String gsdl3_path, String gsdl3_src_path, String site_name)
     140    public Configuration(String gli_user_directory_path, String gsdl_path, String gsdl3_path, String gsdl3_src_path, String site_name,
     141             FedoraInfo fedora_info)
    137142    {
    138143    super();
     
    145150    this.site_name = site_name;
    146151
     152    this.fedora_info = fedora_info;
     153
    147154    // Try to load the configuration file from the user specific location
    148155    String config_xml_file_name = CONFIG_XML;
     
    151158    }
    152159
     160    if (fedora_info.isActive()) {
     161        config_xml_file_name = FEDORA_CONFIG_PREFIX + config_xml_file_name;
     162    }
     163
    153164    // If the existing user config.xml file isn't recent enough, backup the old version and update it
    154165    File config_xml_file = new File(gli_user_directory_path + config_xml_file_name);
     166
    155167    if (config_xml_file != null && config_xml_file.exists()) {
    156168        just_updated_config_xml_file = updateUserConfigXMLFileIfNecessary(config_xml_file);
     
    597609    }
    598610
     611    static public String getApplicationTitle() {
     612    String gli_title = getString("GLI.Title", GENERAL_SETTING);
     613    String title = (gli_title=="") ? Gatherer.PROGRAM_NAME : gli_title;
     614
     615    return title;
     616    }
     617
     618
    599619    static public String getServletPath() {
    600620    return servlet_path;
     
    688708    File user_config_xml = null;
    689709    String config_xml_name = CONFIG_XML;
     710
    690711    if (gsdl3_path!=null) {
    691712        config_xml_name = GS3_CONFIG_XML;
    692713    }
    693 
     714       
    694715    if (Gatherer.isGsdlRemote) {
    695716        if (Gatherer.GS3){
     
    699720        }
    700721    }
     722
     723    if (fedora_info.isActive()) {
     724        config_xml_name = FEDORA_CONFIG_PREFIX + config_xml_name;
     725    }
     726
    701727    try {
    702728        user_config_xml = new File(gli_user_directory_path + config_xml_name);
Note: See TracChangeset for help on using the changeset viewer.