- Timestamp:
- 2003-01-17T10:45:27+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/QueryAction.java
r3645 r3682 33 33 page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.CONFIGURATION_ELEM), true)); 34 34 35 // query type is the subaction 36 String query_type = request.getAttribute(GSXML.SUBACTION_ATT) + "Query"; 37 38 // for now assume all queries can be handled by basic query 39 return basicQuery(page, request, query_type); 40 35 // if want to have a different type of query here, check the subaction att of request 36 37 // for now assume all queries can be handled by basic query 38 return basicQuery(page, request); 39 41 40 } 42 41 … … 45 44 * params to the service, then gets the titles for any results 46 45 */ 47 protected Element basicQuery(Element page, Element request , String service_name) {46 protected Element basicQuery(Element page, Element request) { 48 47 49 48 // check that the stylesheet is present - cant output the page without one. … … 58 57 59 58 HashMap params = GSXML.extractParams(cgi_param_list); 60 59 60 String request_type = (String)params.get(GSCGI.REQUEST_TYPE_ARG); 61 String service_name = (String)params.get(GSCGI.SERVICE_ARG); 61 62 String collection = (String)params.get(GSCGI.COLLECTION_ARG); 62 63 if (collection == null || collection.equals("")) { … … 122 123 page.appendChild(description); 123 124 124 // now we always do the query - we have no way of knowing whether 125 // a query was specified or not cos we cant assume that q is the 126 // query string - maybe we could check that any required params have 127 // a value?? 128 125 // just a display request 126 if (request_type.equals("d")) { 127 // output the page 128 // process using the stylesheet 129 Document style_doc = converter_.getDOM(new File(stylesheet)); 130 GSXSLT.absoluteIncludePaths(style_doc, config_); 131 return (Element)transformer_.transform(style_doc, page); 132 } 133 134 // do the query 129 135 Element mr_query_message = doc_.createElement(GSXML.MESSAGE_ELEM); 130 136 Element mr_query_request = doc_.createElement(GSXML.REQUEST_ELEM);
Note:
See TracChangeset
for help on using the changeset viewer.