Changeset 30553 for main/trunk/greenstone3/src/java/org/greenstone/gsdl3/collection/ServiceCluster.java
- Timestamp:
- 2016-06-02T14:11:02+12:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/collection/ServiceCluster.java
r28966 r30553 93 93 94 94 protected Element display_item_list = null; 95 /** extra stuff */ 96 protected Element extra_info = null; 95 97 /** default values for servlet params */ 96 98 protected Element library_param_list = null; … … 146 148 this.library_param_list = this.desc_doc.createElement(GSXML.LIBRARY_PARAM_ELEM+GSXML.LIST_MODIFIER); 147 149 this.service_list = this.desc_doc.createElement(GSXML.SERVICE_ELEM + GSXML.LIST_MODIFIER); 150 this.extra_info = this.desc_doc.createElement(GSXML.EXTRA_INFO_ELEM); 148 151 //this.plugin_item_list = this.desc_doc.createElement(GSXML.PLUGIN_ELEM + GSXML.LIST_MODIFIER); 149 152 } … … 273 276 } 274 277 } 275 276 } 278 279 // get any extra info 280 Element info = (Element) GSXML.getChildByTagName(service_cluster_info, GSXML.EXTRA_INFO_ELEM); 281 if (info != null) { 282 if (!addExtraInfo(info)) { 283 logger.error("couldn't add extra info"); 284 } 285 } 286 287 } 277 288 /** 278 289 * adds metadata from a metadataList into the metadata_list xml … … 336 347 return true; 337 348 } 349 350 protected boolean addExtraInfo(Element info) { 351 if (info == null) { 352 return false; 353 } 354 NodeList children = info.getChildNodes(); 355 for(int i=0; i<children.getLength(); i++) { 356 this.extra_info.appendChild(this.desc_doc.importNode(children.item(i), true)); 357 } 358 return true; 359 } 338 360 339 361 // protected boolean addPlugins(Element plugin_list) … … 652 674 description.appendChild(result_doc.importNode(this.metadata_list, true)); 653 675 description.appendChild(result_doc.importNode(this.library_param_list, true)); 676 description.appendChild(result_doc.importNode(this.extra_info, true)); 654 677 //description.appendChild(this.plugin_item_list); 655 678 return response; … … 682 705 description.appendChild(result_doc.importNode(this.library_param_list, true)); 683 706 } 707 else if (info.equals(GSXML.EXTRA_INFO_ELEM)) { 708 description.appendChild(result_doc.importNode(this.extra_info, true)); 709 } 684 710 } 685 711 } … … 769 795 * } 770 796 */ 797 771 798 if (type.equals(GSXML.REQUEST_TYPE_SYSTEM)) 772 799 { … … 780 807 return response; 781 808 } 782 783 809 protected Element processSystemRequest(Element request) 784 810 {
Note:
See TracChangeset
for help on using the changeset viewer.