- Timestamp:
- 2009-08-30T18:41:00+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/cdm/Argument.java
r18912 r20439 103 103 /** The argument flag as it appears in the command. Also used as the unique identifier of an argument. */ 104 104 private String name = null; 105 /** The value of the arg, stored for metadata type options */ 106 private String stored_value = null; 105 107 /** The plugin that owns this argument, for the purposes of visualising inheritance. */ 106 108 private String owner = null; … … 264 266 return null; 265 267 } 266 267 return XMLTools.getValue(element); 268 if (stored_value != null) { 269 return stored_value; 270 } 271 String value = XMLTools.getValue(element); 272 if (type == METADATA) { 273 // We display using metadata display name, but store in the XML using 274 // full name (canonical name) 275 stored_value = MetadataTools.convertMetadataElementListNames(value, MetadataTools.TO_DISPLAY_NAMES); 276 return stored_value; 277 } 278 return value; 268 279 } 269 280 … … 451 462 public void setValue(String value) { 452 463 if(element != null) { 453 XMLTools.setValue(element, value); 464 if (type == METADATA) { 465 value = MetadataTools.convertMetadataElementListNames(value, MetadataTools.FROM_DISPLAY_NAMES); 466 stored_value = value; 467 } 468 XMLTools.setValue(element, value); 454 469 } 455 470 else { … … 500 515 text.append(name); 501 516 502 String value = XMLTools.getValue(element);517 String value = getValue(); //XMLTools.getValue(element); 503 518 if (value.length() == 0) { 504 519 return text.toString();
Note:
See TracChangeset
for help on using the changeset viewer.