Changeset 8952
- Timestamp:
- 2005-02-02T14:42:29+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/ServiceRack.java
r6364 r8952 87 87 protected HashMap format_info_map = null; 88 88 89 /** the name of the Dictionary to be used. The classname will be used if null */ 90 protected String dictionary_name = null; 91 89 92 /** sets the cluster name */ 90 93 public void setClusterName(String cluster_name) { … … 112 115 /** the no-args constructor */ 113 116 public ServiceRack() { 117 System.err.println("service rack"); 114 118 this.converter = new XMLConverter(); 115 119 this.doc = this.converter.newDOM(); 116 120 this.short_service_info = this.doc.createElement(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER); 117 121 this.format_info_map = new HashMap(); 122 // the default value for the dictionary is the classname 123 String class_name = this.getClass().getName(); 124 class_name = class_name.substring(class_name.lastIndexOf('.')+1); 125 this.dictionary_name = class_name; 126 118 127 } 119 128 … … 318 327 /** overloaded version for no args case */ 319 328 protected String getTextString(String key, String lang) { 320 return getTextString(key, null, lang); 321 } 329 return getTextString(key, lang, this.dictionary_name, null); 330 } 331 332 protected String getTextString(String key, String lang, String dictionary) { 333 return getTextString(key, lang, dictionary, null); 334 } 335 protected String getTextString(String key, String lang, String [] args) { 336 return getTextString(key, lang, this.dictionary_name, args); 337 } 338 322 339 /** getTextString - retrieves a language specific text string for the given 323 key and locale 340 key and locale, from the specified resource_bundle 324 341 */ 325 protected String getTextString(String key, String [] args, String lang) {326 327 String class_name = this.getClass().getName();328 class_name = class_name.substring(class_name.lastIndexOf('.')+1);329 330 Dictionary dict = new Dictionary( class_name, lang);342 protected String getTextString(String key, String lang, String dictionary, String[] args) { 343 344 //String class_name = this.getClass().getName(); 345 //class_name = class_name.substring(class_name.lastIndexOf('.')+1); 346 347 Dictionary dict = new Dictionary(dictionary, lang); 331 348 String result = dict.get(key, args); 332 349 if (result == null) { // not found
Note:
See TracChangeset
for help on using the changeset viewer.