Changeset 6537
- Timestamp:
- 2004-01-16T15:55:50+13:00 (20 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/msm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/msm/ElementWrapper.java
r6142 r6537 230 230 231 231 public String toString() { 232 return getNamespace() + MSMUtils.NS_SEP + getIdentity(); 233 /* 232 234 String element_name = getName(); 233 235 String element_identifier = getIdentity(); … … 247 249 // return element_name + " (" + element_identifier + ")"; 248 250 //} 251 */ 249 252 } 250 253 } -
trunk/gli/src/org/greenstone/gatherer/msm/MSMUtils.java
r5785 r6537 314 314 static final public Element getAttributeNodeNamed(Node element, String name) { 315 315 Element attribute = null; 316 String language_code = Locale.getDefault().getLanguage();316 String language_code = Gatherer.config.getLanguage(); 317 317 for(Node n = element.getFirstChild(); n != null; n = n.getNextSibling()) { 318 318 if(n.getNodeName().equals("Attribute")) { … … 382 382 comment = StaticStrings.SPACE_CHARACTER + comment; 383 383 } 384 String description = definition + comment;385 return Utility.stripNL(description.trim());384 //String description = definition + comment; 385 return definition + comment; //Utility.stripNL(description.trim()); 386 386 } 387 387 … … 495 495 String identifier = null; 496 496 // Determine locale code. 497 String language_code = Locale.getDefault().getLanguage();497 String language_code = Gatherer.config.getLanguage(); 498 498 // Get the 'identifier' Element with the correct locale 499 499 for(Node node = element.getFirstChild(); node != null; -
trunk/gli/src/org/greenstone/gatherer/msm/MetadataSet.java
r5785 r6537 62 62 /** The list of metadata elements which are, of course, children of the root node. */ 63 63 private NodeList elements = null; 64 65 private String current_language_code; 64 66 /** The description of this metadata set. Cached as it takes more computation time. */ 65 67 private String description = null; … … 434 436 */ 435 437 public String getName() { 438 if(current_language_code != null && !Gatherer.config.getLanguage().equals(current_language_code)) { 439 name = null; 440 } 436 441 if(name == null) { 437 442 // Determine the code. 438 String language_code = Gatherer.dictionary.getLanguage();443 current_language_code = Gatherer.config.getLanguage(); 439 444 // Recover all Name elements 440 445 NodeList names = document.getElementsByTagName("Name"); … … 444 449 Element pos_name = (Element) names.item(i); 445 450 String pos_name_code = pos_name.getAttribute("language"); 446 if(pos_name_code.equalsIgnoreCase( language_code)) {451 if(pos_name_code.equalsIgnoreCase(current_language_code)) { 447 452 name = MSMUtils.getValue(pos_name); 448 453 found = true; … … 458 463 } 459 464 names = null; 460 language_code = null; 461 // Failing all that set an error message 465 // Failing all that set an error message 462 466 if(name == null) { 463 467 name = Dictionary.get("MSM.No_Name");
Note:
See TracChangeset
for help on using the changeset viewer.