Revision 9c384528
Added by Patrick Plitzner almost 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/categorical/CategoricalDataDisplayConverter.java | ||
---|---|---|
16 | 16 |
import eu.etaxonomy.cdm.model.description.State; |
17 | 17 |
import eu.etaxonomy.cdm.persistence.dto.TermDto; |
18 | 18 |
import eu.etaxonomy.cdm.remote.l10n.TermRepresentation_L10n; |
19 |
import eu.etaxonomy.taxeditor.model.DescriptionHelper; |
|
19 | 20 |
|
20 | 21 |
/** |
21 | 22 |
* Converts CategoricalData and States of one cell of the character matrix to a |
... | ... | |
33 | 34 |
@Override |
34 | 35 |
public Object canonicalToDisplayValue(Object canonicalValue) { |
35 | 36 |
if(canonicalValue instanceof CategoricalData){ |
36 |
CategoricalData categoricalData = (CategoricalData)canonicalValue; |
|
37 |
String result = categoricalData.getStatesOnly().toString(); |
|
38 |
result = result.substring(1, result.length() - 1); |
|
39 |
return result; |
|
37 |
String text = DescriptionHelper.getLabel(canonicalValue); |
|
38 |
return text.equals(DescriptionHelper.NO_LABEL_STRING)?"":text; |
|
40 | 39 |
} |
41 | 40 |
else if(canonicalValue instanceof State){ |
42 | 41 |
return ((State) canonicalValue).getLabel(); |
Also available in: Unified diff
fix #8333 Show modifiers for states in Character Matrix