Changeset 30634 for main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractBrowse.java
- Timestamp:
- 2016-07-28T12:58:54+12:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractBrowse.java
r29989 r30634 234 234 Element cl = (Element) classifiers.item(i); 235 235 Element new_cl = (Element) doc.importNode(cl, false); // just import this node, not the children 236 237 //String content = cl.getAttribute(GSXML.CLASSIFIER_CONTENT_ATT); 238 236 cl_list.appendChild(new_cl); 237 238 // have we got a displayItem for the classifier title? 239 String text = getDisplayText(cl, GSXML.DISPLAY_TEXT_NAME, lang, "en", "metadata_names"); 239 240 //get the classify title from the database 240 241 String class_id = cl.getAttribute(GSXML.NAME_ATT); 241 242 String content = getMetadata(class_id, "Title"); 242 243 cl_list.appendChild(new_cl); 244 String text = GSXML.getDisplayText(cl, GSXML.DISPLAY_TEXT_NAME, lang, "en"); 245 if (text == null || text.equals("")) 246 { 247 // no display element was specified, use the metadata name 248 // for now this looks in the class properties file 249 // this needs to use a general metadata thing instead 250 text = getMetadataNameText(content + ".buttonname", lang); 251 } 252 if (text == null) 253 { 254 text = content; 255 } 256 243 if (text == null || text.equals("")) { 244 245 // no display element was specified, use the metadata name 246 if (!content.equals("")) { 247 248 text = getTextString(content + ".buttonname", lang, "metadata_names"); 249 if (text == null) { 250 251 text = content; 252 } 253 } 254 255 if (text == null) { 256 text=class_id; 257 } 258 } 257 259 Element cl_name = GSXML.createDisplayTextElement(doc, GSXML.DISPLAY_TEXT_NAME, text); 258 260 new_cl.appendChild(cl_name); … … 260 262 // description 261 263 262 String meta_name = get MetadataNameText(content, lang);264 String meta_name = getTextString(content, lang, "metadata_names"); 263 265 if (meta_name == null) 264 266 {
Note:
See TracChangeset
for help on using the changeset viewer.