Changeset 10540
- Timestamp:
- 2005-08-19T13:40:25+12:00 (19 years ago)
- Location:
- trunk/gli
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/classes/dictionary.properties
r10388 r10540 770 770 MissingEXEC_GS3.Message:Warning! You will not be able to view your new collections within the Librarian Interface unless you specify the path to the Greenstone context in the locally running Tomcat Webserver. You can enter this now in the text field below, or later by going to Preferences and choosing the Connection tab. Remember that a valid url must start with the protocol "http://". The default address is http://localhost:8080/gsdl3. 771 771 MissingEXEC_GS3.Title:Missing Greenstone Library Address 772 #***** Missing GLIServer ***** 773 MissingGLIServer.Message:Warning! You will not be able to work with collections within the Librarian Interface unless you specify the address of the remote Greenstone "gliserver" script. You can enter this now in the text field below, or later by going to Preferences and choosing the Connection tab. Remember that a valid URL must start with the protocol "http://" and end with "gliserver". 774 MissingGLIServer.Title:Missing GLIServer Address 772 775 #***** Missing GSDL ***** 773 776 MissingGSDL.Message:Warning! You will not be able to access all of the Librarian Interface's features without a local copy of Greenstone Digital Library also installed. If you believe you are receiving this message in error please check your installation, and the paths specified in Librarian Interface batch or script file. -
trunk/gli/classes/xml/configRemote.xml
r10390 r10540 28 28 ]> 29 29 30 <Configuration version="2.61 ">30 <Configuration version="2.61a"> 31 31 <GathererConfig> 32 32 <!-- ***** General Options: apply globally to the GLI execution. ***** --> … … 37 37 <!-- The standard font used in the Gatherer. [Verdana, BOLD, 12] --> 38 38 <Argument name="general.font">Verdana, BOLD, 12</Argument> 39 <Argument name="general.gliserver_url"/> 39 40 <Argument name="general.library_url"/> 40 41 <Argument name="general.locale">en_NZ</Argument> … … 98 99 <Argument name="warning.MissingEXEC">true</Argument> 99 100 <Argument name="warning.MissingGSDL">true</Argument> 101 <Argument name="warning.MissingGLIServer">true</Argument> 100 102 <Argument name="warning.MissingImageMagick">true</Argument> 101 103 <Argument name="warning.MissingPERL">true</Argument> -
trunk/gli/src/org/greenstone/gatherer/Configuration.java
r10461 r10540 129 129 static private String wget_version_str = StaticStrings.NO_WGET_STR; 130 130 131 static public URL gliserver_url = null; 131 132 static public URL library_url = null; 132 133 … … 182 183 catch (MalformedURLException exception) { 183 184 DebugStream.printStackTrace(exception); 185 } 186 } 187 188 // Read the Greenstone gliserver URL from the config file, if using a remote Greenstone 189 if (Gatherer.isGsdlRemote) { 190 String gliserver_url_string = getString("general.gliserver_url", true); 191 if (!gliserver_url_string.equals("")) { 192 try { 193 gliserver_url = new URL(gliserver_url_string); 194 } 195 catch (MalformedURLException exception) { 196 DebugStream.printStackTrace(exception); 197 } 184 198 } 185 199 } -
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r10518 r10540 93 93 static public boolean isApplet = false; 94 94 static public boolean isGsdlRemote = false; 95 static public String cgiBase = "";95 static public String cgiBase = null; 96 96 97 97 // feedback stuff … … 129 129 } 130 130 131 // If a gliserver URL has been specified, we're using remote building132 if (go. gliserver_url_string != null) {131 // Are we using a remote Greenstone? 132 if (go.use_remote_greenstone) { 133 133 isGsdlRemote = true; 134 cgiBase = go.gliserver_url_string.substring(0, go.gliserver_url_string.lastIndexOf('/') + 1);135 136 // With remote building we use our own collect directory, since we can't use the Greenstone one137 setCollectDirectoryPath(getGLIUserDirectoryPath() + "collect" + File.separator);138 134 139 135 // We don't have a local Greenstone! 140 136 go.gsdl_path = null; 141 } 142 143 // We have a local Greenstone 144 if (!isGsdlRemote) { 137 138 // We have to use our own collect directory since we can't use the Greenstone one 139 setCollectDirectoryPath(getGLIUserDirectoryPath() + "collect" + File.separator); 140 141 // If a gliserver URL has been specified... 142 if (go.gliserver_url_string != null) { 143 cgiBase = go.gliserver_url_string.substring(0, go.gliserver_url_string.lastIndexOf('/') + 1); 144 } 145 } 146 // No, we have a local Greenstone 147 else { 145 148 LocalGreenstone.setDirectoryPath(go.gsdl_path); 146 149 } … … 151 154 } 152 155 153 // Special code for running with a remote Greenstone156 // More special code for running with a remote Greenstone 154 157 if (isGsdlRemote) { 155 158 Configuration.TEMPLATE_CONFIG_XML = "xml/configRemote.xml"; … … 173 176 } 174 177 175 init(go.gsdl_path, go.gsdl3_path, go.gsdl3_src_path, go.local_library_path, go.library_url_string, go.debug, 176 go.perl_path, go.no_load, go.filename, go.site_name, go.servlet_path, go.wget_path); 178 init(go.gsdl_path, go.gsdl3_path, go.gsdl3_src_path, go.local_library_path, go.library_url_string, 179 go.gliserver_url_string, go.debug, go.perl_path, go.no_load, go.filename, go.site_name, 180 go.servlet_path, go.wget_path); 177 181 } 178 182 179 183 180 184 public void init(String gsdl_path, String gsdl3_path, String gsdl3_src_path, String local_library_path, 181 String library_url_string, boolean debug_enabled, String perl_path,182 boolean no_load, String open_collection,185 String library_url_string, String gliserver_url_string, boolean debug_enabled, 186 String perl_path, boolean no_load, String open_collection, 183 187 String site_name, String servlet_path, String wget_path) 184 188 { … … 273 277 if (Configuration.library_url == null) { 274 278 missingEXEC(); 279 } 280 281 // The "-gliserver_url" option overwrites anything in the config files 282 if (gliserver_url_string != null && gliserver_url_string.length() > 0) { 283 try { 284 System.err.println("Setting gliserver_url to " + gliserver_url_string + "..."); 285 Configuration.gliserver_url = new URL(gliserver_url_string); 286 } 287 catch (MalformedURLException error) { 288 DebugStream.printStackTrace(error); 289 } 290 } 291 292 // If we're using a remote Greenstone we need to know where the gliserver script is 293 System.err.println("Configuration.gliserver_url = " + Configuration.gliserver_url); 294 if (isGsdlRemote && Configuration.gliserver_url == null) { 295 missingGLIServer(); 275 296 } 276 297 … … 683 704 try { 684 705 Configuration.library_url = new URL(library_url_string); 706 } 707 catch (MalformedURLException exception) { 708 DebugStream.printStackTrace(exception); 709 } 710 } 711 } 712 713 714 static private void missingGLIServer() 715 { 716 WarningDialog dialog = new WarningDialog("warning.MissingGLIServer", "MissingGLIServer.Title", Dictionary.get("MissingGLIServer.Message"), "general.gliserver_url", false); 717 dialog.setValueField(new URLField(Configuration.getColor("coloring.editable_foreground", false), Configuration.getColor("coloring.editable_background", false), Configuration.getColor("coloring.error_foreground", false), Configuration.getColor("coloring.error_background", false))); 718 dialog.display(); 719 dialog.dispose(); 720 dialog = null; 721 722 String gliserver_url_string = Configuration.getString("general.gliserver_url", true); 723 if (!gliserver_url_string.equals("")) { 724 try { 725 Configuration.gliserver_url = new URL(gliserver_url_string); 685 726 } 686 727 catch (MalformedURLException exception) { -
trunk/gli/src/org/greenstone/gatherer/GathererApplet.java
r10396 r10540 120 120 // } 121 121 122 String[] args = { "-gliserver_url", gliserver_url_string, 122 String[] args = { "-use_remote_greenstone", 123 "-gliserver_url", gliserver_url_string, 123 124 "-library_url", library_url_string, 124 125 }; -
trunk/gli/src/org/greenstone/gatherer/GetOpt.java
r10367 r10540 37 37 public boolean feedback_enabled = false; 38 38 public boolean no_load = false; 39 public boolean use_remote_greenstone = false; 39 40 40 41 public String collect_directory_path = null; … … 135 136 filename = null; 136 137 } 138 // Use a remote Greenstone rather than a local one 139 else if (argument_name.equals(StaticStrings.USE_REMOTE_GREENSTONE_ARGUMENT)) { 140 use_remote_greenstone = true; 141 } 137 142 } 138 143 // 3b. Now for those that do -
trunk/gli/src/org/greenstone/gatherer/util/StaticStrings.java
r10527 r10540 233 233 static final public String UNKNOWNPLUG_STR = "UnknownPlug"; 234 234 static final public String USE_METADATA_FILES_ARGUMENT = "use_metadata_files"; 235 static final public String USE_REMOTE_GREENSTONE_ARGUMENT = "-use_remote_greenstone"; 235 236 static final public String URL_SEPARATOR_CHARACTER = "/"; 236 237 static final public String VALUE_ATTRIBUTE = "value";
Note:
See TracChangeset
for help on using the changeset viewer.