Changeset 14286 for gsdl/branches
- Timestamp:
- 2007-07-31T11:03:58+12:00 (17 years ago)
- Location:
- gsdl/branches/gsdl-2.74
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/branches/gsdl-2.74/etc/error.txt
r2939 r14286 1 Warning: couldn't read build.cfg file for collection "demo", gsdlhome="/research/oranfry/sandbox/gsdl-2.74" 2 Warning: couldn't read build.cfg file for collection "demo", gsdlhome="/research/oranfry/sandbox/gsdl-2.74" -
gsdl/branches/gsdl-2.74/etc/oai.cfg
r11774 r14286 24 24 25 25 # Strings containing spaces should be enclosed in double quotes "" 26 27 #the baseURL used by the oaiserver 28 #Example: baseURL "http://your-domain-name/cgi-bin/oaiserver" 29 baseURL "your-own-baseURL-goes-here" 26 30 27 31 # The OAI repository name - human readable -
gsdl/branches/gsdl-2.74/src/oaiservr/README.txt
r10150 r14286 44 44 * maintainer 45 45 One item only, as a valid email address 46 * baseURL 47 One item only, see the example in the oai.cfg file. 46 48 * httpdomain 47 49 NB: in the gsdlsite.cfg file, NOT oai.cfg -
gsdl/branches/gsdl-2.74/src/oaiservr/identityaction.cpp
r9608 r14286 26 26 text_t version = (this->configuration->getOAIVersion() <= 110) ? (text_t)"1.1":(text_t)"2.0"; 27 27 28 site_cfg_read(gsdlhome, httpdomain, httpprefix); 28 //site_cfg_read(gsdlhome, httpdomain, httpprefix); 29 text_t baseURL = this->configuration->getCollectionConfig("", "baseURL"); 29 30 30 31 output << " <repositoryName>" << repositoryName << "</repositoryName>" << endl; 31 output << " <baseURL>" << httpdomain << "/oaimain</baseURL>" << endl; // Tack on the app name32 output << " <baseURL>" << baseURL << "</baseURL>" << endl; // Tack on the app name 32 33 output << " <adminEmail>" << maintainer << "</adminEmail>" << endl; 33 34 output << " <protocolVersion>" << version << "</protocolVersion>" << endl; -
gsdl/branches/gsdl-2.74/src/oaiservr/oaiaction.cpp
r9608 r14286 216 216 217 217 // Read stuff from the gsdlsite.cfg file. We do this to get the base URL (httpdomain) 218 site_cfg_read(gsdlhome, httpdomain, httpprefix); 218 //site_cfg_read(gsdlhome, httpdomain, httpprefix); 219 text_t baseURL = this->configuration->getCollectionConfig("", "baseURL"); 219 220 220 221 int version = this->configuration->getOAIVersion(); … … 225 226 * <requestURL>http://baseURL.com/oaimain?verb="someVerb"&key=value</requestURL> 226 227 */ 227 requestURL = " <requestURL>" + httpdomain + "/oaimain";228 requestURL = " <requestURL>" + baseURL; 228 229 229 230 if(numArgs == 0) break; // If no args, all done - the error will be picked up later … … 251 252 */ 252 253 if(numArgs == 0) { 253 requestURL = " <request>" + httpdomain + "/oaimain</request>\n";254 requestURL = " <request>" + baseURL + "</request>\n"; 254 255 break; 255 256 } … … 260 261 ++here; 261 262 } 262 requestURL += ">\n " + httpdomain + "/oaimain</request>\n";263 requestURL += ">\n " + baseURL + "</request>\n"; 263 264 break; 264 265 } -
gsdl/branches/gsdl-2.74/src/oaiservr/oaiconfig.cpp
r11732 r14286 244 244 } 245 245 } 246 else if (key == "baseURL" && cfgline.size() >= 1) { 247 int line = 0; 248 249 while (line < cfgline.size()) { 250 if (cfgline[line] != "NULL" && 251 cfgline[line] != "") { 252 // do something 253 break; 254 } 255 else { 256 ++line; 257 } 258 } 259 260 // Only try to set the configuration if we have a legitimate value ... 261 if (line < cfgline.size()) { 262 // ensure we have a map to write to 263 if (this->collectMap[this->collection] == NULL) { 264 this->collectMap[this->collection] = new oaicollectconfig(this->collection); 265 } 266 this->collectMap[this->collection]->baseURL = cfgline[line]; 267 } 268 } 246 269 } 247 270 … … 260 283 if (field == "repositoryName") { 261 284 return this->collectMap[collection]->repositoryName; 285 } 286 287 if (field == "baseURL") { 288 return this->collectMap[collection]->baseURL; 262 289 } 263 290 -
gsdl/branches/gsdl-2.74/src/oaiservr/oaiconfig.h
r11732 r14286 15 15 text_t maintainer; 16 16 text_t repositoryName; 17 text_t baseURL; 17 18 text_tmap fieldMap; // maps from OAI name to GSDL name 18 19 };
Note:
See TracChangeset
for help on using the changeset viewer.