Changeset 16874


Ignore:
Timestamp:
2008-08-18T12:02:54+12:00 (16 years ago)
Author:
kjdon
Message:

when testing to see if we need to get service descriptions or not, ignore oai type services as well as retrieve services cos these never have descriptions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/src/java/org/greenstone/gsdl3/core/DefaultReceptionist.java

    r16688 r16874  
    2222     static Logger logger = Logger.getLogger(org.greenstone.gsdl3.core.DefaultReceptionist.class.getName());
    2323   
     24  /** add in the collection description to the page, then for each service, add in the service description */
    2425    protected void addExtraInfo(Element page) {
    25     // we want to add in the collection description for each page - cos
    26     // our default xslt needs this.
    27     super.addExtraInfo(page);
     26      super.addExtraInfo(page);
    2827   
    2928    Element page_request = (Element)GSXML.getChildByTagName(page, GSXML.PAGE_REQUEST_ELEM);
     
    108107        int i=1;
    109108        Element test_s = (Element)services.item(0);
    110         while (i<services.getLength() && test_s.getAttribute(GSXML.TYPE_ATT).equals(GSXML.SERVICE_TYPE_RETRIEVE)) {
     109        while (i<services.getLength() && (test_s.getAttribute(GSXML.TYPE_ATT).equals(GSXML.SERVICE_TYPE_RETRIEVE) || test_s.getAttribute(GSXML.TYPE_ATT).equals(GSXML.SERVICE_TYPE_OAI))) {
    111110        test_s = (Element)services.item(i); i++;
    112111        }
    113112        if (i==services.getLength()) {
    114         // we have only found retrieve services, so dont need descripitons anyway
     113        // we have only found retrieve or oai services, so dont need descripitons anyway
    115114        return;
    116115        }
     
    122121
    123122    // if get here, we need to get the service descriptions
    124     logger.debug("getting services description");
    125123       
    126124    // we will send all the requests in a single message
Note: See TracChangeset for help on using the changeset viewer.