Changeset 278 for trunk/gsdl/src/recpt


Ignore:
Timestamp:
1999-06-16T15:11:25+12:00 (25 years ago)
Author:
sjboddie
Message:

get_info() now takes a getParents argument

Location:
trunk/gsdl/src/recpt
Files:
3 edited

Legend:

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

    r274 r278  
    1212/*
    1313   $Log$
     14   Revision 1.8  1999/06/16 03:11:25  sjboddie
     15   get_info() now takes a getParents argument
     16
    1417   Revision 1.7  1999/06/16 02:05:23  sjboddie
    1518   just changed a comment that was confusing me
     
    9598
    9699bool get_info (const text_t &OID, const text_t &collection,
    97            const text_tarray &metadata, recptproto *collectproto,
    98            FilterResponse_t &response, ostream &logout) {
     100           const text_tarray &metadata, bool getParents,
     101           recptproto *collectproto,FilterResponse_t &response,
     102           ostream &logout) {
    99103
    100104  response.clear();
     
    105109  request.filterName = "NullFilter";
    106110  request.filterResultOptions = FRmetadata;
     111  request.getParents = getParents;
    107112  request.fields = metadata;
    108113  request.docSet.insert (OID);
     
    128133  metadata.push_back ("haschildren");
    129134
    130   if (get_info (OID, collection, metadata, collectproto,
    131         response, logout)) {
     135  if (get_info (OID, collection, metadata, false, collectproto, response, logout)) {
    132136    if (response.docInfo[0].metadata[0].values[0] == "1")
    133137      return true;
     
    280284
    281285  // get topOIDs info
    282   if (get_info (topOID, collection, metadata, collectproto, response, logout))
     286  if (get_info (topOID, collection, metadata, false, collectproto, response, logout))
    283287      recurse_contents (response.docInfo[0], classify, totalcols, collection,
    284288            metadata, collectproto, response, logout);
  • trunk/gsdl/src/recpt/OIDtools.h

    r274 r278  
    3232// metadata fields are to be requested
    3333bool get_info (const text_t &OID, const text_t &collection,
    34            const text_tarray &metadata, recptproto *collectproto,
    35            FilterResponse_t &response, ostream &logout);
     34           const text_tarray &metadata, bool getParents,
     35           recptproto *collectproto, FilterResponse_t &response,
     36           ostream &logout);
    3637
    3738// has_children returns true if OID has children
  • trunk/gsdl/src/recpt/browsetools.cpp

    r257 r278  
    1212/*
    1313   $Log$
     14   Revision 1.5  1999/06/16 03:11:25  sjboddie
     15   get_info() now takes a getParents argument
     16
    1417   Revision 1.4  1999/05/10 03:40:26  sjboddie
    1518   lots of changes - slowly getting document action sorted out
     
    5255  metadata.push_back ("Title");
    5356  metadata.push_back ("hastxt");
    54   if (get_info (args["d"], args["c"], metadata, collectproto, response, logout)) {
     57  if (get_info (args["d"], args["c"], metadata, false, collectproto, response, logout)) {
    5558     
    5659    docinfo = response.docInfo[0];
     
    6669    metadata.push_back ("Title");
    6770    metadata.push_back ("Creator");
    68     get_info (booktop, args["c"], metadata, collectproto, response, logout);
     71    get_info (booktop, args["c"], metadata, false, collectproto, response, logout);
    6972    title = response.docInfo[0].metadata[0].values[0];
    7073    author = response.docInfo[0].metadata[1].values[0];
     
    9194    get_top (args["d"], doctop);
    9295    // get title of last sibling
    93     if (get_info (doctop + ".lc", args["c"], metadata, collectproto, response, logout)) {
     96    if (get_info (doctop + ".lc", args["c"], metadata, false, collectproto, response, logout)) {
    9497      if (is_number (response.docInfo[0].metadata[0].values[0])) {
    9598        textout << outconvert << disp << "_document:page_" << docinfo.metadata[0].values[0]
     
    176179  text_t top;
    177180  get_top (args["d"], top);
    178   if (get_info (top, args["c"], metadata, collectproto,
    179         response, logout)) {
     181  if (get_info (top, args["c"], metadata, false, collectproto, response, logout)) {
    180182
    181183    text_t &archivedir = response.docInfo[0].metadata[0].values[0];
     
    215217    // a Hierarchy type toc
    216218    metadata.push_back ("classifytype");
    217     if (get_info (top, args["c"], metadata, collectproto,
    218           response, logout)) {
     219    if (get_info (top, args["c"], metadata, false, collectproto, response, logout)) {
    219220      if (response.docInfo[0].metadata[0].values[0] == "Hierarchy")
    220221    if (args["gc"] == "1")
     
    509510
    510511  while (thisparent != end) {
    511     if (get_info (*thisparent, args["c"], metadata, collectproto,
    512           response, logout)) {
     512    if (get_info (*thisparent, args["c"], metadata, false, collectproto, response, logout)) {
    513513      text_t &doctype = response.docInfo[0].metadata[0].values[0];
    514514      text_t &title = response.docInfo[0].metadata[1].values[0];
     
    659659  metadata.push_back ("hasprevious");
    660660  // get "haschildren", "hasnext" and "hasprevious" metadata for OID
    661   if (get_info (OID, collection, metadata, collectproto, response, logout)) {
     661  if (get_info (OID, collection, metadata, false, collectproto, response, logout)) {
    662662
    663663    text_t haschildren = response.docInfo[0].metadata[0].values[0];
     
    674674      else {
    675675    // see if parent has younger siblings
    676     if (get_info (OID + ".pr", collection, metadata, collectproto, response, logout)) {
     676    if (get_info (OID + ".pr", collection, metadata, false, collectproto, response, logout)) {
    677677      if (response.docInfo[0].metadata[1].values[0] == "1")
    678678        disp.setmacro ("httpnextarrow", "document",
     
    683683      if (hasprevious == "1") {
    684684    // see if OIDs older sibling has children
    685     if (get_info (OID + ".ps", collection, metadata, collectproto, response, logout)) {
     685    if (get_info (OID + ".ps", collection, metadata, false, collectproto, response, logout)) {
    686686      if (response.docInfo[0].metadata[0].values[0] == "1")
    687687        disp.setmacro ("httpprevarrow", "document",
Note: See TracChangeset for help on using the changeset viewer.