Revision 5f4e7a24
Added by Andreas Müller almost 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/MisapplicationContainer.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.taxeditor.editor.name.container; |
11 | 11 |
|
12 |
import javax.persistence.GenerationType; |
|
13 |
|
|
14 | 12 |
import org.apache.commons.lang.StringUtils; |
15 | 13 |
import org.eclipse.swt.graphics.Font; |
16 | 14 |
|
... | ... | |
30 | 28 |
* |
31 | 29 |
* @author p.ciardelli |
32 | 30 |
* @created 13.01.2009 |
33 |
* @version 1.0 |
|
34 | 31 |
*/ |
35 | 32 |
public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> { |
36 | 33 |
TaxonRelationship misapplication; |
... | ... | |
47 | 44 |
|
48 | 45 |
} |
49 | 46 |
|
50 |
|
|
51 |
/* (non-Javadoc) |
|
52 |
* @see eu.etaxonomy.taxeditor.editor.name.NameComposite#initializeComposite() |
|
53 |
*/ |
|
54 | 47 |
/** {@inheritDoc} */ |
55 | 48 |
@Override |
56 | 49 |
protected void initializeComposite() { |
... | ... | |
80 | 73 |
} |
81 | 74 |
String title = ""; |
82 | 75 |
String author = ""; |
83 |
TaxonName misappliedNameName = HibernateProxyHelper.deproxy(getMisappliedName().getName(), TaxonName.class);
|
|
84 |
if (misappliedNameName.getAuthorshipCache() != null && !StringUtils.isBlank(misappliedNameName.getAuthorshipCache())&& getMisappliedName().getAppendedPhrase() == null){
|
|
76 |
TaxonName misappliedNameName = HibernateProxyHelper.deproxy(getMisappliedName().getName()); |
|
77 |
if (StringUtils.isNotBlank(misappliedNameName.getAuthorshipCache())){
|
|
85 | 78 |
author = ", non " + misappliedNameName.getAuthorshipCache(); |
86 | 79 |
} |
87 | 80 |
if (misapplication.getCitation() == null) { |
... | ... | |
98 | 91 |
sec = getMisappliedName().getAppendedPhrase() + " "+sec; //$NON-NLS-1$ |
99 | 92 |
} |
100 | 93 |
title += sec + getMisappliedName().getSec().getTitleCache(); |
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 | 94 |
} |
106 | 95 |
title += author; |
107 | 96 |
title = title.replace("&", "&&"); //$NON-NLS-1$ //$NON-NLS-2$ |
... | ... | |
123 | 112 |
return EditorUtil.getFont(Resources.MISAPPLIEDNAME_FONT); |
124 | 113 |
} |
125 | 114 |
|
126 |
/* (non-Javadoc) |
|
127 |
* @see eu.etaxonomy.taxeditor.editor.name.container.AbstractGroupedContainer#showAnnotations() |
|
128 |
*/ |
|
129 | 115 |
@Override |
130 | 116 |
public void showAnnotations() { |
131 | 117 |
if(getData().getSec() == null){ |
... | ... | |
142 | 128 |
showSec(); |
143 | 129 |
} |
144 | 130 |
|
145 |
|
|
146 |
/* (non-Javadoc) |
|
147 |
* @see eu.etaxonomy.taxeditor.editor.name.AbstractGroupedContainer#updateIndent() |
|
148 |
*/ |
|
149 | 131 |
@Override |
150 | 132 |
protected void updateIndent() { |
151 | 133 |
setIndent(MISAPPLIEDNAME_INDENT); |
Also available in: Unified diff
fix #6681 show ,non Author also if appended phrase exists