- Timestamp:
- 2006-10-17T15:52:42+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/DefaultReceptionist.java
r9874 r13124 14 14 import java.util.Enumeration; 15 15 16 import org.apache.log4j.*; 17 16 18 /** The default greenstone receptionist - needs some extra info for each page 17 19 */ 18 20 public class DefaultReceptionist extends TransformingReceptionist { 21 22 static Category logger = Category.getInstance(org.greenstone.gsdl3.core.DefaultReceptionist.class.getName()); 19 23 20 24 protected void addExtraInfo(Element page) { … … 27 31 String action = page_request.getAttribute(GSXML.ACTION_ATT); 28 32 if (action.equals("s")) { 29 System.err.println("HACK: don't ask for coll info if system action");33 logger.error("HACK: don't ask for coll info if system action"); 30 34 return; 31 35 } 32 ///ystem.out.println("add extra info, page request="+this.converter.getString(page_request));36 logger.debug("add extra info, page request="+this.converter.getString(page_request)); 33 37 // is a collection defined? 34 38 Element param_list = (Element)GSXML.getChildByTagName(page_request, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER); 35 39 if (param_list==null) { // must be the original home page 36 ///ystem.out.println("DefaultReceptionist:no param list, assuming home page");40 logger.debug(" no param list, assuming home page"); 37 41 return; 38 42 } 39 43 Element coll_param = GSXML.getNamedElement(param_list, GSXML.PARAM_ELEM, GSXML.NAME_ATT, GSParams.COLLECTION); 40 44 if (coll_param == null) { 41 ///ystem.out.println("DefaultReceptionist:coll param is null, returning");45 logger.debug(" coll param is null, returning"); 42 46 return; 43 47 } … … 75 79 76 80 if (coll_description == null) { 77 System.err.println("DefaultReceptionist:no collection description, returning");81 logger.error(" no collection description, returning"); 78 82 return; 79 83 } … … 89 93 Element service_list = (Element)GSXML.getChildByTagName(coll_description, GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER); 90 94 if (service_list == null) { 91 System.err.println("DefaultReceptionist:no service list, returning");95 logger.error(" no service list, returning"); 92 96 // something weird has gone wrong 93 97 return; … … 96 100 NodeList services = service_list.getElementsByTagName(GSXML.SERVICE_ELEM); 97 101 if (services.getLength()==0) { 98 System.err.println("DefaultReceoptionist: no services found for colllection/cluster "+ coll_name);102 logger.error("DefaultReceoptionist: no services found for colllection/cluster "+ coll_name); 99 103 return; 100 104 } … … 118 122 119 123 // if get here, we need to get the service descriptions 120 ///ystem.out.println("getting services description");124 logger.debug("getting services description"); 121 125 122 126 // we will send all the requests in a single message … … 139 143 // check that have same number of responses as collections 140 144 if (services.getLength() != service_responses.getLength()) { 141 System.err.println("DefaultReceptionist Error:didn't get a response for each service - somethings gone wrong!");145 logger.error(" didn't get a response for each service - somethings gone wrong!"); 142 146 // for now, dont use the metadata 143 147 } else { … … 149 153 GSXML.mergeElements(c1, c2); 150 154 } else { 151 System.err.println("DefaultReceptionist Error:response does not correspond to request!");155 logger.error(" response does not correspond to request!"); 152 156 } 153 157
Note:
See TracChangeset
for help on using the changeset viewer.