Changeset 5964
- Timestamp:
- 2003-11-25T11:46:14+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/XMLRetrieve.java
r5264 r5964 28 28 protected String toc_xsl_name = ""; 29 29 protected String document_encoding = ""; 30 protected String document_root_tag = ""; 31 30 32 protected Element collection_doc_list = null; 31 33 32 34 protected boolean provide_content = true; 33 35 protected boolean provide_structure = true; … … 37 39 public boolean configure(Element info, Element extra_info) { 38 40 41 System.out.println("configuring XMLRetrieve..."); 39 42 // look for the parameters 40 43 Element param_list = (Element)GSXML.getChildByTagName(info, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER); … … 45 48 this.toc_xsl_name = (String)params.get("tocXSLT"); 46 49 this.document_encoding = (String)params.get("documentEncoding"); 50 this.document_root_tag = (String)params.get("documentRootTag"); 47 51 services_to_provide = (String)params.get("provideServices"); 48 52 } … … 92 96 collection_doc_list = (Element)GSXML.getChildByTagName(extra_info, GSXML.DOCUMENT_ELEM+GSXML.LIST_MODIFIER); 93 97 98 this.converter.setEntityResolver(new GSEntityResolver()); 94 99 return true; 95 100 } … … 131 136 } 132 137 138 133 139 // if we have asked for the whole doc, just append it 134 140 if (doc_name.equals(node_id)) { … … 363 369 String meta_name = (String) meta_name_list.elementAt(i); 364 370 String actual_meta_name = meta_name; 365 if (meta_name.startsWith("root :")) {371 if (meta_name.startsWith("root_")) { 366 372 actual_meta_name = meta_name.substring(5); 367 373 } else { … … 393 399 if (section != null) { 394 400 Element title_meta = extractTitleMeta(section); 395 metadata_list.appendChild(title_meta); 396 401 if (title_meta != null) { 402 metadata_list.appendChild(title_meta); 403 } 397 404 } 398 405 } … … 426 433 // this assumes that the scope refers to a top level node - this may be overwritten if the scope bit in the id is a shorthand of some sort 427 434 protected String translateScope(String scope) { 435 if (this.document_root_tag != null) { 436 return GSPath.appendLink(this.document_root_tag, scope); 437 } 428 438 return scope; 429 439 } 430 440 431 441 } 442
Note:
See TracChangeset
for help on using the changeset viewer.