Changeset 13956
- Timestamp:
- 2007-03-01T15:15:50+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/AbstractBrowse.java
r13270 r13956 84 84 85 85 logger.info("Configuring AbstractBrowse..."); 86 this.config_info = info; 87 88 if (macro_resolver != null) { 86 this.config_info = info; 87 if (macro_resolver != null) { 89 88 macro_resolver.setSiteDetails(this.site_http_address, this.cluster_name); 90 89 // set up the macro resolver … … 196 195 Element cl = (Element)classifiers.item(i); 197 196 Element new_cl = (Element)this.doc.importNode(cl, false); // just import this node, not the children 198 String content = cl.getAttribute(GSXML.CLASSIFIER_CONTENT_ATT); 199 cl_list.appendChild(new_cl); 197 198 //String content = cl.getAttribute(GSXML.CLASSIFIER_CONTENT_ATT); 199 200 //get the classify title from the database 201 String class_id = cl.getAttribute(GSXML.NAME_ATT); 202 String content = getMetadata(class_id,"Title"); 203 204 cl_list.appendChild(new_cl); 200 205 String text = GSXML.getDisplayText(cl, 201 206 GSXML.DISPLAY_TEXT_NAME, … … 211 216 } 212 217 218 213 219 Element cl_name = GSXML.createDisplayTextElement(this.doc, GSXML.DISPLAY_TEXT_NAME, text); 214 220 new_cl.appendChild(cl_name); … … 257 263 Element cl = (Element)classifiers.item(i); 258 264 String name = cl.getAttribute(GSXML.NAME_ATT); 259 Element node_extra = GSXML.getNamedElement(config_browse, 260 GSXML.CLASSIFIER_ELEM, 261 GSXML.NAME_ATT, 262 name); 265 266 //Element node_extra = GSXML.getNamedElement(config_browse, 267 // GSXML.CLASSIFIER_ELEM, 268 // GSXML.NAME_ATT, 269 // name); 270 //now use the position to get the node - CL1 271 int position = Integer.parseInt(name.substring(2)); 272 Element node_extra = null; 273 NodeList cls = config_browse.getElementsByTagName(GSXML.CLASSIFIER_ELEM); 274 if (position >0 && position <= cls.getLength()) { 275 node_extra = (Element) cls.item((position -1)); 276 } 277 263 278 if (node_extra == null) { 264 279 logger.error("GS2REtrieve: haven't found extra info for classifier named "+name); … … 698 713 boolean all_metadata, 699 714 ArrayList metadata_names); 715 716 /** get the particular metadata (identified by the metadata name) for the classifier node node_id 717 * 718 */ 719 abstract protected String getMetadata(String node_id, String metadata_name); 720 700 721 701 722 /** returns the structural information asked for.
Note:
See TracChangeset
for help on using the changeset viewer.