ImageResources.HETEROTYPIC_SYN_ORIGINAL_ICON);
/** Constant <code>MISAPPLIEDNAME_ICON</code> */
public static final Image MISAPPLIEDNAME_ICON = ImageResources.getImage(ImageResources.MISAPPLIED_NAME_ICON);
- public static final Image INVALID_TYPE_DESIGNATION_ICON = ImageResources.getImage(ImageResources.INVALID_TYPE_DESIGNATION_ICON);
/** Constant <code>PROPARTE_ICON</code> */
public static final Image PRO_PARTE_SYNONYM_ICON = ImageResources.getImage(ImageResources.PRO_PARTE_SYNONYM_ICON);
/** Constant <code>PARTIAL_SYN_ICON</code> */
}else if (rel.getType().isAnySynonym() && this.conceptType.equals(ConceptType.Synonym)){
relationship = rel;
break;
- } else if (rel.getType().isInvalidDesignation() && this.conceptType.equals(ConceptType.InvalidDesignation)){
- relationship = rel;
- break;
- }
+ }
}
showSec();
initTextViewer();
protected void updateIcon() {
if (relationship.getType().isAnyMisappliedName() ){
setIcon(MISAPPLIEDNAME_ICON);
- }else if (relationship.getType().isInvalidDesignation()){
- setIcon(INVALID_TYPE_DESIGNATION_ICON);
}else if (relationship.getType().isProParte()){
setIcon(PRO_PARTE_SYNONYM_ICON);
}else if (relationship.getType().isAnySynonym()){
// showNameRelations();
if (relationship.getType().isAnyMisappliedName()){
conceptType = ConceptType.Misapplication;
- }else if (relationship.getType().isAnySynonym()){
+ }else /*if (relationship.getType().isAnySynonym())*/{
conceptType = ConceptType.Synonym;
- }else{
- conceptType = ConceptType.InvalidDesignation;
}
String text;
TaxonNameEditorE4 taxonNameEditor) {
MisappliedGroupE4 group = taxonNameEditor.getMisappliedGroup();
Taxon taxon = HibernateProxyHelper.deproxy(taxonNameEditor.getTaxon(), Taxon.class);
- if(taxon.getMisappliedNames(true).isEmpty() && taxon.getProParteAndPartialSynonyms().isEmpty() && taxon.getInvalidDesignations().isEmpty()){
+ if(taxon.getMisappliedNames(true).isEmpty() && taxon.getProParteAndPartialSynonyms().isEmpty()){
taxonNameEditor.removeGroup(group);
taxonNameEditor.setMisapplicationsGroup(null);
}else{
import eu.etaxonomy.taxeditor.editor.name.e4.TaxonNameEditorE4;
/**
- *
* @author pplitzner
* @date Aug 24, 2017
- *
*/
public class MisappliedGroupE4 extends AbstractGroupE4{
protected enum ConceptType {
Misapplication,
- Synonym,
- InvalidDesignation
+ Synonym
}
this.add(container);
container.createContent();
}
- for(Taxon invalidDes : getEditor().getTaxon().getInvalidDesignations()){
-
- ConceptContainerE4 container = new ConceptContainerE4(this, invalidDes, ConceptType.InvalidDesignation);
- this.add(container);
- container.createContent();
- }
for(Taxon misapplication : getEditor().getTaxon().getAllMisappliedNames()){
private boolean redrawNeeded() {
Set<Taxon> concepts = getEditor().getTaxon().getMisappliedNames(true);
concepts.addAll(getEditor().getTaxon().getProParteAndPartialSynonyms());
- concepts.addAll(getEditor().getTaxon().getInvalidDesignations());
Set<Taxon> presentConcepts = new HashSet<>();
for (AbstractGroupedContainerE4<Taxon> container : getGroupedContainers()){
&& !NameEditorMenuPropertyTester.isAccepted(selectedElement)
&& NameEditorMenuPropertyTester.isNotMisapplication(selectedElement)
&& NameEditorMenuPropertyTester.isNotProparteSynonym(selectedElement)
- && NameEditorMenuPropertyTester.isNotInvalidDesignation(selectedElement);
menuItem.setVisible(canExecute);
}
return canExecute;
private static final String NOT_HOMOTYPIC_SYNONYM_OF_ACCEPTED = "isNotHomotypicSynonymOfAcceptedTaxon"; //$NON-NLS-1$
private static final String SYNONYM_WITH_HOMOTYPIC_SYNONYMS = "isSynonymInHomotypicalGroupWithMoreSynonyms"; //$NON-NLS-1$
private static final String IS_ORPHANED = "isOrphaned";
- private static final String IS_NOT_INVALID_DESIGNATION = "isNotInvalidDesignation";//$NON-NLS-1$
/**
* <p>Constructor for NameEditorMenuPropertyTester.</p>
else if (IS_ORPHANED.equals(property)){
return isOrphaned(selectedElement);
}
- else if (IS_NOT_INVALID_DESIGNATION.equals(property)){
- return isNotInvalidDesignation(selectedElement);
- }
}
return false;
return false;
}
- /**
- * @param selectedElement
- * @return
- */
- public static boolean isNotInvalidDesignation(Object selectedElement) {
- if (selectedElement instanceof Synonym){
- return true;
- }
- if(((Taxon) selectedElement).isInvalidDesignation() ){
- return false;
- }
- return true;
- }
-
}
public static final String HETEROTYPIC_SYN_ORIGINAL_ICON = "heterotypic_syn_original_icon";
/** Constant <code>MISAPPLIED_NAME_ICON="misapplied_icon"</code> */
public static final String MISAPPLIED_NAME_ICON = "misapplied_icon";
- /** Constant <code>INVALID_TYPE_DESIGNATION_ICON="invalid_type_designation_icon"</code> */
- public static final String INVALID_TYPE_DESIGNATION_ICON = "invalid_icon";
/** Constant <code>PRO_PARTE_SYNONYM_ICON="pro_parte_synonym_icon"</code> */
public static final String PRO_PARTE_SYNONYM_ICON = "proparte_syn_icon";
/** Constant <code>PRO_PARTE_SYNONYM_ICON="pro_parte_synonym_icon"</code> */
"homotypic_syn_hetero_group.gif");
registerImage(registry, MISAPPLIED_NAME_ICON,
"misapplied_no_bg.gif");
- registerImage(registry, INVALID_TYPE_DESIGNATION_ICON,
- "invalid.gif");
registerImage(registry, PRO_PARTE_SYNONYM_ICON,
"proparte-bright.gif");
registerImage(registry, PARTIAL_SYNONYM_ICON,
public class DeleteTaxonConfiguratorComposite extends DeleteTaxonBaseConfiguratorComposite {
private Button btnDeleteSynonyms;
- private Button btnDeleteMisappliedNamesAndInvalidDesignations;
+ private Button btnDeleteMisappliedNames;
private Button btnTaxonRelationships;
private Button btnConceptRelationships;
data.exclude = b.getSelection();
btnDeleteSynonyms.setEnabled(data.exclude);
- btnDeleteMisappliedNamesAndInvalidDesignations.setEnabled(data.exclude);
+ btnDeleteMisappliedNames.setEnabled(data.exclude);
btnTaxonRelationships.setEnabled(data.exclude);
btnConceptRelationships.setEnabled(data.exclude);
btnDeleteTaxonName.setEnabled(data.exclude);
btnDeleteSynonyms.setText("Delete synonyms if possible");
btnDeleteSynonyms.setSelection(true);
- btnDeleteMisappliedNamesAndInvalidDesignations = new Button(this, SWT.CHECK);
- GridData gd_btnDeleteMisappliedNamesAndInvalidDesignations = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
- gd_btnDeleteMisappliedNamesAndInvalidDesignations.horizontalIndent = 10;
- btnDeleteMisappliedNamesAndInvalidDesignations.setLayoutData(gd_btnDeleteMisappliedNamesAndInvalidDesignations);
- btnDeleteMisappliedNamesAndInvalidDesignations.setText("Delete misapplied names and invalid designations if possible");
- btnDeleteMisappliedNamesAndInvalidDesignations.setSelection(true);
+ btnDeleteMisappliedNames = new Button(this, SWT.CHECK);
+ GridData gd_btnDeleteMisappliedNames = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
+ gd_btnDeleteMisappliedNames.horizontalIndent = 10;
+ btnDeleteMisappliedNames.setLayoutData(gd_btnDeleteMisappliedNames);
+ btnDeleteMisappliedNames.setText("Delete misapplied names if possible");
+ btnDeleteMisappliedNames.setSelection(true);
btnTaxonRelationships = new Button(this, SWT.CHECK);
IObservableValue deleteSynonymsConfiguratorObserveValue = PojoProperties.value("deleteSynonymsIfPossible").observe(configurator);
m_bindingContext.bindValue(observeSelectionBtnDeleteSynonymsObserveWidget, deleteSynonymsConfiguratorObserveValue, null, null);
- IObservableValue observeSelectionbtnDeleteMisappliedNamesAndInvalidDesignationsObserveWidget = WidgetProperties.selection().observe(btnDeleteMisappliedNamesAndInvalidDesignations);
- IObservableValue deleteMisappliedNamesAndInvalidDesignationsConfiguratorObserveValue = PojoProperties.value("deleteMisappliedNamesAndInvalidDesignationsIfPossible").observe(configurator);
- m_bindingContext.bindValue(observeSelectionbtnDeleteMisappliedNamesAndInvalidDesignationsObserveWidget, deleteMisappliedNamesAndInvalidDesignationsConfiguratorObserveValue, null, null);
+ IObservableValue observeSelectionbtnDeleteMisappliedNamesObserveWidget = WidgetProperties.selection().observe(btnDeleteMisappliedNames);
+ IObservableValue deleteMisappliedNamesConfiguratorObserveValue = PojoProperties.value("deleteMisappliedNamesAndInvalidDesignationsIfPossible").observe(configurator);
+ m_bindingContext.bindValue(observeSelectionbtnDeleteMisappliedNamesObserveWidget, deleteMisappliedNamesConfiguratorObserveValue, null, null);
IObservableValue observeSelectionbtnTaxonRelationshipsObserveWidget = WidgetProperties.selection().observe(btnTaxonRelationships);
IObservableValue deleteTaxonRelationshipsConfiguratorObserveValue = PojoProperties.value("deleteTaxonRelationships").observe(configurator);