Changeset 722
- Timestamp:
- 1999-10-19T16:23:46+13:00 (25 years ago)
- Location:
- trunk/gsdl/src
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/browsefilter.cpp
r534 r722 28 28 /* 29 29 $Log$ 30 Revision 1.8 1999/10/19 03:23:39 davidb 31 Collection building support through web pages 32 and internal and external link handling for collection documents 33 30 34 Revision 1.7 1999/09/07 04:57:20 sjboddie 31 35 added gpl notice … … 106 110 if (!file_exists(gdbm_filename)) { 107 111 logout << text_t2ascii 108 << " error: gdbm database \""112 << "warning: gdbm database \"" //**** 109 113 << gdbm_filename << "\" does not exist\n\n"; 110 return false;114 // return false; //**** 111 115 } 112 116 -
trunk/gsdl/src/colservr/collectserver.cpp
r650 r722 29 29 /* 30 30 $Log$ 31 Revision 1.17 1999/10/19 03:23:39 davidb 32 Collection building support through web pages 33 and internal and external link handling for collection documents 34 31 35 Revision 1.16 1999/10/10 08:20:35 sjboddie 32 36 - metadata now returns map rather than array … … 123 127 else if (key == "numwords") collectinfo.numWords = value.getint(); 124 128 else if (key == "numbytes") collectinfo.numBytes = value.getint(); 129 else if (key == "collectionmeta" && cfgline.size() == 2) 130 collectinfo.collectionmeta[cfgline[0]] = cfgline[1]; 125 131 else if (key == "format" && cfgline.size() == 2) 126 132 collectinfo.format[cfgline[0]] = cfgline[1]; 133 else if (key == "building" && cfgline.size() == 2) 134 collectinfo.building[cfgline[0]] = cfgline[1]; 127 135 else if (key == "receptionist") collectinfo.receptionist = value; 128 136 } -
trunk/gsdl/src/colservr/mggdbmsource.cpp
r650 r722 28 28 /* 29 29 $Log$ 30 Revision 1.17 1999/10/19 03:23:40 davidb 31 Collection building support through web pages 32 and internal and external link handling for collection documents 33 30 34 Revision 1.16 1999/10/10 08:20:36 sjboddie 31 35 - metadata now returns map rather than array … … 147 151 if (!file_exists(gdbm_filename)) { 148 152 logout << text_t2ascii 149 << " error: gdbm database \""153 << "warning: gdbm database \"" //**** 150 154 << gdbm_filename << "\" does not exist\n\n"; 151 return false;155 // return false; //**** 152 156 } 153 157 -
trunk/gsdl/src/colservr/queryfilter.cpp
r621 r722 28 28 /* 29 29 $Log$ 30 Revision 1.19 1999/10/19 03:23:40 davidb 31 Collection building support through web pages 32 and internal and external link handling for collection documents 33 30 34 Revision 1.18 1999/09/22 03:43:18 sjboddie 31 35 Endresults queryfilter option may now take '-1' for 'all' … … 629 633 if (!file_exists(gdbm_filename)) { 630 634 logout << text_t2ascii 631 << " error: gdbm database \""635 << "warning: gdbm database \"" //**** 632 636 << gdbm_filename << "\" does not exist\n\n"; 633 return false;637 //return false; //**** 634 638 } 635 639 -
trunk/gsdl/src/recpt/Makefile.in
r713 r722 63 63 converter.h recptconfig.h cgiutils.h OIDtools.h browsetools.h htmlgen.h \ 64 64 statusaction.h pageaction.h comtypes.h recptproto.h \ 65 pingaction.h queryaction.h documentaction.h htmlutils.h \ 65 pingaction.h queryaction.h documentaction.h \ 66 extlinkaction.h buildaction.h htmlutils.h \ 66 67 querytools.h formattools.h tipaction.h authenaction.h infodbclass.h \ 67 68 userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \ … … 80 81 htmlgen.cpp statusaction.cpp pageaction.cpp comtypes.cpp \ 81 82 recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \ 82 htmlutils.cpp querytools.cpp formattools.cpp tipaction.cpp authenaction.cpp \ 83 infodbclass.cpp userdb.cpp usersaction.cpp vlistbrowserclass.cpp \ 84 hlistbrowserclass.cpp datelistbrowserclass.cpp invbrowserclass.cpp \ 85 pagedbrowserclass.cpp htmlbrowserclass.h 83 extlinkaction.cpp buildaction.cpp htmlutils.cpp querytools.cpp formattools.cpp \ 84 tipaction.cpp authenaction.cpp infodbclass.cpp userdb.cpp usersaction.cpp \ 85 vlistbrowserclass.cpp hlistbrowserclass.cpp datelistbrowserclass.cpp \ 86 invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp 87 86 88 87 89 RECPTSOURCES = recptmain.cpp … … 96 98 htmlgen.o statusaction.o pageaction.o comtypes.o \ 97 99 recptproto.o pingaction.o queryaction.o documentaction.o \ 98 htmlutils.o querytools.o formattools.o tipaction.o authenaction.o \ 100 extlinkaction.o buildaction.o htmlutils.o querytools.o \ 101 formattools.o tipaction.o authenaction.o \ 99 102 infodbclass.o userdb.o usersaction.o vlistbrowserclass.o \ 100 103 hlistbrowserclass.o datelistbrowserclass.o invbrowserclass.o \ -
trunk/gsdl/src/recpt/authenaction.cpp
r543 r722 28 28 /* 29 29 $Log$ 30 Revision 1.8 1999/10/19 03:23:41 davidb 31 Collection building support through web pages 32 and internal and external link handling for collection documents 33 30 34 Revision 1.7 1999/09/07 23:04:29 rjmcnab 31 35 removed some compiler warnings … … 292 296 disp.setmacro ("messagestatus", "authen", ("_authen:message" + args["us"] 293 297 + "_")); 298 // change style of header and footer if page is a frame 299 if (args["sp"] != "frameset") { 300 disp.setmacro ("header", "authen", "_status:infoheader_(Log in)"); 301 disp.setmacro ("header", "authenok", "_status:infoheader_(Log in)"); 302 disp.setmacro ("footer", "authen", "_status:infofooter_(Log in)"); 303 disp.setmacro ("footer", "authenok", "_status:infofooter_(Log in)"); 304 } 305 else { 306 // disp.setmacro ("header", "authen", "_Global:header_"); //**** 307 // disp.setmacro ("header", "authenok", "_Global:header_"); 308 // disp.setmacro ("footer", "authen", "_Global:footer_"); 309 // disp.setmacro ("footer", "authenok", "_Global:footer_"); 310 disp.setmacro ("header", "authen", "_:header_"); 311 disp.setmacro ("header", "authenok", "_:header_"); 312 disp.setmacro ("footer", "authen", "_:footer_"); 313 disp.setmacro ("footer", "authenok", "_:footer_"); 314 } 315 294 316 295 317 // get a list of saved configuration arguments (if possible) -
trunk/gsdl/src/recpt/comtypes.h
r671 r722 68 68 69 69 // ColInfoResponse ::= SEQUENCE { 70 // shortInfo [0] IMPLICIT ShortCollectionInfo, 71 // isPublic [2] IMPLICIT BOOLEAN, -- whether has anonymous access 72 // isBeta [3] IMPLICIT BOOLEAN, -- beta if still under development 73 // buildDate [4] IMPLICIT GeneralizedTime, 74 // languages [5] IMPLICIT StringSet, -- languages in the collection 75 // numDocs [6] IMPLICIT INTEGER, 76 // numWords [7] IMPLICIT INTEGER OPTIONAL, 77 // numBytes [8] IMPLICIT INTEGER OPTIONAL 78 // format [9] IMPLICIT StringSet 79 // receptionist [10] IMPLICIT GeneralString 70 // shortInfo [0] IMPLICIT ShortCollectionInfo, 71 // isPublic [2] IMPLICIT BOOLEAN, -- whether has anonymous access 72 // isBeta [3] IMPLICIT BOOLEAN, -- beta if still under development 73 // buildDate [4] IMPLICIT GeneralizedTime, 74 // languages [5] IMPLICIT StringSet, -- languages in the collection 75 // numDocs [6] IMPLICIT INTEGER, 76 // numWords [7] IMPLICIT INTEGER OPTIONAL, 77 // numBytes [8] IMPLICIT INTEGER OPTIONAL 78 // collectionmeta [9] IMPLICIT StringSet 79 // format [10] IMPLICIT StringSet 80 // building [11] IMPLICIT StringSet 81 // receptionist [12] IMPLICIT GeneralString 80 82 // } 81 83 struct ColInfoResponse_t { … … 91 93 unsigned long numWords; // 0 if not known 92 94 unsigned long numBytes; // 0 if not known 95 text_tmap collectionmeta; 93 96 text_tmap format; 97 text_tmap building; 94 98 text_t receptionist; 95 99 }; -
trunk/gsdl/src/recpt/documentaction.cpp
r669 r722 28 28 /* 29 29 $Log$ 30 Revision 1.28 1999/10/19 03:23:42 davidb 31 Collection building support through web pages 32 and internal and external link handling for collection documents 33 30 34 Revision 1.27 1999/10/14 23:00:53 sjboddie 31 35 finished changes to browsing support … … 167 171 arg_ainfo.argdefault = ""; 168 172 arg_ainfo.savedarginfo = cgiarginfo::can; 173 argsinfo.addarginfo (NULL, arg_ainfo); 174 175 // whether or not a document should be retrieved from the 176 // library or the Web. 177 arg_ainfo.shortname = "il"; 178 arg_ainfo.longname = "internal link preference"; 179 arg_ainfo.multiplechar = false; 180 arg_ainfo.defaultstatus = cgiarginfo::weak; 181 arg_ainfo.argdefault = "l"; 182 arg_ainfo.savedarginfo = cgiarginfo::must; 169 183 argsinfo.addarginfo (NULL, arg_ainfo); 170 184 … … 271 285 } 272 286 273 void documentaction::get_cgihead_info (cgiargsclass &/*args*/, response_t &response, 274 text_t &response_data, ostream &/*logout*/) { 275 response = content; 276 response_data = "text/html"; 287 void documentaction::get_cgihead_info (cgiargsclass &args, response_t &response, 288 text_t &response_data, ostream &logout) { 289 290 if ((!args["d"].empty()) && (args["il"] == "w")) 291 { 292 text_t &oid = args["d"]; 293 text_t &collection = args["c"]; 294 295 recptprotolistclass* protocols = recpt->get_recptprotolist_ptr(); 296 recptproto* collectproto = protocols->getrecptproto (collection, logout); 297 298 text_tset metadata; 299 FilterResponse_t filt_response; 300 301 metadata.insert ("URL"); 302 303 // get metadata for this document and it's parents 304 if (get_info (oid, collection, metadata, true, collectproto, filt_response, logout)) 305 { 306 text_t url = *(filt_response.docInfo[0].metadata[0].values.begin()); 307 308 response = location; 309 response_data = url; 310 } 311 else 312 { 313 // error, no URL 314 logout << "Error: documentaction::get_cgihead_info failed on get_info" << endl; 315 } 316 } 317 else 318 { 319 response = content; 320 response_data = "text/html"; 321 } 277 322 } 278 323 -
trunk/gsdl/src/recpt/infodbclass.cpp
r533 r722 28 28 /* 29 29 $Log$ 30 Revision 1.5 1999/10/19 03:23:42 davidb 31 Collection building support through web pages 32 and internal and external link handling for collection documents 33 30 34 Revision 1.4 1999/09/07 04:56:56 sjboddie 31 35 added GPL notice … … 137 141 // returns true if opened 138 142 bool gdbmclass::opendatabase (const text_t &filename, int mode, int num_retrys, 139 bool need_filelock) { 143 #ifdef __WIN32__ 144 bool need_filelock 145 #else 146 bool 147 #endif 148 ) { 140 149 text_t data_location; 141 150 int block_size = 512; -
trunk/gsdl/src/recpt/librarymain.cpp
r713 r722 28 28 /* 29 29 $Log$ 30 Revision 1.17 1999/10/19 03:23:43 davidb 31 Collection building support through web pages 32 and internal and external link handling for collection documents 33 30 34 Revision 1.16 1999/10/18 20:07:33 sjboddie 31 35 added htmlbrowserclass … … 105 109 #include "usersaction.h" 106 110 #include "authenaction.h" 111 #include "extlinkaction.h" 112 #include "buildaction.h" 107 113 108 114 #include "browserclass.h" … … 206 212 207 213 documentaction adocumentaction; 208 adocumentaction.set_receptionist (&recpt);214 adocumentaction.set_receptionist (&recpt); 209 215 recpt.add_action (&adocumentaction); 210 216 211 217 usersaction ausersaction; 212 218 recpt.add_action (&ausersaction); 219 220 extlinkaction anextlinkaction; 221 recpt.add_action (&anextlinkaction); 222 223 buildaction abuildaction; 224 abuildaction.set_receptionist (&recpt); 225 recpt.add_action (&abuildaction); 213 226 214 227 authenaction aauthenaction; -
trunk/gsdl/src/recpt/nullproto.cpp
r533 r722 28 28 /* 29 29 $Log$ 30 Revision 1.10 1999/10/19 03:23:43 davidb 31 Collection building support through web pages 32 and internal and external link handling for collection documents 33 30 34 Revision 1.9 1999/09/07 04:56:56 sjboddie 31 35 added GPL notice … … 109 113 outconvertclass text_t2ascii; 110 114 logout << text_t2ascii 111 << " Error: couldn't read build.cfg file for collection \""115 << "Warning: couldn't read build.cfg file for collection \"" //**** 112 116 << configinfo.collection << "\", gsdlhome=\"" 113 117 << configinfo.gsdlhome << "\"\n"; 114 return false;118 // return false; //**** 115 119 } 116 120 -
trunk/gsdl/src/recpt/pageaction.cpp
r673 r722 28 28 /* 29 29 $Log$ 30 Revision 1.18 1999/10/19 03:23:44 davidb 31 Collection building support through web pages 32 and internal and external link handling for collection documents 33 30 34 Revision 1.17 1999/10/14 23:04:44 sjboddie 31 35 some hacks to make nzdl home page look right … … 208 212 ColInfoResponse_t cinfo; 209 213 (*rprotolist_here).p->get_collectinfo (*collist_here, cinfo, err, logout); 214 210 215 if (err == noError) { 211 if (cinfo.isPublic ) {216 if (cinfo.isPublic && (cinfo.buildDate > 0)) { 212 217 213 218 FilterResponse_t response; -
trunk/gsdl/src/recpt/receptionist.cpp
r712 r722 28 28 /* 29 29 $Log$ 30 Revision 1.36 1999/10/19 03:23:44 davidb 31 Collection building support through web pages 32 and internal and external link handling for collection documents 33 30 34 Revision 1.35 1999/10/18 20:07:05 sjboddie 31 35 tidied up a few things - moved processing of "hp" argument … … 1109 1113 text_t &collection = args["c"]; 1110 1114 1115 disp.setmacro ("gsdlhome", "Global", configinfo.gsdlhome); 1111 1116 disp.setmacro ("gwcgi", "Global", configinfo.gwcgi); 1112 1117 disp.setmacro ("httpimg", "Global", configinfo.httpimg); -
trunk/gsdl/src/recpt/recptproto.h
r533 r722 170 170 void addrecptproto (recptproto *therecptproto); 171 171 172 // getrecptproto will return NULL if a recptproto for the given col elction172 // getrecptproto will return NULL if a recptproto for the given collection 173 173 // could not be found 174 174 recptproto *getrecptproto (const text_t &collection, ostream &logout); -
trunk/gsdl/src/recpt/statusaction.cpp
r716 r722 28 28 /* 29 29 $Log$ 30 Revision 1.21 1999/10/19 03:23:46 davidb 31 Collection building support through web pages 32 and internal and external link handling for collection documents 33 30 34 Revision 1.20 1999/10/18 20:10:41 sjboddie 31 35 don't want to use authentication to reach status page (usersaction still … … 121 125 } 122 126 127 void statusaction::output_welcome (cgiargsclass &/*args*/, displayclass &disp, 128 outconvertclass &outconvert, 129 ostream &textout, ostream &/*logout*/) { 130 textout << outconvert << disp << "_status:infoheader_(_titlewelcome_)\n" 131 "_status:welcome_\n" 132 "_status:infofooter_\n"; 133 } 134 123 135 void statusaction::output_generalinfo (cgiargsclass &/*args*/, displayclass &disp, 124 136 outconvertclass &outconvert, … … 127 139 const recptconf &rcinfo = recpt->get_configinfo (); 128 140 129 textout << outconvert << disp << "_status: header_(General Information)\n";141 textout << outconvert << disp << "_status:infoheader_(General Information)\n"; 130 142 textout << outconvert 131 143 << "<h2>General information</h2>\n" … … 269 281 } 270 282 271 textout << outconvert << disp << "</table>\n_status: footer_\n";283 textout << outconvert << disp << "</table>\n_status:infofooter_\n"; 272 284 } 273 285 … … 279 291 if (rcargsinfo == NULL) return; 280 292 281 textout << outconvert << disp << "_status: header_(Argument Information)\n";293 textout << outconvert << disp << "_status:infoheader_(Argument Information)\n"; 282 294 textout << outconvert 283 295 << "<h2>Argument information</h2>\n" … … 323 335 } 324 336 325 textout << outconvert << disp << "</table>\n_status: footer_\n";337 textout << outconvert << disp << "</table>\n_status:infofooter_\n"; 326 338 } 327 339 … … 332 344 actionmapclass *actions = recpt->get_actionmap_ptr(); 333 345 334 textout << outconvert << disp << "_status: header_(Action Information)\n";346 textout << outconvert << disp << "_status:infoheader_(Action Information)\n"; 335 347 textout << outconvert 336 348 << "<h2>Action information</h2>\n" … … 368 380 } 369 381 370 textout << outconvert << disp << "</table>\n_status: footer_\n";382 textout << outconvert << disp << "</table>\n_status:infofooter_\n"; 371 383 } 372 384 … … 382 394 if (rprotolist == NULL) return; 383 395 384 textout << outconvert << disp << "_status: header_(Protocol Information)\n";396 textout << outconvert << disp << "_status:infoheader_(Protocol Information)\n"; 385 397 textout << outconvert 386 398 << "<h2>Protocol information</h2>\n" … … 445 457 << "mode making some of the collections unreachable.\n"; 446 458 } 447 textout << outconvert << disp << "_status: footer_\n";459 textout << outconvert << disp << "_status:infofooter_\n"; 448 460 } 449 461 … … 453 465 if (recpt == NULL) return; 454 466 455 textout << outconvert << disp << "_status: header_(Collection info)\n";467 textout << outconvert << disp << "_status:infoheader_(Collection info)\n"; 456 468 textout << outconvert << "<h2>Collection info</h2>\n"; 457 469 … … 643 655 } 644 656 645 textout << outconvert << disp << "_status: footer_\n";657 textout << outconvert << disp << "_status:infofooter_\n"; 646 658 } 647 659 … … 655 667 if (cinitfilename == NULL) return; 656 668 657 textout << outconvert << disp << "_status: header_(Init log)\n";669 textout << outconvert << disp << "_status:infoheader_(Init log)\n"; 658 670 textout << outconvert << "<h2>Init log</h2>\n"; 659 671 … … 682 694 } 683 695 684 textout << outconvert << disp << "_status: footer_\n";696 textout << outconvert << disp << "_status:infofooter_\n"; 685 697 } 686 698 … … 694 706 if (cerrfilename == NULL) return; 695 707 696 textout << outconvert << disp << "_status: header_(Error log)\n";708 textout << outconvert << disp << "_status:infoheader_(Error log)\n"; 697 709 textout << outconvert << "<h2>Error log</h2>\n"; 698 710 logout << flush; … … 722 734 } 723 735 724 textout << outconvert << disp << "_status: footer_\n";736 textout << outconvert << disp << "_status:infofooter_\n"; 725 737 } 726 738 … … 780 792 } 781 793 782 bool statusaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, cgiargsclass & args,794 bool statusaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, cgiargsclass &/*args*/, 783 795 ostream &/*logout*/) { 784 // authenticate the user if authentication is avaiable785 // args["uan"] = 1;786 // args["ug"] = "administrator";787 788 796 return true; 789 797 } … … 837 845 if (arg_sp == "frameset") output_frameset (args, disp, outconvert, textout, logout); 838 846 else if (arg_sp == "select") output_select (args, disp, outconvert, textout, logout); 847 else if (arg_sp == "welcome") output_welcome (args, disp, outconvert, textout, logout); 839 848 else if (arg_sp == "generalinfo") output_generalinfo (args, disp, outconvert, textout, logout); 840 849 else if (arg_sp == "argumentinfo") output_argumentinfo (args, disp, outconvert, textout, logout); -
trunk/gsdl/src/recpt/statusaction.h
r533 r722 48 48 ostream &textout, ostream &logout); 49 49 50 void output_welcome (cgiargsclass &args, displayclass &disp, 51 outconvertclass &outconvert, 52 ostream &textout, ostream &logout); 50 53 void output_generalinfo (cgiargsclass &args, displayclass &disp, 51 54 outconvertclass &outconvert,
Note:
See TracChangeset
for help on using the changeset viewer.