Changeset 5650
- Timestamp:
- 2003-10-16T11:21:20+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/Format.java
r5590 r5650 37 37 import org.greenstone.gatherer.cdm.DOMProxyListEntry; 38 38 import org.greenstone.gatherer.msm.MSMUtils; 39 import org.greenstone.gatherer.util.Codec; 39 40 import org.w3c.dom.*; 40 41 /** This class encapsulates all the information about a format command from the collection configuration. This includes both the 'general' formatting commands, and the commands targetted at specific classifiers or classification component types. This class is, unfortunately, the most complex in terms of DOM model support, since we have to maintain a live reference to any classifier this format applies to. We temporarily use the feature name as the format name attribute but since the order of classifiers can change, this of course gets horribly out of date. Before the CollectionDesignManager saves the CollectionConfiguration it calls a method in the FormatManager to force all of the Formats to update their name attributes. … … 229 230 String value = "Error"; 230 231 if(element != null) { 231 value = MSMUtils.getValue(element); 232 value = MSMUtils.getValue(element); 233 // Decode into text 234 value = Codec.transform(value, Codec.DOM_TO_TEXT); 232 235 } 233 236 return value; … … 291 294 } 292 295 // Encode 293 296 value = Codec.transform(value, Codec.TEXT_TO_DOM); 294 297 // Store in DOM 295 298 MSMUtils.setValue(element, value); … … 312 315 } 313 316 else { 314 temp.append("\""); 315 temp.append(MSMUtils.getValue(element)); 316 temp.append("\""); 317 temp.append("\""); 318 // Retrieve the DOM encoded value, decode and then append 319 value = MSMUtils.getValue(element); 320 value = Codec.transform(value, Codec.DOM_TO_TEXT); 321 temp.append(value); 322 temp.append("\""); 317 323 } 318 324 text = temp.toString();
Note:
See TracChangeset
for help on using the changeset viewer.