Revision b4ca72fe
Added by Cherian Mathew about 11 years ago
eu.etaxonomy.taxeditor.cdmlib/.classpath | ||
---|---|---|
110 | 110 |
<classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/> |
111 | 111 |
<classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT-sources.jar"/> |
112 | 112 |
<classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT.jar"/> |
113 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.1.2-sources.jar"/>
|
|
114 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.1.2.jar"/>
|
|
115 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.1.2-sources.jar"/>
|
|
116 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.1.2.jar"/>
|
|
117 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.1.2-sources.jar"/>
|
|
118 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.1.2.jar"/>
|
|
119 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.1.2-sources.jar"/>
|
|
120 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.1.2.jar"/>
|
|
121 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.1.2-sources.jar"/>
|
|
122 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.1.2.jar"/>
|
|
123 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.1.2-sources.jar"/>
|
|
124 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.1.2.jar"/>
|
|
125 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.1.2-sources.jar"/>
|
|
126 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.1.2.jar"/>
|
|
127 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.1.2-sources.jar"/>
|
|
128 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.1.2.jar"/>
|
|
113 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.1.4-SNAPSHOT-sources.jar"/>
|
|
114 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.1.4-SNAPSHOT.jar"/>
|
|
115 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.1.4-SNAPSHOT-sources.jar"/>
|
|
116 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.1.4-SNAPSHOT.jar"/>
|
|
117 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.1.4-SNAPSHOT-sources.jar"/>
|
|
118 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.1.4-SNAPSHOT.jar"/>
|
|
119 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.1.4-SNAPSHOT-sources.jar"/>
|
|
120 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.1.4-SNAPSHOT.jar" sourcepath="lib/cdmlib-model-3.1.4-SNAPSHOT-sources.jar"/>
|
|
121 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.1.4-SNAPSHOT-sources.jar"/>
|
|
122 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.1.4-SNAPSHOT.jar" sourcepath="lib/cdmlib-persistence-3.1.4-SNAPSHOT-sources.jar"/>
|
|
123 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.1.4-SNAPSHOT-sources.jar"/>
|
|
124 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.1.4-SNAPSHOT.jar"/>
|
|
125 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.1.4-SNAPSHOT-sources.jar"/>
|
|
126 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.1.4-SNAPSHOT.jar"/>
|
|
127 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.1.4-SNAPSHOT-sources.jar"/>
|
|
128 |
<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.1.4-SNAPSHOT.jar" sourcepath="lib/cdmlib-services-3.1.4-SNAPSHOT-sources.jar"/>
|
|
129 | 129 |
<classpathentry kind="output" path="target/classes"/> |
130 | 130 |
</classpath> |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java | ||
---|---|---|
108 | 108 |
TaxonEditorInput input = null; |
109 | 109 |
|
110 | 110 |
TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).find(taxonBaseUuid); |
111 |
|
|
112 |
if(taxonBase.isInstanceOf(Taxon.class)){ |
|
111 |
if(taxonBase.isOrphaned()) { |
|
112 |
EditorUtil.warningDialog("Orphaned Taxon", TaxonEditorInput.class, "This is an orphaned taxon i.e. a taxon that is not connected to a classification and not having any taxonomic relationships. Editing of orphaned taxon is currently not supported."); |
|
113 |
} |
|
114 |
else if(taxonBase.isInstanceOf(Taxon.class)){ |
|
113 | 115 |
Taxon taxon = CdmBase.deproxy(taxonBase, Taxon.class); |
114 | 116 |
|
115 | 117 |
if (taxon.isMisapplication()){ |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/AbstractGroupedContainer.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.taxeditor.editor.name.container; |
11 | 11 |
|
12 |
import java.util.Iterator; |
|
12 | 13 |
import java.util.List; |
13 | 14 |
import java.util.Set; |
14 | 15 |
|
... | ... | |
454 | 455 |
return enableFreetext; |
455 | 456 |
} |
456 | 457 |
|
458 |
/** |
|
459 |
* Checks whether there are more than one, non-orphaned taxon bases |
|
460 |
* attached to the taxon name |
|
461 |
* |
|
462 |
* @return |
|
463 |
*/ |
|
457 | 464 |
private boolean isNameUsedMultipleTimes() { |
458 |
if (getName().getTaxonBases().size() > 1) { |
|
465 |
|
|
466 |
Set<TaxonBase> taxonBases = getName().getTaxonBases(); |
|
467 |
Iterator<TaxonBase> tbItr = taxonBases.iterator(); |
|
468 |
int nonOrphanedTaxonBaseCount = taxonBases.size(); |
|
469 |
|
|
470 |
while(tbItr.hasNext()) { |
|
471 |
TaxonBase tb = tbItr.next(); |
|
472 |
if(tb.isOrphaned()) { |
|
473 |
nonOrphanedTaxonBaseCount--; |
|
474 |
} |
|
475 |
} |
|
476 |
if(nonOrphanedTaxonBaseCount > 1) { |
|
459 | 477 |
return true; |
460 | 478 |
} |
461 | 479 |
return false; |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchResultLabelProvider.java | ||
---|---|---|
16 | 16 |
import org.eclipse.swt.graphics.Font; |
17 | 17 |
import org.eclipse.swt.graphics.Image; |
18 | 18 |
|
19 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
|
19 | 20 |
import eu.etaxonomy.cdm.model.common.UuidAndTitleCache; |
20 | 21 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
21 | 22 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
... | ... | |
23 | 24 |
import eu.etaxonomy.taxeditor.model.ImageResources; |
24 | 25 |
import eu.etaxonomy.taxeditor.navigation.NavigationUtil; |
25 | 26 |
import eu.etaxonomy.taxeditor.preference.Resources; |
27 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
26 | 28 |
|
27 | 29 |
/** |
28 | 30 |
* <p>SearchResultLabelProvider class.</p> |
... | ... | |
95 | 97 |
// return ImageResources.getImage(ImageResources.MISAPPLIED_NAME_ICON); |
96 | 98 |
// }else{ |
97 | 99 |
if(type == Taxon.class){ |
100 |
if(((UuidAndTitleCache) element).getIsOrphaned()) { |
|
101 |
return ImageResources.getImage(ImageResources.ORPHANED_TAXON); |
|
102 |
} |
|
98 | 103 |
return ImageResources.getImage(ImageResources.BLACK_SQUARE_ICON); |
99 | 104 |
}else if(type == Synonym.class){ |
100 | 105 |
return ImageResources.getImage(ImageResources.HETEROTYPIC_SYN_ICON); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ImageResources.java | ||
---|---|---|
122 | 122 |
public static final String TWO_PRONGED_EQUAL = "2_pronged_equal"; |
123 | 123 |
/** Constant <code>MISAPPLIED_NAME="misapplied_name"</code> */ |
124 | 124 |
public static final String MISAPPLIED_NAME = "misapplied_name"; |
125 |
/** Constant <code>ORPHANED_TAXON="orphaned_taxon"</code> */ |
|
126 |
public static final String ORPHANED_TAXON = "orphaned_taxon"; |
|
125 | 127 |
/** Constant <code>EXPAND_ALL="expand_all"</code> */ |
126 | 128 |
public static final String EXPAND_ALL = "expand_all"; |
127 | 129 |
/** Constant <code>COLLAPSE_ALL="collapse_all"</code> */ |
... | ... | |
290 | 292 |
registerImage(registry, TWO_PRONGED_EQUAL, |
291 | 293 |
"2_pronged_equal_small.GIF"); |
292 | 294 |
registerImage(registry, MISAPPLIED_NAME, |
293 |
"ma_12x12.gif"); |
|
295 |
"ma_12x12.gif"); |
|
296 |
registerImage(registry, ORPHANED_TAXON, |
|
297 |
"orphaned.gif"); |
|
294 | 298 |
registerImage(registry, EXPAND_ALL, |
295 | 299 |
"expandAll.jpg"); |
296 | 300 |
registerImage(registry, COLLAPSE_ALL, |
Also available in: Unified diff
SearchResultLabelProvider : display new orphaned-taxa image icon for orphaned taxa
AbstractGroupedContainer : updated 'isNameUsedMultipleTimes' to factor in orphaned taxa
TaxonEditorInput : added display of message in case of orphaned taxa
ImageResources : added new orphaned-taxa image icon to resources