greenstone.org greenstone wiki greenstone trac planet greenstone

Changeset 16107

Show
Ignore:
Timestamp:
2008-06-23 16:26:59 (7 months ago)
Author:
mdewsnip
Message:

Adding a new argument to display_classifier_nodes() for indicating whether an HList or VList should be output, in preparation for adding top-level hlist support.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gsdl/trunk/src/recpt/dynamicclassifieraction.cpp

    r16097 r16107  
    361361    FilterResponse_t upper_classifier_node_response; 
    362362    upper_classifier_node_response.docInfo.push_back(upper_classifier_node); 
    363     display_classifier_nodes (upper_classifier_node_response, classifier_node_indent, args, collectproto, browsers, disp, outconvert, textout, logout); 
     363    display_classifier_nodes (upper_classifier_node_response, "VList", classifier_node_indent, args, collectproto, browsers, disp, outconvert, textout, logout); 
    364364    classifier_node_indent++; 
    365365 
     
    445445  } 
    446446 
    447   display_classifier_nodes (child_classifier_nodes_response, classifier_node_indent, args, collectproto, browsers, disp, outconvert, textout, logout); 
     447  display_classifier_nodes (child_classifier_nodes_response, "VList", classifier_node_indent, args, collectproto, browsers, disp, outconvert, textout, logout); 
    448448} 
    449449 
    450450 
    451451void dynamicclassifieraction::display_classifier_nodes (FilterResponse_t classifier_nodes_response, 
    452                                                         int classifier_node_indent, 
     452                                                        text_t classifier_nodes_type, 
     453                                                        int classifier_nodes_indent, 
    453454                                                        cgiargsclass &args, recptproto *collectproto, 
    454455                                                        browsermapclass *browsers, displayclass &disp, 
     
    458459  // Check there are some classifier nodes to display 
    459460  if (classifier_nodes_response.docInfo.empty()) return; 
     461 
     462  // Get the format statement for this classifier if there is one, or use the browser's default otherwise 
     463  text_t formatstring; 
     464  browserclass *bptr = browsers->getbrowser (classifier_nodes_type); 
     465  ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr (collectproto, args["c"], logout); 
     466  if (!get_formatstring (args["dcl"], classifier_nodes_type, cinfo->format, formatstring)) 
     467  { 
     468    formatstring = bptr->get_default_formatstring(); 
     469  } 
     470  format_t *formatlistptr = new format_t(); 
     471  text_tset metadata; 
     472  bool getParents = false; 
     473  parse_formatstring (formatstring, formatlistptr, metadata, getParents); 
     474  bool use_table = is_table_content (formatlistptr); 
     475 
     476  // Display the classifier nodes 
     477  bptr->output_section_group (classifier_nodes_response, args, args["c"], classifier_nodes_indent, formatlistptr, use_table, metadata, getParents, collectproto, disp, outconvert, textout, logout); 
     478} 
     479 
     480 
     481void dynamicclassifieraction::display_document_nodes (FilterResponse_t documents_response, 
     482                                                      int document_nodes_indent, 
     483                                                      cgiargsclass &args, recptproto *collectproto, 
     484                                                      browsermapclass *browsers, displayclass &disp, 
     485                                                      outconvertclass &outconvert, ostream &textout, 
     486                                                      ostream &logout) 
     487{ 
     488  // Check there are some documents to display 
     489  if (documents_response.docInfo.empty()) return; 
    460490 
    461491  // Get the format statement for this classifier if there is one, or use the browser's default otherwise 
     
    474504  bool use_table = is_table_content (formatlistptr); 
    475505 
    476   // Display the classifier nodes 
    477   bptr->output_section_group (classifier_nodes_response, args, args["c"], classifier_node_indent, formatlistptr, use_table, metadata, getParents, collectproto, disp, outconvert, textout, logout); 
    478 } 
    479  
    480  
    481 void dynamicclassifieraction::display_document_nodes (FilterResponse_t documents_response, int document_nodes_indent, 
    482                                                       cgiargsclass &args, recptproto *collectproto, 
    483                                                       browsermapclass *browsers, displayclass &disp, 
    484                                                       outconvertclass &outconvert, ostream &textout, 
    485                                                       ostream &logout) 
    486 { 
    487   // Check there are some documents to display 
    488   if (documents_response.docInfo.empty()) return; 
    489  
    490   // Get the format statement for this classifier if there is one, or use the browser's default otherwise 
    491   text_t formatstring; 
    492   text_t classifier_type = "VList"; 
    493   browserclass *bptr = browsers->getbrowser (classifier_type); 
    494   ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr (collectproto, args["c"], logout); 
    495   if (!get_formatstring (args["dcl"], classifier_type, cinfo->format, formatstring)) 
    496   { 
    497     formatstring = bptr->get_default_formatstring(); 
    498   } 
    499   format_t *formatlistptr = new format_t(); 
    500   text_tset metadata; 
    501   bool getParents = false; 
    502   parse_formatstring (formatstring, formatlistptr, metadata, getParents); 
    503   bool use_table = is_table_content (formatlistptr); 
    504  
    505506  // Request the necessary metadata for displaying the documents 
    506507  text_tarray document_OIDs; 
  • gsdl/trunk/src/recpt/dynamicclassifieraction.h

    r16097 r16107  
    9595 
    9696  void display_classifier_nodes (FilterResponse_t classifier_nodes_response, 
    97                                  int classifier_node_indent, 
     97                                 text_t classifier_nodes_type, 
     98                                 int classifier_nodes_indent, 
    9899                                 cgiargsclass &args, recptproto *collectproto, 
    99100                                 browsermapclass *browsers, displayclass &disp, 
     
    101102                                 ostream &logout); 
    102103 
    103   void display_document_nodes (FilterResponse_t documents_response, int document_nodes_indent, 
     104  void display_document_nodes (FilterResponse_t documents_response, 
     105                               int document_nodes_indent, 
    104106                               cgiargsclass &args, recptproto *collectproto, 
    105107                               browsermapclass *browsers, displayclass &disp,