Changeset 8625
- Timestamp:
- 2004-11-23T13:07:15+13:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Configuration.java
r8620 r8625 97 97 static public Configuration self = null; 98 98 99 /** The path (or url) to the webserver which is serving the Greenstone collection. */100 static public String exec_path = null;101 99 /** The path to the Greenstone Suite installation directory. */ 102 100 static public String gsdl_path = ""; … … 135 133 /** Constructor. 136 134 * @param gsdl_path The path to the Greenstone directory as a <strong>String</strong>. 137 * @param exec_path A <strong>String</strong> containing the path or url to the webserver serving the greenstone collections.135 * @param library_url A <strong>String</strong> containing the url of the Greenstone webserver. 138 136 * @param perl_path The path to the PERL executable, as a <strong>String</strong>. 139 137 * @param mirroring_enabled If true will override the config.xml fiel setting for mirroring. 140 138 * @param site_name The name of the Greenstone 3 site currently in use. 141 139 */ 142 public Configuration(String gsdl_path, String gsdl3_path, String exec_path, String perl_path, boolean mirroring_enabled, String site_name) {140 public Configuration(String gsdl_path, String gsdl3_path, String library_url, String perl_path, boolean mirroring_enabled, String site_name) { 143 141 super(); 144 142 self = this; … … 146 144 this.gsdl_path = gsdl_path; 147 145 this.gsdl3_path = gsdl3_path; 148 this.exec_path = exec_path;149 146 this.mirroring_enabled = mirroring_enabled; 150 147 this.site_name = site_name; 151 148 152 // The exec_path may contain an url address, in which case we blindly use that and leave it up to the user to worry about settings and resetting. 153 DebugStream.println("EXEC_PATH = " + exec_path); 154 if(exec_path != null && exec_path.length() > 0) { 149 DebugStream.println("Library URL = " + library_url); 150 if (library_url != null && library_url.length() > 0) { 155 151 try { 156 exec_address = new URL( exec_path);152 exec_address = new URL(library_url); 157 153 } 158 154 catch (MalformedURLException error) { 159 DebugStream.println("Not an address."); 160 // !!! When the Local Library is used on Windows this exception is thrown -- needs to be fixed 161 // DebugStream.printStackTrace(error); 155 DebugStream.printStackTrace(error); 162 156 } 163 157 } -
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r8624 r8625 118 118 119 119 public GUIManager init(Dimension size, String gsdl_path, String gsdl3_path, String local_library_path, 120 String exec_path, boolean debug_enabled, String perl_path,120 String library_url, boolean debug_enabled, String perl_path, 121 121 boolean no_load, String open_collection, 122 122 String site_name, String servlet_path, … … 153 153 try { 154 154 // Load Config 155 loadConfig(gsdl_path, gsdl3_path, exec_path, perl_path, mirroring_enabled, site_name);155 loadConfig(gsdl_path, gsdl3_path, library_url, perl_path, mirroring_enabled, site_name); 156 156 157 157 // I don't really know what this is for but I've moved it here from Configuration … … 609 609 /** Loads the configuration file if one exists. Otherwise it creates a new one. Currently uses serialization. 610 610 * @param gsdl_path The path to the gsdl directory, gathered from the startup arguments, and presented as a <strong>String</strong>. 611 * @param exec_pathThe path to the library executable, gathered from the startup arguments, and presented as a <strong>String</strong>.611 * @param library_url The path to the library executable, gathered from the startup arguments, and presented as a <strong>String</strong>. 612 612 * @param perl_path The path to the PERL compiler as a <strong>String</strong>. Necessary for windows platform versions. 613 613 * @param mirroring_enabled … … 619 619 * @see org.greenstone.gatherer.Configuration 620 620 */ 621 private void loadConfig(String gsdl_path, String gsdl3_path, String exec_path, String perl_path, boolean mirroring_enabled, String site_name) {621 private void loadConfig(String gsdl_path, String gsdl3_path, String library_url, String perl_path, boolean mirroring_enabled, String site_name) { 622 622 try { 623 new Configuration(gsdl_path, gsdl3_path, exec_path, perl_path, mirroring_enabled, site_name);623 new Configuration(gsdl_path, gsdl3_path, library_url, perl_path, mirroring_enabled, site_name); 624 624 } 625 625 catch (Exception error) { -
trunk/gli/src/org/greenstone/gatherer/GathererApplet.java
r8620 r8625 172 172 173 173 g_man = gatherer.init(size, go.gsdl_path, go.gsdl3_path, go.local_library_path, 174 go. exec_path, go.debug, go.perl_path,174 go.library_url, go.debug, go.perl_path, 175 175 go.no_load, go.filename, go.site_name, 176 176 go.servlet_path, go.mirroring_enabled, -
trunk/gli/src/org/greenstone/gatherer/GathererProg.java
r8621 r8625 91 91 GUIManager g_man 92 92 = gatherer.init(size, go.gsdl_path, go.gsdl3_path, go.local_library_path, 93 go. exec_path, go.debug, go.perl_path,93 go.library_url, go.debug, go.perl_path, 94 94 go.no_load, go.filename, go.site_name, 95 95 go.servlet_path, go.mirroring_enabled, -
trunk/gli/src/org/greenstone/gatherer/GetOpt.java
r8620 r8625 39 39 public boolean no_load = false; 40 40 41 public String exec_path = null;42 41 public String extra = null; 43 42 public String filename = null; 44 43 public String gsdl_path = null; 45 44 public String gsdl3_path = null; 45 public String library_url = null; 46 46 public String local_library_path = null; 47 47 public String perl_path = null; … … 187 187 else if (argument_name.equals(StaticStrings.LOCAL_LIBRARY_ARGUMENT)) { 188 188 local_library_path = argument_value; 189 190 // exec_path = argument_value; 191 // // If there is no colon in first five characters of 192 // // the exec_path (which would either be an existing 193 // // protocol, or a windows file path to say a local 194 // // library), we can append the protocol http://. 195 // if(argument_value.lastIndexOf(StaticStrings.COLON_CHARACTER, 5) == -1) { 196 // exec_path = StaticStrings.HTTP_PROTOCOL_STR + argument_value; 197 // } 198 // else { 199 // exec_path = argument_value; 200 // } 201 // // If the user has given us an address, but it ends 202 // // with a '/' we assume we're using the greenstone 203 // // library.cgi 204 // if(exec_path.startsWith(StaticStrings.HTTP_PROTOCOL_STR) && exec_path.endsWith(StaticStrings.URL_SEPARATOR_CHARACTER)) { 205 // exec_path = exec_path + StaticStrings.LIBRARY_STR; 206 // } 189 } 190 // Manually specify the Greenstone library URL 191 else if (argument_name.equals(StaticStrings.LIBRARY_URL_ARGUMENT)) { 192 library_url = argument_value; 207 193 } 208 194 // Parse the path to PERL. If not provided its assumes -
trunk/gli/src/org/greenstone/gatherer/gems/GEMS.java
r8593 r8625 190 190 try { 191 191 192 config = new Configuration(go.gsdl_path, null, go.exec_path, go.perl_path, false, null);192 config = new Configuration(go.gsdl_path, null, null, go.perl_path, false, null); 193 193 } 194 194 catch (Exception exception) { -
trunk/gli/src/org/greenstone/gatherer/util/StaticStrings.java
r8618 r8625 155 155 static final public String LEVELS_ELEMENT = "Levels"; 156 156 static final public String LEVELS_STR = "levels"; 157 static final public String LIBRARY_URL_ARGUMENT = "-library_url"; 157 158 static final public String LOCAL_LIBRARY_ARGUMENT = "-local_library"; 158 static final public String LIBRARY_STR = "library";159 159 static final public String LOAD_ARGUMENT = "-load"; 160 160 static final public String MAC_OPEN_COMMAND = "open %1";
Note:
See TracChangeset
for help on using the changeset viewer.