Changeset 5402
- Timestamp:
- 2003-09-01T15:51:31+12:00 (21 years ago)
- Location:
- trunk/gsdl3/src/java/org/greenstone/gsdl3/core
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/DefaultReceptionist.java
r5146 r5402 29 29 Element param_list = (Element)GSXML.getChildByTagName(page_request, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER); 30 30 if (param_list==null) { // must be the original home page 31 System.out.println("DefaultReceptionist: no param list, assuming home page");31 ///ystem.out.println("DefaultReceptionist: no param list, assuming home page"); 32 32 return; 33 33 } 34 34 Element coll_param = GSXML.getNamedElement(param_list, GSXML.PARAM_ELEM, GSXML.NAME_ATT, GSParams.COLLECTION); 35 35 if (coll_param == null) { 36 System.out.println("DefaultReceptionist: coll param is null, returning");36 ///ystem.out.println("DefaultReceptionist: coll param is null, returning"); 37 37 return; 38 38 } … … 45 45 Element page_response = (Element)GSXML.getChildByTagName(page, GSXML.PAGE_RESPONSE_ELEM); 46 46 if (this.language_list != null) { 47 System.out.println("appending lang list");48 47 page_response.appendChild(this.language_list); 49 48 } … … 54 53 } 55 54 if (coll_description == null) { 56 System.out.println("getting a coll description");57 55 // we dont have one yet - get it 58 56 Element coll_about_message = this.doc.createElement(GSXML.MESSAGE_ELEM); … … 68 66 69 67 if (coll_description == null) { 70 System. out.println("DefaultReceptionist: no collection description, returning");68 System.err.println("DefaultReceptionist: no collection description, returning"); 71 69 return; 72 70 } … … 82 80 Element service_list = (Element)GSXML.getChildByTagName(coll_description, GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER); 83 81 if (service_list == null) { 84 System. out.println("DefaultReceptionist: no service list, returning");82 System.err.println("DefaultReceptionist: no service list, returning"); 85 83 // something weird has gone wrong 86 84 return; -
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/MessageRouter.java
r5226 r5402 119 119 120 120 if (this.site_home==null) { 121 System.err.println(" You must set site_home before calling configure");121 System.err.println("MessageRouter: You must set site_home before calling configure"); 122 122 return false; 123 123 } … … 224 224 public Element process(Element message) { 225 225 226 System.out.println("MR received request");227 System.out.println(this.converter.getString(message));226 ///ystem.out.println("MR received request"); 227 ///ystem.out.println(this.converter.getString(message)); 228 228 229 229 // check that its a correct message tag 230 230 if (!message.getTagName().equals(GSXML.MESSAGE_ELEM)) { 231 System.err.println(" Invalid message. GSDL message should start with <"+GSXML.MESSAGE_ELEM+">, instead it starts with:"+message.getTagName()+".");231 System.err.println("MessageRouter: Invalid message. GSDL message should start with <"+GSXML.MESSAGE_ELEM+">, instead it starts with:"+message.getTagName()+"."); 232 232 return null; 233 233 } … … 277 277 } // for each request 278 278 279 System.out.println("MR returned response");280 System.out.println(this.converter.getString(mainResult));279 ///ystem.out.println("MR returned response"); 280 ///ystem.out.println(this.converter.getString(mainResult)); 281 281 282 282 return mainResult; … … 433 433 // have to be added later 434 434 if (!getRemoteSiteInfo(comm, name)) { 435 System.err.println(" couldn't get info from site "+name);435 System.err.println("MessageRouter: couldn't get info from site "+name); 436 436 } 437 437 } else { 438 System.err.println(" couldn't configure soap site:"+name);438 System.err.println("MessageRouter: couldn't configure soap site:"+name); 439 439 } 440 440 441 441 } else { 442 System.err.print(" cant talk to server of type:"+type);442 System.err.print("MessageRouter: cant talk to server of type:"+type); 443 443 System.err.println(", so not making a connection to "+name); 444 444 } … … 534 534 return response; 535 535 } 536 System.out.println("params found, getting subset");537 536 NodeList params = param_list.getElementsByTagName(GSXML.PARAM_ELEM); 538 537 … … 717 716 c = (Collection)Class.forName("org.greenstone.gsdl3.collection."+coll_class_name).newInstance(); 718 717 } catch (Exception e) { 719 System.out.println(" couldn't create a new collection, type "+coll_class_name+", defaulting to class Collection");718 System.out.println("MessageRouter: couldn't create a new collection, type "+coll_class_name+", defaulting to class Collection"); 720 719 c = new Collection(); 721 720 } … … 761 760 Element site_list = (Element)GSXML.getChildByTagName(config, GSXML.SITE_ELEM+GSXML.LIST_MODIFIER); 762 761 if (site_list ==null ) { 763 System. out.println("MessageRouter:activateSite, no sites found");762 System.err.println("MessageRouter:activateSite, no sites found"); 764 763 return false; 765 764 } 766 765 Element this_site_elem = GSXML.getNamedElement(site_list, GSXML.SITE_ELEM, GSXML.NAME_ATT, site_name); 767 766 if (this_site_elem == null) { 768 System. out.println("MessageRouter:activateSite, site "+site_name+" not found");767 System.err.println("MessageRouter:activateSite, site "+site_name+" not found"); 769 768 return false; 770 769 } … … 784 783 // have to be added later 785 784 if (!getRemoteSiteInfo(comm, site_name)) { 786 System.err.println(" couldn't get info from site "+site_name);785 System.err.println("MessageRouter: couldn't get info from site "+site_name); 787 786 } 788 787 } else { 789 System.err.println(" couldn't configure soap site:"+site_name);788 System.err.println("MessageRouter: couldn't configure soap site:"+site_name); 790 789 return false; 791 790 } 792 791 793 792 } else { 794 System.err.print(" cant talk to server of type:"+type);793 System.err.print("MessageRouter: cant talk to server of type:"+type); 795 794 System.err.println(", so not making a connection to "+site_name); 796 795 return false; … … 846 845 } 847 846 } else { 848 System.err.println(" couldn't deactivate coll");847 System.err.println("MessageRouter: couldn't deactivate coll"); 849 848 // couldn't do it 850 849 return false; -
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/Receptionist.java
r5144 r5402 89 89 ac = (Action)Class.forName("org.greenstone.gsdl3.action."+class_name).newInstance(); 90 90 } catch (Exception e) { 91 System. out.println("couldn't load in action "+class_name);91 System.err.println("Receptionist: couldn't load in action "+class_name); 92 92 e.printStackTrace(); 93 93 continue; … … 102 102 this.language_list = (Element)GSXML.getChildByTagName(config_doc, "languageList"); 103 103 if (language_list == null) { 104 System. out.println("lang list is null!!");104 System.err.println("Receptionist: didn't find a language list in the config file!!"); 105 105 } 106 106 return true; … … 193 193 page.appendChild(page_response); 194 194 195 // System.out.println("REceptionist: raw page="+this.converter.getString(page));195 ///ystem.out.println("REceptionist: raw page="+this.converter.getString(page)); 196 196 // transform the result in some way 197 197 Element resulting_page = postProcessPage(page); -
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java
r5145 r5402 38 38 39 39 if (this.config_params==null) { 40 System.err.println(" Receptionist Error: config variables must be set before calling configure");40 System.err.println("TransformingReceptionist Error: config variables must be set before calling configure"); 41 41 return false; 42 42 } 43 43 if (this.mr==null) { 44 System.err.println(" Receptionist Error: message router must be set before calling configure");44 System.err.println("TransformingReceptionist Error: message router must be set before calling configure"); 45 45 return false; 46 46 } … … 65 65 ac = (Action)Class.forName("org.greenstone.gsdl3.action."+class_name).newInstance(); 66 66 } catch (Exception e) { 67 System.err.println(" couldn't load in action "+class_name);67 System.err.println("TransformingReceptionist Error: couldn't load in action "+class_name); 68 68 e.printStackTrace(); 69 69 continue; … … 95 95 Element lang_list = (Element)GSXML.getChildByTagName(config_doc, "languageList"); 96 96 if (lang_list == null) { 97 System. out.println("lang list is null!!");97 System.err.println("TransformingReceptionist: didn't find a language list in the config file!!"); 98 98 } else { 99 99 this.language_list = (Element) this.doc.importNode(lang_list, true); … … 137 137 if (xslt_file==null) { 138 138 // cant transform the page - return null or the original? 139 System.err.println(" cant find the xslt file needed, so returning the original page!");139 System.err.println("TransformingReceptionist: cant find the xslt file needed, so returning the original page!"); 140 140 return page; 141 141 } … … 183 183 String stylesheet = GSFile.stylesheetFile((String)this.config_params.get(GSConstants.GSDL3_HOME), (String)this.config_params.get(GSConstants.SITE_NAME), (String)this.config_params.get(GSConstants.INTERFACE_NAME), collection, name); 184 184 if (stylesheet==null) { 185 System.out.println(" cant find stylesheet for "+name);185 System.out.println("TransformingReceptionist: cant find stylesheet for "+name); 186 186 } 187 187 return stylesheet;
Note:
See TracChangeset
for help on using the changeset viewer.