- Timestamp:
- 2008-02-12T16:13:13+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/Configuration.java
r14302 r14974 69 69 /** The name of the general Gatherer configuration file for running with GS3. */ 70 70 static public String GS3_CONFIG_XML = "config3.xml"; 71 static public String FEDORA_CONFIG_PREFIX = "fedora-"; 71 72 72 73 /** 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). */ … … 101 102 /** If we are using GLI in Greenstone 3, the path to gsdl3 src directory (== gsdl3 dir)*/ 102 103 static public String gsdl3_src_path = ""; 104 105 static public FedoraInfo fedora_info = null; 106 103 107 /** The path to the PERL executable, up to and including Perl.exe. */ 104 108 static public String perl_path = ""; … … 134 138 * @param site_name The name of the Greenstone 3 site currently in use. 135 139 */ 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) 137 142 { 138 143 super(); … … 145 150 this.site_name = site_name; 146 151 152 this.fedora_info = fedora_info; 153 147 154 // Try to load the configuration file from the user specific location 148 155 String config_xml_file_name = CONFIG_XML; … … 151 158 } 152 159 160 if (fedora_info.isActive()) { 161 config_xml_file_name = FEDORA_CONFIG_PREFIX + config_xml_file_name; 162 } 163 153 164 // If the existing user config.xml file isn't recent enough, backup the old version and update it 154 165 File config_xml_file = new File(gli_user_directory_path + config_xml_file_name); 166 155 167 if (config_xml_file != null && config_xml_file.exists()) { 156 168 just_updated_config_xml_file = updateUserConfigXMLFileIfNecessary(config_xml_file); … … 597 609 } 598 610 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 599 619 static public String getServletPath() { 600 620 return servlet_path; … … 688 708 File user_config_xml = null; 689 709 String config_xml_name = CONFIG_XML; 710 690 711 if (gsdl3_path!=null) { 691 712 config_xml_name = GS3_CONFIG_XML; 692 713 } 693 714 694 715 if (Gatherer.isGsdlRemote) { 695 716 if (Gatherer.GS3){ … … 699 720 } 700 721 } 722 723 if (fedora_info.isActive()) { 724 config_xml_name = FEDORA_CONFIG_PREFIX + config_xml_name; 725 } 726 701 727 try { 702 728 user_config_xml = new File(gli_user_directory_path + config_xml_name);
Note:
See TracChangeset
for help on using the changeset viewer.