Revision eeaf651a
Added by Katja Luther almost 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/MisapplicationContainer.java | ||
---|---|---|
11 | 11 |
|
12 | 12 |
import javax.persistence.GenerationType; |
13 | 13 |
|
14 |
import org.apache.commons.lang.StringUtils; |
|
14 | 15 |
import org.eclipse.swt.graphics.Font; |
15 | 16 |
|
17 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
|
18 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
|
16 | 19 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
17 | 20 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship; |
18 | 21 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType; |
... | ... | |
77 | 80 |
} |
78 | 81 |
String title = ""; |
79 | 82 |
String author = ""; |
80 |
if (getMisappliedName().getName().getAuthorshipCache() != null && getMisappliedName().getAppendedPhrase() == null){ |
|
81 |
author = ", non " + getMisappliedName().getName().getAuthorshipCache(); |
|
83 |
TaxonName misappliedNameName = HibernateProxyHelper.deproxy(getMisappliedName().getName(), TaxonName.class); |
|
84 |
if (misappliedNameName.getAuthorshipCache() != null && !StringUtils.isBlank(misappliedNameName.getAuthorshipCache())&& getMisappliedName().getAppendedPhrase() == null){ |
|
85 |
author = ", non " + misappliedNameName.getAuthorshipCache(); |
|
82 | 86 |
} |
83 | 87 |
if (misapplication.getCitation() == null) { |
84 | 88 |
if (getMisappliedName().getAppendedPhrase() != null ){ |
85 | 89 |
title = getMisappliedName().getAppendedPhrase(); |
86 | 90 |
}else{ |
87 | 91 |
title = "auct."; //$NON-NLS-1$ |
92 |
|
|
88 | 93 |
} |
94 |
|
|
89 | 95 |
} else { |
90 | 96 |
String sec = " sensu "; //$NON-NLS-1$ |
91 | 97 |
if (getMisappliedName().getAppendedPhrase() != null ){ |
92 | 98 |
sec = getMisappliedName().getAppendedPhrase() + " "+sec; //$NON-NLS-1$ |
93 | 99 |
} |
94 | 100 |
title += sec + misapplication.getCitation().getTitleCache(); |
95 |
title += author; |
|
96 |
title = title.replace("&", "&&"); //$NON-NLS-1$ //$NON-NLS-2$ |
|
97 | 101 |
|
98 | 102 |
|
99 |
setNonEditableInfo(title, false); |
|
103 |
|
|
104 |
|
|
100 | 105 |
} |
106 |
title += author; |
|
107 |
title = title.replace("&", "&&"); //$NON-NLS-1$ //$NON-NLS-2$ |
|
108 |
setNonEditableInfo(title, false); |
|
101 | 109 |
} |
102 | 110 |
|
103 | 111 |
/** |
Also available in: Unified diff
ref #6390: fix display of misapplied names in name editor