Changeset 18892

Show
Ignore:
Timestamp:
06.04.2009 11:52:19 (10 years ago)
Author:
kjdon
Message:

some comments changed and support for oaimetadata in oai.cfg. list of sets stored in metadataSet

Files:
1 modified

Legend:

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

    r18885 r18892  
    155155    // first one. 
    156156    // 
    157     // This configuration should only appear in main.cfg 
     157    // This configuration should only appear in oai.cfg 
    158158    // 
    159159    if (this->collection != "") { 
    160       cerr << "Attempt to configure an oai collection outside of main.cfg" << endl; 
     160      cerr << "Attempt to configure an oai collection outside of oai.cfg" << endl; 
    161161      cerr << "Configuration attempted in " << this->collection << " collection." << endl; 
    162162      exit(1); 
     
    164164    for (int c = 0; c < cfgline.size(); ++c) { 
    165165      this->collectList.push_back(cfgline[c]); 
     166    } 
     167  } 
     168  else if (key == "oaimetadata" && cfgline.size() >= 1) { 
     169    // List of metadata prefixes to suuport 
     170    // This line should read: 
     171    // 
     172    // oaicollection <metadataname> <metadataname>... 
     173    // 
     174    // 
     175    // This configuration should only appear in oai.cfg 
     176    // 
     177    if (this->collection != "") { 
     178      cerr << "Attempt to configure oai metadata outside of oai.cfg" << endl; 
     179      cerr << "Configuration attempted in " << this->collection << " collection." << endl; 
     180      exit(1); 
     181    } 
     182    for (int c = 0; c < cfgline.size(); ++c) { 
     183      // todo: check that the set name is valid 
     184      this->metadataSet.insert(cfgline[c]); 
    166185    } 
    167186  } 
     
    172191    // oaiinfo <information field name> <value> 
    173192    // 
    174     // This configuration should only be attempted in main.cfg 
     193    // This configuration should only be attempted in oai.cfg 
    175194    // 
    176195    if (this->collection != "") { 
    177       cerr << "Attempt to set oai information outside of main.cfg" << endl; 
     196      cerr << "Attempt to set oai information outside of oai.cfg" << endl; 
    178197      cerr << "Configuration attempted in " << this->collection << " collection." << endl; 
    179198      exit(1);