Ignore:
Timestamp:
1999-07-20T14:59:54+12:00 (25 years ago)
Author:
sjboddie
Message:

List and AZList classifications now use format strings

File:
1 edited

Legend:

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

    r397 r405  
    1212/*
    1313   $Log$
     14   Revision 1.13  1999/07/20 02:59:54  sjboddie
     15   List and AZList classifications now use format strings
     16
    1417   Revision 1.12  1999/07/16 00:19:01  sjboddie
    1518   some changes to the way quoted queries are handled
     
    257260    get_top (arg_d, top);
    258261    metadata.push_back ("Title");
    259     get_children (top, collection, metadata, collectproto, response, logout);
     262    bool getParents = false;
     263    get_children (top, collection, metadata, getParents, collectproto, response, logout);
    260264    ResultDocInfo_tarray::const_iterator dochere = response.docInfo.begin();
    261265    ResultDocInfo_tarray::const_iterator docend = response.docInfo.end();
     
    308312    metadata.push_back ("Title");
    309313    metadata.push_back ("classifytype");
    310     get_children ("", collection, metadata, collectproto, response, logout);
     314    bool getParents = false;
     315    get_children ("", collection, metadata, getParents, collectproto, response, logout);
    311316     
    312317    int numc = response.docInfo.size();
     
    501506      metadata.push_back ("Title");
    502507      metadata.push_back ("doctype");
    503       if (get_children (classtop, collection, metadata, collectproto, response, logout)) {
     508      bool getParents = false;
     509      if (get_children (classtop, collection, metadata, getParents, collectproto, response, logout)) {
    504510       
    505511        // don't want links unless there are 2 or more sections
     
    558564    text_tarray metadata;
    559565    FilterResponse_t response;
    560     text_t toptitle, toptype, thistype;
     566    text_t toptitle, toptype, thistype, formatstring;
    561567   
     568    text_t &collection = args["c"];
    562569    text_t &arg_d = args["d"];
    563570    text_t &arg_cl = args["cl"];
     
    578585    metadata.push_back ("Title");
    579586    metadata.push_back ("classifytype");
    580     if (get_info (OID, args["c"], metadata, true, collectproto, response, logout)) {
     587    if (get_info (OID, collection, metadata, true, collectproto, response, logout)) {
    581588      toptitle = response.docInfo[0].metadata[0].values[0];
    582589      toptype = response.docInfo[0].metadata[1].values[0];
    583590      thistype = response.docInfo[0].metadata[1].values.back();
    584591    }
    585    
     592
    586593    // output the table of contents
    587594    if (!arg_d.empty()) {
    588595     
    589596      if (toptype == "Hierarchy")
    590     hierarchy_toc (thistype, toptitle, args, collectproto,
     597    hierarchy_toc (thistype, args, collectproto,
    591598               disp, outconvert, textout, logout);
    592599      else
    593600    // Book is the default for a document level toc - AZList, List and
    594601    // Datelist don't make sense for document level
    595     book_toc (toptitle, args, collectproto, disp,
     602    book_toc (args, collectproto, disp,
    596603          outconvert, textout, logout);
    597604    } else {
    598    
     605
     606      // see if we can find a formatstring for this type of toc
     607      ColInfoResponse_t collectinfo;
     608      comerror_t err;
     609      collectproto->get_collectinfo (collection, collectinfo, err, logout);
     610      if (err == noError) {
     611    text_tmap::const_iterator it = collectinfo.format.find(toptype + toptitle);
     612    if (it != collectinfo.format.end()) formatstring = (*it).second;
     613      }
     614     
    599615      if (toptype == "Hierarchy")
    600     hierarchy_toc (thistype, toptitle, args, collectproto,
     616    hierarchy_toc (thistype, args, collectproto,
    601617               disp, outconvert, textout, logout);
    602618      else if (toptype == "Datelist")
    603     datelist_toc (thistype, toptitle, args, collectproto,
     619    datelist_toc (thistype, toptitle, formatstring, args, collectproto,
    604620              disp, outconvert, textout, logout);
    605       else if (toptype == "AZList")
    606     azlist_toc (thistype, toptitle, args, collectproto,
    607             disp, outconvert, textout, logout);
    608621      else
    609622    // List is the default for a classification level toc - Book doesn't make
    610623    // sense for classification level
    611     list_toc (thistype, toptitle, args, collectproto,
     624    list_toc (thistype, formatstring, args, collectproto,
    612625          disp, outconvert, textout, logout);
    613626    }
Note: See TracChangeset for help on using the changeset viewer.