Changeset 6871
- Timestamp:
- 2004-02-24T11:10:50+13:00 (20 years ago)
- Location:
- trunk/gsdl3/src/java/org/greenstone/gsdl3/service
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS3Retrieve.java
r6517 r6871 111 111 this.short_service_info.appendChild(dcr_service); 112 112 113 if (!database.setDatabase(this.cluster_name)) { 114 System.err.println("GS3Search Error: Could not open SQL database!"); 113 // open the database for querying 114 // the database name is a combination of site name and collection name 115 116 // check that site_home is set 117 if (this.site_home == null || this.site_home.equals("")) { 118 System.err.println("GS3Retrieve Error: site_home is not set, so cannot work out the site name and cannot determine the database name"); 115 119 return false; 116 120 } 117 121 String site_name = this.site_home.substring(this.site_home.lastIndexOf(File.separator)+1); 122 if (site_name.equals("")) { 123 System.err.println("GS3Retrieve Error: Cannot extract the site name from site home: "+this.site_home); 124 return false; 125 } 126 if (!database.setDatabase(site_name+"_"+this.cluster_name)) { 127 System.err.println("GS3Retrieve Error: Could not open SQL database!"); 128 return false; 129 } 130 118 131 // now do the classifier browse service 119 132 -
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS3Search.java
r6517 r6871 28 28 import org.w3c.dom.NodeList; 29 29 30 import java.io.File; 30 31 31 32 /** … … 115 116 //} 116 117 // open the database for querying 117 if (!database.setDatabase(this.cluster_name)) { 118 // the database name is a combination of site name and collection name 119 120 // check that site_home is set 121 if (this.site_home == null || this.site_home.equals("")) { 122 System.err.println("GS3Search Error: site_home is not set, so cannot work out the site name and cannot determine the database name"); 123 return false; 124 } 125 String site_name = this.site_home.substring(this.site_home.lastIndexOf(File.separator)+1); 126 if (site_name.equals("")) { 127 System.err.println("GS3Search Error: Cannot extract the site name from site home: "+this.site_home); 128 return false; 129 } 130 if (!database.setDatabase(site_name+"_"+this.cluster_name)) { 118 131 System.err.println("GS3Search Error: Could not open SQL database!"); 119 132 return false;
Note:
See TracChangeset
for help on using the changeset viewer.