Changeset 5402


Ignore:
Timestamp:
2003-09-01T15:51:31+12:00 (21 years ago)
Author:
kjdon
Message:

tidying up println stuff

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  
    2929    Element param_list = (Element)GSXML.getChildByTagName(page_request, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
    3030    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");
    3232        return;
    3333    }
    3434    Element coll_param = GSXML.getNamedElement(param_list, GSXML.PARAM_ELEM, GSXML.NAME_ATT, GSParams.COLLECTION);
    3535    if (coll_param == null) {
    36         System.out.println("DefaultReceptionist: coll param is null, returning");
     36        ///ystem.out.println("DefaultReceptionist: coll param is null, returning");
    3737        return;
    3838    }
     
    4545    Element page_response = (Element)GSXML.getChildByTagName(page, GSXML.PAGE_RESPONSE_ELEM);
    4646    if (this.language_list != null) {
    47         System.out.println("appending lang list");
    4847        page_response.appendChild(this.language_list);
    4948    }
     
    5453    }
    5554    if (coll_description == null) {
    56         System.out.println("getting a coll description");
    5755        // we dont have one yet - get it
    5856        Element coll_about_message = this.doc.createElement(GSXML.MESSAGE_ELEM);
     
    6866       
    6967        if (coll_description == null) {
    70         System.out.println("DefaultReceptionist: no collection description, returning");
     68        System.err.println("DefaultReceptionist: no collection description, returning");
    7169        return;
    7270        }
     
    8280    Element service_list = (Element)GSXML.getChildByTagName(coll_description, GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER);
    8381    if (service_list == null) {
    84         System.out.println("DefaultReceptionist: no service list, returning");
     82        System.err.println("DefaultReceptionist: no service list, returning");
    8583        // something weird has gone wrong
    8684        return;
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/core/MessageRouter.java

    r5226 r5402  
    119119
    120120    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");
    122122        return false;
    123123    }
     
    224224    public Element process(Element message) {
    225225
    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));
    228228               
    229229    // check that its a correct message tag
    230230    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()+".");
    232232        return null;
    233233    }
     
    277277    } // for each request
    278278   
    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));
    281281
    282282    return mainResult;
     
    433433            // have to be added later
    434434            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);
    436436            }
    437437        } else {
    438             System.err.println("couldn't configure soap site:"+name);
     438            System.err.println("MessageRouter: couldn't configure soap site:"+name);
    439439        }
    440440       
    441441        } else {
    442         System.err.print("cant talk to server of type:"+type);
     442        System.err.print("MessageRouter: cant talk to server of type:"+type);
    443443        System.err.println(", so not making a connection to "+name);
    444444        }
     
    534534        return response;
    535535        }
    536         System.out.println("params found, getting subset");
    537536        NodeList params = param_list.getElementsByTagName(GSXML.PARAM_ELEM);
    538537       
     
    717716            c = (Collection)Class.forName("org.greenstone.gsdl3.collection."+coll_class_name).newInstance();
    718717        } 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");
    720719            c = new Collection();
    721720        }
     
    761760    Element site_list = (Element)GSXML.getChildByTagName(config, GSXML.SITE_ELEM+GSXML.LIST_MODIFIER);
    762761    if (site_list ==null ) {
    763         System.out.println("MessageRouter:activateSite, no sites found");
     762        System.err.println("MessageRouter:activateSite, no sites found");
    764763        return false;
    765764    }
    766765    Element this_site_elem = GSXML.getNamedElement(site_list, GSXML.SITE_ELEM, GSXML.NAME_ATT, site_name);
    767766    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");
    769768        return false;
    770769    }
     
    784783        // have to be added later
    785784        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);
    787786        }
    788787        } else {
    789         System.err.println("couldn't configure soap site:"+site_name);
     788        System.err.println("MessageRouter: couldn't configure soap site:"+site_name);
    790789        return false;
    791790        }
    792791       
    793792    } else {
    794         System.err.print("cant talk to server of type:"+type);
     793        System.err.print("MessageRouter: cant talk to server of type:"+type);
    795794        System.err.println(", so not making a connection to "+site_name);
    796795        return false;
     
    846845        }
    847846        } else {
    848         System.err.println("couldn't deactivate coll");
     847        System.err.println("MessageRouter: couldn't deactivate coll");
    849848        // couldn't do it
    850849        return false;
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/core/Receptionist.java

    r5144 r5402  
    8989        ac = (Action)Class.forName("org.greenstone.gsdl3.action."+class_name).newInstance();
    9090        } 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);
    9292        e.printStackTrace();
    9393        continue;
     
    102102    this.language_list = (Element)GSXML.getChildByTagName(config_doc, "languageList");
    103103    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!!");
    105105    }
    106106    return true;
     
    193193    page.appendChild(page_response);
    194194
    195     //System.out.println("REceptionist: raw page="+this.converter.getString(page));
     195    ///ystem.out.println("REceptionist: raw page="+this.converter.getString(page));
    196196    // transform the result in some way
    197197    Element resulting_page = postProcessPage(page);
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java

    r5145 r5402  
    3838   
    3939    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");
    4141        return false;
    4242    }
    4343    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");
    4545        return false;
    4646    }
     
    6565        ac = (Action)Class.forName("org.greenstone.gsdl3.action."+class_name).newInstance();
    6666        } 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);
    6868        e.printStackTrace();
    6969        continue;
     
    9595    Element lang_list = (Element)GSXML.getChildByTagName(config_doc, "languageList");
    9696    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!!");
    9898    } else {
    9999        this.language_list = (Element) this.doc.importNode(lang_list, true);
     
    137137    if (xslt_file==null) {
    138138        // 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!");
    140140        return page;
    141141    }
     
    183183    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);
    184184    if (stylesheet==null) {
    185         System.out.println("cant find stylesheet for "+name);
     185        System.out.println("TransformingReceptionist: cant find stylesheet for "+name);
    186186    }
    187187    return stylesheet;
Note: See TracChangeset for help on using the changeset viewer.