Project

General

Profile

« Previous | Next » 

Revision 683611da

Added by Alex Theys about 12 years ago

AT: Committing working from home files

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.Modifier;
20 21
import eu.etaxonomy.cdm.model.description.State;
21 22
import eu.etaxonomy.cdm.model.description.StateData;
22 23
import eu.etaxonomy.cdm.model.description.TextData;
......
47 48
		else if (element instanceof CategoricalData) {
48 49
			//String text = "";
49 50
			//TextData textData = categoricalDescriptionBuilder.build((CategoricalData) element, getLanguageList());
50
			if (((CategoricalData) element).getStates() != null) {
51
			if (!((CategoricalData) element).getStates().isEmpty()) {
51 52
				for (StateData statedata : ((CategoricalData) element).getStates()) {
52 53
					if(statedata.getState() != null) {
53
						text = text + statedata.getState().getTitleCache();
54
						text = text + statedata.getState().getTitleCache() + "; ";
54 55
					}
55
					else {
56
					/*else {
56 57
						text = "No data provided";
57
					}
58
					}*/
58 59
				}
59 60
			}
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
					}
61
			
62
			if (!((CategoricalData) element).getModifiers().isEmpty()) {
63
				for (Modifier modifier : ((CategoricalData) element).getModifiers()) {
64
					text = text + modifier.getTitleCache();
68 65
				}
69 66
			}
67

  
70 68
			
71 69
			//text = textData.getText(CdmStore.getDefaultLanguage());
72 70
			if (text == null || text.length() == 0) {

Also available in: Unified diff