- Timestamp:
- 2003-01-06T15:23:47+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/QueryAction.java
r3603 r3645 59 59 HashMap params = GSXML.extractParams(cgi_param_list); 60 60 61 String collection = (String)params.get( "collection");61 String collection = (String)params.get(GSCGI.COLLECTION_ARG); 62 62 if (collection == null || collection.equals("")) { 63 63 System.err.println("QueryAction Error: no collection was specified!"); … … 77 77 78 78 Element mr_info_response = (Element) mr_.process(mr_info_message); 79 System.out.println("describe response from query=");80 System.out.println(converter_.getString(mr_info_response));81 79 String path = GSXML.RESPONSE_ELEM; 82 80 path = GSPath.appendLink(path, GSXML.SERVICE_ELEM); … … 87 85 System.out.println("adding shortnames"); 88 86 // add short names to the params in the param list 89 cgi_. addShortNames(pl);87 cgi_.paramListAddShortNames(pl); 90 88 // for each param in the description, overwrite teh default value with the currently set value if present 91 89 Element param = (Element)pl.getFirstChild(); … … 116 114 } 117 115 } 118 System.out.println(converter_.getString(pl));119 116 120 117 // part of the data for the description is the cgi-params … … 148 145 // for now, just create a whole new request 149 146 150 // check that there are some resources - for now check the list, but later should use a numdocs metadata elem147 // check that there are some documents - for now check the list, but later should use a numdocs metadata elem 151 148 path = GSXML.RESPONSE_ELEM; 152 149 path = GSPath.appendLink(path, GSXML.CONTENT_ELEM); 153 path = GSPath.appendLink(path, GSXML. RESOURCE_ELEM+GSXML.LIST_MODIFIER);154 155 Element resource_list = (Element)GSXML.getNodeByPath(mr_query_response,156 path); // resourceList not present if no docs found157 if ( resource_list == null) {150 path = GSPath.appendLink(path, GSXML.DOCUMENT_ELEM+GSXML.LIST_MODIFIER); 151 152 Element document_list = (Element)GSXML.getNodeByPath(mr_query_response, 153 path); // documentList not present if no docs found 154 if (document_list == null) { 158 155 159 156 Element result_response = (Element)GSXML.getChildByTagName(mr_query_response, GSXML.RESPONSE_ELEM); … … 182 179 183 180 // the first part of the content is the doc list 184 meta_content.appendChild(doc_.importNode( resource_list, true));181 meta_content.appendChild(doc_.importNode(document_list, true)); 185 182 186 183 // the second part of the content is the metadata list
Note:
See TracChangeset
for help on using the changeset viewer.