Changeset 22287


Ignore:
Timestamp:
06/23/10 13:56:08 (11 years ago)
Author:
kjdon
Message:

added oai-identifier description now that we are using oai scheme ids

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/oaiservr/identifyaction.cpp

    r22213 r22287  
    5959  // Get the repository name (some human-readable name for the site, or superset of collections)
    6060  text_t repositoryName = this->configuration->getRepositoryName();
     61  text_t repositoryId = this->configuration->getRepositoryId();
    6162  // Get admin's email address (i.e. the site maintainer)
    6263  text_t maintainer = this->configuration->getMaintainer();
    6364  text_t version = (this->configuration->getOAIVersion() <= 110) ? (text_t)"1.1":(text_t)"2.0";
    64 
     65  text_t id_version = this->configuration->getRepositoryIdVersion();
     66 
    6567  text_t baseURL = this->configuration->getBaseURL();
    6668 
     
    7981    output << utf8convert << "  <granularity>YYYY-MM-DD</granularity>\n";
    8082  }
     83  // list the oai identifier
     84  output << "  <description>\n";
     85  if (id_version == "1.1") {
     86
     87    output << "    <oai-identifier xmlns=\"http://www.openarchives.org/OAI/1.1/oai-identifier\"\n";
     88    output << "        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n";
     89    output << "        xsi:schemaLocation=\"http://www.openarchives.org/OAI/1.1/oai-identifier    http://www.openarchives.org/OAI/1.1/oai-identifier.xsd\">\n";
     90  } else {
     91
     92    output << "    <oai-identifier xmlns=\"http://www.openarchives.org/OAI/2.0/oai-identifier\"\n";
     93    output << "      xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n";
     94    output << "      xsi:schemaLocation=\"http://www.openarchives.org/OAI/2.0/oai-identifier\n";
     95    output << "      http://www.openarchives.org/OAI/2.0/oai-identifier.xsd\">\n";
     96
     97   
     98  }
     99
     100  output << "    <scheme>oai</scheme>\n";
     101  output << "    <repositoryIdentifier>"<< repositoryId <<"</repositoryIdentifier>\n";
     102  output << "    <delimiter>:</delimiter>\n";
     103  output << "    <sampleIdentifier>oai:"<<repositoryId<<":demo:HASH983080b052e9230b7ccf94</sampleIdentifier>\n";
     104  output << "  </oai-identifier>\n";
     105
     106  output << utf8convert << "  </description>\n";
    81107  // list all configuration information
    82108  text_tmap::iterator here = this->configuration->getInformation()->begin();
Note: See TracChangeset for help on using the changeset viewer.