Changeset 15834
- Timestamp:
- 2008-05-30T14:31:36+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/src/recpt/dynamicclassifieraction.cpp
r15807 r15834 111 111 if (arg_dcl.empty()) 112 112 { 113 textout << outconvert << disp << "Error: Missing \"dcl\" value.\n";113 textout << outconvert << disp << "Error: Missing dcl argument.\n"; 114 114 textout << outconvert << disp << "_document:footer_\n"; 115 115 return true; … … 120 120 if (cinfo->dynamic_classifiers.find(arg_dcl) == cinfo->dynamic_classifiers.end()) 121 121 { 122 textout << outconvert << disp << "Error: Invalid \"dcl\" value " << arg_dcl <<".\n";122 textout << outconvert << disp << "Error: Invalid dcl value \"" << arg_dcl << "\".\n"; 123 123 textout << outconvert << disp << "_document:footer_\n"; 124 124 return true; … … 170 170 get_documents_with_metadata_value (metadata_element_name, metadata_value, args["c"], collectproto, document_OIDs_response, logout); 171 171 172 // Check the metadata value is valid 173 if (document_OIDs_response.docInfo.empty()) 174 { 175 textout << outconvert << disp << "Error: No documents have metadata value \"" << arg_dcn << "\".\n"; 176 textout << outconvert << disp << "_document:footer_\n"; 177 return true; 178 } 179 172 180 // Make an array of matching document OIDs 173 181 text_tarray document_OIDs; … … 179 187 } 180 188 181 // Request the necessary metadata for these documents 189 // Display the classifier node 190 ResultDocInfo_t classifier_node; 191 classifier_node.OID = arg_dcn; 192 classifier_node.metadata["doctype"].values.push_back("classify"); 193 classifier_node.metadata["haschildren"].values.push_back("1"); 194 classifier_node.metadata["numleafdocs"].values.push_back(document_OIDs.size()); 195 classifier_node.metadata["Title"].values.push_back(classifier_node.OID); 196 bptr->output_section_group (classifier_node, args, args["c"], 0, formatlistptr, use_table, metadata, getParents, collectproto, disp, outconvert, textout, logout); 197 198 // Request the necessary metadata for the documents under this node 182 199 FilterResponse_t document_info_response; 183 200 get_info (document_OIDs, args["c"], args["l"], metadata, getParents, collectproto, document_info_response, logout); 184 201 185 202 // Display the document nodes 186 bptr->output_section_group (document_info_response, args, args["c"], 0, formatlistptr, use_table, metadata, getParents, collectproto, disp, outconvert, textout, logout);203 bptr->output_section_group (document_info_response, args, args["c"], 1, formatlistptr, use_table, metadata, getParents, collectproto, disp, outconvert, textout, logout); 187 204 } 188 205
Note:
See TracChangeset
for help on using the changeset viewer.