Changeset 18860


Ignore:
Timestamp:
04/01/09 15:22:30 (12 years ago)
Author:
kjdon
Message:

added new field to collection - baseDocRoot. Equivalent to _httpprefix_ but oaiserver doesn't use macros. Used to find location of oai2.xsl - stylesheet to pretty display responses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/oaiservr/oaiconfig.cpp

    r14284 r18860  
    267267    }
    268268  }
     269  else if (key == "baseDocRoot" && cfgline.size() >= 1) {
     270    int line = 0;
     271   
     272    while (line < cfgline.size()) {
     273      if (cfgline[line] != "NULL" &&
     274      cfgline[line] != "") {
     275    // do something
     276    break;
     277      }
     278      else {
     279    ++line;
     280      }
     281    }
     282   
     283    // Only try to set the configuration if we have a legitimate value ...
     284    if (line < cfgline.size()) {
     285      // ensure we have a map to write to
     286      if (this->collectMap[this->collection] == NULL) {
     287    this->collectMap[this->collection] = new oaicollectconfig(this->collection);
     288      }
     289      this->collectMap[this->collection]->baseDocRoot = cfgline[line];
     290    }
     291  }
    269292}
    270293
     
    287310  if (field == "baseURL") {
    288311    return this->collectMap[collection]->baseURL;
     312  }
     313
     314  if (field == "baseDocRoot") {
     315    return this->collectMap[collection]->baseDocRoot;
    289316  }
    290317
Note: See TracChangeset for help on using the changeset viewer.