Revision cad652ea
Added by Patrick Plitzner almost 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/supplementalInfo/SupplementalInfoDisplayConverter.java | ||
---|---|---|
15 | 15 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
16 | 16 |
import eu.etaxonomy.cdm.model.occurrence.FieldUnit; |
17 | 17 |
import eu.etaxonomy.cdm.model.occurrence.GatheringEvent; |
18 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
|
19 | 18 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
20 |
import eu.etaxonomy.taxeditor.editor.workingSet.matrix.CharacterMatrix; |
|
21 | 19 |
|
22 | 20 |
/** |
23 | 21 |
* Converts the supplemental information (taxon and specimen data) |
... | ... | |
29 | 27 |
*/ |
30 | 28 |
public class SupplementalInfoDisplayConverter extends DisplayConverter{ |
31 | 29 |
|
32 |
private CharacterMatrix matrix; |
|
33 |
|
|
34 |
public SupplementalInfoDisplayConverter(CharacterMatrix matrix) { |
|
35 |
this.matrix= matrix; |
|
30 |
public SupplementalInfoDisplayConverter() { |
|
36 | 31 |
} |
37 | 32 |
|
38 | 33 |
/** |
... | ... | |
45 | 40 |
TaxonNode node = (TaxonNode)canonicalValue; |
46 | 41 |
displayValue = node.getTaxon().getName().getTitleCache(); |
47 | 42 |
} |
48 |
else if(HibernateProxyHelper.isInstanceOf(canonicalValue, Taxon.class)){ |
|
49 |
if(matrix.isTreeView()){ |
|
50 |
return "---"; |
|
51 |
} |
|
52 |
else { |
|
53 |
Taxon taxon = (Taxon)canonicalValue; |
|
54 |
displayValue = taxon.getName().getTitleCache(); |
|
55 |
} |
|
56 |
} |
|
57 | 43 |
else if(HibernateProxyHelper.isInstanceOf(canonicalValue, FieldUnit.class)){ |
58 | 44 |
FieldUnit fieldUnit = HibernateProxyHelper.deproxy(canonicalValue, FieldUnit.class); |
59 | 45 |
GatheringEvent gatheringEvent = fieldUnit.getGatheringEvent(); |
Also available in: Unified diff
ref #7095 Show specimen id for specimen rows