Changeset 9933


Ignore:
Timestamp:
2005-05-24T10:40:47+12:00 (19 years ago)
Author:
kjdon
Message:

made it compile with the new ColInfoResponse collectionmeta type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/z3950proto.cpp

    r9924 r9933  
    262262  // copy the text maps over.
    263263  //  collectinfo.collectionmeta; // text_tmap
    264   collectinfo.collectionmeta=*((*here)->getMeta());
     264  text_tmap collmeta = *((*here)->getMeta());
     265  text_tmap::iterator mhere = collmeta.begin();
     266  text_tmap::iterator mend = collmeta.end();
     267  while (mhere != mend) {
     268    collectinfo.collectionmeta[(*mhere).first][g_EmptyText] = (*mhere).second;
     269    mhere ++;
     270  }
     271  //collectinfo.collectionmeta=*((*here)->getMeta());
    265272  collectinfo.format=*((*here)->getFormat()); //text_tmap
    266273  /*    collectinfo.building; //text_tmap  */
     
    465472    text_tset::iterator fields_here=request.fields.begin();
    466473    text_tset::iterator fields_end=request.fields.end();
    467     text_tmap::iterator it;
     474    //text_tmap::iterator it;
     475    collectionmeta_map::iterator it;
    468476    while (fields_here!=fields_end) {
    469477      it=info.collectionmeta.find(*fields_here);
    470478      if (it!=info.collectionmeta.end())
    471         docs_here->metadata[*fields_here].values.push_back((*it).second);
     479        docs_here->metadata[*fields_here].values.push_back(((*it).second)[g_EmptyText]);
    472480      else if (*fields_here=="Title" && !request.docSet.empty()) {
    473481        // We only do this for a document action.
     
    518526    else { // request.fields empty: return all metadata for about page or query
    519527      // we'll only put it in the first docInfo.
    520       text_tmap::iterator colmeta_here=info.collectionmeta.begin();
    521       text_tmap::iterator colmeta_end=info.collectionmeta.end();
     528      collectionmeta_map::iterator colmeta_here=info.collectionmeta.begin();
     529      collectionmeta_map::iterator colmeta_end=info.collectionmeta.end();
    522530      while (colmeta_here!=colmeta_end) {
    523531    response.docInfo[0].metadata[(*colmeta_here).first].
    524       values.push_back((*colmeta_here).second);
     532      values.push_back(((*colmeta_here).second)[g_EmptyText]);
    525533    ++colmeta_here;
    526534      }
     
    539547    if ((*zserver)->getcfgAbout("en", tmpabout)==true)
    540548      abouttext+=tmpabout;
    541 
     549   
    542550    (*zserver)->setMeta("collectionextra",abouttext);
    543551    response.docInfo[0].metadata["collectionextra"].values.push_back(abouttext);
Note: See TracChangeset for help on using the changeset viewer.