Project

General

Profile

« Previous | Next » 

Revision 6d75492c

Added by Alex Theys about 12 years ago

AT: commiting latest changes to the Palm Use data extension

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesLabelProvider.java
17 17
import eu.etaxonomy.cdm.model.description.CategoricalData;
18 18
import eu.etaxonomy.cdm.model.description.DescriptionBase;
19 19
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
20
import eu.etaxonomy.cdm.model.description.State;
21
import eu.etaxonomy.cdm.model.description.StateData;
20 22
import eu.etaxonomy.cdm.model.description.TextData;
21 23
import eu.etaxonomy.taxeditor.store.CdmStore;
22 24

  
......
43 45
			}
44 46
		}
45 47
		else if (element instanceof CategoricalData) {
46
			TextData textData = categoricalDescriptionBuilder.build((CategoricalData) element, getLanguageList());
47
			text = textData.getText(CdmStore.getDefaultLanguage());
48
			//String text = "";
49
			//TextData textData = categoricalDescriptionBuilder.build((CategoricalData) element, getLanguageList());
50
			if (((CategoricalData) element).getStates() != null) {
51
				for (StateData statedata : ((CategoricalData) element).getStates()) {
52
					if(statedata.getState() != null) {
53
						text = text + statedata.getState().getTitleCache();
54
					}
55
					else {
56
						text = "No data provided";
57
					}
58
				}
59
			}
60
			if (((CategoricalData) element).getStatesOnly() != null) {
61
				for (State state : ((CategoricalData) element).getStatesOnly()) {
62
					if (state != null) {
63
						text = text + state.getTitleCache();
64
					}
65
					else {
66
						text = "No data provided";
67
					}
68
				}
69
			}
70
			
71
			//text = textData.getText(CdmStore.getDefaultLanguage());
48 72
			if (text == null || text.length() == 0) {
49 73
				text = "No data provided";
50 74
			}

Also available in: Unified diff