merge-update from trunk
authorPatric Plitzner <p.plitzner@bgbm.org>
Mon, 8 Jun 2015 11:46:40 +0000 (11:46 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Mon, 8 Jun 2015 11:46:40 +0000 (11:46 +0000)
63 files changed:
.gitattributes
eu.etaxonomy.taxeditor.application/OSGI-INF/l10n/plugin.properties
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/bundle.properties
eu.etaxonomy.taxeditor.bulkeditor/plugin.xml
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorMenuPropertyTester.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorPropertyTester.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ConvertPerson2TeamHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ConvertTeam2PersonHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/AgentCreator.java
eu.etaxonomy.taxeditor.cdmlib/.classpath
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin.properties
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_en.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenDerivateViewHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/dnd/NameEditorDragSourceEffect.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/dnd/NameEditorDropTargetListener.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/MoveSynonymToAnotherAcceptedTaxonHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientOccurenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivateEditorForTaxonHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/MoveDerivateOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveLabelProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/CreateDescriptionElementOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteTaxonDescriptionOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaContentProvider.java
eu.etaxonomy.taxeditor.feature/feature.xml
eu.etaxonomy.taxeditor.navigation/plugin.xml
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigator.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodeComparator.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveTaxonHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/plugin.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmStorePropertyTester.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/OrderPreferences.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencePropertyTester.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionNaturalOrderDialog.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/NumberWithLabelElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/HybridDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/DnaSampleGeneralDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/SequenceGeneralDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/SingleReadGeneralDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/TissueSampleGeneralDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/media/MediaSpecimenGeneralDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchComposite.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchCompositeController.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewPart.java
eu.etaxonomy.taxeditor.test/.classpath
eu.etaxonomy.taxeditor/rcp.target

index e84077c200c55774e711acdff9e0f8712fb8185a..1f8c325ff4b9e402f4f318c596dcefc2b5b33320 100644 (file)
@@ -82,11 +82,14 @@ eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkedito
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorViewerConfiguration.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/IBulkEditorConstants.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/IBulkEditorSortProvider.java -text
+eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorMenuPropertyTester.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorPropertyTester.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/DeleteObjectContributionItem.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/DynamicMarkerTypeEditingMenu.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/DynamicNewObjectMenu.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/OpenBulkEditorContributionItem.java -text
+eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ConvertPerson2TeamHandler.java -text
+eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ConvertTeam2PersonHandler.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/DeleteHandler.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/MergeGroupHandler.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/OpenBulkEditorHandler.java -text
@@ -355,6 +358,7 @@ eu.etaxonomy.taxeditor.editor/.project -text
 eu.etaxonomy.taxeditor.editor/META-INF/MANIFEST.MF -text
 eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin.properties -text
 eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_de.properties -text
+eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_en.properties -text
 eu.etaxonomy.taxeditor.editor/build.properties -text
 eu.etaxonomy.taxeditor.editor/icons/address-book-new.png -text
 eu.etaxonomy.taxeditor.editor/icons/camera-photo.png -text
@@ -485,6 +489,7 @@ eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/h
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteAllEmptyNamesHandler.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteTaxonBaseHandler.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/GroupBasionymContributionItem.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/MoveSynonymToAnotherAcceptedTaxonHandler.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/NameEditorMenuPropertyTester.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/RemoveBasionymHandler.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/SetBasionymHandler.java -text
@@ -1384,6 +1389,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/IPos
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/MatchStrategyConfigurator.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmPreferences.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmStorePropertyTester.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ChecklistEditorGeneralPreference.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/DefaultFeatureTreePreferenecs.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/DescriptionPreferences.java -text
@@ -1396,6 +1402,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/Mat
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/MediaPreferences.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/MobotOpenUrlPreferences.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NomenclaturalCodePreferences.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/OrderPreferences.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencePropertyTester.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/Resources.java -text
@@ -1482,6 +1489,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/sele
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SpecimenOrObservationTypeSelectionDialog.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonBaseSelectionDialog.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionNaturalOrderDialog.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmEntityWizardPage.java -text
index 8db829129667b94fe710bd503643e4d25bcbc03a..37beb7b7d6080d8b6d566bcc38749314b3cfe1d2 100644 (file)
@@ -13,7 +13,7 @@ extension.name = Taxonomic Editor
 perspective.name = Taxonomic\r
 perspective.name.0 = Polytomous Key\r
 perspective.name.1 = Uses\r
-perspective.name.2 = Derivates\r
+perspective.name.2 = Derivatives\r
 menu.label = General\r
 menu.label.0 = Edit\r
 menu.label.1 = Window\r
index 99cd6fa5b3dbced1e9b54d4dea4bd6b93d6439b5..8858bb121ccd79d440c8170cb27ea1905d011d0a 100644 (file)
@@ -14,4 +14,21 @@ command.label.0 = Set Current Line as Target for Duplicate Removal
 command.label.1 = Set as Candidate(s) for Duplicate Removal
 command.label.2 = Remove as Candidate(s) for Duplicate Removal
 command.label.3 = De-Duplicate Group
-command.label.4 = Delete
\ No newline at end of file
+command.label.4 = Delete
+command.label.5 = Convert Team to Person
+command.name = Merge Group
+command.name.0 = Set as Target for Group Merge
+command.name.1 = Dynamic Open Bulk Editor
+commandParameter.name = Bulk Editor Class
+command.name.2 = Dynamic New Object
+command.name.3 = Dynamic Delete Object
+command.name.4 = Set as Candidate for Group Merge
+command.name.5 = Remove as Candidate for Group Merge
+command.name.6 = Set Marker Flag
+command.name.7 = delete
+command.name.8 = convert Team to Person
+command.name.9 = convert Person to Team
+specification.label = Merge Candidate Annotation
+specification.label.0 = Merge Target Annotation
+command.label.6 = Convert Person to Team
+command.name.10 = convert Person to Team
\ No newline at end of file
index 0b1fdeab655ee2586575ab3dd96579e426945b04..f408f10ff1d902402c707fb61e42842a08b575df 100644 (file)
                </reference>\r
             </visibleWhen>\r
          </command>\r
+         \r
          <command\r
                commandId="bulkeditor.commands.setmergecandidate"\r
                label="%command.label.1"\r
                </reference>\r
             </visibleWhen>\r
          </command>\r
+         <command\r
+               commandId="eu.etaxonomy.taxeditor.bulkeditor.convertTeam2Person"\r
+               label="%command.label.5"\r
+               style="push">\r
+                  <visibleWhen\r
+                               checkEnabled="true">\r
+                               <and>\r
+                               <reference\r
+                       definitionId="isConvertEnabled">\r
+                               </reference>\r
+                               <reference \r
+                                               definitionId="isTeam">\r
+                               </reference>\r
+                       </and>\r
+                       </visibleWhen>\r
+         </command>\r
+         <command\r
+               commandId="eu.etaxonomy.taxeditor.bulkeditor.convertPerson2Team"\r
+               label="%command.label.6"\r
+               style="push">\r
+               <visibleWhen \r
+                       checkEnabled="true">>\r
+                               <and>\r
+                               <reference\r
+                       definitionId="isConvertEnabled">\r
+                               </reference>\r
+                               <reference \r
+                                       definitionId="isPerson">\r
+                               </reference>\r
+                       </and>\r
+                       </visibleWhen>\r
+         </command>\r
          <separator\r
                name="taxeditor-bulkeditor.separator2"\r
                visible="true">\r
       <command\r
             defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.MergeGroupHandler"\r
             id="bulkeditor.commands.mergegroup"\r
-            name="Merge Group">\r
+            name="%command.name">\r
       </command>\r
       <command\r
             defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.SetMergeTargetHandler"\r
             id="bulkeditor.commands.setmergetarget"\r
-            name="Set as Target for Group Merge">\r
+            name="%command.name.0">\r
       </command>\r
       <command\r
             defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.OpenBulkEditorHandler"\r
             id="taxeditor-bulkeditor.dynamicopenmenu"\r
-            name="Dynamic Open Bulk Editor">\r
+            name="%command.name.1">\r
          <commandParameter\r
                id="taxeditor-bulkeditor.commandParameter.inputType"\r
-               name="Bulk Editor Class"\r
+               name="%commandParameter.name"\r
                values="eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputTypeValues">\r
          </commandParameter>\r
       </command>\r
       <command\r
             defaultHandler="eu.etaxonomy.taxeditor.annotatedlineeditor.handler.NewObjectHandler"\r
             id="taxeditor-bulkeditor.dynamicnewobjectcommand"\r
-            name="Dynamic New Object">\r
+            name="%command.name.2">\r
       </command>\r
       <command\r
             defaultHandler="eu.etaxonomy.taxeditor.annotatedlineeditor.handler.DeleteObjectHandler"\r
             id="taxeditor-bulkeditor.dynamicdeleteobjectcommand"\r
-            name="Dynamic Delete Object">\r
+            name="%command.name.3">\r
       </command>\r
       <command\r
             defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.SetMergeCandidateHandler"\r
             id="bulkeditor.commands.setmergecandidate"\r
-            name="Set as Candidate for Group Merge">\r
+            name="%command.name.4">\r
       </command>\r
       <command\r
             defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.RemoveMergeCandidateHandler"\r
             id="bulkeditor.commands.removemergecandidate"\r
-            name="Remove as Candidate for Group Merge">\r
+            name="%command.name.5">\r
       </command>\r
       <command\r
             defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.SetMarkerFlagHandler"\r
             id="taxeditor-bulkeditor.command.setMarkerFlag"\r
-            name="Set Marker Flag">\r
+            name="%command.name.6">\r
       </command>\r
       <command\r
             id="eu.etaxonomy.taxeditor.bulkeditor.delete"\r
-            name="delete">\r
+            name="%command.name.7">\r
+      </command>\r
+      <command\r
+            id="eu.etaxonomy.taxeditor.bulkeditor.convertTeam2Person"\r
+            name="%command.name.8">\r
+      </command>\r
+      <command\r
+            id="eu.etaxonomy.taxeditor.bulkeditor.convertPerson2Team"\r
+            name="%command.name.10">\r
       </command>\r
       <!--command\r
             defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.NewEntityHandler"\r
             highlightPreferenceValue="true"\r
             icon="icons/merge_candidate.gif"\r
             includeOnPreferencePage="true"\r
-            label="Merge Candidate Annotation"\r
+            label="%specification.label"\r
             overviewRulerPreferenceKey="merge_candidate_annotation_overview"\r
             overviewRulerPreferenceValue="true"\r
             presentationLayer="0"\r
             highlightPreferenceValue="true"\r
             icon="icons/merge_target.gif"\r
             includeOnPreferencePage="true"\r
-            label="Merge Target Annotation"\r
+            label="%specification.label.0"\r
             overviewRulerPreferenceKey="merge_target_annotation_overview"\r
             overviewRulerPreferenceValue="true"\r
             presentationLayer="1"\r
             </test>\r
          </with>\r
       </definition>\r
+      <definition\r
+            id="isConvertEnabled">\r
+         <with\r
+               variable="activeEditor">\r
+            <test\r
+                  property="taxeditor-bulkeditor.propertyTester.isConvertingEnabled">\r
+            </test>\r
+         </with>\r
+      </definition>\r
       <definition\r
             id="isTaxonBulkEditorInput">\r
          <with\r
             </test>\r
          </with>\r
       </definition>\r
+       <definition\r
+            id="isTeam">\r
+         <with\r
+               variable="selection">\r
+            <test\r
+                  property="eu.etaxonomy.taxeditor.bulkeditor.command.isTeam">\r
+            </test>\r
+         </with>\r
+      </definition>\r
+      <definition\r
+            id="isPerson">\r
+         <with\r
+               variable="selection">\r
+            <test\r
+                  property="eu.etaxonomy.taxeditor.bulkeditor.command.isPerson">\r
+            </test>\r
+         </with>\r
+      </definition>\r
    </extension>\r
    <extension\r
          point="org.eclipse.core.expressions.propertyTesters">\r
             class="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorPropertyTester"\r
             id="taxeditor-bulkeditor.PropertyTester"\r
             namespace="taxeditor-bulkeditor.propertyTester"\r
-            properties="isMergingEnabled, isDerivedUnitEditor, isTaxonEditor, isGroupEditor"\r
+            properties="isMergingEnabled, isDerivedUnitEditor, isTaxonEditor, isGroupEditor, isConvertingEnabled"\r
             type="eu.etaxonomy.taxeditor.bulkeditor.BulkEditor">\r
       </propertyTester>\r
+      <propertyTester\r
+            class="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorMenuPropertyTester"\r
+            id="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorMenuPropertyTester"\r
+            namespace="eu.etaxonomy.taxeditor.bulkeditor.command"\r
+            properties="isTeam, isPerson"\r
+            type="java.lang.Object">\r
+      </propertyTester>\r
    </extension>\r
    <extension\r
          point="org.eclipse.ui.handlers">\r
             </with>\r
          </activeWhen>\r
       </handler>\r
+      <handler\r
+            class="eu.etaxonomy.taxeditor.bulkeditor.handler.ConvertTeam2PersonHandler"\r
+            commandId="eu.etaxonomy.taxeditor.bulkeditor.convertTeam2Person">\r
+      </handler>\r
+      <handler\r
+            class="eu.etaxonomy.taxeditor.bulkeditor.handler.ConvertPerson2TeamHandler"\r
+            commandId="eu.etaxonomy.taxeditor.bulkeditor.convertPerson2Team">\r
+      </handler>\r
+      \r
    </extension>\r
    <extension\r
          point="org.eclipse.ui.preferencePages">\r
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorMenuPropertyTester.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorMenuPropertyTester.java
new file mode 100644 (file)
index 0000000..fe7e77e
--- /dev/null
@@ -0,0 +1,52 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2015 EDIT\r
+* European Distributed Institute of Taxonomy\r
+* http://www.e-taxonomy.eu\r
+*\r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.bulkeditor.command;\r
+\r
+import org.eclipse.core.expressions.PropertyTester;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+\r
+import eu.etaxonomy.cdm.model.agent.Person;\r
+import eu.etaxonomy.cdm.model.agent.Team;\r
+\r
+/**\r
+ * @author k.luther\r
+ * @date 13.05.2015\r
+ *\r
+ */\r
+public class BulkEditorMenuPropertyTester extends PropertyTester {\r
+\r
+\r
+       private static final String IS_TEAM = "isTeam";\r
+       private static final String IS_PERSON = "isPerson";\r
+       \r
+       public BulkEditorMenuPropertyTester(){\r
+       }\r
+       /**\r
+        * {@inheritDoc}\r
+        */\r
+       @Override\r
+       public boolean test(Object receiver, String property, Object[] args,\r
+                       Object expectedValue) {\r
+               if(receiver instanceof IStructuredSelection){\r
+                       IStructuredSelection selection = (IStructuredSelection) receiver;\r
+                       Object selectedElement = selection.getFirstElement();\r
+                       if (property.equals(IS_PERSON) && selectedElement instanceof Person){\r
+                               return true;\r
+                       } \r
+                       if (property.equals(IS_TEAM) && selectedElement instanceof Team){\r
+                               return true;\r
+                       }\r
+                       return false;\r
+               \r
+               }\r
+               return false;\r
+       }\r
+\r
+}\r
index 0d3efd55b2c4d688f58a0658f2f1b43516352116..7368adc1d835f5dbfda890534210eee434e8af07 100644 (file)
@@ -12,6 +12,7 @@ package eu.etaxonomy.taxeditor.bulkeditor.command;
 
 import org.apache.log4j.Logger;
 import org.eclipse.core.expressions.PropertyTester;
+
 import org.eclipse.ui.IEditorInput;
 
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
@@ -38,7 +39,9 @@ public class BulkEditorPropertyTester extends PropertyTester {
        private static final String IS_GROUP_EDITOR = "isGroupEditor";
     public static final String IS_DERIVED_UNIT_EDITOR = "isDerivedUnitEditor";
     public static final String IS_TAXON_EDITOR = "isTaxonEditor";
-
+    public static final String IS_CONVERT_ENABLED = "isConvertingEnabled";
+    public static final String IS_PERSON = "isPerson";
+    public static final String IS_TEAM = "isTeam";
        /* (non-Javadoc)
         * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
         */
@@ -46,14 +49,22 @@ public class BulkEditorPropertyTester extends PropertyTester {
        @Override
     public boolean test(Object receiver, String property, Object[] args,
                        Object expectedValue) {
-               BulkEditor bulkEditor = (BulkEditor) receiver;
-
+               BulkEditor bulkEditor = null;
+               
+               
+               bulkEditor = (BulkEditor) receiver;
                if (IS_MERGING_ENABLED.equals(property)) {
                        IEditorInput input = bulkEditor.getEditorInput();
                        if (input instanceof AbstractBulkEditorInput) {
                                return ((AbstractBulkEditorInput<?>) input).isMergingEnabled();
                        }
                }
+               if (IS_CONVERT_ENABLED.equals(property)) {
+                       IEditorInput input = bulkEditor.getEditorInput();
+                       if (input instanceof AbstractBulkEditorInput) {
+                               return ((AbstractBulkEditorInput<?>) input).isConvertingEnabled();
+                       }
+               }
                else if(IS_GROUP_EDITOR.equals(property)){
                        return bulkEditor.getEditorInput() instanceof GroupEditorInput;
                }
@@ -63,6 +74,7 @@ public class BulkEditorPropertyTester extends PropertyTester {
         else if(IS_TAXON_EDITOR.equals(property)){
             return bulkEditor.getEditorInput() instanceof TaxonEditorInput;
         }
+               
 //             if (("isPublishFlagEditingEnabled").equals(property)) {
 //                     IEditorInput input = bulkEditor.getEditorInput();
 //                     if (input instanceof NameEditorInput) {
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ConvertPerson2TeamHandler.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ConvertPerson2TeamHandler.java
new file mode 100644 (file)
index 0000000..2191fa9
--- /dev/null
@@ -0,0 +1,99 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2015 EDIT\r
+* European Distributed Institute of Taxonomy\r
+* http://www.e-taxonomy.eu\r
+*\r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.bulkeditor.handler;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.jface.dialogs.MessageDialog;\r
+import org.eclipse.jface.viewers.ISelection;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.ui.IEditorInput;\r
+import org.eclipse.ui.IEditorPart;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+import org.eclipse.ui.texteditor.IDocumentProvider;\r
+\r
+import eu.etaxonomy.cdm.api.service.IAgentService;\r
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;\r
+import eu.etaxonomy.cdm.model.agent.Person;\r
+import eu.etaxonomy.cdm.model.agent.Team;\r
+import eu.etaxonomy.cdm.strategy.merge.MergeException;\r
+import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService;\r
+import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation;\r
+import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel;\r
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;\r
+import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * @author k.luther\r
+ * @date 12.05.2015\r
+ *\r
+ */\r
+public class ConvertPerson2TeamHandler extends AbstractHandler {\r
+\r
+       /**\r
+        * {@inheritDoc}\r
+        */\r
+       @Override\r
+       public Object execute(ExecutionEvent event) throws ExecutionException {\r
+               ISelection selection = HandlerUtil.getCurrentSelection(event);\r
+               \r
+               IEditorPart editor = HandlerUtil.getActiveEditor(event);\r
+               \r
+               IEditorInput input = editor.getEditorInput();\r
+               if (editor.isDirty()){\r
+                       boolean proceed = MessageDialog.openQuestion(null,\r
+                                       "Save changes", "You have made changes that must be saved before this query can be executed. Would you like to proceed?");\r
+                       if (proceed) {\r
+                               editor.doSave(null);\r
+                       } else {\r
+                               return null;\r
+                       }\r
+               }\r
+               if((input instanceof IEntityPersistenceService) && (selection instanceof IStructuredSelection)){\r
+                       \r
+                       \r
+                       IDocumentProvider provider = ((BulkEditor) editor).getDocumentProvider();\r
+                       LineAnnotationModel model = \r
+                                       (LineAnnotationModel) provider.getAnnotationModel(input);\r
+                       \r
+                       \r
+                       IStructuredSelection structuredSelection = (IStructuredSelection) selection;\r
+                       \r
+                       IEntityPersistenceService persistenceService = (IEntityPersistenceService) input;\r
+               \r
+                       Team team ;\r
+                       for(Object object : structuredSelection.toList()){\r
+                               LineAnnotation annotation = (LineAnnotation) model.getAnnotation(object);\r
+                               team = null;\r
+                               if (object instanceof Person){\r
+                                       Person person = HibernateProxyHelper.deproxy(object, Person.class);\r
+                                       try {\r
+                                               team = CdmStore.getService(IAgentService.class).convertPerson2Team(person);\r
+                                       } catch (IllegalArgumentException e) {\r
+                                               MessagingUtils.informationDialog("Can not convert Team to Person", e.getMessage());\r
+                                       } catch (MergeException e) {\r
+                                               MessagingUtils.informationDialog("Can not convert Team to Person", e.getMessage());\r
+                                       }\r
+                               }else{\r
+                                       MessagingUtils.informationDialog("Can not convert Team to Person", "convertTeam2Person can only be called on a team.");\r
+                               }\r
+                               \r
+                               if (team != null){\r
+                                       ((BulkEditor) editor).removeAnnotatedLine(annotation);\r
+                                       ((BulkEditor) editor).createAnnotatedLine(team);\r
+                               }\r
+                       }\r
+               }\r
+               return null;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ConvertTeam2PersonHandler.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ConvertTeam2PersonHandler.java
new file mode 100644 (file)
index 0000000..846ada1
--- /dev/null
@@ -0,0 +1,101 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2015 EDIT\r
+* European Distributed Institute of Taxonomy\r
+* http://www.e-taxonomy.eu\r
+*\r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.bulkeditor.handler;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.jface.dialogs.MessageDialog;\r
+import org.eclipse.jface.viewers.ISelection;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.ui.IEditorInput;\r
+import org.eclipse.ui.IEditorPart;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+import org.eclipse.ui.texteditor.IDocumentProvider;\r
+\r
+import eu.etaxonomy.cdm.api.service.AgentServiceImpl;\r
+import eu.etaxonomy.cdm.api.service.IAgentService;\r
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;\r
+import eu.etaxonomy.cdm.model.agent.AgentBase;\r
+import eu.etaxonomy.cdm.model.agent.Person;\r
+import eu.etaxonomy.cdm.model.agent.Team;\r
+import eu.etaxonomy.cdm.strategy.merge.MergeException;\r
+import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService;\r
+import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation;\r
+import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel;\r
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;\r
+import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * @author k.luther\r
+ * @date 12.05.2015\r
+ *\r
+ */\r
+public class ConvertTeam2PersonHandler extends AbstractHandler {\r
+\r
+       /**\r
+        * {@inheritDoc}\r
+        */\r
+       @Override\r
+       public Person execute(ExecutionEvent event) throws ExecutionException {\r
+               ISelection selection = HandlerUtil.getCurrentSelection(event);\r
+               \r
+               IEditorPart editor = HandlerUtil.getActiveEditor(event);\r
+               \r
+               IEditorInput input = editor.getEditorInput();\r
+               if (editor.isDirty()){\r
+                       boolean proceed = MessageDialog.openQuestion(null,\r
+                                       "Save changes", "You have made changes that must be saved before this query can be executed. Would you like to proceed?");\r
+                       if (proceed) {\r
+                               editor.doSave(null);\r
+                       } else {\r
+                               return null;\r
+                       }\r
+               }\r
+               if((input instanceof IEntityPersistenceService) && (selection instanceof IStructuredSelection)){\r
+                       \r
+                       \r
+                       IDocumentProvider provider = ((BulkEditor) editor).getDocumentProvider();\r
+                       LineAnnotationModel model = \r
+                                       (LineAnnotationModel) provider.getAnnotationModel(input);\r
+                       \r
+                       \r
+                       IStructuredSelection structuredSelection = (IStructuredSelection) selection;\r
+                       \r
+                       IEntityPersistenceService persistenceService = (IEntityPersistenceService) input;\r
+               \r
+                       Person person ;\r
+                       for(Object object : structuredSelection.toList()){\r
+                               LineAnnotation annotation = (LineAnnotation) model.getAnnotation(object);\r
+                               person = null;\r
+                               if (object instanceof Team){\r
+                                       Team team = HibernateProxyHelper.deproxy(object, Team.class);\r
+                                       try {\r
+                                               person = CdmStore.getService(IAgentService.class).convertTeam2Person(team);\r
+                                       } catch (IllegalArgumentException e) {\r
+                                               MessagingUtils.informationDialog("Can not convert Team to Person", e.getMessage());\r
+                                       } catch (MergeException e) {\r
+                                               MessagingUtils.informationDialog("Can not convert Team to Person", e.getMessage());\r
+                                       }\r
+                               }else{\r
+                                       MessagingUtils.informationDialog("Can not convert Team to Person", "convertTeam2Person can only be called on a team.");\r
+                               }\r
+                               \r
+                               if (person != null){\r
+                                       ((BulkEditor) editor).removeAnnotatedLine(annotation);\r
+                                       ((BulkEditor) editor).createAnnotatedLine(person);\r
+                               }\r
+                       }\r
+               }\r
+               return null;\r
+       }\r
+\r
+}\r
index 5a7cccc119a7ae8ca03599d85595af7a614f2c8a..e5b852b5ab76e79dc3e8abf0862f5ef0cd935e35 100644 (file)
@@ -207,6 +207,14 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> implements IEd
                return false;
        }
 
+       /**
+        * <p>isMergingEnabled</p>
+        *
+        * @return a boolean.
+        */
+       public boolean isConvertingEnabled() {
+               return false;
+       }
        /**
         * <p>isMarkerTypeEditingEnabled</p>
         *
@@ -217,10 +225,7 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> implements IEd
                return false;
        }
 
-       /*
-        * (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#merge(eu.etaxonomy.cdm.model.common.IdentifiableEntity, eu.etaxonomy.cdm.model.common.IdentifiableEntity)
-        */
+
        /** {@inheritDoc} */
        @Override
     public boolean merge(T entity, T mergeTarget) {
@@ -239,10 +244,7 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> implements IEd
                return true;
        }
 
-       /*
-        * (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#create(eu.etaxonomy.cdm.model.common.IdentifiableEntity)
-        */
+
        /** {@inheritDoc} */
        @Override
     public boolean create(T entity) {
index 923d532c08bfaf6b62246a04cbc82e6b82b9bee0..2a739544f0deeab50984dc606b4db9d09ca8d4d0 100644 (file)
@@ -20,10 +20,20 @@ import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurato
 import eu.etaxonomy.cdm.api.service.exception.DataChangeNoRollbackException;
 import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
 import eu.etaxonomy.cdm.model.agent.AgentBase;
+import eu.etaxonomy.cdm.model.agent.Person;
+import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
+import eu.etaxonomy.cdm.strategy.merge.DefaultMergeStrategy;
+import eu.etaxonomy.cdm.strategy.merge.IMergable;
+import eu.etaxonomy.cdm.strategy.merge.IMergeStrategy;
+import eu.etaxonomy.cdm.strategy.merge.MergeException;
+import eu.etaxonomy.cdm.strategy.merge.MergeMode;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
+import eu.etaxonomy.taxeditor.bulkeditor.handler.MergeGroupHandler;
 import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.AgentCreator;
 import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.IdentifiableEntitySortProvider;
+import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 
@@ -34,7 +44,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created 25.06.2009
  * @version 1.0
  */
-public class AgentEditorInput extends AbstractBulkEditorInput<AgentBase> {
+public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase> {
 
        /**
         * 
@@ -99,10 +109,39 @@ public class AgentEditorInput extends AbstractBulkEditorInput<AgentBase> {
        public boolean isMergingEnabled() {
                return true;
        }
+       
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInput#isMergingEnabled()
+        */
+       /** {@inheritDoc} */
+       @Override
+       public boolean isConvertingEnabled() {
+               return true;
+       }
+       
+       /** {@inheritDoc} */
+       @Override
+    public boolean merge(TeamOrPersonBase entity, TeamOrPersonBase mergeTarget) {
+               if (entity instanceof IMergable) {
+                       try {
+                               IMergeStrategy strategy = DefaultMergeStrategy.NewInstance(Person.class);
+                               strategy.setMergeMode("institutionalMemberships", MergeMode.FIRST);
+                               CdmStore.getCommonService().merge((IMergable)mergeTarget, (IMergable)entity, strategy);                         
+                       } catch (MergeException e) {
+                               MessagingUtils.errorDialog("Bulk Editor Merge Error",
+                                               this,
+                                               "Could not merge chosen objects of type " + entity.getClass().getName(),
+                                               TaxeditorBulkeditorPlugin.PLUGIN_ID,
+                                               e,
+                                               true);
+                       }
+               }
+               return true;
+       }
 
        /** {@inheritDoc} */
        @Override
-       public List<AgentBase> listEntities(IIdentifiableEntityServiceConfigurator configurator) {
+       public List<TeamOrPersonBase> listEntities(IIdentifiableEntityServiceConfigurator configurator) {
                return CdmStore.getSearchManager().findTeamOrPersons(configurator);
        }
        
@@ -130,10 +169,10 @@ public class AgentEditorInput extends AbstractBulkEditorInput<AgentBase> {
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getSortProviders()
         */
        @Override
-       public List<IBulkEditorSortProvider<AgentBase>> getSortProviders() {
-               List<IBulkEditorSortProvider<AgentBase>> sortProviders = super.getSortProviders();
+       public List<IBulkEditorSortProvider<TeamOrPersonBase>> getSortProviders() {
+               List<IBulkEditorSortProvider<TeamOrPersonBase>> sortProviders = super.getSortProviders();
                
-               sortProviders.add(0, new IdentifiableEntitySortProvider<AgentBase>());
+               sortProviders.add(0, new IdentifiableEntitySortProvider<TeamOrPersonBase>());
                
                return sortProviders;
        }
@@ -142,8 +181,20 @@ public class AgentEditorInput extends AbstractBulkEditorInput<AgentBase> {
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#createEntityCreator()
         */
        @Override
-       protected IEntityCreator<AgentBase> createEntityCreator() {
+       protected IEntityCreator<TeamOrPersonBase> createEntityCreator() {
                return new AgentCreator();
        }
 
+       @Override
+       public boolean save(TeamOrPersonBase entity) {
+               return CdmStore.getService(IAgentService.class).saveOrUpdate(entity) != null;
+       }
+
+       @Override
+       public boolean delete(TeamOrPersonBase entity)
+                       throws ReferencedObjectUndeletableException {
+               // TODO Auto-generated method stub
+               return false;
+       }
+
 }
index 015b24a287550061d5c71dc282a414b3c2d7ca47..efb0bdc10b977a0771474284eee127449662b0f2 100644 (file)
@@ -28,15 +28,14 @@ import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
  * @created 18.09.2009
  * @version 1.0
  */
-public class AgentCreator implements IEntityCreator<AgentBase> {
-       private static final Logger logger = Logger
-                       .getLogger(AgentCreator.class);
+public class AgentCreator implements IEntityCreator<TeamOrPersonBase> {
+       private static final Logger logger = Logger.getLogger(AgentCreator.class);
 
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.String)
         */
        /** {@inheritDoc} */
-       public AgentBase createEntity(String text) {
+       public TeamOrPersonBase createEntity(String text) {
                // FIXME
                logger.error("FIXMEFIXMEFIXMEFIXMEFIXMEFIXMEFIXMEFIXMEFIXMEFIXMEFIXME");
                logger.error("We can only create Persons at the moment. See #1820");
@@ -48,7 +47,7 @@ public class AgentCreator implements IEntityCreator<AgentBase> {
         * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.Class, java.lang.String)
         */
        /** {@inheritDoc} */
-       public AgentBase createEntity(Object key, String text) {
+       public TeamOrPersonBase createEntity(Object key, String text) {
                TeamOrPersonBase teamOrPerson = null;
                if (Team.class.equals((key))) {
                        teamOrPerson = Team.NewInstance();
index f264612778f34ed9b2e868e2bcea9f5b0ba3db3e..404f901086ce8d2433dfd54167ef7ec54e016387 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
-       <classpathentry kind="src" path="src/main/java"/>\r
-       <classpathentry kind="src" path="src/test/java"/>\r
-       <classpathentry kind="src" path="src/main/resources"/>\r
-       <classpathentry kind="src" path="src/test/resources"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aspectjrt-1.7.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.7.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/avro-1.6.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-anim-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-awt-util-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-bridge-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-css-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-dom-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-ext-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-extension-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-gvt-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-js-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-parser-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-script-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-svg-dom-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-svggen-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-transcoder-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-util-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-xml-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/c3p0-0.9.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-2.2.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.aopalliance-1.0.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.apache.commons.logging-1.1.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.8.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-codec-20041127.091804.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-dbcp-1.4.jar" sourcepath="lib/commons-dbcp-1.4-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-io-2.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-lang-2.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.5.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/concurrent-1.3.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dbunit-2.4.9.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-core-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-logging-api-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-module-apt-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-module-xhtml-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-sink-api-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/easymock-3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/easymockclassextension-2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ehcache-core-2.6.9.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/fop-1.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/guava-r05.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/h2-1.3.170.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hamcrest-core-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-c3p0-4.1.10.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-cglib-repack-2.1_3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-4.0.1.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-core-4.1.10.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-ehcache-4.1.10.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-entitymanager-4.1.10.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-4.1.10.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-jpa-2.0-api-1.0.1.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-4.2.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-analyzers-4.2.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-engine-4.2.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-orm-4.2.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-4.3.1.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hsqldb-1.8.0.10.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/httpclient-4.2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/httpcore-4.2.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/icu4j-2.6.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/itextpdf-5.4.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.8.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jackson-mapper-asl-1.8.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jakarta-regexp-1.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/javassist-3.17.1-GA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.2.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-impl-2.2-EA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-xjc-2.2-EA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb1-impl-2.2-EA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jboss-logging-3.1.3.GA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jdbc4-2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jdom-1.1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/joda-time-2.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/json-lib-2.4-jdk15.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jtds-1.3.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/junit-4.11.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/junit-benchmarks-0.5.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lsid-client-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lsid-server-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-core-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-facet-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-grouping-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-highlighter-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-kuromoji-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-memory-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-misc-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-phonetic-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-queries-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-smartcn-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-spatial-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-spellchecker-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-stempel-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/mchange-commons-java-0.2.3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.24.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/objenesis-1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/odfdom-java-0.8.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ognl-2.6.9.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/opencsv-2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.equinox.common-3.6.0.v20110523.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.osgi.core-1.0.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aop-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aspects-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.beans-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.context-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.core-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.expression-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.jdbc-3.2.2.RELEASE.jar" sourcepath="lib/org.springframework.jdbc-3.2.2.RELEASE-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.orm-3.2.2.RELEASE.jar" sourcepath="lib/org.springframework.orm-3.2.2.RELEASE-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.oxm-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.test-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.transaction-3.2.2.RELEASE.jar" sourcepath="lib/org.springframework.transaction-3.2.2.RELEASE-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web.servlet-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/osgi-3.6.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/p6spy-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/paranamer-2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/plexus-classworlds-1.2-alpha-9.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/plexus-container-default-1.0-alpha-30.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/plexus-utils-2.0.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/servlet-api-2.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.7.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/snappy-java-1.0.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/solr-analysis-extras-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/solr-core-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/solr-solrj-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-aop-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-beans-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-context-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-context-support-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-core-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-expression-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-modules-cache-0.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-config-3.1.3.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-core-3.1.3.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/stax-1.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/stax-api-1.0.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-core-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-database-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-dbmaintainer-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-dbunit-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-easymock-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-inject-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-mock-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-orm-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-spring-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/usertype.jodatime-2.0.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/usertype.spi-2.0.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/validation-api-1.0.0.GA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xalan-2.6.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.11.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-apis-1.0.b2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-resolver-1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlgraphics-commons-1.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlParserAPIs-2.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlpull-1.1.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlunit-1.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xom-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.4c.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xstream-1.4.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-9.0.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/h2mig_pagestore_addon.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-remoting-3.1.3.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jena-core-2.11.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jena-iri-1.0.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.5.2-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.5.2-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.5.2-SNAPSHOT.jar" sourcepath="lib/cdmlib-io-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.5.2-SNAPSHOT.jar" sourcepath="lib/cdmlib-model-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.5.2-SNAPSHOT.jar" sourcepath="lib/cdmlib-persistence-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.5.2-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.5.2-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.5.2-SNAPSHOT.jar" sourcepath="lib/cdmlib-services-3.5.2-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/poi-3.10-FINAL.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-3.10-FINAL.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.3.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.10-FINAL.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.3.5.jar"/>\r
-       <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="src" path="src/test/java"/>
+       <classpathentry kind="src" path="src/main/resources"/>
+       <classpathentry kind="src" path="src/test/resources"/>
+       <classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aspectjrt-1.7.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.7.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/avro-1.6.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-anim-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-awt-util-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-bridge-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-css-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-dom-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-ext-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-extension-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-gvt-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-js-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-parser-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-script-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-svg-dom-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-svggen-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-transcoder-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-util-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-xml-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/c3p0-0.9.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-2.2.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.aopalliance-1.0.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.apache.commons.logging-1.1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.8.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-codec-20041127.091804.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-dbcp-1.4.jar" sourcepath="lib/commons-dbcp-1.4-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-io-2.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-lang-2.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.5.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/concurrent-1.3.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dbunit-2.4.9.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-core-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-logging-api-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-module-apt-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-module-xhtml-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-sink-api-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/easymock-3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/easymockclassextension-2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ehcache-core-2.6.9.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/fop-1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/guava-r05.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/h2-1.3.170.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hamcrest-core-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-c3p0-4.1.10.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-cglib-repack-2.1_3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-4.0.1.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-core-4.1.10.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-ehcache-4.1.10.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-entitymanager-4.1.10.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-4.1.10.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-jpa-2.0-api-1.0.1.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-4.2.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-analyzers-4.2.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-engine-4.2.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-orm-4.2.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-4.3.1.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hsqldb-1.8.0.10.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/httpclient-4.2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/httpcore-4.2.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/icu4j-2.6.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/itextpdf-5.4.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.8.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jackson-mapper-asl-1.8.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jakarta-regexp-1.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/javassist-3.17.1-GA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.2.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-impl-2.2-EA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-xjc-2.2-EA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb1-impl-2.2-EA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jboss-logging-3.1.3.GA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jdbc4-2.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jdom-1.1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/joda-time-2.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/json-lib-2.4-jdk15.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jtds-1.3.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/junit-4.11.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/junit-benchmarks-0.5.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lsid-client-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lsid-server-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-core-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-facet-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-grouping-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-highlighter-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-kuromoji-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-memory-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-misc-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-phonetic-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-queries-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-smartcn-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-spatial-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-spellchecker-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-stempel-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/mchange-commons-java-0.2.3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.24.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/objenesis-1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/odfdom-java-0.8.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ognl-2.6.9.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/opencsv-2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.equinox.common-3.6.0.v20110523.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.osgi.core-1.0.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aop-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aspects-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.beans-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.context-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.core-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.expression-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.jdbc-3.2.2.RELEASE.jar" sourcepath="lib/org.springframework.jdbc-3.2.2.RELEASE-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.orm-3.2.2.RELEASE.jar" sourcepath="lib/org.springframework.orm-3.2.2.RELEASE-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.oxm-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.test-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.transaction-3.2.2.RELEASE.jar" sourcepath="lib/org.springframework.transaction-3.2.2.RELEASE-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web.servlet-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/osgi-3.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/p6spy-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/paranamer-2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/plexus-classworlds-1.2-alpha-9.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/plexus-container-default-1.0-alpha-30.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/plexus-utils-2.0.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/servlet-api-2.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.7.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/snappy-java-1.0.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/solr-analysis-extras-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/solr-core-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/solr-solrj-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-aop-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-beans-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-context-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-context-support-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-core-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-expression-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-modules-cache-0.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-config-3.1.3.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-core-3.1.3.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/stax-1.2.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/stax-api-1.0.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-core-3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-database-3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-dbmaintainer-3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-dbunit-3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-easymock-3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-inject-3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-mock-3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-orm-3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-spring-3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/usertype.jodatime-2.0.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/usertype.spi-2.0.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/validation-api-1.0.0.GA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xalan-2.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.11.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-apis-1.0.b2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-resolver-1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlgraphics-commons-1.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlParserAPIs-2.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlpull-1.1.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlunit-1.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xom-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.4c.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xstream-1.4.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-9.0.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/h2mig_pagestore_addon.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-remoting-3.1.3.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jena-core-2.11.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jena-iri-1.0.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.5.2-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.5.2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.5.2-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.5.2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.5.2-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.5.2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.5.2-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.5.2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.5.2-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.5.2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.5.2-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.5.2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.5.2-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.5.2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.5.2-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.5.2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/poi-3.10-FINAL.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-3.10-FINAL.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.3.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.10-FINAL.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.3.5.jar"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
index 7e5c3e34245e6a391124fb18dfd90ef0895a903c..1c03030fc915ddc834cf1df4280e190e31a92032 100644 (file)
@@ -9,7 +9,7 @@ editor.name.1 = Key
 editor.name.2 = Polytomous Key Graph Editor\r
 editor.name.3 = Polytomous Key List Editor\r
 editor.name.4 = Cdm Authority Editor\r
-editor.name.5 = Derivate View\r
+editor.name.5 = Derivative View\r
 view.name = Factual Data\r
 view.name.0 = Uses\r
 view.name.1 = Media\r
@@ -52,7 +52,7 @@ command.label.28 = Move Description to Taxon
 command.label.29 = Move Elements to Taxon\r
 command.label.30 = Delete\r
 command.label.31 = Save\r
-menu.label.2 = New Derivate\r
+menu.label.2 = New Derivative\r
 command.label.32 = New Use\r
 command.label.33 = New Use Summary\r
 command.label.34 = New Use Record\r
@@ -112,7 +112,7 @@ command.name.32 = Create Concept Relation
 command.name.33 = Open Related Concept\r
 category.name.7 = -- Group\r
 command.name.34 = Edit CDM Authorities\r
-command.name.35 = Open Derivate View\r
+command.name.35 = Open Derivative View\r
 scheme.description = The default key binding scheme for the Taxonomic Editor\r
 scheme.name = Taxonomic Editor Default Key Bindings\r
 editor.name.6 = Specimen Import Editor\r
@@ -153,4 +153,12 @@ command.name.42 = Open Taxon Editor
 command.name.43 = Create Field Unit\r
 command.name.44 = Deep Delete\r
 command.name.46 = Move Synonym (Homotypical Group) to another Accepted Taxon\r
-command.label.56 = Move Synonym (Homotypical Group) to another Accepted Taxon
\ No newline at end of file
+command.label.56 = Move Synonym (Homotypical Group) to another Accepted Taxon\r
+markerContentGenerator.name = Validation Problems Marker Generator\r
+command.name.45 = Delete\r
+command.name.47 = Delete\r
+commandParameter.name = taxonUUID\r
+Bundle-Name = Editor Bundle\r
+command.name.48 = delete\r
+command.name.49 = delete\r
+command.name.50 = delete
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_en.properties b/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_en.properties
new file mode 100644 (file)
index 0000000..65d48ba
--- /dev/null
@@ -0,0 +1,141 @@
+#Properties file for taxeditor-editor\r
+Bundle-Vendor.0 = EDIT\r
+Bundle-Name.0 = EDIT Taxonomic Editor - Editor Bundle\r
+command.name.17 = Set Basionym\r
+command.name.18 = Remove Basionym\r
+editor.name = Multipage Taxon Editor\r
+editor.name.0 = Taxon Name Editor\r
+editor.name.1 = Key\r
+editor.name.2 = Polytomous Key Graph Editor\r
+editor.name.3 = Polytomous Key List Editor\r
+editor.name.4 = Cdm Authority Editor\r
+editor.name.5 = Derivate View\r
+view.name = Factual Data\r
+view.name.0 = Uses\r
+view.name.1 = Media\r
+view.name.2 = Concept Relations\r
+view.name.3 = Concept Graph\r
+category.name = Taxonomic Editor\r
+command.label = Reference\r
+command.label.0 = Name\r
+command.label.1 = Team\r
+command.label.2 = Person\r
+command.label.3 = Specimen\r
+command.label.4 = Factual Data\r
+command.label.5 = Media\r
+command.label.6 = Concept\r
+command.label.7 = Concept Graph\r
+command.label.8 = Open Parent\r
+menu.label = New\r
+command.label.9 = Heterotypic Synonym\r
+command.label.10 = Homotypic Synonym\r
+command.label.11 = Synonym In Homotypical Group\r
+menu.label.0 = Change To\r
+command.label.12 = Accepted Taxon\r
+command.label.13 = Synonym\r
+command.label.14 = Misapplication\r
+command.label.15 = Delete\r
+command.label.16 = Delete All Empty Names\r
+command.label.17 = Swap Synonym With Accepted\r
+command.label.18 = Show Details\r
+command.label.19 = Save\r
+command.label.20 = New Node\r
+command.label.21 = Delete\r
+command.label.22 = Apply Layout\r
+command.label.23 = New Key Number\r
+command.label.24 = New Alternative\r
+command.label.25 = Refresh Nodes\r
+command.label.26 = Delete\r
+command.label.27 = New Factual Data\r
+menu.label.1 = New\r
+command.label.28 = Move Description to Taxon\r
+command.label.29 = Move Elements to Taxon\r
+command.label.30 = Delete\r
+command.label.31 = Save\r
+menu.label.2 = New Derivate\r
+command.label.32 = New Use\r
+command.label.33 = New Use Summary\r
+command.label.34 = New Use Record\r
+command.label.35 = Delete\r
+command.label.36 = Save\r
+command.label.37 = New Image Gallery\r
+command.label.38 = New Image\r
+command.label.39 = Move Image Up In List\r
+command.label.40 = Move Image Down In List\r
+command.label.41 = Delete\r
+command.label.42 = Save\r
+menu.label.3 = New\r
+command.label.43 = Open Related Concept\r
+command.label.44 = Delete\r
+command.label.45 = Edit Authorities\r
+extension.name = Name Commands\r
+category.name.0 = -- Name Editor\r
+command.name = Open Parent\r
+command.name.0 = Create Homotypic Synonym\r
+command.name.1 = Create Heterotypic Synonym\r
+command.name.2 = Create Synonym In Homotypical Group\r
+command.name.3 = Change To Synonym\r
+command.name.4 = Change To Accepted Taxon\r
+command.name.5 = Change To Misapplication\r
+command.name.6 = Swap Synonym With Accepted\r
+command.name.7 = Set Basionym / Original Combination\r
+command.name.8 = Remove Basionym / Original Combination\r
+command.name.9 = Delete All Empty Names\r
+category.name.1 = -- Factual\r
+command.name.10 = Create Description Element\r
+command.name.11 = New Description\r
+command.name.12 = Move Description Elements to Taxon\r
+command.name.13 = Move Description to Taxon\r
+category.name.2 = -- New Uses\r
+command.name.14 = New Use\r
+command.name.15 = New Use Summary\r
+command.name.16 = New Use Record\r
+category.name.3 = -- Media\r
+command.name.19 = Move Image Down In List\r
+command.name.20 = New Image Gallery\r
+command.name.21 = New Image\r
+command.name.22 = Move Image Up In List\r
+category.name.4 = -- New Entity\r
+command.name.23 = New Reference\r
+command.name.24 = New Name\r
+command.name.25 = New Team\r
+command.name.26 = New Person\r
+command.name.27 = New Specimen\r
+category.name.5 = -- Polytomous Keys\r
+command.name.28 = New Child Node\r
+command.name.29 = New Sibling Node\r
+command.name.30 = Refresh Node Numbering\r
+command.name.31 = Apply Layout\r
+category.name.6 = -- Concept Relations\r
+command.name.32 = Create Concept Relation\r
+command.name.33 = Open Related Concept\r
+category.name.7 = -- Group\r
+command.name.34 = Edit CDM Authorities\r
+command.name.35 = Open Derivate View\r
+scheme.description = The default key binding scheme for the Taxonomic Editor\r
+scheme.name = Taxonomic Editor Default Key Bindingseditor.name.6 = Specimen Import Editor\r
+editor.name.7 = Gbif Import Editor\r
+editor.name.8 = Checklist Editor\r
+view.name.4 = Specimen Import\r
+view.name.5 = GBIF Specimen Import\r
+command.label.46 = Name\r
+command.label.47 = Reference\r
+command.label.48 = Datasource\r
+command.label.49 = Misapplication\r
+command.label.50 = Use Existing Image\r
+command.name.36 = Create Misapplication\r
+command.name.37 = Use Existing Image\r
+command.name.38 = Open Checklist Editor\r
+command.name.39 = New Datasource\r
+wizard.name = Specimen Search/Import\r
+wizard.description = Queries data provider for specimens with specified parameters.\nNote: Query results are currently limited to 100.\r
+command.name.40 = Validation\r
+view.name.6 = Validation\r
+marker.field.0 = Object Type\r
+marker.field.1 = Object\r
+marker.field.2 = Attribute\r
+marker.field.3 = Problematic Value\r
+marker.field.4 = Problem description\r
+marker.field.5 = Validator\r
+marker.field.6 = Entity Class\r
+marker.field.7 = Entity Id
\ No newline at end of file
index 84899076bdeaf670009593da0323f45d62431d09..9c171a2137d2e1a25755a48885d8bf1b87fc6a66 100644 (file)
        <extension point="org.eclipse.ui.ide.markerSupport">
            <markerContentGenerator
                    id="eu.etaxonomy.taxeditor.editor.validation.ValidationProblemsMarkerGenerator" 
-                   name="Validation Problems Marker Generator">  
+                   name="%markerContentGenerator.name">  
                <markerTypeReference id="eu.etaxonomy.taxeditor.markers.validationerror" />
                
                <markerFieldReference id="eu.etaxonomy.taxeditor.markers.validation.userFriendlyTypeName" visible="true" />
                visible="true">
          </separator>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.editor.name.delete"
                label="%command.label.15"
                style="push">
             <visibleWhen>
                visible="true">
          </separator>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.key.polytomous.delete"
                label="%command.label.21"
                style="push">
          </command>
                style="push">
          </command>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.key.polytomous.command.delete"
                label="%command.label.26"
                style="push">
          </command>
       <menuContribution
             locationURI="popup:eu.etaxonomy.taxeditor.editor.view.descriptive">
          <command
-               commandId="eu.etaxonomy.taxeditor.description.commands.adddescription"
+               commandId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.adddescription"
                label="%command.label.27"
                style="push">
          </command>
             </visibleWhen>
          </command>
          <command
-               commandId="eu.etaxonomy.taxeditor.editor.commands.description.moveDescriptionToTaxon"
+               commandId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.moveDescriptionToTaxon"
                label="%command.label.28"
                style="push">
             <visibleWhen
             </visibleWhen>
          </command>
          <command
-               commandId="eu.etaxonomy.taxeditor.description.commands.moveDescriptionElements"
+               commandId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.moveDescriptionElements"
                label="%command.label.29"
                style="push">
             <visibleWhen
                visible="true">
          </separator>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.delete"
                label="%command.label.30"
                style="push">
          </command>
       <menuContribution
             locationURI="popup:eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView">
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.editor.derivate.delete"
                label="%command.label.52"
                style="push">
          </command>
                visible="true">
          </separator>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.editor.use.command.delete"
                label="%command.label.35"
                style="push">
          </command>
       <menuContribution
             locationURI="popup:eu.etaxonomy.taxeditor.editor.view.media">
          <command
-               commandId="taxeditor-editor.command.newimagegallery"
+               commandId="eu.etaxonomy.taxeditor.editor.media.command.newimagegallery"
                label="%command.label.37"
                style="push">
             <visibleWhen>
                visible="true">
          </separator>
          <command
-               commandId="taxeditor-editor.newimage"
+               commandId="eu.etaxonomy.taxeditor.editor.media.command.newimage"
                label="%command.label.38"
                style="push">
             <visibleWhen>
             </visibleWhen>
          </command>
          <command
-               commandId="taxeditor-editor.useExistingImage"
+               commandId="eu.etaxonomy.taxeditor.editor.media.command.useExistingImage"
                label="%command.label.50"
                style="push">
             <visibleWhen>
             </visibleWhen>
          </command>
          <command
-               commandId="taxeditor-editor.command.moveimgdown"
+               commandId="eu.etaxonomy.taxeditor.editor.media.command.moveimgdown"
                label="%command.label.39"
                style="push">
             <visibleWhen>
             </visibleWhen>
          </command>
          <command
-               commandId="taxeditor-editor.command.moveimgup"
+               commandId="eu.etaxonomy.taxeditor.editor.media.command.moveimgup"
                label="%command.label.40"
                style="push">
             <visibleWhen>
                visible="true">
          </separator>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.editor.media.command.delete"
                label="%command.label.41"
                style="push">
          </command>
                visible="true">
          </separator>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.editor.view.concept.command.delete"
                label="%command.label.44"
                style="push">
          </command>
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.name.handler.DeleteTaxonBaseHandler"
-            commandId="org.eclipse.ui.edit.delete">
+            commandId="eu.etaxonomy.taxeditor.editor.name.command.delete">
          <activeWhen>
             <and>
                <reference
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.DeleteHandler"
-            commandId="org.eclipse.ui.edit.delete">
+            commandId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.delete">
           <activeWhen>
              <with
                    variable="activePartId">
                    <equals
                          value="eu.etaxonomy.taxeditor.editor.view.media">
                    </equals>
+                   <equals
+                       value="eu.etaxonomy.taxeditor.editor.view.uses">
+                               </equals>
                 </or>
              </with>
           </activeWhen>
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.DeleteNodeHandler"
-            commandId="org.eclipse.ui.edit.delete">
+            commandId="eu.etaxonomy.taxeditor.editor.key.polytomous.command.delete">
          <activeWhen>
             <with
                   variable="activePartId">
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.view.concept.handler.DeleteConceptRelationHandler"
-            commandId="org.eclipse.ui.edit.delete">
+            commandId="eu.etaxonomy.taxeditor.editor.view.concept.command.delete">
          <activeWhen>
             <with
                   variable="activePartId">
             </with>
          </activeWhen>
       </handler>
-      <handler
-            class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.DeleteHandler"
-            commandId="org.eclipse.ui.edit.delete">
-         <activeWhen>
-            <with
-                  variable="activePartId">
-               <equals
-                     value="eu.etaxonomy.taxeditor.editor.view.uses">
-               </equals>
-            </with>
-         </activeWhen>
-      </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler"
             commandId="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler">
       </handler>
-            <handler
+      <handler
             class="eu.etaxonomy.taxeditor.editor.handler.LoadPherogramHandler"
             commandId="eu.etaxonomy.taxeditor.editor.molecular.AlignmentEditor.loadPherogram">
          <activeWhen>
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.view.derivate.handler.DeleteDerivateHandler"
-            commandId="org.eclipse.ui.edit.delete">
+            commandId="eu.etaxonomy.taxeditor.editor.view.derivate.command.delete">
          <activeWhen>
             <with
                   variable="activePartId">
             id="eu.etaxonomy.taxeditor.editor.name.changeAcceptedToSynonym"
             name="Change Accepted Taxon to Synonym">
       </command>-->
+      <command
+            categoryId="eu.etaxonomy.taxeditor.editor.taxon.name.command.category"
+            defaultHandler="eu.etaxonomy.taxeditor.editor.name.handler.DeleteTaxonBaseHandler"
+            id="eu.etaxonomy.taxeditor.editor.name.delete"
+            name="%command.name.45">
+      </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.taxon.name.command.category"
             defaultHandler="eu.etaxonomy.taxeditor.editor.name.handler.DeleteAllEmptyNamesHandler"
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.category"
             defaultHandler="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.CreateDescriptionElementHandler"
-            id="eu.etaxonomy.taxeditor.editor.description.createDescriptionElement"
+            id="eu.etaxonomy.taxeditor.editor.view.descriptive.command.createDescriptionElement"
             name="%command.name.10">
       </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.category"
             defaultHandler="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.CreateDescriptionHandler"
-            id="eu.etaxonomy.taxeditor.description.commands.adddescription"
+            id="eu.etaxonomy.taxeditor.editor.view.descriptive.command.adddescription"
             name="%command.name.11">
       </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.category"
-            defaultHandler="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.MoveDescriptionElementsHandler"
-            id="eu.etaxonomy.taxeditor.description.commands.moveDescriptionElements"
-            name="%command.name.12">
-      </command>
-      <command
-            categoryId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.category"
-            defaultHandler="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.MoveDescriptionToOtherTaxonHandler"
-            id="eu.etaxonomy.taxeditor.editor.commands.description.moveDescriptionToTaxon"
-            name="%command.name.13">
+             defaultHandler="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.DeleteHandler"
+             id="eu.etaxonomy.taxeditor.editor.view.descriptive.command.delete"
+             name="%command.name.48">
       </command>
       <category
             id="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
             id="eu.etaxonomy.taxeditor.use.commands.adduse"
             name="%command.name.14">
       </command>
+      <command
+            categoryId="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.uses.handler.CreateUseRecordHandler"
+            id="eu.etaxonomy.taxeditor.editor.use.createUseRecord"
+            name="%command.name.16">
+      </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
             defaultHandler="eu.etaxonomy.taxeditor.editor.view.uses.handler.CreateUseSummaryHandler"
             name="%command.name.15">
       </command>
       <command
-            categoryId="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
-            defaultHandler="eu.etaxonomy.taxeditor.editor.view.uses.handler.CreateUseRecordHandler"
-            id="eu.etaxonomy.taxeditor.editor.use.createUseRecord"
-            name="%command.name.16">
+            id="eu.etaxonomy.taxeditor.editor.use.command.delete"
+            name="%command.name.47">
       </command>
       <category
             id="eu.etaxonomy.taxeditor.editor.media.category"
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.media.category"
             defaultHandler="eu.etaxonomy.taxeditor.editor.view.media.handler.MoveImageDownInListHandler"
-            id="taxeditor-editor.command.moveimgdown"
+            id="eu.etaxonomy.taxeditor.editor.media.command.moveimgdown"
             name="%command.name.19">
       </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.media.category"
             defaultHandler="eu.etaxonomy.taxeditor.editor.view.media.handler.AddImageGalleryHandler"
-            id="taxeditor-editor.command.newimagegallery"
+            id="eu.etaxonomy.taxeditor.editor.media.command.newimagegallery"
             name="%command.name.20">
       </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.media.category"
             defaultHandler="eu.etaxonomy.taxeditor.editor.view.media.handler.CreateMediaHandler"
-            id="taxeditor-editor.newimage"
+            id="eu.etaxonomy.taxeditor.editor.media.command.newimage"
             name="%command.name.21">
       </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.media.category"
             defaultHandler="eu.etaxonomy.taxeditor.editor.view.media.handler.AddExistingMediaHandler"
-            id="taxeditor-editor.useExistingImage"
+            id="eu.etaxonomy.taxeditor.editor.media.command.useExistingImage"
             name="%command.name.37">
       </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.media.category"
             defaultHandler="eu.etaxonomy.taxeditor.editor.view.media.handler.MoveImageUpInListHandler"
-            id="taxeditor-editor.command.moveimgup"
+            id="eu.etaxonomy.taxeditor.editor.media.command.moveimgup"
             name="%command.name.22">
+      </command>
+       <command
+            categoryId="eu.etaxonomy.taxeditor.editor.media.category"
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.DeleteHandler"
+            id="eu.etaxonomy.taxeditor.editor.media.command.delete"
+            name="%command.name.49">
       </command>
       <category
             id="eu.etaxonomy.taxeditor.editor.new.category"
             id="eu.etaxonomy.taxeditor.key.command.applyLayout"
             name="%command.name.31">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.DeleteNodeHandler"
+            id="eu.etaxonomy.taxeditor.key.polytomous.command.delete"
+            name="%command.name.50">
+      </command>
       <category
             id="eu.etaxonomy.taxeditor.editor.view.concept.category"
             name="%category.name.6">
             name="%command.name.42">
          <commandParameter
                id="eu.etaxonomy.taxeditor.editor.taxonParameter"
-               name="taxonUUID"
+               name="%commandParameter.name"
                optional="false"
                typeId="eu.etaxonomy.taxeditor.editor.taxonParameterType">
          </commandParameter>
             id="eu.etaxonomy.taxeditor.editor.derivate.deepDelete"
             name="%command.name.44">
       </command>
+      <command
+            categoryId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.category"
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.MoveDescriptionToOtherTaxonHandler"
+            id="eu.etaxonomy.taxeditor.editor.commands.description.moveDescriptionToTaxon"
+            name="%command.name.13">
+      </command>
+      <command
+            categoryId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.category"
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.MoveDescriptionElementsHandler"
+            id="eu.etaxonomy.taxeditor.description.commands.moveDescriptionElements"
+            name="%command.name.12">
+      </command>
       <command
             defaultHandler="eu.etaxonomy.taxeditor.editor.handler.EditSequenceHandler"
             id="eu.etaxonomy.taxeditor.editor.editSequence"
index 412cabedd6d2856c44bc4ff79b8d2a5a089f1b51..318191f82fa760fed8d2b965fd9bf183f57cb0a0 100644 (file)
@@ -47,9 +47,9 @@ public class OpenDerivateViewHandler extends AbstractHandler {
                 try {
                     EditorUtil.open(input);
                 } catch (PartInitException e) {
-                    MessagingUtils.error(OpenDerivateViewHandler.class, "Could not open Derivate Editor", e);
+                    MessagingUtils.error(OpenDerivateViewHandler.class, "Could not open Derivative Editor", e);
                 } catch (NullPointerException npe){
-                    MessagingUtils.messageDialog("Failed to open Editor", OpenDerivateViewHandler.class, "Could not open Derivate Editor. The derivate hierarchy is corrupted!", npe);
+                    MessagingUtils.messageDialog("Failed to open Editor", OpenDerivateViewHandler.class, "Could not open Derivative Editor. The derivate hierarchy is corrupted!", npe);
                 }
             }
             else{
index c1362a2872339f0d1db37602736cbd51b5edd5f8..2c24b900473a00c1a23fd61601f4a40fc167928a 100644 (file)
@@ -3,7 +3,6 @@
  */
 package eu.etaxonomy.taxeditor.editor.name.dnd;
 
-import org.eclipse.swt.SWTException;
 import org.eclipse.swt.dnd.DragSourceEffect;
 import org.eclipse.swt.dnd.DragSourceEvent;
 import org.eclipse.swt.widgets.Control;
@@ -35,9 +34,8 @@ public class NameEditorDragSourceEffect extends DragSourceEffect {
        /** {@inheritDoc} */
        @Override
        public void dragFinished(DragSourceEvent event) {
+               // TODO Auto-generated method stub
                super.dragFinished(event);
-               
        }
        
-       
 }
index f04ccb16d5502f8d478a521af2473926eb7c1300..c8bccaa26f795ba7294ed37f037927e00c138a89 100644 (file)
@@ -9,7 +9,6 @@ import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.DropTargetAdapter;
 import org.eclipse.swt.dnd.DropTargetEvent;
 
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.reference.Reference;
@@ -69,9 +68,7 @@ public class NameEditorDropTargetListener extends DropTargetAdapter {
        
        /** {@inheritDoc} */
        public void drop(DropTargetEvent dropTargetEvent) {
-               if (!EditorUtil.forceUserSave(target.getEditor(), dropTargetEvent.display.getActiveShell())){
-                       return ;
-               }
+               
                TaxonBase taxonBase = getDroppedTaxonBase(dropTargetEvent);
                
                Assert.isNotNull(taxonBase);
@@ -105,7 +102,6 @@ public class NameEditorDropTargetListener extends DropTargetAdapter {
        
        private AbstractPostOperation createOperation(TaxonBase taxonBase) {
                
-               
                if(taxonBase instanceof Synonym){
                        Synonym synonym = (Synonym) taxonBase;
                        
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/MoveSynonymToAnotherAcceptedTaxonHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/MoveSynonymToAnotherAcceptedTaxonHandler.java
new file mode 100644 (file)
index 0000000..8219866
--- /dev/null
@@ -0,0 +1,82 @@
+package eu.etaxonomy.taxeditor.editor.name.handler;\r
+\r
+import java.util.UUID;\r
+\r
+import org.apache.log4j.Logger;\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.common.NotDefinedException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.jface.dialogs.MessageDialog;\r
+import org.eclipse.jface.viewers.StructuredSelection;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.eclipse.ui.IEditorInput;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+\r
+import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
+import eu.etaxonomy.cdm.model.taxon.Synonym;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
+import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;\r
+import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;\r
+import eu.etaxonomy.taxeditor.editor.name.operation.MoveSynonymToAnotherAcceptedTaxonOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;\r
+\r
+public class MoveSynonymToAnotherAcceptedTaxonHandler extends AbstractHandler implements IPostOperationEnabled {\r
+       private static final Logger logger = Logger\r
+       .getLogger(MoveSynonymToAnotherAcceptedTaxonHandler.class);\r
+       private MultiPageTaxonEditor editor;\r
+       \r
+       @Override\r
+       public Object execute(ExecutionEvent event) throws ExecutionException {\r
+               editor =  (MultiPageTaxonEditor) HandlerUtil.getActiveEditor(event);\r
+               Shell shell = HandlerUtil.getActiveShell(event);\r
+               IEditorInput input = editor.getEditorInput();\r
+               if (!EditorUtil.forceUserSave(editor, shell)) {\r
+                       return null;\r
+               }\r
+               \r
+               if (!(input instanceof TaxonEditorInput)) {\r
+                       logger.error("Editor input is not TaxonEditorInput");\r
+                       return null;\r
+               }\r
+\r
+               // Get synonym from selection\r
+               StructuredSelection selection = (StructuredSelection) HandlerUtil.getCurrentSelection(event);\r
+               if (!(selection.getFirstElement() instanceof Synonym)) {\r
+                       logger.error("Selection does not contain a Synonym");\r
+                       return null;\r
+               }\r
+\r
+               Synonym synonym = (Synonym) selection.getFirstElement();\r
+               TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select new accepted taxon", null, null, null);\r
+               Taxon oldParent = ((TaxonEditorInput)input).getTaxon();\r
+       \r
+                       MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon of Synonym", EditorUtil.getUndoContext(),\r
+                                       oldParent.getUuid(), synonym.getUuid(), newParentNode.getTaxon(), editor);\r
+                       \r
+                       EditorUtil.executeOperation(operation);\r
+       \r
+\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public boolean postOperation(CdmBase objectAffectedByOperation) {\r
+               // TODO Auto-generated method stub\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public boolean onComplete() {\r
+               // TODO Auto-generated method stub\r
+               return false;\r
+       }\r
+       \r
+       \r
+\r
+}\r
index 637b5f722a50d515483de225e1eeec0c64dff21a..2509f76320aab1a0ace0517828a9ad57b851077f 100644 (file)
@@ -1040,4 +1040,20 @@ public class TransientOccurenceService implements IOccurrenceService {
            return defaultService.countOccurrences(config);
        }
 
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public List<DerivedUnit> getAllChildDerivatives(SpecimenOrObservationBase<?> specimen) {
+           return defaultService.getAllChildDerivatives(specimen);
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public List<SpecimenOrObservationBase<?>> getAllHierarchyDerivatives(SpecimenOrObservationBase<?> specimen) {
+           return defaultService.getAllHierarchyDerivatives(specimen);
+       }
+
 }
index 8dc0e35a4d194e0638e7354ff64d19437d6ae50b..7548960d901fee8e5cf57967c11d847e1f60866a 100644 (file)
@@ -166,7 +166,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
             DerivateViewEditorInput derivateViewEditorInput = (DerivateViewEditorInput) getEditorInput();
             return derivateViewEditorInput.getName();
         }
-        return "Derivate View";
+        return "Derivative View";
     }
 
     /* (non-Javadoc)
index ab74d55aa71945cc35d8b087279c8a4d84958ebe..5f29227659bd535f89c4bc3708723831b6f2f646 100644 (file)
@@ -61,16 +61,16 @@ public class OpenDerivateEditorForTaxonHandler extends AbstractHandler {
                 }
             }
             if(derivateUuids.isEmpty()){
-                MessagingUtils.warningDialog("Could not open Derivate Editor", this, "No Derivates found");
+                MessagingUtils.warningDialog("Could not open Derivative Editor", this, "No Derivatives found");
                 return null;
             }
             DerivateViewEditorInput input = new DerivateViewEditorInput(derivateUuids);
             try {
                 EditorUtil.open(input);
             } catch (PartInitException e) {
-                MessagingUtils.error(OpenDerivateViewHandler.class, "Could not open Derivate Editor", e);
+                MessagingUtils.error(OpenDerivateViewHandler.class, "Could not open Derivative Editor", e);
             } catch (NullPointerException npe){
-                MessagingUtils.messageDialog("Failed to open Editor", OpenDerivateViewHandler.class, "Could not open Derivate Editor. The derivate hierarchy is corrupted!", npe);
+                MessagingUtils.messageDialog("Failed to open Editor", OpenDerivateViewHandler.class, "Could not open Derivative Editor. The derivative hierarchy is corrupted!", npe);
             }
         }
         return null;
index 960548975c864b53f0af55eab51c3ffe555c0a34..b863dcbe28a14aa047007dccf5189f11df1cd582 100644 (file)
@@ -63,7 +63,7 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
             derivateView = (DerivateView) getPostOperationEnabled();
         }
         if(derivateView==null){
-            MessagingUtils.operationDialog(this, new NullPointerException("DerivateView was null"), TaxeditorEditorPlugin.PLUGIN_ID, this.getLabel(), getLabel());
+            MessagingUtils.operationDialog(this, new NullPointerException("DerivativeView was null"), TaxeditorEditorPlugin.PLUGIN_ID, this.getLabel(), getLabel());
             return Status.CANCEL_STATUS;
         }
         if(derivateView.isDirty()){
@@ -79,7 +79,7 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
             return postExecute(null);
         }
         else{
-            MessagingUtils.warningDialog("Moving derivate not possible!", derivateView, "Moving \""+derivateView.getLabelProvider().getDerivateText(draggedNode)+"\" to \""+derivateView.getLabelProvider().getDerivateText(targetNode)+"\" is not possible!");
+            MessagingUtils.warningDialog("Moving derivatives not possible!", derivateView, "Moving \""+derivateView.getLabelProvider().getDerivateText(draggedNode)+"\" to \""+derivateView.getLabelProvider().getDerivateText(targetNode)+"\" is not possible!");
         }
         return Status.CANCEL_STATUS;
     }
index a8ea15156ffc0a225781f8c295c53f3f2fe84003..f9ce58ed0730808ef5ab53f8ac0852521db00026 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -21,17 +21,19 @@ import eu.etaxonomy.taxeditor.model.DescriptionHelper;
  * @version $Id: $
  */
 public class DescriptiveLabelProvider extends ColumnLabelProvider implements IStyledLabelProvider  {
-       
+
        /** {@inheritDoc} */
-       public String getText(Object element) {
+       @Override
+    public String getText(Object element) {
                return DescriptionHelper.getLabel(element);
-       }               
+       }
 
        /* (non-Javadoc)
         * @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText(java.lang.Object)
         */
        /** {@inheritDoc} */
-       public StyledString getStyledText(Object element) {
+       @Override
+    public StyledString getStyledText(Object element) {
                return new StyledString(getText(element), StyledString.QUALIFIER_STYLER);
        }
 }
index f9541aa3ec5580324687e36ce093820a98c5ab85..7556a73d2612f9b93ca11525614197de02a0c09a 100644 (file)
@@ -150,7 +150,7 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
                         EditorUtil.open(new DerivateViewEditorInput(specimenUuids));
                     }
                 } catch (PartInitException e) {
-                    MessagingUtils.error(DescriptiveViewPart.class, "Could not open Derivate Editor", e);
+                    MessagingUtils.error(DescriptiveViewPart.class, "Could not open Derivative Editor", e);
                 }
 
 
index 76c4d76a9e53728179dc90d007c9c5769e29b9cd..a16125b363d537438780edb3807aeb6a6c9b0241 100644 (file)
@@ -40,7 +40,7 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 public class CreateDescriptionElementOperation extends AbstractPostTaxonOperation {
 
        /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.descripti"{trunked}</code> */
-       public static final String ID = "eu.etaxonomy.taxeditor.editor.description.createDescriptionElement";
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.descriptive.command.createDescriptionElement";
 
        private final DescriptionBase<?> description;
        private final Feature feature;
index 5324d4e40d18cc2537133b33fd2b0237dee23ff7..5a6cebd41ada0fb17b00e2184025bbf119f9adbc 100644 (file)
@@ -9,6 +9,9 @@
 
 package eu.etaxonomy.taxeditor.editor.view.descriptive.operation;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IAdaptable;
@@ -59,7 +62,10 @@ public class DeleteTaxonDescriptionOperation extends AbstractPostTaxonOperation
 
                monitor.worked(20);
                if (description != null){
-                       CdmStore.getService(IDescriptionService.class).deleteDescription(description);
+                       List<String> propertyPaths = new ArrayList<String>();
+                       propertyPaths.add("taxon");
+                       TaxonDescription loadedDescription = (TaxonDescription) CdmStore.getService(IDescriptionService.class).load(description.getUuid(), propertyPaths);
+                       CdmStore.getService(IDescriptionService.class).deleteDescription(loadedDescription);
                        return postExecute(description);
                }
                return null;
index 0e4a261059b225fe59d662dbec7a4aef007943dd..cf5aa8cc74f88054b13f14a92ae81914b11f3ec7 100644 (file)
@@ -72,7 +72,12 @@ public class MediaContentProvider implements ITreeContentProvider{
                }
                else if (parentElement instanceof DescriptionBase) {
                        if (((DescriptionBase) parentElement).isImageGallery()) {
-                               return getImages((DescriptionBase) parentElement).toArray();
+                               List<Media> images =  getImages((DescriptionBase) parentElement);
+                               if (images != null){
+                                       return images.toArray();
+                               } 
+                               return null;
+                               
                        }
                }
                else if (parentElement instanceof DerivedUnit){
@@ -111,6 +116,9 @@ public class MediaContentProvider implements ITreeContentProvider{
        /** {@inheritDoc} */
        @Override
     public boolean hasChildren(Object element) {
+               if (getChildren(element)== null) {
+                       return false;
+               }
                return (getChildren(element).length > 0);
        }
 
@@ -139,10 +147,12 @@ public class MediaContentProvider implements ITreeContentProvider{
                        if(elements.size() > 1){
                                MessagingUtils.error(this.getClass(), "There should be one and only one description element to hold the images. Found: " + elements.size() + " InDescription ID: " + description.getUuid(), null);
                        }
+                       if (!elements.isEmpty()){
+                               DescriptionElementBase element = elements.iterator().next();
+                               return element.getMedia();
+                       }
 
-                       DescriptionElementBase element = elements.iterator().next();
-
-                       return element.getMedia();
+                       
                }
                return null;
        }
index 30ed8dda9b361dbf2c1b1d88aa2cd4baf8080ad2..ebaea0fbcc51dc2a5147b761a3a3097adce0f92a 100644 (file)
@@ -55,6 +55,8 @@
       <import plugin="org.eclipse.jface"/>
       <import plugin="org.eclipse.swt"/>
       <import plugin="org.eclipse.equinox.common" version="3.6.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.update.configurator"/>
+      <import plugin="org.eclipse.equinox.p2.publisher.eclipse"/>
    </requires>
 
    <plugin
index 2317fff545aff5dbe3fe426150b95c7e81653e71..5caf3402c685bcb28702864b1a12a66c5b6d29ae 100644 (file)
                visible="true">
          </separator>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.navigation.command.delete"
                label="%command.label.10"
                style="push">
             <visibleWhen
                style="push">
             <visibleWhen
                   checkEnabled="true">
-               <reference
-                     definitionId="isCdmStoreConnected">
-               </reference>
+               <and>
+                  <reference
+                        definitionId="isCdmStoreConnected">
+                  </reference>
+                  <reference
+                        definitionId="isTaxonNode">
+                  </reference></and>
             </visibleWhen>
          </command>
       </menuContribution>
                visible="true">
          </separator>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.command.delete"
                label="%command.label.19"
                style="push">
          </command>
             id="eu.etaxonomy.taxeditor.navigation.navigator.handler.OpenFixClassificationHierarchyHandler"
             name="%command.name.10">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.DeleteHandler"
+            id="eu.etaxonomy.taxeditor.navigation.command.delete"
+            name="delete">
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.handlers">
       <handler
             class="eu.etaxonomy.taxeditor.navigation.navigator.handler.DeleteHandler"
-            commandId="org.eclipse.ui.edit.delete">
+            commandId="eu.etaxonomy.taxeditor.navigation.navigator.command.delete">
          <activeWhen>
             <with
                   variable="activePartId">
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.DeleteHandler"
-            commandId="org.eclipse.ui.edit.delete">
+            commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.command.delete">
          <activeWhen>
             <with
                   variable="activePartId">
          class="eu.etaxonomy.taxeditor.preference.PreferencePropertyTester"
          id="eu.etaxonomy.taxeditor.preferences.propertyTester"
          namespace="eu.etaxonomy.taxeditor.preferences.propertyTester"
-         properties="isCdmStoreConnected, isShowExperimentalFeatures, isChecklistEditorEnabled"
+         properties="isShowExperimentalFeatures, isChecklistEditorEnabled"
          type="org.eclipse.jface.viewers.IStructuredSelection">
    </propertyTester>
+   <propertyTester
+         class="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
+         id="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
+         namespace="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
+         properties="isCdmStoreConnected"
+         type="java.lang.Object">
+   </propertyTester>
    </extension>
    <extension
          point="org.eclipse.core.expressions.definitions">
       </definition>
       <definition
             id="isCdmStoreConnected">
-         <with
-               variable="selection">
-            <test
-                  property="eu.etaxonomy.taxeditor.preferences.propertyTester.isCdmStoreConnected">
-            </test>
-         </with>
+         <test
+               property="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester.isCdmStoreConnected">
+         </test>
       </definition>
       <definition
             id="isShowExperimentalFeatures">
index e10a6488ebc67b0c259c24d621cb80d624b9ab6b..3913e0a2922c3eec1cc9e992e54b697fa4413d30 100644 (file)
@@ -11,6 +11,7 @@
 package eu.etaxonomy.taxeditor.navigation.navigator;
 
 import java.util.ArrayList;
+import java.util.Comparator;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Observable;
@@ -32,12 +33,14 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.IClassificationService;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonComparatorSearch;
+import eu.etaxonomy.cdm.model.taxon.TaxonNaturalComparator;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.DataChangeBridge;
 import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.LoginManager;
 
@@ -76,8 +79,12 @@ public class TaxonNavigator extends CommonNavigator implements
        /** {@inheritDoc} */
        @Override
        protected IAdaptable getInitialInput() {
-
-               TaxonComparatorSearch comparator = new TaxonComparatorSearch();
+               Comparator comparator;
+               if (PreferencesUtil.getSortNodesNaturally()){
+                       comparator = new TaxonNaturalComparator();
+               } else{
+                       comparator = new TaxonComparatorSearch();
+               }
                TaxonNodeComparator viewerComparator = new TaxonNodeComparator(comparator);
                this.getCommonViewer().setComparator(viewerComparator);
         setLinkingEnabled(true);
index b049f86c057dcef7abd10da1db804a81d02ea18e..67c826f0da6976847e107c9780f582fc3596912d 100644 (file)
@@ -12,13 +12,14 @@ import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.taxon.Classification;\r
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
 import eu.etaxonomy.cdm.model.taxon.TaxonComparatorSearch;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonNaturalComparator;\r
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
 import eu.etaxonomy.taxeditor.ui.section.supplemental.IdentifiableSourceElement;\r
 \r
 public class TaxonNodeComparator extends ViewerComparator{\r
 \r
        \r
-       public TaxonNodeComparator(TaxonComparatorSearch comparator) {\r
+       public TaxonNodeComparator(Comparator<TaxonBase> comparator){\r
                super(comparator);\r
        }\r
 \r
@@ -29,7 +30,11 @@ public class TaxonNodeComparator extends ViewerComparator{
                if (e1 instanceof Classification && e2 instanceof Classification){\r
                        return ((Classification)e1).getTitleCache().compareTo(((Classification)e2).getTitleCache());\r
                } else{\r
-                       return this.getComparator().compare(((TaxonNode)e1).getTaxon(),((TaxonNode)e2).getTaxon());\r
+                       if (this.getComparator() instanceof TaxonNaturalComparator){\r
+                               return this.getComparator().compare((TaxonNode)e1, (TaxonNode)e2);\r
+                       }else{\r
+                               return this.getComparator().compare(((TaxonNode)e1).getTaxon(),((TaxonNode)e2).getTaxon());\r
+                       }\r
                }\r
        }\r
 }\r
index fbf20ea45cfa2e92d287b62520ef53496af2493f..86eb9506f926fd1267fbb4f1a23972d0ff3d4663 100644 (file)
@@ -19,12 +19,15 @@ import org.apache.log4j.Logger;
 import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.IconAndMessageDialog;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.swt.dnd.DropTargetEvent;
 import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.navigator.CommonDropAdapter;
 import org.eclipse.ui.navigator.CommonDropAdapterAssistant;
@@ -39,6 +42,7 @@ import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -65,6 +69,7 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
        public IStatus handleDrop(CommonDropAdapter dropAdapter,
                        DropTargetEvent dropTargetEvent, Object target) {
 
+               
                if (target instanceof ITaxonTreeNode) {
                        Set<TaxonNode> taxonNodes = getSelectedTaxa();
                        ITaxonTreeNode targetTreeNode = (ITaxonTreeNode) target;
@@ -82,7 +87,7 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                }
             }
                }
-
+               
                return Status.CANCEL_STATUS;
        }
 
@@ -171,51 +176,64 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                if(targetITaxonTreeNode instanceof TaxonNode){
 
                        TaxonNode targetTaxonNode = (TaxonNode) targetITaxonTreeNode;
-
-//                     for(TaxonNode taxonNode : taxonNodes){
-//                             if (taxonNode.equals(targetTaxonNode)) {
-//                                     return Status.CANCEL_STATUS;
-//                             }
-//                     }
-
-                       // Make sure parent taxon does not have unsaved changes
+               // Make sure parent taxon does not have unsaved changes
                        if (NavigationUtil.isDirty(targetTaxonNode)){
                                MessageDialog.openWarning(NavigationUtil.getShell(), "Unsaved Parent Taxon", "There are unsaved " +
                                "changes in the parent taxon. Pleas save first.");
                                return Status.CANCEL_STATUS;
                        }
 
-                       
-                       /*if (((TaxonNode) targetITaxonTreeNode).isTopmostNode()) {
-                               MessageDialog.openConfirm(null, "Taxonnode can not be moved", "A taxonnode can not be moved to the classification");
-                       }*/
-
-                       // Make sure parentTaxon is not the drop target
-//                     if (!childTaxonNode.isTopmostNode() && childTaxonNode.getParent().equals(targetTaxonNode)){
-//                             return Status.CANCEL_STATUS;
-//                     }
-
-                       // Make sure taxon is not being dropped onto itself
-//                     if (childTaxonNode.equals(targetTaxonNode)) {
-//                             return Status.CANCEL_STATUS;
-//                     }
-
-
-
                }
-
-               IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
-               if (workspaceUndoContext == null) {
-                       logger.error("Workspace undo context is null. DND operation cancelled");
-                       return Status.CANCEL_STATUS;
-               }
-
-               AbstractPostOperation operation = new MoveTaxonOperation
-                               ("Move Taxon", workspaceUndoContext, taxonNode, targetITaxonTreeNode, this, taxonNavigator);
-               NavigationUtil.executeOperation(operation);
+               if (!PreferencesUtil.getSortNodesNaturally()){
+                       IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
+                       if (workspaceUndoContext == null) {
+                               logger.error("Workspace undo context is null. DND operation cancelled");
+                               return Status.CANCEL_STATUS;
+                       }
+       
+                       AbstractPostOperation operation = new MoveTaxonOperation
+                                       ("Move Taxon", workspaceUndoContext, taxonNode, targetITaxonTreeNode, this, taxonNavigator, true);
+                       NavigationUtil.executeOperation(operation);
+                       
+                       logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+                       return Status.OK_STATUS;
+               }else{
+                       String[] buttonLables = {"Parent", "Predecessor", "Cancel"};
+                       MessageDialog dialog = new MessageDialog(null, "Target node", null, "Do you want to use the target node as parent or do you want to move the taxon below the target.", MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
+                       dialog.open();
+                       int returnCode = dialog.getReturnCode();
+                       if (returnCode == 0){
+                               IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
+                               if (workspaceUndoContext == null) {
+                                       logger.error("Workspace undo context is null. DND operation cancelled");
+                                       return Status.CANCEL_STATUS;
+                               }
+               
+                               AbstractPostOperation operation = new MoveTaxonOperation
+                                               ("Move Taxon", workspaceUndoContext, taxonNode, targetITaxonTreeNode, this, taxonNavigator, true);
+                               NavigationUtil.executeOperation(operation);
+                               
+                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+                               return Status.OK_STATUS;
+                       }else if (returnCode == 1){
+                               IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
+                               if (workspaceUndoContext == null) {
+                                       logger.error("Workspace undo context is null. DND operation cancelled");
+                                       return Status.CANCEL_STATUS;
+                               }
                
-               logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
-               return Status.OK_STATUS;
+                               AbstractPostOperation operation = new MoveTaxonOperation
+                                               ("Move Taxon", workspaceUndoContext, taxonNode, targetITaxonTreeNode, this, taxonNavigator, false);
+                               NavigationUtil.executeOperation(operation);
+                               
+                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+                               return Status.OK_STATUS;
+                       } else{
+                               return Status.CANCEL_STATUS;
+                       }
+                       
+                       
+               }
        }
 
        /* (non-Javadoc)
index ba681d70c4affeae78491497ba7ebeebf04c73a0..4c84b0197943fbdcd70f5ab5564839119aa1cef6 100644 (file)
@@ -41,8 +41,10 @@ import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionNaturalOrderDialog;
 
 /**
  * <p>MoveTaxonHandler class.</p>
@@ -87,8 +89,15 @@ public class MoveTaxonHandler extends AbstractHandler implements IPostOperationE
                
 //             TaxonNode taxonNode = (TaxonNode) selection.getFirstElement();
                if (taxonNode != null){
-                       parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), "Choose new parent", excludeTaxa, null, null);
-                       
+                       boolean moveToNewParent = true; 
+                       if (PreferencesUtil.getSortNodesNaturally()){
+                               if(!MessageDialog.openQuestion(null, "Target node", "The choosen target node should be the parent?")){
+                                       moveToNewParent = false;
+                               }
+                               parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), "Choose the taxon above the moved taxon.", excludeTaxa, null, null);
+                       }else{
+                               parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), "Choose new parent", excludeTaxa, null, null);
+                       }
                        if(parentTaxonNode != null){
                                if(NavigationUtil.isDirty(parentTaxonNode)){
                                        MessageDialog.openWarning(HandlerUtil.getActiveShell(event), "Unsaved Parent Taxon", "There are unsaved " +
@@ -98,7 +107,7 @@ public class MoveTaxonHandler extends AbstractHandler implements IPostOperationE
                                
                                AbstractPostOperation operation = new MoveTaxonOperation
                                                ("Move taxon to new parent", NavigationUtil.getUndoContext(),
-                                                               taxonNode, parentTaxonNode, taxonNavigator, taxonNavigator); //$NON-NLS-1$
+                                                               taxonNode, parentTaxonNode, taxonNavigator, taxonNavigator, moveToNewParent); //$NON-NLS-1$
                                NavigationUtil.executeOperation(operation);
                                taxonNavigator.refresh();
                        
index 16011b6cb116496d6a82685319c978ea1102bc05..bd2b57db5ecb6f2daebf24ad111b936ad3e5ad93 100644 (file)
@@ -53,7 +53,7 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
        //private Map<TaxonNode, ITaxonTreeNode> oldParentTreeNodes;
 
        private TaxonNode taxonNode;
-
+       private boolean moveToParentNode;
        /**
         * <p>Constructor for MoveTaxonOperation.</p>
         *
@@ -65,7 +65,7 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
         * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
         */
        public MoveTaxonOperation(String label, IUndoContext undoContext,
-                       TaxonNode taxonNodeToMove, ITaxonTreeNode newParentTreeNode, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled) {
+                       TaxonNode taxonNodeToMove, ITaxonTreeNode newParentTreeNode, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled, boolean moveToParentNode) {
                super(label, undoContext, postOperationEnabled, conversationEnabled);
                
                this.taxonNode = taxonNodeToMove;
@@ -74,7 +74,7 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
                }*/
                
                this.newParentTreeNode = newParentTreeNode;
-
+               this.moveToParentNode = moveToParentNode;
                // Save old parent ITaxonTreeNodes for undo
                
                //this.parentNode = taxonNode.getParent();
@@ -90,7 +90,7 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
                bind();
                monitor.worked(20);
 
-               UpdateResult result = CdmStore.getService(ITaxonNodeService.class).moveTaxonNode(this.taxonNode.getUuid(),newParentTreeNode.getUuid());
+               UpdateResult result = CdmStore.getService(ITaxonNodeService.class).moveTaxonNode(this.taxonNode.getUuid(),newParentTreeNode.getUuid(), moveToParentNode);
 //             try {
 //                     for (TaxonNode taxonNode : taxonNodes){
 //                             TaxonNode newTaxonNode = newParentTreeNode.addChildNode(taxonNode,
index d2e8b5c5c00ef9ca9fec645c2a98b3275f1de76e..a13d96793be297842565f4adad8c6dd84442ae23 100644 (file)
@@ -33,10 +33,10 @@ view.name.2 = Reporting
 view.name.3 = Supplemental Data\r
 view.name.4 = Details\r
 view.name.5 = Use Records\r
-view.name.6 = Derivate Search\r
+view.name.6 = Derivative Search\r
 editor.name = Defined Term Editor\r
 menu.label = Show View\r
-command.label = Derivate Search\r
+command.label = Derivative Search\r
 command.label.0 = Details\r
 command.label.1 = Supplemental\r
 command.label.2 = Datasource\r
@@ -130,4 +130,29 @@ page.name.28 = Checklist Editor
 page.name.29 = Editor Profile\r
 page.name.30 = Language\r
 command.label.clone = Clone\r
-command.label.openInSpecimenEditor = Open in Specimen Editor
\ No newline at end of file
+command.label.openInSpecimenEditor = Open in Specimen Editor\r
+page.name.31 = Order of Taxonnodes\r
+extension.name.0 = Popup Menu Commands\r
+command.name.8 = Clone Datasource\r
+command.name.9 = Open Feature Tree Editor Wizard\r
+command.name.10 = Open Password Wizzard\r
+command.name.11 = Open Distribution Editor Wizard\r
+command.name.12 = Connect\r
+wizard.name.18 = CSV\r
+wizard.name.19 = CSV_NAME\r
+wizard.name.20 = CSV_PRINT\r
+activity.description = DELETE permission dependent ui contributions\r
+activity.name = Delete\r
+activity.description.0 = UPDATE permission dependent ui contributions\r
+activity.name.0 = Update\r
+activity.description.1 = CREATE permission dependent ui contributions\r
+activity.name.1 = Delete\r
+activity.description.2 = ROLE_USER_MANAGER dependent ui contributions\r
+activity.name.2 = UserManagement\r
+activity.description.3 = ROLE_PROJECT_MANAGER dependent ui contributions\r
+activity.name.3 = ProjectManagement\r
+extension-point.name = Cdm Viewer\r
+Bundle-Vendor = EDIT\r
+Bundle-Name = DataStore Bundle\r
+command.name.13 = delete\r
+command.name.14 = delete
\ No newline at end of file
index bad7e8f5491bfc85002307bebdef6325732479d4..9d02cb1d2161281aeb6db9994cc46588b4536df7 100644 (file)
@@ -14,3 +14,5 @@ LanguageEditorPreferencePage_ChooseDefaultLanguage=Please choose your default la
 LanguageEditorPreferencePage_EditorHasToRestart=The application has to be restarted, in order to complete the language switch.\nDo you want to restart now?\r
 LanguageEditorPreferencePage_PleaseRestart=Please Restart\r
 LanguageEditorPreferencePage_RestartRequired=After changing the default language, a restart is required,\nin order for the new settings to take effect.\r
+OrderPreferencePage_NewNavigatorWindowRequired=After changing the order of the taxon nodes, closing and reopen of the taxon navigator is required.\r
+OrderPreferencePage_PleaseReopenNavigator=Please close and reopen the taxon navigator.
\ No newline at end of file
index fcbc5af1d7f84f776606345355a75c23e98b50e0..3c18fec10e3b677c3d05f72f09091afde89a3769 100644 (file)
@@ -13,4 +13,5 @@ CdmDataSourceViewPart_9=Verf\u00FCgbar
 LanguageEditorPreferencePage_ChooseDefaultLanguage=Bitte wählen Sie die Standardsprache für den Taxonomischen Editor aus.\r
 LanguageEditorPreferencePage_EditorHasToRestart=Der Anwendung muss neu gestartet werden, um die Sprache zu wechseln.\nWollen Sie jetzt neu starten?\r
 LanguageEditorPreferencePage_PleaseRestart=Bitte neu starten\r
-LanguageEditorPreferencePage_RestartRequired=Nach dem Wechsel der Standardsprache ist ein Neustart erforderlich.
\ No newline at end of file
+LanguageEditorPreferencePage_RestartRequired=Nach dem Wechsel der Standardsprache ist ein Neustart erforderlich.\r
+OrderPreferencePage_NewNavigatorWindowRequired=Nach dem Ändern der Taxon Sortierung, ist das Schließen und erneute Öffnen des taxon Navigators erforderlich.
\ No newline at end of file
index 5bfa3d750c4668048ede557c0077b9035dd88850..37c33cdfeb15a1690faac784e1c68b90427e895a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.2"?>
 <plugin>
-   <extension-point id="eu.etaxonomy.taxeditor.store.cdmViewer" name="Cdm Viewer" schema="schema/eu.etaxonomy.taxeditor.store.cdmViewer.exsd"/>
+   <extension-point id="eu.etaxonomy.taxeditor.store.cdmViewer" name="%extension-point.name" schema="schema/eu.etaxonomy.taxeditor.store.cdmViewer.exsd"/>
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
             id="eu.etaxonomy.taxeditor.preference.defaultlanguagepditorpreferencePage"
             name="%page.name.30">
       </page>
+      <page
+            category="eu.etaxonomy.taxeditor.preferences.general"
+            class="eu.etaxonomy.taxeditor.preference.OrderPreferences"
+            id="eu.etaxonomy.taxeditor.preference.OrderPreferencesPage"
+            name="%page.name.31">
+      </page>
    </extension>
    <extension
          point="org.eclipse.ui.views">
                visible="true">
          </separator>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.view.datasource.delete"
                label="%command.label.9"
                style="push">
                <visibleWhen>
             </command>
          </menu>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.editor.definedTerms.delete"
                label="%command.label.14"
                style="push">
             <visibleWhen
          point="org.eclipse.ui.handlers">
       <handler
             class="eu.etaxonomy.taxeditor.view.datasource.handler.DeleteDataSourceHandler"
-            commandId="org.eclipse.ui.edit.delete">
+            commandId="eu.etaxonomy.taxeditor.view.datasource.delete">
          <activeWhen>
             <with
                   variable="activePartId">
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.definedterm.handler.DeleteTermBaseHandler"
-            commandId="org.eclipse.ui.edit.delete">
+            commandId="eu.etaxonomy.taxeditor.editor.definedTerms.delete">
          <activeWhen>
             <with
                   variable="activePartId">
       </handler>
    </extension>
    <extension
-         name="Popup Menu Commands"
+         name="%extension.name.0"
          point="org.eclipse.ui.commands">
       <command
             defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.ChangeConnectionHandler"
       <command
             defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.CloneDataSourceHandler"
             id="eu.etaxonomy.taxeditor.store.datasource.clone"
-            name="Clone Datasource">
+            name="%command.name.8">
       </command>
       <command
             defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler"
             id="eu.etaxonomy.taxeditor.store.datasource.close"
             name="%command.name.2">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.DeleteDataSourceHandler"
+            id="eu.etaxonomy.taxeditor.view.datasource.delete"
+            name="%command.name.13">
+      </command>
       <command
             defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.UpdateDataSourceHandler"
             id="eu.etaxonomy.taxeditor.store.datasource.update"
       </command>
       <command
          id="eu.etaxonomy.taxeditor.store.open.FeatureTreeEditorWizard"
-         name="Open Feature Tree Editor Wizard">
+         name="%command.name.9">
          </command>
       <command
             id="eu.etaxonomy.taxeditor.store.openPasswordWizzard"
-            name="Open Password Wizzard">
+            name="%command.name.10">
       </command>
       <command
             id="eu.etaxonomy.taxeditor.store.open.OpenDistributionEditorWizardHandler"
-            name="Open Distribution Editor Wizard">
+            name="%command.name.11">
       </command>
       <command
             defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.ChangeConnectionHandler"
             id="eu.etaxonomy.taxeditor.datasource.connect"
-            name="Connect">
+            name="%command.name.12">
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.DeleteTermBaseHandler"
+            id="eu.etaxonomy.taxeditor.editor.definedTerms.delete"
+            name="%command.name.14">
       </command>
    </extension>
    <extension
             category="eu.etaxonomy.taxeditor.export.category.cdm"
             class="eu.etaxonomy.taxeditor.io.wizard.CsvExportWizard"
             id="eu.etaxonomy.taxeditor.io.export.csv"
-            name="CSV">
+            name="%wizard.name.18">
       </wizard>
       <wizard
             category="eu.etaxonomy.taxeditor.export.category.cdm"
             class="eu.etaxonomy.taxeditor.io.wizard.CsvNameExportWizard"
-            id="eu.etaxonomy.taxeditor.io.export.csv"
-            name="CSV-Names">
+            id="eu.etaxonomy.taxeditor.io.export.csv_name"
+            name="%wizard.name.19">
+      </wizard>
+      <wizard
+            category="eu.etaxonomy.taxeditor.export.category.cdm"
+            class="eu.etaxonomy.taxeditor.io.wizard.CsvPrintExportWizard"
+            id="eu.etaxonomy.taxeditor.io.export.csv_print"
+            name="%wizard.name.20">
       </wizard>
    </extension>
    <extension
 <extension
       point="org.eclipse.ui.activities">
    <activity
-         description="DELETE permission dependent ui contributions"
+         description="%activity.description"
          id="eu.etaxonomy.taxeditor.store.activityDelete"
-         name="Delete">
+         name="%activity.name">
       <enabledWhen>
          <reference
                definitionId="canDELETE">
          pattern="eu\.etaxonomy\.taxeditor\..*/.*.delete">
    </activityPatternBinding>
    <activity
-         description="UPDATE permission dependent ui contributions"
+         description="%activity.description.0"
          id="eu.etaxonomy.taxeditor.store.activityUpdate"
-         name="Update">
+         name="%activity.name.0">
       <enabledWhen>
          <reference
                definitionId="canUPDATE">
          pattern="eu\.etaxonomy\.taxeditor\..*/.*.command\.update\..*">
    </activityPatternBinding>
    <activity
-         description="CREATE permission dependent ui contributions"
+         description="%activity.description.1"
          id="eu.etaxonomy.taxeditor.store.activityCreate"
-         name="Delete">
+         name="%activity.name.1">
       <enabledWhen>
          <reference
                definitionId="canDELETE">
          pattern="eu\.etaxonomy\.taxeditor\..*/.*.command\.create\..*">
    </activityPatternBinding>
    <activity
-         description="ROLE_USER_MANAGER dependent ui contributions"
+         description="%activity.description.2"
          id="eu.etaxonomy.taxeditor.store.activityUserManagement"
-         name="UserManagement">
+         name="%activity.name.2">
       <enabledWhen>
          <reference
                definitionId="hasROLE_USER_MANAGER">
          pattern="eu\.etaxonomy\.taxeditor\..*/bulkeditor\.input\.group">
    </activityPatternBinding>
    <activity
-         description="ROLE_PROJECT_MANAGER dependent ui contributions"
+         description="%activity.description.3"
          id="eu.etaxonomy.taxeditor.store.activityProjectManagement"
-         name="ProjectManagement">
+         name="%activity.name.3">
       <enabledWhen>
          <reference
                definitionId="hasROLE_PROJECT_MANAGER">
index dcbf087ed8de6c094bd6d1d616d3b922ae0b945f..9757c60b19eec36087b3f7ba0bc39a0eac1e5683 100644 (file)
@@ -22,6 +22,8 @@ public class Messages extends NLS {
     public static String LanguageEditorPreferencePage_EditorHasToRestart;
     public static String LanguageEditorPreferencePage_PleaseRestart;
     public static String LanguageEditorPreferencePage_RestartRequired;
+    public static String OrderPreferencePage_NewNavigatorWindowRequired;
+    public static String OrderPreferencePage_PleaseReopenNavigator;
     public static String CdmDataSourceViewPart_1;
     public static String CdmDataSourceViewPart_10;
     public static String CdmDataSourceViewPart_11;
index 8b913c614db9f42905532f0758fc2d40c0a459de..658b72c31738fee7aafe23666f4bdb09fd9fbdc5 100644 (file)
@@ -413,6 +413,7 @@ public class DescriptionHelper {
         * @return a {@link java.lang.String} object.
         */
        public static String getLabel(Object element){
+           String noLabelString = "[no label]";
                if (element instanceof FeatureNodeContainer){
                        return getFeatureNodeContainerText((FeatureNodeContainer) element);
                }
@@ -420,7 +421,11 @@ public class DescriptionHelper {
                        return getDescriptionText((DescriptionBase) element);
                }
                else if(element instanceof CategoricalData){
-                       return getCategoricalDataText((CategoricalData) element);
+                       String categoricalDataText = getCategoricalDataText((CategoricalData) element);
+                       if(categoricalDataText.isEmpty()){
+                           categoricalDataText = noLabelString;
+                       }
+            return categoricalDataText;
                }
                else if (element instanceof CommonTaxonName) {
                        return getCommonNameText((CommonTaxonName) element);
@@ -432,7 +437,11 @@ public class DescriptionHelper {
                        return getIndividualsAssociationText((IndividualsAssociation) element);
                }
                else if (element instanceof QuantitativeData) {
-                       return getQuantitativeDataText((QuantitativeData) element);
+                       String quantitativeDataText = getQuantitativeDataText((QuantitativeData) element);
+                       if(quantitativeDataText.isEmpty()){
+                quantitativeDataText = noLabelString;
+                       }
+            return quantitativeDataText;
                }
                else if (element instanceof TaxonInteraction) {
                        return getTaxonInteractionText((TaxonInteraction) element);
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmStorePropertyTester.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmStorePropertyTester.java
new file mode 100644 (file)
index 0000000..b28e46d
--- /dev/null
@@ -0,0 +1,40 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.preference;
+
+import org.eclipse.core.expressions.PropertyTester;
+
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author n.hoffmann
+ * @created Jan 26, 2011
+ * @version 1.0
+ */
+public class CdmStorePropertyTester extends PropertyTester {
+
+       private static final String EDITOR_IS_CONNECTED_TO_DB = "isCdmStoreConnected";
+
+       @Override
+       public boolean test(Object receiver, String property, Object[] args,
+                       Object expectedValue) {
+
+           if(EDITOR_IS_CONNECTED_TO_DB.equals(property)){
+               return isCdmStoreConnected();
+           }
+               return false;
+       }
+
+       private boolean isCdmStoreConnected(){
+           boolean active = CdmStore.isActive();
+           return active;
+       }
+}
index a748e14c661f218e2d57a50206435585dccc5286..c34d4b7e0f3e6ed5f26fdda6f0c443cdaefff8d9 100644 (file)
@@ -89,7 +89,9 @@ public interface IPreferenceKeys {
 
        /** Constant <code>SORT_RANKS_HIERARCHICHALLY="eu.etaxonomy.taxeditor.menus.sortRanksH"{trunked}</code> */
        public static final String SORT_RANKS_HIERARCHICHALLY = "eu.etaxonomy.taxeditor.menus.sortRanksHierarchichally";
-
+       /** Constant <code>SORT_NODES_NATURALL="eu.etaxonomy.taxeditor.menus.sortNodesN"{trunked}</code> */
+       public static final String SORT_NODES_NATURALLY = "eu.etaxonomy.taxeditor.menus.sortNodesNaturally";
+       
        /**
         * Whether multilanguage text fields should be editable in multiple languages.
         */
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/OrderPreferences.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/OrderPreferences.java
new file mode 100644 (file)
index 0000000..3e434a9
--- /dev/null
@@ -0,0 +1,86 @@
+package eu.etaxonomy.taxeditor.preference;\r
+\r
+import java.io.IOException;\r
+\r
+import org.eclipse.jface.dialogs.MessageDialog;\r
+import org.eclipse.jface.preference.PreferencePage;\r
+import org.eclipse.jface.resource.ImageDescriptor;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.ui.IWorkbench;\r
+import org.eclipse.ui.IWorkbenchPreferencePage;\r
+import org.eclipse.ui.PlatformUI;\r
+\r
+import eu.etaxonomy.taxeditor.Messages;\r
+\r
+public class OrderPreferences extends PreferencePage implements IWorkbenchPreferencePage {\r
+       \r
+\r
+           boolean isNaturalOrderActivated;\r
+           boolean isSelectionChanged = false;\r
+           /*\r
+            * (non-Javadoc)\r
+            *\r
+            * @see\r
+            * org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors\r
+            * ()\r
+            */\r
+           @Override\r
+           protected Control createContents(Composite parent) {\r
+\r
+               Composite composite = new Composite(parent, SWT.NULL);\r
+               composite.setLayout(new GridLayout());\r
+               final Label description = new Label(parent, SWT.NONE);\r
+               description.setText(Messages.OrderPreferencePage_NewNavigatorWindowRequired);\r
+               isNaturalOrderActivated = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SORT_NODES_NATURALLY);\r
+               final Button activateCheckButton = new Button(composite, SWT.CHECK);\r
+               activateCheckButton.setText("Enable Natural Order");\r
+               activateCheckButton.setSelection(isNaturalOrderActivated);\r
+               activateCheckButton.addSelectionListener(new SelectionAdapter(){\r
+                   @Override\r
+                   public void widgetSelected(SelectionEvent e) {\r
+                       if(isNaturalOrderActivated != activateCheckButton.getSelection()) {\r
+                               isNaturalOrderActivated = activateCheckButton.getSelection();\r
+                               PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SORT_NODES_NATURALLY, isNaturalOrderActivated);\r
+                        isSelectionChanged = true;\r
+                    }else{\r
+                        isSelectionChanged = false;\r
+                    }\r
+\r
+                   }\r
+               });\r
+\r
+              \r
+\r
+               return composite;\r
+           }\r
+\r
+         \r
+               @Override\r
+               public void init(IWorkbench workbench) {\r
+                       // TODO Auto-generated method stub\r
+                       \r
+               }\r
+\r
+               /* (non-Javadoc)\r
+                * @see org.eclipse.jface.preference.PreferencePage#performOk()\r
+                */\r
+               @Override\r
+               public boolean performOk() {\r
+              if(isSelectionChanged){\r
+                 MessageDialog.openInformation(getShell(), null, Messages.OrderPreferencePage_PleaseReopenNavigator);            \r
+                       return super.performOk();\r
+              }\r
+              return true;\r
+               }\r
+\r
+\r
+}\r
index 62c31c9195624eb7e7c40e22556024c6f86155d1..5b1a935daa92c9234b6ce410b337b0c9a8946d5a 100644 (file)
@@ -12,8 +12,6 @@ package eu.etaxonomy.taxeditor.preference;
 
 import org.eclipse.core.expressions.PropertyTester;
 
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
 /**
  * @author n.hoffmann
  * @created Jan 26, 2011
@@ -26,25 +24,15 @@ public class PreferencePropertyTester extends PropertyTester {
 
     private static final String SHOW_CHECKLIST_EDITOR = "isChecklistEditorEnabled";
 
-       private static final String EDITOR_IS_CONNECTED_TO_DB = "isCdmStoreConnected";
-
-       /* (non-Javadoc)
-        * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
-        */
        @Override
        public boolean test(Object receiver, String property, Object[] args,
                        Object expectedValue) {
-
                if(SHOW_EXPERIMENTAL_FEATURES.equals(property)){
                        return isShowExperimentalFeatures();
                }
            if(SHOW_CHECKLIST_EDITOR.equals(property)){
                return isChecklistEditorEnabled();
            }
-           if(EDITOR_IS_CONNECTED_TO_DB.equals(property)){
-               return isCdmStoreConnected();
-           }
-
                return false;
        }
 
@@ -59,8 +47,4 @@ public class PreferencePropertyTester extends PropertyTester {
         return PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE);
     }
 
-       private boolean isCdmStoreConnected(){
-           boolean active = CdmStore.isActive();
-           return active;
-       }
 }
index bbca40e5a93ea95f652007fa35c2cca6a40d4fb3..83e6756fc4caf2d40451b9b1ed628662057fc2e4 100644 (file)
@@ -751,4 +751,27 @@ public class PreferencesUtil implements IPreferenceKeys {
             ctrl.setEnabled(enabled);
         }
     }
+    
+    /**
+        * <p>
+        * getSortRanksNaturally
+        * </p>
+        *
+        * @return a boolean.
+        */
+       public static boolean getSortNodesNaturally() {
+               return getPreferenceStore().getBoolean(SORT_NODES_NATURALLY);
+       }
+       
+       /**
+        * <p>
+        * setSortRanksNaturally
+        * </p>
+        *
+        * @param selection
+        *            a boolean.
+        */
+       public static void setSortNodesNaturally(boolean selection) {
+               getPreferenceStore().setValue(SORT_NODES_NATURALLY, selection);
+       }
 }
index 1f24d45216a4716abd36730fb223f1d79b71a5f2..e9968f0b3ee523c90524ae351f704bb4e600557d 100644 (file)
@@ -138,9 +138,10 @@ public class SearchManager {
         * @param configurator a {@link eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator} object.
         * @return a {@link java.util.List} object.
         */
-       public List<AgentBase> findTeamOrPersons(IIdentifiableEntityServiceConfigurator configurator){
+       @SuppressWarnings("unchecked")
+       public List<TeamOrPersonBase> findTeamOrPersons(IIdentifiableEntityServiceConfigurator configurator){
                configurator.setClazz(TeamOrPersonBase.class);
-               return findAgents(configurator);
+               return (List)findAgents(configurator);
        }
 
        /**
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionNaturalOrderDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionNaturalOrderDialog.java
new file mode 100644 (file)
index 0000000..275a5d5
--- /dev/null
@@ -0,0 +1,25 @@
+package eu.etaxonomy.taxeditor.ui.dialog.selection;\r
+\r
+import java.util.List;\r
+import java.util.UUID;\r
+\r
+import org.eclipse.swt.widgets.Shell;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.model.taxon.Classification;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
+\r
+public class TaxonNodeSelectionNaturalOrderDialog extends\r
+               TaxonNodeSelectionDialog {\r
+\r
+       protected TaxonNodeSelectionNaturalOrderDialog(Shell shell,\r
+                       ConversationHolder conversation, String title,\r
+                       List<UUID> excludeTaxa, boolean multi, TaxonNode node,\r
+                       Classification classification) {\r
+               super(shell, conversation, title, excludeTaxa, multi, node, classification);\r
+               // TODO Auto-generated constructor stub\r
+       }\r
+       \r
+       \r
+\r
+}\r
index 4b425cf5e9c3d384aa425b94592dfd3716bc7253..72cc267f39235518d477ffa8715b0502f82a9744 100644 (file)
@@ -64,7 +64,7 @@ public class NumberWithLabelElement extends TextWithLabelElement {
            if(super.getText()!=null){
                String text = super.getText().trim();
                try {
-                   return text.equals("") ? 0 : new Integer(text);
+                   return StringUtils.isBlank(text) ? 0 : new Integer(text);
                } catch (NumberFormatException e) {
                    exception = e;
                }
@@ -79,7 +79,7 @@ public class NumberWithLabelElement extends TextWithLabelElement {
        public Float getFloat(){
            String text = super.getText();
            try {
-               return new Float(text);
+               return StringUtils.isBlank(text) ? 0 : new Float(text);
            } catch (NumberFormatException e) {
                exception = e;
            }
index c9ddfffb8af7fa38b4e267ce7099084339cf5bc2..07f08c70463ac355736b0020b1c02f99efb5c5fa 100644 (file)
@@ -22,6 +22,7 @@ import org.eclipse.ui.forms.widgets.TableWrapLayout;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
@@ -192,7 +193,7 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
         */
        protected void setSectionTitle() {
                String title = "";
-               if (getEntity() != null && (getEntity() instanceof IdentifiableEntity)) {
+               if (getEntity() != null && (getEntity() instanceof IdentifiableEntity) && !(getEntity() instanceof SpecimenOrObservationBase)) {
                        title = ": " + ((IdentifiableEntity) getEntity()).getTitleCache();
                }
                this.setText(String.format("%s%s", getHeading(), title));
index 298080f403064eff43be41fcfc103b692dbf98d8..fde5720fc440b504832d806d40e3b9fb38a158eb 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.classification;
 
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.swt.widgets.Text;
+
 import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.Classification;
@@ -111,6 +116,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                text_newTaxonName = formFactory.createTextWithLabelElement(formElement,
                                "New Taxon", "", style);
                text_newTaxonName.setFocus();
+               preFillParentTaxonName();
 
                checkbox_openInEditor = formFactory.createCheckbox(formElement,
                                "Open in Editor", true, style);
@@ -118,7 +124,35 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                setParentTreeNode(entity);
        }
 
-       /*
+       private void preFillParentTaxonName() {
+        if(getEntity() instanceof TaxonNode){
+            TaxonNode node = (TaxonNode)getEntity();
+            if(node.getTaxon()!=null){
+                Taxon taxon = HibernateProxyHelper.deproxy(node.getTaxon(), Taxon.class);
+                if(taxon.getName()!=null && taxon.getName().isInstanceOf(NonViralName.class)){
+                    NonViralName<?> name = HibernateProxyHelper.deproxy(node.getTaxon().getName(), NonViralName.class);
+                    if( ! name.isSupraGeneric() && name.getRank() != null){
+                        String taxonName = "";
+                        if(name.isGenus() || name.isInfraGeneric()|| name.isSpeciesAggregate() ){
+                            taxonName = name.getGenusOrUninomial();
+                        }
+                        else if(name.isSpecies() || name.isInfraSpecific() ){
+                            taxonName = CdmUtils.concat(" ", name.getGenusOrUninomial(),name.getSpecificEpithet());
+                        }
+                        if (StringUtils.isNotBlank(taxonName)){
+                               text_newTaxonName.setText(taxonName + " ");
+                               if(text_newTaxonName.getMainControl() instanceof Text){
+                                       Text text = (Text)text_newTaxonName.getMainControl();
+                                       text.setSelection(text_newTaxonName.getText().length());
+                               }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    /*
         * (non-Javadoc)
         *
         * @see
index 1dfab3c0fab21bdee4211abd386bc21fcbffbf53..3d6b22a8d9e8e65aa625337426290caa40d5e7cd 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -21,12 +21,13 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
  * @created Jan 5, 2011
  * @version 1.0
  */
-public class HybridDetailElement extends AbstractCdmDetailElement<NonViralName> {
+public class HybridDetailElement extends AbstractCdmDetailElement<NonViralName<?>> {
+
+       private CheckboxElement checkboxMonomHybrid;
+       private CheckboxElement checkboxBinomHybrid;
+       private CheckboxElement checkboxTrinomHybrid;
+       private CheckboxElement checkboxHybridFormula;
 
-       private CheckboxElement checkbox_monomHybrid;
-       private CheckboxElement checkbox_binomHybrid;
-       private CheckboxElement checkbox_trinomHybrid;
-       
        /**
         * @param formFactory
         * @param formElement
@@ -36,30 +37,26 @@ public class HybridDetailElement extends AbstractCdmDetailElement<NonViralName>
                super(formFactory, formElement);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls(eu.etaxonomy.taxeditor.forms.ICdmFormElement, java.lang.Object, int)
-        */
        @Override
-       protected void createControls(ICdmFormElement formElement, NonViralName entity,
+       protected void createControls(ICdmFormElement formElement, NonViralName<?> entity,
                        int style) {
-               checkbox_monomHybrid = formFactory.createCheckbox(formElement, "Monom Hybrid", entity.isMonomHybrid(), style);
-               checkbox_binomHybrid = formFactory.createCheckbox(formElement, "Binom Hybrid", entity.isBinomHybrid(), style);
-               checkbox_trinomHybrid = formFactory.createCheckbox(formElement, "Trinom Hybrid", entity.isTrinomHybrid(), style);
+               checkboxMonomHybrid = formFactory.createCheckbox(formElement, "Monom hybrid", entity.isMonomHybrid(), style);
+               checkboxBinomHybrid = formFactory.createCheckbox(formElement, "Binom hybrid", entity.isBinomHybrid(), style);
+               checkboxTrinomHybrid = formFactory.createCheckbox(formElement, "Trinom hybrid", entity.isTrinomHybrid(), style);
+               checkboxHybridFormula = formFactory.createCheckbox(formElement, "Hybrid formula", entity.isHybridFormula(), style);
+               checkboxHybridFormula.setEnabled(false);//read-only
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)
-        */
        @Override
        public void handleEvent(Object eventSource) {
-               if(eventSource == checkbox_monomHybrid){
-                       getEntity().setMonomHybrid(checkbox_monomHybrid.getSelection());
+               if(eventSource == checkboxMonomHybrid){
+                       getEntity().setMonomHybrid(checkboxMonomHybrid.getSelection());
                }
-               else if(eventSource == checkbox_binomHybrid){
-                       getEntity().setBinomHybrid(checkbox_binomHybrid.getSelection());
+               else if(eventSource == checkboxBinomHybrid){
+                       getEntity().setBinomHybrid(checkboxBinomHybrid.getSelection());
                }
-               else if(eventSource == checkbox_trinomHybrid){
-                       getEntity().setTrinomHybrid(checkbox_trinomHybrid.getSelection());
+               else if(eventSource == checkboxTrinomHybrid){
+                       getEntity().setTrinomHybrid(checkboxTrinomHybrid.getSelection());
                }
        }
 
index c4df98d163ecdf364e2441051a08c5053621e051..f9b48e1784147b43e4752e8f9eac718467a35b40 100644 (file)
@@ -44,7 +44,7 @@ public class DnaSampleGeneralDetailSection extends AbstractCdmDetailSection<DnaS
      */
     @Override
     public String getHeading() {
-        return "General DNA";
+        return "General";
     }
 
     /* (non-Javadoc)
index bd3cc13a459ac0fb88f187db02bfa69ef110018d..427a5d737528038a3a64cac5c89da50221ee8bf3 100644 (file)
@@ -44,7 +44,7 @@ public class SequenceGeneralDetailSection extends AbstractCdmDetailSection<Seque
      */
     @Override
     public String getHeading() {
-        return "General Sequence";
+        return "General";
     }
 
     /* (non-Javadoc)
index 37331bf2f569c6d18744e5613050448ce9bce97a..e2fd1db1c627713b829344d05ac755f2c3ffe200 100644 (file)
@@ -44,7 +44,7 @@ public class SingleReadGeneralDetailSection extends AbstractCdmDetailSection<Sin
      */
     @Override
     public String getHeading() {
-        return "General SingleRead";
+        return "General";
     }
 
     /* (non-Javadoc)
index 59721c32fc63b65f2bac44a74a674f3359936dea..c45a5f51a0c16652f1f8a0bb7a1c66ec1d418736 100644 (file)
@@ -11,14 +11,18 @@ package eu.etaxonomy.taxeditor.ui.section.occurrence.dna;
 
 import org.apache.log4j.Logger;
 
+import eu.etaxonomy.cdm.api.service.IVocabularyService;
 import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.agent.Institution;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
 import eu.etaxonomy.cdm.model.common.TermType;
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.cdm.model.common.TimePeriod;
+import eu.etaxonomy.cdm.model.common.VocabularyEnum;
 import eu.etaxonomy.cdm.model.molecular.DnaSample;
 import eu.etaxonomy.cdm.model.occurrence.Collection;
 import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
@@ -35,6 +39,8 @@ import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
  */
 public class TissueSampleGeneralDetailElement extends AbstractCdmDetailElement<DnaSample> {
 
+    private final TermVocabulary plantKindOfUnitVocabulary = CdmStore.getService(IVocabularyService.class).find(VocabularyEnum.PlantKindOfUnit.getUuid());
+
     static private final Logger logger = Logger.getLogger(TissueSampleGeneralDetailElement.class);
 
     private TermComboElement<DefinedTerm> comboKindOfTissue;
@@ -65,7 +71,7 @@ public class TissueSampleGeneralDetailElement extends AbstractCdmDetailElement<D
      */
     @Override
     protected void createControls(ICdmFormElement formElement, DnaSample entity, int style) {
-        comboKindOfTissue = formFactory.createDefinedTermComboElement(TermType.KindOfUnit, formElement, "Kind Of Tissue", entity.getKindOfUnit(), style);
+        comboKindOfTissue = formFactory.createDefinedTermComboElement(plantKindOfUnitVocabulary, formElement, "Kind Of Tissue", entity.getKindOfUnit(), style);
         TimePeriod preparationDate = null;
         DefinedTerm preservationMedium = null;
         AgentBase<?> staff = null;
index f8b342089b0a42e220ad1dd690da910bf2a678fa..16894a55b3c75d4c8d42492204cbf001c66c8ad2 100644 (file)
@@ -22,7 +22,6 @@ import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
-import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
 
 /**
  * @author pplitzner
@@ -52,7 +51,7 @@ public class MediaSpecimenGeneralDetailSection  extends AbstractCdmDetailSection
      */
     @Override
     public String getHeading() {
-        return "General Media Specimen";
+        return "General";
     }
 
     /* (non-Javadoc)
@@ -60,27 +59,27 @@ public class MediaSpecimenGeneralDetailSection  extends AbstractCdmDetailSection
      */
     @Override
     public void setText(String title) {
-        String text = null;
-        if(getEntity()!=null && getEntity().getKindOfUnit()!=null){
-            if(getEntity().getKindOfUnit().equals(DerivateLabelProvider.getArtworkTerm())){
-                text = "Artwork";
-            }
-            else if(getEntity().getKindOfUnit().equals(DerivateLabelProvider.getLivingPlantPhotoTerm())){
-                text = "Living Plant Photo";
-            }
-            else if(getEntity().getKindOfUnit().equals(DerivateLabelProvider.getSpecimenScanTerm())){
-                text = "Specimen Scan";
-            }
-            else if(getEntity().getKindOfUnit().equals(DerivateLabelProvider.getDetailImageTerm())){
-                text = "Detail Image";
-            }
-        }
-        if(text!=null){
-            super.setText(text);
-        }
-        else{
+//        String text = null;
+//        if(getEntity()!=null && getEntity().getKindOfUnit()!=null){
+//            if(getEntity().getKindOfUnit().equals(DerivateLabelProvider.getArtworkTerm())){
+//                text = "Artwork";
+//            }
+//            else if(getEntity().getKindOfUnit().equals(DerivateLabelProvider.getLivingPlantPhotoTerm())){
+//                text = "Living Plant Photo";
+//            }
+//            else if(getEntity().getKindOfUnit().equals(DerivateLabelProvider.getSpecimenScanTerm())){
+//                text = "Specimen Scan";
+//            }
+//            else if(getEntity().getKindOfUnit().equals(DerivateLabelProvider.getDetailImageTerm())){
+//                text = "Detail Image";
+//            }
+//        }
+//        if(text!=null){
+//            super.setText(text);
+//        }
+//        else{
             super.setText(title);
-        }
+//        }
     }
 
     @Override
index 10405b6dae51d97d06d8721a042bd8bd319bbb81..1b47155dba9396fce2fbdfb417b72105c024208c 100644 (file)
@@ -155,7 +155,7 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
         conversation.bind();
 
         final String emptyString = "";
-        final String separator = ", ";
+        final String separator = " ";
 
         String label = emptyString;
 
@@ -232,8 +232,7 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
                 }
                 eu.etaxonomy.cdm.model.occurrence.Collection collection = derivedUnit.getCollection();
                 if(collection!=null){
-                    label += collection.getName()!=null?collection.getName()+" ":emptyString;
-                    label += collection.getCode()!=null?"("+collection.getCode()+"), ":emptyString;
+                    label += collection.getCode()!=null?"("+collection.getCode()+")"+separator:emptyString;
                 }
                 String mostSignificantIdentifier = CdmStore.getService(IOccurrenceService.class).getMostSignificantIdentifier(derivedUnit);
                 label += mostSignificantIdentifier!=null?mostSignificantIdentifier+separator:emptyString;
index 0db71df83aec3b4933db863b847953dc7a368e7b..b101a2298f984495584e9f00a7dad9267fd8ea15 100644 (file)
@@ -68,7 +68,7 @@ public class DerivateSearchComposite extends Composite {
         btnClearTaxon.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif"));
 
         lblDerivateType = new Label(this, SWT.NULL);
-        lblDerivateType.setText("Derivate Type");
+        lblDerivateType.setText("Derivative Type");
 
         comboDerivateType = new Combo(this, SWT.READ_ONLY);
         comboDerivateType.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
index 2715d4c652c833c10e274053c240954bfe4ffadb..a161ed4a88c0cef2d32730787f5ddcb1d8b4073d 100644 (file)
@@ -114,12 +114,28 @@ public class DerivateSearchCompositeController implements Listener{
 
         FindOccurrencesConfigurator config = new FindOccurrencesConfigurator();
         config.setAssociatedTaxonUuid(selectedTaxon!=null?selectedTaxon.getUuid():null);
-        config.setSpecimenType(specimenType==SpecimenOrObservationType.Unknown?null:specimenType);//unknown := all types
+        config.setSpecimenType(specimenType.equals(SpecimenOrObservationType.Unknown)?null:specimenType);//unknown := all types
         config.setTitleSearchString(queryString);
+        if(selectedTaxon!=null){
+            config.setRetrieveIndirectlyAssociatedSpecimens(true);
+            config.setSpecimenType(null);
+        }
 
         SearchManager searchManager = new SearchManager();
         List<SpecimenOrObservationBase> occurrences = searchManager.findOccurrences(config);
 
+        //filter out specimens of wrong type (only if an associated taxon was selected)
+        if(selectedTaxon!=null && !specimenType.equals(SpecimenOrObservationType.Unknown)){
+            List<SpecimenOrObservationBase> specimensOfCorrectType = new ArrayList<SpecimenOrObservationBase>();
+            for(SpecimenOrObservationBase<?> occurrence:occurrences){
+                if(occurrence.getRecordBasis().equals(specimenType)
+                        || occurrence.getRecordBasis().isKindOf(specimenType)){
+                    specimensOfCorrectType.add(occurrence);
+                }
+            }
+            occurrences = specimensOfCorrectType;
+        }
+
         //filter out assigned specimens
         if(derivateSearchComposite.getBtnFilterUndeterminedSpecimen().getSelection()){
             List<SpecimenOrObservationBase> specimensWithNoDetermination = new ArrayList<SpecimenOrObservationBase>();
index cd780fc68c5d3f0d2e66420cae3c283d081f1aaf..d3f20092474906c4d04a7895f2f9b15320d32b9c 100644 (file)
@@ -12,13 +12,16 @@ package eu.etaxonomy.taxeditor.view.detail;
 
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeNode;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IWorkbenchPart;
 
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
@@ -42,7 +45,6 @@ public class DetailsViewPart extends AbstractCdmEditorViewPart implements IPartC
        /** {@inheritDoc} */
        @Override
        public void createViewer(Composite parent) {
-               //selectionService.addPostSelectionListener(this);
 
                viewer = new DetailsViewer(parent, this);
                getSite().setSelectionProvider(viewer);
@@ -67,6 +69,7 @@ public class DetailsViewPart extends AbstractCdmEditorViewPart implements IPartC
 
         if((part instanceof IEditorPart) || (part instanceof IPartContentHasDetails)) {
             if(structuredSelection.size() != 1){
+                setPartName(createPartTitle(null));
                 showEmptyPage();
                 return;
             }
@@ -76,20 +79,41 @@ public class DetailsViewPart extends AbstractCdmEditorViewPart implements IPartC
                 // do show the map for distributions
                 Feature feature = ((FeatureNodeContainer) ((IStructuredSelection) selection).getFirstElement()).getFeature();
                 if(!feature.equals(Feature.DISTRIBUTION())){
+                    setPartName(createPartTitle(null));
                     showEmptyPage();
                     return;
                 }
             }
 
+
+            setPartName(createPartTitle(((IStructuredSelection) selection).getFirstElement()));
             showViewer(part, structuredSelection);
         }else{
+            setPartName(createPartTitle(null));
             showEmptyPage();
         }
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.view.AbstractCdmViewPart#showEmptyPage()
-        */
+       private String getViewName(){
+           return "Details";
+       }
+
+       private String createPartTitle(Object selectedObject){
+           if(selectedObject!=null){
+               if(selectedObject instanceof TreeNode){
+                   selectedObject = ((TreeNode) selectedObject).getValue();
+               }
+               if(selectedObject instanceof SpecimenOrObservationBase){
+                   return getViewName()+": "+HibernateProxyHelper.deproxy(selectedObject, SpecimenOrObservationBase.class).getRecordBasis();
+               }
+               if(selectedObject instanceof CdmBase){
+                   return getViewName()+": "+HibernateProxyHelper.deproxy(selectedObject, CdmBase.class).getClass().getSimpleName();
+               }
+               return getViewName()+": "+selectedObject.getClass().getSimpleName();
+           }
+           return getViewName();
+       }
+
        @Override
        public void showEmptyPage() {
            viewer.setSelection(null);
@@ -118,14 +142,9 @@ public class DetailsViewPart extends AbstractCdmEditorViewPart implements IPartC
        public void dispose() {
                selectionService.removePostSelectionListener(this);
                super.dispose();
-               
+
        }
 
-       /**
-        * <p>onComplete</p>
-        *
-        * @return a boolean.
-        */
        @Override
     public boolean onComplete() {
                return true;
index 4deb39a8f1b75bac21085bb3c7a5d1cdae1404b2..12d3a7cdd6d733338f1e108848d412f566620e95 100644 (file)
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>\r
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
-       <classpathentry kind="src" path="src/test/java"/>\r
-       <classpathentry kind="src" path="src/main/resources"/>\r
-       <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src/test/java"/>
+       <classpathentry kind="src" path="src/main/resources"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
index c929cd0de4fb7d2936c32700d5795d171d85e50f..7f4ff50a288107431b864d2422441790a2c8318a 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde version="3.8"?><target name="Eclipse Indigo Target" sequenceNumber="5">
+<?pde version="3.8"?><target name="Eclipse Indigo Target" sequenceNumber="7">
 <locations>
 <location includeAllPlatforms="true" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
 <unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
@@ -9,21 +9,21 @@
 <repository location="http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site"/>
 </location>
 <location includeAllPlatforms="true" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.jdt.feature.group" version="3.7.1.r371_v20110810-0800-7z8gFcoFMLfTabvKsR5Qm9rBGEBK"/>
-<unit id="org.eclipse.pde.source.feature.group" version="3.7.1.r37x_v20110810-0800-7b7qFVtFEx2XnmZ4jlM5mjM"/>
-<unit id="org.eclipse.platform.feature.group" version="3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK"/>
-<unit id="org.eclipse.equinox.executable.feature.group" version="3.5.0.v20110530-7P7NFUFFLWUl76mart"/>
-<unit id="org.eclipse.platform.source.feature.group" version="3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK"/>
-<unit id="org.eclipse.platform.sdk" version="3.7.1.M20110909-1335"/>
-<unit id="org.eclipse.rcp.feature.group" version="3.7.1.r37x_v20110729-9DB5FmNFnFLSFCtLxnRfMqt15A4A"/>
-<unit id="org.eclipse.rcp.source.feature.group" version="3.7.1.r37x_v20110729-9DB5FmNFnFLSFCtLxnRfMqt15A4A"/>
-<unit id="org.eclipse.rcp.sdk.id" version="3.7.1.M20110909-1335"/>
-<unit id="org.eclipse.equinox.sdk.feature.group" version="3.7.1.R37x_v20110907-7M7W8h8eNV4Vrz-hz01A7SL_MhZP"/>
-<unit id="org.eclipse.zest.sdk.feature.group" version="1.3.0.v20110425-2050-67C08COMOGAKRUKGP_ULXbePP8ZT"/>
+<unit id="org.eclipse.jdt.feature.group" version="3.7.2.v20120120-1414-7z8gFcuFMP7BW5XTz0jLTnz0l9B1"/>
+<unit id="org.eclipse.pde.source.feature.group" version="3.7.2.v20120120-1420-7b7rFUOFEx2Xnqafnpz0E--0"/>
+<unit id="org.eclipse.platform.feature.group" version="3.7.2.v20120207-1839-9gF7UHPDFxGjd-PqDr2jX_4yKaumkoHTz04_q-q"/>
+<unit id="org.eclipse.equinox.executable.feature.group" version="3.5.1.v20111216-1653-7P7NFUIFIbaUcU77s0KQWHw5HZTZ"/>
+<unit id="org.eclipse.platform.source.feature.group" version="3.7.2.v20120207-1839-9gF7UHPDFxGjd-PqDr2jX_4yKaumkoHTz04_q-q"/>
+<unit id="org.eclipse.platform.sdk" version="3.7.2.M20120208-0800"/>
+<unit id="org.eclipse.rcp.feature.group" version="3.7.2.v20120120-1424-9DB5FmnFq5JCf1UA38R-kz0S0272"/>
+<unit id="org.eclipse.rcp.source.feature.group" version="3.7.2.v20120120-1424-9DB5FmnFq5JCf1UA38R-kz0S0272"/>
+<unit id="org.eclipse.rcp.sdk.id" version="3.7.2.M20120208-0800"/>
+<unit id="org.eclipse.equinox.sdk.feature.group" version="3.7.1.R37x_v20110907-7M7W8i8eNV4WsRkue-4Vq4J6pCyW"/>
+<unit id="org.eclipse.zest.sdk.feature.group" version="1.3.0.v20110425-2050-67C18COMPIAKSVKGQaRTQTiSN8WP"/>
 <repository location="http://download.eclipse.org/releases/indigo"/>
 </location>
 <location includeAllPlatforms="true" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.nebula.widgets.compositetable.feature" version="1.0.0.201409040043"/>
+<unit id="org.eclipse.nebula.widgets.compositetable.feature.feature.group" version="1.0.0.201409040043"/>
 <repository location="http://download.eclipse.org/technology/nebula/archives/Q32014/release/"/>
 </location>
 </locations>