Project

General

Profile

« Previous | Next » 

Revision e01ad27b

Added by Katja Luther over 4 years ago

set flag... should not be enabled for classifications

View differences:

eu.etaxonomy.taxeditor.navigation/plugin.xml
46 46
            class="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodePropertyTester"
47 47
            id="eu.etaxonomy.taxeditor.navigation.navigator.navigatorPropertyTester"
48 48
            namespace="eu.etaxonomy.taxeditor.navigation.navigator.navigatorPropertyTester"
49
            properties="hasSynonyms,isClassification,isUnplaced,isExcluded,noClassificationExists"
49
            properties="hasSynonyms,isClassification,isUnplaced,isExcluded,noClassificationExists,isNotClassification"
50 50
            type="java.lang.Object">
51 51
      </propertyTester>
52 52
      
......
161 161
         <test
162 162
               property="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodePropertyTester.isClassification">
163 163
         </test>
164
      </definition>
165
       <definition
166
            id="isNotClassification">
167
         <test
168
               property="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodePropertyTester.isNotClassification">
169
         </test>
164 170
      </definition>
165 171
      <definition
166 172
            id="isUnplaced">
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodePropertyTester.java
22 22
	private static final Object HAS_SYNONYMS = "hasSynonyms"; //$NON-NLS-1$
23 23
	private static final Object HAS_TAXA = "hasTaxa"; //$NON-NLS-1$
24 24
	private static final Object IS_CLASSIFICATION = "isClassification"; //$NON-NLS-1$
25
	private static final Object IS_UNPLACED = "isUnplaced";
26
	private static final Object IS_EXCLUDED = "isExcluded";
25
	private static final Object IS_NOT_CLASSIFICATION = "isNotClassification"; //$NON-NLS-1$
26
	private static final Object IS_UNPLACED = "isUnplaced"; //$NON-NLS-1$
27
	private static final Object IS_EXCLUDED = "isExcluded"; //$NON-NLS-1$
27 28
    private static final Object NO_CLASSIFICATION_EXIST = "noClassificationExist";
28 29
	/** {@inheritDoc} */
29 30
	@Override
......
53 54
			TaxonNodeDto node = (TaxonNodeDto) receiver;
54 55
			return node.getTaxonUuid() == null;
55 56
		}
57
		if (receiver instanceof TaxonNodeDto && IS_NOT_CLASSIFICATION.equals(property)) {
58
            TaxonNodeDto node = (TaxonNodeDto) receiver;
59
            return node.getTaxonUuid() != null;
60
        }
56 61
		if (receiver instanceof TaxonNodeDto && IS_UNPLACED.equals(property)) {
57 62
            TaxonNodeDto node = (TaxonNodeDto) receiver;
58
            return node.isUnplaced();
63
            return node.isUnplaced() && node.getTaxonUuid() != null;
59 64
        }
60 65
		if (receiver instanceof TaxonNodeDto && IS_EXCLUDED.equals(property)) {
61 66
            TaxonNodeDto node = (TaxonNodeDto) receiver;
62
            return node.isExcluded();
67
            return node.isExcluded() && node.getTaxonUuid() != null;
63 68
        }
64 69
		if (NO_CLASSIFICATION_EXIST.equals(property)) {
65 70
           return 0 == CdmStore.getService(IClassificationService.class).count(Classification.class);

Also available in: Unified diff