- Timestamp:
- 1999-08-13T16:16:43+12:00 (25 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/receptionist.cpp
r451 r456 12 12 /* 13 13 $Log$ 14 Revision 1.24 1999/08/13 04:16:42 sjboddie 15 added some collection-level metadata stuff 16 14 17 Revision 1.23 1999/08/11 23:28:59 sjboddie 15 18 added support for html classifier (i.e. the hp argumant now must be … … 520 523 } 521 524 525 // get collection information 526 collectinfo.clear(); 527 if (!collection.empty()) { 528 comerror_t err; 529 collectproto->get_collectinfo (collection, collectinfo, err, logout); 530 if (err != noError) collectinfo.clear(); 531 } 532 522 533 // translate "d", "cl", and "hp" arguments if required 523 534 translate_OIDs (args, collectproto, logout); … … 740 751 } 741 752 742 // prepare_page sets up page parameters, sets display macros ,743 // gets format informationand opens the page ready for output753 // prepare_page sets up page parameters, sets display macros 754 // and opens the page ready for output 744 755 void receptionist::prepare_page (action *a, cgiargsclass &args, recptproto *collectproto, 745 756 outconvertclass &outconvert, ostream &logout) { … … 763 774 if (first) pageparams += ",language=" + args["l"]; 764 775 else pageparams += ",language=" + args["l"]; 765 766 // get collection information767 collectinfo.clear();768 if (!collection.empty()) {769 comerror_t err;770 collectproto->get_collectinfo (collection, collectinfo, err, logout);771 if (err != noError) collectinfo.clear();772 }773 776 774 777 // open the page … … 777 780 778 781 // define general macros 779 define_general_macros (args, outconvert, logout);782 define_general_macros (args, collectproto, outconvert, logout); 780 783 781 784 … … 795 798 } 796 799 797 void receptionist::define_general_macros (cgiargsclass &args, outconvertclass &/*outconvert*/, 798 ostream &logout) { 800 void receptionist::define_general_macros (cgiargsclass &args, recptproto *collectproto, 801 outconvertclass &/*outconvert*/, ostream &logout) { 802 803 text_t &collection = args["c"]; 804 799 805 disp.setmacro ("gwcgi", "Global", configinfo.gwcgi); 800 806 disp.setmacro ("httpimg", "Global", configinfo.httpimg); … … 813 819 argshere ++; 814 820 } 815 } 821 822 // set collection specific macros 823 if ((!collection.empty()) && (collectproto != NULL)) { 824 FilterResponse_t response; 825 text_tarray metadata; 826 // metadata.push_back (".collectionimage"); 827 828 get_info ("collection", collection, metadata, false, 829 collectproto, response, logout); 830 831 if (!response.docInfo[0].metadata.empty()) { 832 MetadataInfo_tarray::const_iterator here = response.docInfo[0].metadata.begin(); 833 MetadataInfo_tarray::const_iterator end = response.docInfo[0].metadata.end(); 834 while (here != end) { 835 if (((*here).name != "haschildren") && ((*here).name != "hasnext") && 836 ((*here).name != "hasprevious")) { 837 disp.setmacro ((*here).name, "Global", (*here).values[0]); 838 } 839 here ++; 840 } 841 } 842 } 843 } -
trunk/gsdl/src/recpt/receptionist.h
r438 r456 57 57 virtual void translate_OIDs (cgiargsclass &args, recptproto *collectproto, ostream &logout); 58 58 59 virtual void define_general_macros (cgiargsclass &args, outconvertclass &outconvert, 60 ostream &logout); 59 60 virtual void define_general_macros (cgiargsclass &args, recptproto *collectproto, 61 outconvertclass &outconvert, ostream &logout); 61 62 62 63 public: … … 81 82 // The converters remain the property of the calling code. 82 83 void add_converter (const text_t &name, inconvertclass *inconverter, 83 rzwsoutconvertclass *outconverter) 84 {converters.add_converter(name, inconverter, outconverter);}84 rzwsoutconvertclass *outconverter) { 85 converters.add_converter(name, inconverter, outconverter);} 85 86 convertinfoclass *get_convertinfo_ptr () {return &converters;} 86 87 87 88 88 89 // configure should be called for each line in the 89 90 // configuration files to configure the receptionist and everything … … 122 123 virtual bool produce_cgi_page (cgiargsclass &args, ostream &contentout, 123 124 ostream &logout); 124 125 125 126 // get_cgihead_info determines the cgi header information for 126 127 // a set of cgi arguments. If response contains location then … … 130 131 virtual void get_cgihead_info (cgiargsclass &args, response_t &response, 131 132 text_t &response_data, ostream &logout); 132 133 133 134 // produce the page content 134 135 virtual bool produce_content (cgiargsclass &args, ostream &contentout, 135 136 ostream &logout); 136 137 137 138 // returns the compressed argument ("e") corresponding to the argument 138 139 // list. This can be used to save preferences between sessions. 139 140 text_t get_compressed_arg (cgiargsclass &args, ostream &logout); 140 141 141 142 protected: 142 143 // will read in all the macro files. If one is not found an
Note:
See TracChangeset
for help on using the changeset viewer.