Merge branch 'release/4.3.0' 4.3.0
authorjenkins <jenkins-int@bgbm.org>
Fri, 23 Sep 2016 14:24:11 +0000 (16:24 +0200)
committerjenkins <jenkins-int@bgbm.org>
Fri, 23 Sep 2016 14:24:11 +0000 (16:24 +0200)
227 files changed:
eu.etaxonomy.taxeditor.application/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.application/pom.xml
eu.etaxonomy.taxeditor.bulkeditor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.bulkeditor/plugin.xml
eu.etaxonomy.taxeditor.bulkeditor/pom.xml
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/AnnotatedLineDocumentProvider.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/AnnotatedLineEditor.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorLineDisplay.java
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/command/BulkEditorSelectionPropertyTester.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/OpenBulkEditorHandler.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForIdentifiableEntity.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/BulkEditorInputType.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/GroupEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/MediaEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/OccurrenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/TaxonEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/UserEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/UserCreator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java
eu.etaxonomy.taxeditor.cdmlib/.classpath
eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.cdmlib/build.properties
eu.etaxonomy.taxeditor.cdmlib/pom.xml
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CacheLoader.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/EntityCacherDebugResult.java
eu.etaxonomy.taxeditor.editor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin.properties
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_de.properties
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.editor/pom.xml
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/Messages.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/group/authority/CdmAuthorityEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenChecklistEditorHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenParentHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenSpecimenEditorForTypeSpecimenHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonBaseHandler.java [moved from eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonHandler.java with 77% similarity]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyGraphContentProvider.java [moved from eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyContentProvider.java with 96% similarity]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyGraphEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/AbstractGroupedContainer.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/LineBreakListener.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/GroupBasionymContributionItem.java [deleted file]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/NameEditorMenuPropertyTester.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistLabelProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptContentProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptLabelProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/CreateConceptRelationHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientAgentService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientCdmRepository.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientClassificationService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientCollectionService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientDescriptionService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientNameService.java
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/dataimport/transientServices/TransientReferenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientTaxonService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientTermService.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/DerivateViewEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateFieldUnitContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/SingleReadHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/searchFilter/DerivateSearchCompositeController.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/media/MediaViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesViewPart.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/MoveTaxonOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperationTest.java
eu.etaxonomy.taxeditor.feature.jre.linux64/feature.xml
eu.etaxonomy.taxeditor.feature.jre.linux64/pom.xml
eu.etaxonomy.taxeditor.feature.platform/feature.xml
eu.etaxonomy.taxeditor.feature.platform/pom.xml
eu.etaxonomy.taxeditor.feature/feature.xml
eu.etaxonomy.taxeditor.feature/pom.xml
eu.etaxonomy.taxeditor.help/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.help/pom.xml
eu.etaxonomy.taxeditor.molecular.lib/.classpath
eu.etaxonomy.taxeditor.molecular.lib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.molecular.lib/pom.xml
eu.etaxonomy.taxeditor.molecular/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.molecular/pom.xml
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditorInput.java
eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/bundle.properties
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/bundle_de.properties
eu.etaxonomy.taxeditor.navigation/plugin.xml
eu.etaxonomy.taxeditor.navigation/pom.xml
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/RecentNamesContributionItem.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyLabelProvider.java [deleted file]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewPart.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/CreateClassificationHierarchyHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingDeleteTaxonNodeHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/operation/CreateClassification.java
eu.etaxonomy.taxeditor.printpublisher/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.printpublisher/pom.xml
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle_de.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/icons/default_derivate-16x16-32.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/plugin.xml [changed mode: 0644->0755]
eu.etaxonomy.taxeditor.store/pom.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/CdmDataSourceRepository.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceCredentialsWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermLabelProvider.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/TermEditorInput.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/EditFeatureTreeWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/FeatureTreeEditorWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/SelectFeatureTreeWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/AbstractIOManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ImportManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/AbcdImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ClassificationChooserWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvNameExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvPrintExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExcelNormalExplicitTaxaImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExportToFileDestinationWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/JaxbExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/NomenclaturalCodeWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/SddExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/SddImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/TcsImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ImageResources.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewAmplificationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewClassificationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewCollectionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewDerivedUnitBaseWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewFieldUnitWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewGrantedAuthorityWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewGroupWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewInstitutionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewNonViralNameWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPersonWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPolytomousKeyWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPrimerWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTeamWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewUserWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NomenclaturalCodePreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/AvailableDistributionPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.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/AbstractEntityCollectionElementWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/bar/AuthenticatedUserBar.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/AbstractComboElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/EnumComboElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/TermComboElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/VocabularyComboElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteConfiguratorDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CdmFilteredItemsSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalPersonAuthorSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalReferenceSelectionDialog.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java [changed mode: 0644->0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractFormSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MultilanguageTextElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/RepresentationElement.java [changed mode: 0644->0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TranslatableRepresentationElement.java [changed mode: 0644->0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionSection.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/classification/TaxonNodeWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/TaxonInteractionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameRelationshipWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/association/TaxonAssociationDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/SequenceContigFileCollectionDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/SingleReadPherogramCollectionDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EditFromSelectionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TermTranslationWizardPage.java [changed mode: 0644->0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/util/ApplicationUtil.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmDataViewer.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmViewPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerContextMenu.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtil.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/BioCaseEditorInput.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/DataImportEditorContextMenu.java [changed mode: 0644->0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/GbifResponseComparator.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/GbifResponseImportView.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SaveImportedSpecimenAction.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SpecimenImportView.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SpecimenSearchWizard.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/detail/DetailsViewPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewer.java
eu.etaxonomy.taxeditor.test/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.test/pom.xml
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.java
eu.etaxonomy.taxeditor.webapp/.classpath
eu.etaxonomy.taxeditor.webapp/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.webapp/build.properties
eu.etaxonomy.taxeditor.webapp/pom.xml
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product.with.jre
eu.etaxonomy.taxeditor/pom.xml
eu.etaxonomy.taxeditor/rcp.target
pom.xml

index db76b10..845d0ac 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Application
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.application;singleton:=true
-Bundle-Version: 4.2.0
+Bundle-Version: 4.3.0
 Bundle-Activator: eu.etaxonomy.taxeditor.TaxonomicEditorPlugin
 Bundle-Vendor: EDIT
 Bundle-Localization: OSGI-INF/l10n/plugin
index 282140e..76fef54 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.2.0</version>
+    <version>4.3.0</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
index f154f26..3305fff 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Bulkeditor Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.bulkeditor;singleton:=true
-Bundle-Version: 4.2.0
+Bundle-Version: 4.3.0
 Bundle-Activator: eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.taxeditor.annotatedlineeditor,
index 9d2bf65..abb836a 100644 (file)
@@ -99,8 +99,8 @@
             </visibleWhen>
          </menu>
          <separator
-               name="taxeditor-bulkeditor.separator4"\r
-               visible="true">\r
+               name="taxeditor-bulkeditor.separator4"
+               visible="true">
          </separator>
          <command
                commandId="bulkeditor.commands.setmergetarget"
                </reference>
             </visibleWhen>
          </command>
-         <separator\r
-               name="eu.etaxonomy.taxeditor.bulkeditor.separator1"\r
-               visible="true">\r
-         </separator>\r
+         <separator
+               name="eu.etaxonomy.taxeditor.bulkeditor.separator1"
+               visible="true">
+         </separator>
          <command
                commandId="eu.etaxonomy.taxeditor.bulkeditor.convertTeam2Person"
                label="%command.label.5"
             allPopups="false"
             locationURI="menu:eu.etaxonomy.taxeditor.menu.showView?after=org.eclipse.ui.views.showView.supplemental">
          <command
-               commandId="eu.etaxonomy.taxeditor.openReferencingObjectsView"
+               commandId="eu.etaxonomy.taxeditor.openReferencingObjectsViewFromMenu"
                label="%command.label.OPEN_REFERENCING_OBJECTS_VIEW"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
       </menuContribution>
    </extension>
             name="%command.name.10">
       </command>
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsView"
             id="eu.etaxonomy.taxeditor.openReferencingObjectsView"
             name="%command.name.OPEN_REFERENCING_OBJECTS_VIEW">
       </command>
             id="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForTaxonNode"
             name="%command.name.OPEN_BULK_EDITOR_FOR_TAXON_NODE">
       </command>
+      <command
+            id="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity"
+            name="Open bulk editor for identifiable entity">
+         <commandParameter
+               id="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity.uuid"
+               name="Identifiable Entity UUID"
+               optional="true"
+               typeId="eu.etaxonomy.taxeditor.uuidParameterType">
+         </commandParameter>
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsView"
+            id="eu.etaxonomy.taxeditor.openReferencingObjectsViewFromMenu"
+            name="%command.name.OPEN_REFERENCING_OBJECTS_VIEW">
+      </command>
       <!--command
             defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.NewEntityHandler"
             id="eu.etaxonomy.taxeditor.bulkeditor.command.new"
             </test>
          </with>
       </definition>
+      <definition
+            id="isBulkEditorSupported">
+         <with
+               variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorSelectionPropertyTester.isBulkEditorSupported">
+            </test>
+         </with>
+      </definition>
+      <definition
+            id="isGroupEditor">
+         <with
+               variable="activeEditor">
+            <test
+                  property="taxeditor-bulkeditor.propertyTester.isGroupEditor">
+            </test>
+         </with>
+      </definition>
    </extension>
    <extension
          point="org.eclipse.core.expressions.propertyTesters">
             properties="isTeam, isPerson"
             type="java.lang.Object">
       </propertyTester>
+      <propertyTester
+            class="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorSelectionPropertyTester"
+            id="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorSelectionPropertyTester"
+            namespace="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorSelectionPropertyTester"
+            properties="isBulkEditorSupported"
+            type="org.eclipse.jface.viewers.IStructuredSelection">
+      </propertyTester>
    </extension>
    <extension
          point="org.eclipse.ui.handlers">
             class="eu.etaxonomy.taxeditor.bulkeditor.handler.ConvertPerson2TeamHandler"
             commandId="eu.etaxonomy.taxeditor.bulkeditor.convertPerson2Team">
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.bulkeditor.handler.defaultHandler.OpenBulkEditorForIdentifiableEntity"
+            commandId="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity">
+         <activeWhen>
+            <reference
+                  definitionId="isBulkEditorSupported">
+            </reference>
+         </activeWhen>
+      </handler>
       
    </extension>
    <extension
             selection="eu.etaxonomy.cdm.model.taxon.TaxonNode"
             viewerName="%viewCommandMapping.viewerName.BULK_EDITOR">
       </viewCommandMapping>
+      <viewCommandMapping
+            commandId="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity"
+            selection="eu.etaxonomy.cdm.model.common.IdentifiableEntity"
+            viewerName="%viewCommandMapping.viewerName.BULK_EDITOR">
+      </viewCommandMapping>
    </extension>
 <!-- start set marker -->
 
index 9ad68a2..d9b805c 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>4.2.0</version>
+               <version>4.3.0</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 3243ffb..1ad5dc7 100644 (file)
@@ -25,6 +25,7 @@ import org.eclipse.jface.text.source.IAnnotationModel;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.texteditor.AbstractDocumentProvider;
 
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
@@ -58,6 +59,21 @@ public class AnnotatedLineDocumentProvider extends AbstractDocumentProvider {
        private ILineDisplayStrategy lineDisplayStrategy;
 
        private final IEditorInput input;
+       private ConversationHolder conversation;
+
+       /**
+        * @return the conversation
+        */
+       public ConversationHolder getConversation() {
+               return conversation;
+       }
+
+       /**
+        * @param conversation the conversation to set
+        */
+       public void setConversation(ConversationHolder conversation) {
+               this.conversation = conversation;
+       }
 
        /**
         * <p>Constructor for AnnotatedLineDocumentProvider.</p>
@@ -66,6 +82,7 @@ public class AnnotatedLineDocumentProvider extends AbstractDocumentProvider {
         */
        public AnnotatedLineDocumentProvider(IEditorInput input){
                this.input = input;
+               this.conversation = ((AbstractBulkEditorInput)input).getConversation();
        }
 
        /** {@inheritDoc} */
@@ -232,11 +249,17 @@ public class AnnotatedLineDocumentProvider extends AbstractDocumentProvider {
                        // Get new containers from annotation model
                        LineAnnotationModel model = (LineAnnotationModel) getAnnotationModel(element);
                        Iterator iterator = model.getAnnotationIterator();
+                       if (!this.conversation.isBound()){
+                               this.conversation.bind();
+                       }
+                       
                        while (iterator.hasNext()) {
                                Annotation annotation = (Annotation) iterator.next();
                                if (annotation instanceof IEntityContainer<?>) {
                                        IEntityContainer<?> container = (IEntityContainer<?>) annotation;
+                                       
                                        if (container.isMarkedAsNew() || container.isDirty()) {
+                                               
                                                Object entity = persistenceService.save(container.getEntity()); // save
                                                container.setEntity(entity);
                                                container.setDirty(false);
@@ -244,6 +267,7 @@ public class AnnotatedLineDocumentProvider extends AbstractDocumentProvider {
                                        }
                                }
                        }
+                       this.conversation.commit(true);
                        for (LineAnnotation annotation : model.getDeletedAnnotations()) {
                                if (annotation.isMarkedAsNew()) {
                                        continue;
index e7640f0..03ee6e9 100644 (file)
@@ -71,7 +71,7 @@ public class AnnotatedLineEditor extends TextEditor implements IConversationEnab
     protected void doSetInput(IEditorInput input) throws CoreException {
 
         AnnotatedLineDocumentProvider provider = new AnnotatedLineDocumentProvider(input);
-
+        
         provider.setLineDisplayStrategy(lineDisplayStrategy, input);
         setDocumentProvider(provider);
 
@@ -197,6 +197,8 @@ public class AnnotatedLineEditor extends TextEditor implements IConversationEnab
     public LineAnnotation createAnnotatedLine(Object entity) {
 
         IEditorInput input = getEditorInput();
+        this.conversation.close();
+        this.conversation = ((AbstractBulkEditorInput)input).getConversation();
         AnnotatedLineDocumentProvider provider = (AnnotatedLineDocumentProvider) getDocumentProvider();
 
         LineAnnotation annotation = null;
index fa41c94..d3d9d48 100644 (file)
@@ -10,6 +10,8 @@
 
 package eu.etaxonomy.taxeditor.bulkeditor;
 
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.commands.operations.UndoContext;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -71,8 +73,11 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
 
        private boolean isDirty;
 
+    private IUndoContext undoContext;
+
        public BulkEditor() {
                super(CdmStore.createConversation());
+        undoContext = new UndoContext();
        }
 
        /** {@inheritDoc} */
@@ -169,7 +174,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
        @Override
        public void setFocus() {
            conversation.bind();
-               searchBar.setFocus();
 
                // TODO find a better place to put this - this dialog should be shown after initial contents of
                //      Editor are displayed
@@ -178,6 +182,7 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                        isInitialFocus = false;
                }
                super.setFocus();
+               searchBar.setFocus();
        }
 
        private void displayWarningDialog() {
@@ -270,19 +275,22 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
 
                        // TODO check if dirty, prompt save
                        if (isDirty()) {
-                               boolean proceed = MessageDialog.openQuestion(getEditorSite().getShell(),
-                                               "Save changes", "You have made changes that must be saved before this query can be executed. Would you like to proceed?");
-                               if (proceed) {
+                               String[] labels = {"Save (and Search)", "Don't save (and Search)","Cancel"};
+                               MessageDialog dialog =new MessageDialog(getEditorSite().getShell(), "Save changes", null, "You have made changes that must be saved before this query can be executed. Would you like to proceed?", MessageDialog.QUESTION,labels, 0);
+                               int result = dialog.open();
+                                               //MessageDialog.openQuestion(getEditorSite().getShell(),
+                                               //"Save changes", "You have made changes that must be saved before this query can be executed. Would you like to proceed?");
+                               if (result == 0) {
                                        doSave(null);
-                               } else {
+                               } else if (result == 2){
                                        return;
                                }
                        }
                        conversation.clear();
                        conversation.commit(true);
-                       
+
                        getEditorInput().dispose();
-                       initializeEditor();
+                       getEditorInput().bind();
                        getEditorInput().performSearch(query);
 
                        refresh();
@@ -324,4 +332,8 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
        public boolean canAttachMedia() {
            return getEditorInput() instanceof TaxonEditorInput?true:false;
        }
+
+    public IUndoContext getUndoContext() {
+        return undoContext;
+    }
 }
index 613ee50..e1e9867 100644 (file)
@@ -162,16 +162,7 @@ public class BulkEditorLineDisplay implements ILineDisplayStrategy {
        /** {@inheritDoc} */
        @Override
     public String getEmptyCacheMessage(Object entity) {
-               if (entity instanceof Reference) {
-                       return "No reference title cache";
-               }
-               if (entity instanceof TaxonNameBase) {
-                       return "No name title cache";
-               }
-               if (entity instanceof AgentBase) {
-                       return "No title cache";
-               }
-               return "";
+               return entity.toString();
        }
 
        /* (non-Javadoc)
index bbfe04d..20a4c5d 100644 (file)
@@ -22,8 +22,6 @@ import eu.etaxonomy.taxeditor.bulkeditor.input.OccurrenceEditorInput;
 import eu.etaxonomy.taxeditor.bulkeditor.input.TaxonEditorInput;
 
 /**
- * <p>BulkEditorPropertyTester class.</p>
- *
  * @author p.ciardelli
  * @created 21.09.2009
  * @version 1.0
@@ -43,16 +41,13 @@ public class BulkEditorPropertyTester extends PropertyTester {
     public static final String IS_PERSON = "isPerson";
     public static final String IS_TEAM = "isTeam";
     public static final String IS_MEDIA_EDITOR = "isMediaEditor";
-       /* (non-Javadoc)
-        * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
-        */
-       /** {@inheritDoc} */
+
+    /** {@inheritDoc} */
        @Override
     public boolean test(Object receiver, String property, Object[] args,
                        Object expectedValue) {
                BulkEditor bulkEditor = null;
 
-
                bulkEditor = (BulkEditor) receiver;
                if (IS_MERGING_ENABLED.equals(property)) {
                        IEditorInput input = bulkEditor.getEditorInput();
@@ -74,16 +69,10 @@ public class BulkEditorPropertyTester extends PropertyTester {
                }
         else if(IS_TAXON_EDITOR.equals(property)){
             return bulkEditor.getEditorInput() instanceof TaxonEditorInput;
-        } else if(IS_MEDIA_EDITOR.equals(property)){
+        }
+        else if(IS_MEDIA_EDITOR.equals(property)){
             return bulkEditor.getEditorInput() instanceof MediaEditorInput;
         }
-
-//             if (("isPublishFlagEditingEnabled").equals(property)) {
-//                     IEditorInput input = bulkEditor.getEditorInput();
-//                     if (input instanceof NameEditorInput) {
-//                             return ((NameEditorInput) input).isPublishFlagEnabled();
-//                     }
-//             }
                return false;
        }
 }
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorSelectionPropertyTester.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorSelectionPropertyTester.java
new file mode 100644 (file)
index 0000000..1f5b701
--- /dev/null
@@ -0,0 +1,31 @@
+package eu.etaxonomy.taxeditor.bulkeditor.command;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
+import eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputType;
+
+public class BulkEditorSelectionPropertyTester extends PropertyTester {
+
+    public static final String IS_BULK_EDITOR_SUPPORTED = "isBulkEditorSupported";
+
+       @Override
+       public boolean test(Object receiver, String property, Object[] args,
+                       Object expectedValue) {
+               if(IS_BULK_EDITOR_SUPPORTED.equals(property)){
+                       if(receiver instanceof IStructuredSelection){
+                               IStructuredSelection selection = (IStructuredSelection) receiver;
+                               Object selectedElement = selection.getFirstElement();
+                               if(selectedElement!=null){
+                                   if(selectedElement instanceof UuidAndTitleCache){
+                                       return BulkEditorInputType.getByType(((UuidAndTitleCache) selectedElement).getType())!=null;
+                                   }
+                                       return BulkEditorInputType.getByType(selectedElement.getClass())!=null;
+                               }
+                       }
+               }
+               return false;
+       }
+
+}
index dc4d133..9f733f3 100644 (file)
@@ -19,6 +19,7 @@ import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorConstants;
 import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
 import eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputType;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * <p>OpenBulkEditorHandler class.</p>
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForIdentifiableEntity.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForIdentifiableEntity.java
new file mode 100644 (file)
index 0000000..6910f3d
--- /dev/null
@@ -0,0 +1,31 @@
+package eu.etaxonomy.taxeditor.bulkeditor.handler.defaultHandler;
+
+import java.util.UUID;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.ui.PartInitException;
+
+import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil;
+import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+public class OpenBulkEditorForIdentifiableEntity extends DefaultOpenHandlerBase<IdentifiableEntity> {
+
+       @Override
+       protected IdentifiableEntity getEntity(UUID uuid) {
+               return CdmStore.getCommonService().find(IdentifiableEntity.class, uuid);
+       }
+
+       @Override
+       protected void open(ExecutionEvent event, IdentifiableEntity entity) {
+               try {
+                       BulkEditorUtil.openEditor(entity);
+               } catch (PartInitException e) {
+            MessagingUtils.error(this.getClass(), "Bulk Editor could not be opened for "+entity, e);
+               }
+       }
+
+
+}
index 00f746d..d57ea68 100644 (file)
@@ -10,7 +10,6 @@
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
@@ -21,6 +20,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IPersistableElement;
 
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
@@ -41,8 +41,6 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
- * <p>Abstract AbstractBulkEditorInput class.</p>
- *
  * @author p.ciardelli
  * @created 25.06.2009
  * @version 1.0
@@ -56,33 +54,20 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> extends CdmEnt
        private List<T> model;
 
        private IEntityCreator<T> entityCreator;
-
-       private static Class serviceClass;
+       private final ConversationHolder conversation;
 
        public AbstractBulkEditorInput() {
            super(true);
+           this.conversation = CdmStore.createConversation();
        }
 
-       /**
-        * <p>NewInstance</p>
-        *
-        * @param inputType a {@link eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputTypeValues.BulkEditorInputType} object.
-        * @return a {@link eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput} object.
-        */
        static public AbstractBulkEditorInput NewInstance(BulkEditorInputType inputType) {
 
                return BulkEditorInputType.getInput(inputType);
        }
 
-       /**
-        * <p>NewInstance</p>
-        *
-        * @param entity a {@link eu.etaxonomy.cdm.model.common.IdentifiableEntity} object.
-        * @return a {@link eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput} object.
-        */
        public static AbstractBulkEditorInput NewInstance(IdentifiableEntity entity) {
 
-
                BulkEditorInputType inputType = BulkEditorInputType.getByType(entity.getClass());
 
                AbstractBulkEditorInput editorInput = NewInstance(inputType);
@@ -92,83 +77,35 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> extends CdmEnt
                return editorInput;
        }
 
-       /**
-        * <p>listEntities</p>
-        *
-        * @param configurator a {@link eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator} object.
-        * @return a {@link java.util.List} object.
-        */
        protected abstract List<T> listEntities(IIdentifiableEntityServiceConfigurator configurator);
 
-       /**
-        * <p>loadEntity</p>
-        *
-        * @param entityUuid a {@link java.util.UUID} object.
-        * @return a T object.
-        */
-       protected T loadEntity(UUID entityUuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{});
-               return (T) CdmStore.getService(serviceClass).load(entityUuid, propertyPaths);
-       }
+       protected abstract T loadEntity(UUID entityUuid);
 
        private void setEntityUuid(UUID entityUuid){
                this.entityUuid = entityUuid;
        }
 
-       /**
-        * <p>Getter for the field <code>entityUuid</code>.</p>
-        *
-        * @return a {@link java.util.UUID} object.
-        */
        public UUID getEntityUuid() {
                return entityUuid;
        }
 
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#exists()
-        */
-       /**
-        * <p>exists</p>
-        *
-        * @return a boolean.
-        */
        @Override
     public boolean exists() {
                // TODO Auto-generated method stub
                return false;
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
-        */
-       /**
-        * <p>getImageDescriptor</p>
-        *
-        * @return a {@link org.eclipse.jface.resource.ImageDescriptor} object.
-        */
        @Override
     public ImageDescriptor getImageDescriptor() {
                // TODO Auto-generated method stub
                return null;
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#getPersistable()
-        */
-       /**
-        * <p>getPersistable</p>
-        *
-        * @return a {@link org.eclipse.ui.IPersistableElement} object.
-        */
        @Override
     public IPersistableElement getPersistable() {
                return null;
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
-        */
        /** {@inheritDoc} */
        @Override
     @SuppressWarnings("unchecked")
@@ -176,11 +113,6 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> extends CdmEnt
                return null;
        }
 
-       /**
-        * <p>Setter for the field <code>query</code>.</p>
-        *
-        * @param bulkEditorQuery a {@link eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorQuery} object.
-        */
        public void performSearch(final BulkEditorQuery bulkEditorQuery) {
 
                List<T> entityList = new ArrayList<T>();
@@ -206,29 +138,14 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> extends CdmEnt
                model = entityList;
        }
 
-       /**
-        * <p>isMergingEnabled</p>
-        *
-        * @return a boolean.
-        */
        public boolean isMergingEnabled() {
                return false;
        }
 
-       /**
-        * <p>isMergingEnabled</p>
-        *
-        * @return a boolean.
-        */
        public boolean isConvertingEnabled() {
                return false;
        }
-       /**
-        * <p>isMarkerTypeEditingEnabled</p>
-        *
-        * @param markerType a {@link eu.etaxonomy.cdm.model.common.MarkerType} object.
-        * @return a boolean.
-        */
+
        public boolean isMarkerTypeEditingEnabled(MarkerType markerType) {
                return false;
        }
@@ -266,9 +183,6 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> extends CdmEnt
                return entityCreator;
        }
 
-       /**
-        * @return
-        */
        protected abstract IEntityCreator<T> createEntityCreator();
 
        /**
@@ -295,10 +209,6 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> extends CdmEnt
                return entity.getClass().getSimpleName();
        }
 
-       /**
-        * @param entity
-        * @return
-        */
        public String getText(T entity) {
                if(entity instanceof IdentifiableEntity){
                        IdentifiableEntity identifiableEntity = (IdentifiableEntity) HibernateProxyHelper.deproxy(entity);
@@ -309,9 +219,6 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> extends CdmEnt
                return "No text. Implement in subclass";
        }
 
-       /**
-        * @return
-        */
        public List<T> getModel() {
                return model;
        }
@@ -326,21 +233,19 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> extends CdmEnt
            }
        }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
-     */
     @Override
     public   List<T> getRootEntities() {
         return getModel();
     }
 
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
-     */
     @Override
     public Map<Object, List<String>> getPropertyPathsMap() {
         // TODO Auto-generated method stub
         return null;
     }
+
+       public ConversationHolder getConversation() {
+               return conversation;
+       }
 }
index f7f65de..31b7498 100644 (file)
@@ -9,11 +9,14 @@
 */
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
+import java.util.Arrays;
 import java.util.List;
+import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.IAgentService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
 import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
@@ -147,12 +150,8 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
 
        @Override
        public TeamOrPersonBase save(TeamOrPersonBase entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return (TeamOrPersonBase) CdmStore.getService(IAgentService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IAgentService.class).saveOrUpdate(entity) ;
-               return entity;
-           }
+          return (TeamOrPersonBase) CdmStore.getService(IAgentService.class).merge(entity, true).getMergedEntity();
+          
        }
 
        @Override
@@ -171,4 +170,12 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
     }
 
 
+       @Override
+       protected TeamOrPersonBase loadEntity(UUID entityUuid) {
+               List<String> propertyPaths = Arrays.asList(new String[]{});
+               return HibernateProxyHelper.deproxy(CdmStore.getService(IAgentService.class).load(entityUuid, propertyPaths), TeamOrPersonBase.class);
+       }
+
+
+
 }
index a509aec..bbbc9a2 100644 (file)
@@ -27,7 +27,7 @@ import eu.etaxonomy.cdm.model.name.NameRelationship;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorConstants;
 
 public enum BulkEditorInputType {
@@ -100,7 +100,7 @@ public enum BulkEditorInputType {
                        return GROUP;
                } else if (User.class.isAssignableFrom(clazz)) {
                        return USER;
-               } else if (Taxon.class.isAssignableFrom(clazz)){
+               } else if (TaxonBase.class.isAssignableFrom(clazz)){
                        return TAXON;
                } else if (Media.class.isAssignableFrom(clazz)){
             return MEDIA;
index 0082939..440af45 100644 (file)
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
+import java.util.Arrays;
 import java.util.List;
+import java.util.UUID;
 
+import eu.etaxonomy.cdm.api.service.IAgentService;
 import eu.etaxonomy.cdm.api.service.IGroupService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
 import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.Group;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
 import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.GroupCreator;
@@ -62,12 +66,8 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
         */
        @Override
        public Group save(Group entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IGroupService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IGroupService.class).saveOrUpdate(entity);
-               return entity;
-           }
+           return CdmStore.getService(IGroupService.class).merge(entity, true).getMergedEntity();
+           
        }
 
        /* (non-Javadoc)
@@ -120,6 +120,12 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
 
     }
 
+       @Override
+       protected Group loadEntity(UUID entityUuid) {
+               List<String> propertyPaths = Arrays.asList(new String[]{});
+               return HibernateProxyHelper.deproxy(CdmStore.getService(IAgentService.class).load(entityUuid, propertyPaths), Group.class);
+       }
+
 
 
 }
index 6f3ccb2..697118e 100644 (file)
@@ -9,7 +9,9 @@
 */
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
+import java.util.Arrays;
 import java.util.List;
+import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.IMediaService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
@@ -54,12 +56,8 @@ public class MediaEditorInput extends AbstractBulkEditorInput<Media> {
 
     @Override
     public Media save(Media entity) {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            return CdmStore.getService(IMediaService.class).merge(entity, true).getMergedEntity();
-        } else {
-            CdmStore.getService(IMediaService.class).saveOrUpdate(entity) ;
-            return entity;
-        }
+       return CdmStore.getService(IMediaService.class).merge(entity, true).getMergedEntity();
+       
     }
 
     @Override
@@ -91,4 +89,11 @@ public class MediaEditorInput extends AbstractBulkEditorInput<Media> {
 
         return sortProviders;
     }
+    
+       @Override
+       protected Media loadEntity(UUID entityUuid) {
+               List<String> propertyPaths = Arrays.asList(new String[]{});
+               return CdmStore.getService(IMediaService.class).load(entityUuid, propertyPaths);
+       }
+
 }
index 6116162..9017638 100644 (file)
@@ -10,7 +10,9 @@
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
+import java.util.Arrays;
 import java.util.List;
+import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.INameService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
@@ -98,7 +100,9 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
        /** {@inheritDoc} */
        @Override
        public List listEntities(IIdentifiableEntityServiceConfigurator configurator) {
-               return CdmStore.getSearchManager().findNames(configurator);
+               
+               configurator.setPropertyPaths(getPropertyPaths());
+               return CdmStore.getSearchManager().findNames(configurator, this.getConversation());
        }
 
        /** {@inheritDoc}
@@ -118,12 +122,10 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
        /** {@inheritDoc} */
        @Override
     public TaxonNameBase save(TaxonNameBase entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(INameService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(INameService.class).saveOrUpdate(entity);
-               return entity;
-           }
+               TaxonNameBase mergedName = null;
+               mergedName =  CdmStore.getService(INameService.class).merge(entity, true).getMergedEntity();
+               return mergedName;
+               
        }
 
        /* (non-Javadoc)
@@ -173,5 +175,26 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
 
     }
 
+       @Override
+       protected TaxonNameBase loadEntity(UUID entityUuid) {
+               List<String> propertyPaths = Arrays.asList(new String[]{});
+               return CdmStore.getService(INameService.class).load(entityUuid, getPropertyPaths());
+       }
+
+
+    private List<String> getPropertyPaths(){
+        List<String> nameBasePropertyPaths = Arrays.asList(new String[] {
+        "name.descriptions",
+         "name.typeDesignations",
+         "name.status",
+         "name.nomenclaturalReference.inReference",
+         "name.taxonBases.taxonNodes",
+         "name.relationsFromThisName",
+         "name.relationsToThisName",
+         "name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.synonym.name.status",
+         "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName"});
+        
+        return nameBasePropertyPaths;
+    }
 
 }
index 929379d..b247659 100644 (file)
@@ -10,7 +10,9 @@
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
+import java.util.Arrays;
 import java.util.List;
+import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
@@ -137,12 +139,8 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
        /** {@inheritDoc} */
        @Override
     public SpecimenOrObservationBase<IIdentifiableEntityCacheStrategy> save(SpecimenOrObservationBase entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IOccurrenceService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IOccurrenceService.class).save(entity);
-               return entity;
-           }
+           return CdmStore.getService(IOccurrenceService.class).merge(entity, true).getMergedEntity();
+          
        }
 
 
@@ -173,4 +171,11 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
     public void merge() {
 
     }
+
+       @Override
+       protected SpecimenOrObservationBase loadEntity(UUID entityUuid) {
+               List<String> propertyPaths = Arrays.asList(new String[]{});
+               return CdmStore.getService(IOccurrenceService.class).load(entityUuid, propertyPaths);
+       }
+
 }
index 8b8c113..a269df4 100644 (file)
@@ -139,12 +139,7 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
        /** {@inheritDoc} */
        @Override
     public Reference save(Reference entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IReferenceService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IReferenceService.class).saveOrUpdate(entity);
-               return entity;
-           }
+          return CdmStore.getService(IReferenceService.class).merge(entity, true).getMergedEntity();
        }
 
        /* (non-Javadoc)
index aa6dd15..5ea635f 100644 (file)
@@ -71,12 +71,7 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
        }\r
        @Override\r
        public TaxonBase save(TaxonBase entity) {\r
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {\r
-               return CdmStore.getService(ITaxonService.class).merge(entity, true).getMergedEntity();\r
-           } else {\r
-               CdmStore.getService(ITaxonService.class).saveOrUpdate(entity);\r
-               return entity;\r
-           }\r
+           return CdmStore.getService(ITaxonService.class).merge(entity, true).getMergedEntity();\r
        }\r
 \r
 \r
index 72dd138..f78e19d 100644 (file)
@@ -10,7 +10,9 @@
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
+import java.util.Arrays;
 import java.util.List;
+import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
@@ -62,13 +64,7 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
         */
        @Override
        public User save(User entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IUserService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IUserService.class).saveOrUpdate(entity);
-               return entity;
-           }
-
+           return CdmStore.getService(IUserService.class).merge(entity, true).getMergedEntity();
        }
 
        /* (non-Javadoc)
@@ -121,6 +117,14 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
     public void merge() {
 
     }
+    
+
+       @Override
+       protected User loadEntity(UUID entityUuid) {
+               List<String> propertyPaths = Arrays.asList(new String[]{});
+               return CdmStore.getService(IUserService.class).load(entityUuid, propertyPaths);
+       }
+
 
 
 }
index 81ebab5..c9f0145 100644 (file)
@@ -43,12 +43,8 @@ public class UserCreator  implements IEntityCreator<User>{
        public User createEntity(Object key, String text) {
                try{
                        User user = User.NewInstance(text, text);
-                        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                            CdmStore.getService(IUserService.class).createUser(user);
-                            user = CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
-                        } else {
-                            CdmStore.getService(IUserService.class).createUser(user);
-                        }
+                       CdmStore.getService(IUserService.class).createUser(user);
+                       user = CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
                        return user;
                } catch (AccessDeniedException e){
                        MessagingUtils.messageDialog("Access denied", getClass(), e.getMessage(), e);
index c8a273f..ff5b0a6 100644 (file)
@@ -256,6 +256,9 @@ public class ReferencingObjectsView extends AbstractCdmViewPart {
             } else if (Group.class.isAssignableFrom(objectClass)){
                 referencedObject = CdmStore.getService(IGroupService.class).load(entity, null);
             }
+            else if(CdmBase.class.isAssignableFrom(objectClass)){
+                referencedObject = CdmStore.getCommonService().find(objectClass, entity);
+            }
                        //referencedObject =(CdmBase) CdmStore.getService(IIdentifiableEntityService.class).load(referencedObject.getUuid());
                Set<CdmBase> setOfReferencingObjects = null;
 
@@ -389,4 +392,9 @@ public class ReferencingObjectsView extends AbstractCdmViewPart {
 
        }
 
+       @Override
+       protected String getViewName() {
+               return "Referencing Objects";
+       }
+
 }
index be5bfdb..e3690c7 100644 (file)
        <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.5.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-4.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-4.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-4.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-4.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-4.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-4.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-4.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-4.2.0.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-services/4.1.0-SNAPSHOT/cdmlib-services-4.2.0-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-test-4.2.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-4.3.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-4.3.0.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-ext/4.3.0-SNAPSHOT/cdmlib-ext-4.3.0-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-4.3.0.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-io/4.3.0-SNAPSHOT/cdmlib-io-4.3.0-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-4.3.0.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-model/4.3.0-SNAPSHOT/cdmlib-model-4.3.0-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-4.3.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-4.3.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-4.3.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-4.3.0.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-services/4.3.0-SNAPSHOT/cdmlib-services-4.3.0-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-test-4.3.0.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/cglib-3.2.0.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-3.2.0.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/classmate-1.3.1.jar"/>\r
index 0f8ba7c..806d0b9 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: CDM Library Dependencies Plugin
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.cdmlib;singleton:=true
-Bundle-Version: 4.2.0
+Bundle-Version: 4.3.0
 Eclipse-BundleShape: dir
 Export-Package: com.google.api,
  com.google.api.detect,
@@ -82,6 +82,7 @@ Export-Package: com.google.api,
  eu.etaxonomy.cdm.io.specimen,
  eu.etaxonomy.cdm.io.specimen.abcd206.in,
  eu.etaxonomy.cdm.io.specimen.excel.in,
+ eu.etaxonomy.cdm.io.specimen.gbif.in,
  eu.etaxonomy.cdm.io.taxonx,
  eu.etaxonomy.cdm.io.tcsxml,
  eu.etaxonomy.cdm.io.tcsxml.in,
@@ -497,15 +498,15 @@ Bundle-ClassPath: .,
  lib/batik-util-1.7.jar,
  lib/batik-xml-1.7.jar,
  lib/c3p0-0.9.5.2.jar,
- lib/cdmlib-commons-4.2.0.jar,
- lib/cdmlib-ext-4.2.0.jar,
- lib/cdmlib-io-4.2.0.jar,
- lib/cdmlib-model-4.2.0.jar,
- lib/cdmlib-persistence-4.2.0.jar,
- lib/cdmlib-print-4.2.0.jar,
- lib/cdmlib-remote-4.2.0.jar,
- lib/cdmlib-services-4.2.0.jar,
- lib/cdmlib-test-4.2.0.jar,
+ lib/cdmlib-commons-4.3.0.jar,
+ lib/cdmlib-ext-4.3.0.jar,
+ lib/cdmlib-io-4.3.0.jar,
+ lib/cdmlib-model-4.3.0.jar,
+ lib/cdmlib-persistence-4.3.0.jar,
+ lib/cdmlib-print-4.3.0.jar,
+ lib/cdmlib-remote-4.3.0.jar,
+ lib/cdmlib-services-4.3.0.jar,
+ lib/cdmlib-test-4.3.0.jar,
  lib/cglib-3.2.0.jar,
  lib/cglib-nodep-3.2.0.jar,
  lib/classmate-1.3.1.jar,
index 2949e53..93df380 100644 (file)
@@ -25,15 +25,15 @@ bin.includes = META-INF/,\
                lib/batik-util-1.7.jar,\
                lib/batik-xml-1.7.jar,\
                lib/c3p0-0.9.5.2.jar,\
-               lib/cdmlib-commons-4.2.0.jar,\
-               lib/cdmlib-ext-4.2.0.jar,\
-               lib/cdmlib-io-4.2.0.jar,\
-               lib/cdmlib-model-4.2.0.jar,\
-               lib/cdmlib-persistence-4.2.0.jar,\
-               lib/cdmlib-print-4.2.0.jar,\
-               lib/cdmlib-remote-4.2.0.jar,\
-               lib/cdmlib-services-4.2.0.jar,\
-               lib/cdmlib-test-4.2.0.jar,\
+               lib/cdmlib-commons-4.3.0.jar,\
+               lib/cdmlib-ext-4.3.0.jar,\
+               lib/cdmlib-io-4.3.0.jar,\
+               lib/cdmlib-model-4.3.0.jar,\
+               lib/cdmlib-persistence-4.3.0.jar,\
+               lib/cdmlib-print-4.3.0.jar,\
+               lib/cdmlib-remote-4.3.0.jar,\
+               lib/cdmlib-services-4.3.0.jar,\
+               lib/cdmlib-test-4.3.0.jar,\
                lib/cglib-3.2.0.jar,\
                lib/cglib-nodep-3.2.0.jar,\
                lib/classmate-1.3.1.jar,\
index 2cc4ba1..b285179 100644 (file)
@@ -4,7 +4,7 @@
   <parent>\r
     <groupId>eu.etaxonomy</groupId>\r
     <artifactId>taxeditor-parent</artifactId>\r
-    <version>4.2.0</version>\r
+    <version>4.3.0</version>\r
   </parent>\r
   <modelVersion>4.0.0</modelVersion>\r
   <artifactId>eu.etaxonomy.taxeditor.cdmlib</artifactId>\r
       <version>${cdmlib.version}</version>\r
     </dependency>\r
 \r
-    <!-- <dependency> -->\r
-    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
-    <!-- <artifactId>jetty-server</artifactId> -->\r
-    <!-- <version>9.1.3.v20140225</version> -->\r
-    <!-- </dependency> -->\r
-    <!-- <dependency> -->\r
-    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
-    <!-- <artifactId>jetty-util</artifactId> -->\r
-    <!-- <version>9.1.3.v20140225</version> -->\r
-    <!-- </dependency> -->\r
-    <!-- <dependency> -->\r
-    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
-    <!-- <artifactId>jetty-xml</artifactId> -->\r
-    <!-- <version>9.1.3.v20140225</version> -->\r
-    <!-- </dependency> -->\r
-    <!-- <dependency> -->\r
-    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
-    <!-- <artifactId>jetty-servlet</artifactId> -->\r
-    <!-- <version>9.1.3.v20140225</version> -->\r
-    <!-- </dependency> -->\r
-    <!-- <dependency> -->\r
-    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
-    <!-- <artifactId>jetty-webapp</artifactId> -->\r
-    <!-- <version>9.1.3.v20140225</version> -->\r
-    <!-- </dependency> -->\r
-    <!-- <dependency> -->\r
-    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
-    <!-- <artifactId>jetty-security</artifactId> -->\r
-    <!-- <version>9.1.3.v20140225</version> -->\r
-    <!-- </dependency> -->\r
-    <!-- <dependency> -->\r
-    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
-    <!-- <artifactId>jetty-http</artifactId> -->\r
-    <!-- <version>${jetty.version}</version> -->\r
-    <!-- </dependency> -->\r
-    <!-- <dependency> -->\r
-    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
-    <!-- <artifactId>jetty-io</artifactId> -->\r
-    <!-- <version>${jetty.version}</version> -->\r
-    <!-- </dependency> -->\r
-    <!-- <dependency> -->\r
-    <!-- <groupId>javax.servlet</groupId> -->\r
-    <!-- <artifactId>javax.servlet-api</artifactId> -->\r
-    <!-- <version>3.1.0</version> -->\r
-    <!-- </dependency> -->\r
-\r
-    <!-- <dependency> -->\r
-    <!-- <groupId>javax.servlet</groupId> -->\r
-    <!-- <artifactId>jsp-api</artifactId> -->\r
-    <!-- <version>2.0</version> -->\r
-    <!-- </dependency> -->\r
-\r
     <dependency>\r
       <groupId>net.sf.ehcache</groupId>\r
       <artifactId>ehcache-core</artifactId>\r
       <version>1.3</version>\r
     </dependency>\r
     <dependency>\r
-      <groupId>com.mchange</groupId>\r
-      <artifactId>c3p0</artifactId>\r
-      <version>${c3p0.version}</version>\r
-    </dependency>\r
-    <dependency>\r
       <groupId>org.jboss.spec.javax.transaction</groupId>\r
       <artifactId>jboss-transaction-api_1.1_spec</artifactId>\r
       <version>1.0.0.Final</version>\r
     </dependency>\r
 \r
     <!-- For Unit Tests Start -->\r
+       <!-- still needed? -->\r
 \r
     <dependency>\r
-      <groupId>org.unitils</groupId>\r
-      <artifactId>unitils-core</artifactId>\r
-      <version>3.4.2</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>org.unitils</groupId>\r
-      <artifactId>unitils-spring</artifactId>\r
-      <version>3.4.2</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>org.unitils</groupId>\r
-      <artifactId>unitils-database</artifactId>\r
-      <version>3.4.2</version>\r
-    </dependency>\r
-    <dependency>\r
       <groupId>commons-dbcp</groupId>\r
       <artifactId>commons-dbcp</artifactId>\r
       <version>1.4</version>\r
       <artifactId>commons-pool</artifactId>\r
       <version>1.5.4</version>\r
     </dependency>\r
-    <dependency>\r
-      <groupId>org.unitils</groupId>\r
-      <artifactId>unitils-dbmaintainer</artifactId>\r
-      <version>3.4.2</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>com.h2database</groupId>\r
-      <artifactId>h2</artifactId>\r
-      <version>1.4.181</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>org.unitils</groupId>\r
-      <artifactId>unitils-dbunit</artifactId>\r
-      <version>3.4.2</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>org.dbunit</groupId>\r
-      <artifactId>dbunit</artifactId>\r
-      <version>2.4.9</version>\r
-    </dependency>\r
+\r
\r
     <!-- For Unit Tests End -->\r
 \r
     <!-- For Hibernate Mapping Start -->\r
                <version>5.5.8</version>\r
                <scope>compile</scope>\r
        </dependency>\r
-    \r
 \r
   </dependencies>\r
 </project>\r
index c9f360f..2cb3143 100644 (file)
@@ -59,6 +59,7 @@ import eu.etaxonomy.cdm.api.service.INameService;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;\r
 import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;\r
 import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;\r
+import eu.etaxonomy.cdm.api.service.IPreferenceService;\r
 import eu.etaxonomy.cdm.api.service.IProgressMonitorService;\r
 import eu.etaxonomy.cdm.api.service.IReferenceService;\r
 import eu.etaxonomy.cdm.api.service.IService;\r
@@ -413,6 +414,11 @@ public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfigu
     public IGroupService getGroupService(){\r
         return (IGroupService) getService(IGroupService.class, "/remoting/group.service", new CdmServiceRequestExecutor());\r
     }\r
+    \r
+    @Override\r
+    public IPreferenceService getPreferenceService(){\r
+        return (IPreferenceService) getService(IPreferenceService.class, "/remoting/preference.service", new CdmServiceRequestExecutor());\r
+    }\r
 \r
 \r
     @Override\r
index c99ce01..8b079fc 100644 (file)
@@ -71,8 +71,8 @@ public class CacheLoader {
         } else if (obj instanceof Collection) {
             return (T) load((Collection<T>)obj, recursive, update);
         } else if(obj instanceof Pager) {
-             load(((Pager)obj).getRecords(), recursive, update);
-             return obj;
+               load(((Pager)obj).getRecords(), recursive, update);
+            return obj;
         } else if(obj instanceof MergeResult) {
             return (T) load((MergeResult<CdmBase>)obj, recursive, update);
         }
@@ -153,7 +153,7 @@ public class CacheLoader {
         return map;
     }
 
-    public <T extends Object> Collection<T> load(Collection<T> collection, boolean recursive, boolean update){
+    public <T extends Object> Collection<T> load(Collection<T> collection,  boolean recursive, boolean update){
 
         Collection<T> loadedCollection;
         if(isRecursiveEnabled && recursive) {
index 7319529..442bc61 100644 (file)
@@ -246,10 +246,7 @@ public class EntityCacherDebugResult {
             return;
         }
 
-        int originalMapSize = map.size();
-
         Iterator<Map.Entry<T,T>> iter = map.entrySet().iterator();
-        int i=0;
         while ( iter.hasNext() ) {
             Map.Entry<T,T> e = iter.next();
             CdmEntityInfo childCei = new CdmEntityInfo(e);
@@ -268,15 +265,22 @@ public class EntityCacherDebugResult {
     private <T extends Object> void debug(Collection<T> collection,
             List<CdmEntityInfo> alreadyVisitedEntities,
             CdmEntityInfo cei) {
-        int length = collection.size();
-        Object[] result = new Object[length];
         Iterator<T> collectionItr = collection.iterator();
 
         while(collectionItr.hasNext()) {
             Object obj = collectionItr.next();
-            CdmEntityInfo childCei = new CdmEntityInfo(ProxyUtils.deproxy(obj));
-            cei.addChild(childCei);
-            debugRecursive(obj, alreadyVisitedEntities, childCei);
+            boolean alreadyVisited = false;
+            for (CdmEntityInfo entityInfo: alreadyVisitedEntities) {
+                if(obj.equals(entityInfo.getObject())){
+                    alreadyVisited = true;
+                    break;
+                }
+            }
+            if(!alreadyVisited){
+                CdmEntityInfo childCei = new CdmEntityInfo(ProxyUtils.deproxy(obj));
+                cei.addChild(childCei);
+                debugRecursive(obj, alreadyVisitedEntities, childCei);
+            }
 
         }
 
@@ -312,7 +316,6 @@ public class EntityCacherDebugResult {
                 // retrieve the actual object corresponding to the field.
                 // this object will be either a CdmBase or a Collection / Map
                 // with CdmBase as the generic type
-                String f = field;
                 CdmEntityInfo childCei = getDebugCdmBaseTypeFieldValue(cdmEntity, field, alreadyVisitedEntities, cei);
                 if(!childCei.isProxy()) {
                     Object object = childCei.getObject();
@@ -356,9 +359,6 @@ public class EntityCacherDebugResult {
             o = ProxyUtils.deproxy(o);
             CdmBase cdmEntityInSubGraph = null;
 
-            boolean isHibernateProxy = false;
-            boolean isPersistentCollection = false;
-
             childCei = new CdmEntityInfo(o);
             cei.addChild(childCei);
             childCei.setField(field);
@@ -419,9 +419,10 @@ public class EntityCacherDebugResult {
             for(CdmEntityInfo cei : ceiSet) {
                 if(cei.getObject() == objectToCompare) {
                     foundIdentical = true;
-                } else if(objectToCompare.equals(cei.getObject())) {
-                    return false;
                 }
+//                } else if(objectToCompare.equals(cei.getObject())) {
+//                    return false;
+//                }
             }
         }
         return foundIdentical;
index 44e4537..cf3616e 100644 (file)
@@ -2,12 +2,13 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Editor Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.editor;singleton:=true
-Bundle-Version: 4.2.0
+Bundle-Version: 4.3.0
 Bundle-Activator: eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin
 Bundle-Vendor: %Bundle-Vendor.0
 Bundle-Localization: OSGI-INF/l10n/plugin
 Export-Package: eu.etaxonomy.taxeditor.editor,
  eu.etaxonomy.taxeditor.editor.handler,
+ eu.etaxonomy.taxeditor.editor.handler.defaultHandler,
  eu.etaxonomy.taxeditor.editor.internal,
  eu.etaxonomy.taxeditor.editor.key.polytomous,
  eu.etaxonomy.taxeditor.editor.name,
index 868a448..b069ba2 100644 (file)
@@ -16,7 +16,7 @@ SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Remove from this Sequence
 SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Reuse for other Sequence
 SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=Reuse SingleRead here
 
-DerivateView_DERIVATIVE_EDITOR=Derivative Editor
+DerivateView_DERIVATIVE_EDITOR=Specimen Editor
 DerivateView_SAVING_HIERARCHY=Saving hierarchy
 DerivateView_UNSAVED_CHANGES=View has unsaved changes
 DerivateView_YOU_NEED_TO_SAVE=You need to save before performing this action
@@ -34,7 +34,7 @@ DerivateViewEditorInput_NO_ROOT=No root element found\!
 MoveDerivateOperation_MOVE_NOT_POSSIBLE=Moving derivatives not possible\!
 MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Moving "%s" to "%s" is not possible\!
 
-OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Could not open Derivative Editor
+OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Could not open Specimen Editor
 OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Failed to open Editor
 OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=The derivative hierarchy is corrupted\!
 OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=No Derivatives found
@@ -47,3 +47,7 @@ DescriptiveViewPart_COLLAPSE_ALL=Collapse All
 DescriptiveViewPart_EXPAND_ALL=Expand All
 DescriptiveViewPart_FACTUAL_DATA=Factual Data
 DescriptiveViewPart_SHOW_ALL_DATA=Show all factual data
+
+ConceptGraphView_VIEWER_NAME=Concept Graph
+ConceptViewPart_VIEWER_NAME=Concept Relations
+UsesViewPart_VIEWER_NAME=Uses
index ef43167..f252b7d 100644 (file)
@@ -16,7 +16,7 @@ SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Von Sequenz entfernen
 SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Für andere Sequenz verwenden
 SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=SingleRead hier verwenden
 
-DerivateView_DERIVATIVE_EDITOR=Derivat-Editor
+DerivateView_DERIVATIVE_EDITOR=Specimen-Editor
 DerivateView_SAVING_HIERARCHY=Speichere Hierarchie
 DerivateView_UNSAVED_CHANGES=Ungepeicherte Änderungen
 DerivateView_YOU_NEED_TO_SAVE=Sie müssen speichern, um diese Aktion auszuführen
@@ -34,7 +34,7 @@ DerivateViewEditorInput_NO_ROOT=Kein Root-Element gefunden\!
 MoveDerivateOperation_MOVE_NOT_POSSIBLE=Verschieben von Derivaten nicht möglich\!
 MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Verschieben von "%s" nach "%s" nicht möglich\!
 
-OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Konnte Derivat-Editor nicht öffnen
+OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Konnte Specimen-Editor nicht öffnen
 OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Öffnen des Editors fehlgeschlagen
 OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=Die Derivathierarchie ist korrumpiert\!
 OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=Keine Derivate gefunden
@@ -47,3 +47,7 @@ DescriptiveViewPart_COLLAPSE_ALL=Alles einklappen
 DescriptiveViewPart_EXPAND_ALL=Alles ausklappen
 DescriptiveViewPart_FACTUAL_DATA=Faktendaten
 DescriptiveViewPart_SHOW_ALL_DATA=Zeige alle Faktendaten
+
+ConceptGraphView_VIEWER_NAME=Konzeptgraph
+ConceptViewPart_VIEWER_NAME=Konzeptrelationen
+UsesViewPart_VIEWER_NAME=Nutzung
index 486622a..14420cb 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 = Derivative Editor\r
+editor.name.5 = Specimen Editor\r
 view.name = Factual Data\r
 view.name.0 = Uses\r
 view.name.1 = Media\r
@@ -111,12 +111,12 @@ 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 Derivative Editor\r
+command.name.35 = Open Specimen Editor\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
 editor.name.7 = Gbif Import Editor\r
-editor.name.8 = Checklist Editor\r
+editor.name.8 = Distribution Editor\r
 view.name.4 = Specimen Import\r
 view.name.5 = GBIF Specimen Import\r
 command.label.46 = Name\r
@@ -126,7 +126,7 @@ command.label.49 = Misapplication
 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.38 = Open Distribution 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
@@ -153,6 +153,9 @@ command.name.43 = Create Field Unit
 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\r
+command.name.57 =  Set as Basionym of Homotypical Group\r
+command.label.57 = Set as Basionym of Homotypical Group\r
+\r
 markerContentGenerator.name = Validation Problems Marker Generator\r
 command.name.45 = Delete\r
 command.name.47 = Delete\r
@@ -163,8 +166,8 @@ command.name.49 = delete
 command.name.50 = delete\r
 command.name.51 = delete
 \r
-editor.name.DERIVATIVE_EDITOR = Derivative Editor\r
-command.label.DERIVATIVE_EDITOR = Derivative Editor\r
+editor.name.DERIVATIVE_EDITOR = Specimen Editor\r
+command.label.DERIVATIVE_EDITOR = Specimen Editor\r
 command.label.LINK_WITH_TAXON_SELECTION = Link with taxon selection\r
 command.label.UNLINK_FROM_TAXON_SELECTION = Unlink from taxon selection\r
 command.label.REUSE_SINGLE_READ_HERE = Reuse single read here\r
@@ -172,7 +175,7 @@ command.label.REUSE_SINGLE_READ_FOR_OTHER_SEQUENCE = Reuse for other sequence
 command.label.REMOVE_SINGLE_READ_FROM_THIS_SEQUENCE = Remove from this sequence\r
 command.label.LINK_WITH_TAXON_SELECTIO = Link with Taxon Selection\r
 command.name.OPEN_NAME_EDITOR_FOR_TAXON_NODE = Open Taxon Editor for taxonnode\r
-command.name.OPEN_DERIVATIVE_EDITOR = Open Derivative Editor\r
+command.name.OPEN_DERIVATIVE_EDITOR = Open Specimen Editor\r
 command.name.LINK_WITH_TAXON_SELECTION = Link with taxon selection\r
 command.name.COPY_SINGLE_READ_TO_CLIPBOARD = Copy SingleRead to clipboard\r
 command.name.REUSE_SINGLE_READ = Reuse SingleRead\r
@@ -180,4 +183,5 @@ command.name.REMOVE_SINGLE_READ = Remove SingleRead from sequence
 command.name.TOGGLE_LINK_WITH_TAXON_SELECTION = Toggle link with taxon selection\r
 \r
 viewCommandMapping.viewerName.NAME_EDITOR = Name Editor\r
-viewCommandMapping.viewerName.SPECIMEN_EDITOR = Derivative Editor\r
+viewCommandMapping.viewerName.SPECIMEN_EDITOR = Specimen Editor\r
+viewCommandMapping.viewerName.CHECKLIST_EDITOR = Distribution Editor
\ No newline at end of file
index d7b53fb..4ea61bd 100644 (file)
@@ -26,7 +26,7 @@ command.label.5 = Medien
 command.label.6 = Konzeptrelationen
 command.label.7 = Konzeptgraph
 command.label.8 = \u00d6ffne Parent
-menu.label = Neue
+menu.label = Neu
 command.label.9 = Heterotypisches Synonym
 command.label.10 = Homotypisches Synonym
 command.label.11 = Synonym in Homotypischer Gruppe
@@ -68,6 +68,7 @@ menu.label.3 = Neue
 command.label.43 = \u00d6ffne verbundenes Konzept
 command.label.44 = L\u00f6schen
 command.label.45 = Bearbeite Rechte
+command.label.57 = Setze als Basionym der homotypischen Gruppe
 extension.name = Namensbefehle
 category.name.0 = -- Namenseditor
 command.name = \u00d6ffne Elter
@@ -116,7 +117,7 @@ scheme.description = Die Standard Tastenkombinationsschema f\u00fcr den Taxonomi
 scheme.name = Taxonomic Editor Standard Tastenkombinationen
 editor.name.6 = Specimen Import Editor
 editor.name.7 = GBIF Import Editor
-editor.name.8 = Checklist Editor
+editor.name.8 = Verbreitungs-Editor
 view.name.4 = Specimen Import
 view.name.5 = GBIF Specimen Import
 command.label.46 = Name
@@ -126,7 +127,7 @@ command.label.49 = Misapplication
 command.label.50 = Benutze vorhandenes Bild
 command.name.36 = Erstelle Misapplication
 command.name.37 = Benutze vorhandenes Bild
-command.name.38 = \u00d6ffne Checklist Editor
+command.name.38 = \u00d6ffne Verbreitungs-Editor
 command.name.39 = Neue Datenquelle
 wizard.name = Specimen Suche/Import
 wizard.description = Sendet eine Anfrage mit den eingegebenen Parametern an den Datenprovider.\nHinweis: Die Anzahl der Anfrageergebnisse sind auf 100 begrenzt.
@@ -151,8 +152,8 @@ command.name.41 = Nur Individuals Associations anzeigen
 command.name.42 = \u00d6ffne Taxon Editor
 command.name.43 = Neue Field Unit
 command.name.44 = L\u00f6schen (mit Kindern)
-command.name.46 = Verschiebe Synonym(Homotypische Gruppe) zu neuem Akzeptierten Taxon
-command.label.56 = Verschiebe Synonym(Homotypische Gruppe) zu neuem Akzeptierten Taxon
+command.name.46 = Verschiebe Synonym (homotypische Gruppe) zu neuem akzeptiertem Taxon
+command.label.56 = Verschiebe Synonym (homotypische Gruppe) zu neuem akzeptiertem Taxon
 markerContentGenerator.name = Validation Problems Marker Generator
 command.name.45 = L\u00f6schen
 command.name.47 = L\u00f6schen
@@ -162,6 +163,7 @@ command.name.48 = L\u00f6schen
 command.name.49 = L\u00f6schen
 command.name.50 = L\u00f6schen
 command.name.51 = L\u00f6schen
+command.name.57 = Setze als Basionym der homotypischen Gruppe
 
 editor.name.DERIVATIVE_EDITOR = Specimen-Editor
 command.label.DERIVATIVE_EDITOR = Specimen-Editor
@@ -180,4 +182,5 @@ command.name.REMOVE_SINGLE_READ = Entferne Single-Read von Sequenz
 command.name.TOGGLE_LINK_WITH_TAXON_SELECTION = De-/Aktiviere Verknüpfung mit Taxonauswahl
 
 viewCommandMapping.viewerName.NAME_EDITOR = Namenseditor
-viewCommandMapping.viewerName.SPECIMEN_EDITOR = Specimen-Editor
\ No newline at end of file
+viewCommandMapping.viewerName.SPECIMEN_EDITOR = Specimen-Editor
+viewCommandMapping.viewerName.CHECKLIST_EDITOR = Verbreitungs-Editor
\ No newline at end of file
index 83c8015..d44bd77 100644 (file)
                </reference>
             </visibleWhen>
          </command>
+          <command
+               commandId="eu.etaxonomy.taxeditor.editor.name.setAsBasionym"
+               label="%command.label.57"
+               style="push">
+            <visibleWhen>
+              <reference
+                     definitionId="isSynonymInHomotypicalGroupWithMoreSynonyms">
+               </reference>
+           </visibleWhen>
+         </command>
          <command
                   commandId="eu.etaxonomy.taxeditor.editor.name.moveSynonymToAnotherAcceptedTaxon"
                   label="%command.label.56"
          </activeWhen>
       </handler>
       <handler
-            class="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler"
-            commandId="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler">
-      </handler>
-      <handler
             class="eu.etaxonomy.taxeditor.editor.view.derivate.handler.DeleteDerivateHandler"
             commandId="org.eclipse.ui.edit.delete">
          <activeWhen>
             </with>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler"
+            commandId="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler">
+         <activeWhen>
+            <and>
+               <reference
+                     definitionId="isChecklistEditorEnabled">
+               </reference>
+               <or>
+                  <reference
+                        definitionId="isTaxonNode">
+                  </reference>
+                  <reference
+                        definitionId="isClassification">
+                  </reference>
+               </or>
+            </and>
+         </activeWhen>
+      </handler>
    </extension>
    <extension
          name="%extension.name"
             id="eu.etaxonomy.taxeditor.editor.name.swapSynonymAndAccepted"
             name="%command.name.6">
       </command>
+       <command
+            categoryId="eu.etaxonomy.taxeditor.editor.taxon.name.command.category"
+            defaultHandler="eu.etaxonomy.taxeditor.editor.name.handler.SetBasionymHandler"
+            id="eu.etaxonomy.taxeditor.editor.name.setAsBasionym"
+            name="%command.name.57">
+      </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.taxon.name.command.category"
             defaultHandler="eu.etaxonomy.taxeditor.editor.name.handler.MoveSynonymToAnotherAcceptedTaxonHandler"
             name="%command.name.34">
       </command>
        <command
-             defaultHandler="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler"
              id="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler"
              name="%command.name.38">
+          <commandParameter
+                id="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler.uuid"
+                name="taxonNodeUuid"
+                optional="true"
+                typeId="eu.etaxonomy.taxeditor.uuidParameterType">
+          </commandParameter>
        </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.new.category"
             name="%command.name.41">
       </command>
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.editor.handler.defaultHandler.DefaultOpenTaxonEditorForTaxonHandler"
             id="eu.etaxonomy.taxeditor.editor.openTaxonEditorForTaxon"
             name="%command.name.42">
          <commandParameter
             id="eu.etaxonomy.taxeditor.editor.derivative.toggleLinkWithTaxonSelection"
             name="%command.name.TOGGLE_LINK_WITH_TAXON_SELECTION">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.handler.defaultHandler.DefaultOpenSpecimenEditorForTypeSpecimenHandler"
+            id="eu.etaxonomy.taxeditor.openSpecimenEditorForTypeSpecimen"
+            name="Open specimen editor for type specimen">
+      </command>
         
    </extension>
    <extension
             </test>
          </with>
       </definition>
+       <definition
+            id="isSynonymInHomotypicalGroupWithMoreSynonyms">
+         <with
+               variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.editor.name.propertyTester.isSynonymInHomotypicalGroupWithMoreSynonyms">
+            </test>
+         </with>
+      </definition>
       <definition
             id="isSynonym">
          <with
          </with>
       </definition>
       <definition
-            id="isGroupEditor">
-         <with
-               variable="activeEditor">
-            <test
-                  property="taxeditor-bulkeditor.propertyTester.isGroupEditor">
-            </test>
-         </with>
-      </definition>
-      <definition
             id="isIndividualsAssociation">
          <with
                variable="selection">
             </test>
          </with>
       </definition>
+      <definition
+            id="isOrphanedTaxon">
+         <with
+               variable="selection">
+            <test
+                  forcePluginActivation="true"
+                  property="eu.etaxonomy.taxeditor.editor.name.propertyTester.isOrphaned">
+            </test>
+         </with>
+      </definition>
    </extension>
    <extension
          point="org.eclipse.core.expressions.propertyTesters">
             class="eu.etaxonomy.taxeditor.editor.name.handler.NameEditorMenuPropertyTester"
             id="eu.etaxonomy.taxeditor.editor.name.propertyTester"
             namespace="eu.etaxonomy.taxeditor.editor.name.propertyTester"
-            properties="isAcceptedTaxon,isSynonym,isMisapplication,isTaxonBase,hasEmptyNames,isAcceptedAndHasNoHomotypicSynonyms,isNotHomotypicSynonymOfAcceptedTaxon"
+            properties="isAcceptedTaxon,isSynonym,isMisapplication,isTaxonBase,hasEmptyNames,isAcceptedAndHasNoHomotypicSynonyms,isNotHomotypicSynonymOfAcceptedTaxon,isSynonymInHomotypicalGroupWithMoreSynonyms,isOrphaned"
             type="org.eclipse.jface.viewers.IStructuredSelection">
       </propertyTester>
       <propertyTester
             type="org.eclipse.jface.viewers.TreeSelection">
       </propertyTester>
       <propertyTester
-            class="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorPropertyTester"
-            id="taxeditor-bulkeditor.PropertyTester"
-            namespace="taxeditor-bulkeditor.propertyTester"
-            properties="isGroupEditor"
-            type="eu.etaxonomy.taxeditor.bulkeditor.BulkEditor">
-      </propertyTester>
-      <propertyTester
             class="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
             id="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
             namespace="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
             selection="eu.etaxonomy.cdm.model.taxon.TaxonNode"
             viewerName="%viewCommandMapping.viewerName.SPECIMEN_EDITOR">
       </viewCommandMapping>
+      <viewCommandMapping
+            commandId="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler"
+            selection="eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode"
+            viewerName="%viewCommandMapping.viewerName.CHECKLIST_EDITOR">
+      </viewCommandMapping>
+      <viewCommandMapping
+            commandId="eu.etaxonomy.taxeditor.openSpecimenEditorForTypeSpecimen"
+            selection="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"
+            viewerName="Specimen Editor">
+      </viewCommandMapping>
     </extension>
 </plugin>
index 7db2926..bf94d7a 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
        <groupId>eu.etaxonomy</groupId>
        <artifactId>taxeditor-parent</artifactId>
-    <version>4.2.0</version>
+    <version>4.3.0</version>
   </parent>
   
   <modelVersion>4.0.0</modelVersion>
index f33625a..eab20bc 100644 (file)
@@ -18,7 +18,9 @@ import org.eclipse.osgi.util.NLS;
  */
 public class Messages extends NLS {
     private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
-    public static String CreateDerivateContextMenu_ADD;
+    public static String ConceptGraphView_VIEWER_NAME;
+       public static String ConceptViewPart_VIEWER_NAME;
+       public static String CreateDerivateContextMenu_ADD;
     public static String CreateDerivateContextMenu_DNA_SAMPLE;
     public static String CreateDerivateContextMenu_MEDIA;
     public static String CreateDerivateContextMenu_MEDIA_EXISTING;
@@ -57,6 +59,7 @@ public class Messages extends NLS {
     public static String SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE;
     public static String SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE;
     public static String SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE;
+       public static String UsesViewPart_VIEWER_NAME;
     static {
         // initialize resource bundle
         NLS.initializeMessages(BUNDLE_NAME, Messages.class);
index d127c3f..98481d4 100644 (file)
@@ -338,8 +338,8 @@ public class TaxonEditorInput  extends CdmEntitySessionInput implements IEditorI
     public boolean equals(Object obj) {
         if (TaxonEditorInput.class.equals(obj.getClass())
                 && getTaxon() != null
-                && getTaxon().equals(((TaxonEditorInput) obj).getTaxon())){
-            if(((TaxonEditorInput) obj).getInitiallySelectedTaxonBase() != null){
+                && getTaxon().equals(((TaxonEditorInput) obj).getTaxon())) {
+            if (((TaxonEditorInput) obj).getInitiallySelectedTaxonBase() != null){
                 setInitiallySelectedTaxonBase(((TaxonEditorInput) obj).getInitiallySelectedTaxonBase());
             }
             return true;
@@ -454,9 +454,8 @@ public class TaxonEditorInput  extends CdmEntitySessionInput implements IEditorI
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
-        }
+       CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
+
     }
 
     @Override
index fa78b41..f497936 100644 (file)
@@ -157,8 +157,7 @@ public class CdmAuthorityEditorInput extends CdmEntitySessionInput implements IE
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            group = CdmStore.getService(IGroupService.class).merge(group, true).getMergedEntity();
-        }
+        group = CdmStore.getService(IGroupService.class).merge(group, true).getMergedEntity();
+       
     }
 }
index cc2bbf0..44dadd8 100644 (file)
@@ -1,65 +1,65 @@
 package eu.etaxonomy.taxeditor.editor.handler;
 
-import org.apache.log4j.Logger;
-import org.eclipse.core.commands.AbstractHandler;
+import java.util.UUID;
+
+import org.apache.commons.lang.StringUtils;
 import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.handlers.HandlerUtil;
 
+import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.model.taxon.Classification;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditorInput;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 
-public class OpenChecklistEditorHandler extends AbstractHandler {
+public class OpenChecklistEditorHandler extends DefaultOpenHandlerBase<ITaxonTreeNode> {
 
-    private static final Logger logger = Logger.getLogger(OpenChecklistEditorHandler.class);
+       @Override
+       protected ITaxonTreeNode getEntity(UUID uuid) {
+               ITaxonTreeNode taxonTreeNode = CdmStore.getService(ITaxonNodeService.class).load(uuid);
+               if(taxonTreeNode==null){
+                       taxonTreeNode = CdmStore.getService(IClassificationService.class).load(uuid);
+               }
+               return taxonTreeNode;
+       }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
-     * ExecutionEvent)
-     */
-    @Override
-    public Object execute(ExecutionEvent event) throws ExecutionException {
-        boolean isChecklistEditorActivated = PreferencesUtil.getPreferenceStore().getBoolean(
-                IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE);
-        if (isChecklistEditorActivated) {
-            ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
-            if (currentSelection instanceof IStructuredSelection) {
-                Object selectedElement = ((IStructuredSelection) currentSelection).getFirstElement();
-                if (selectedElement instanceof Classification) {
-                    ChecklistEditorInput input = new ChecklistEditorInput(((Classification) selectedElement));
-                    try {
-                        EditorUtil.open(input);
-                    } catch (PartInitException e) {
-                       MessagingUtils.error(OpenChecklistEditorHandler.class, "Could not open ChecklistView", e);
-                    } catch (NullPointerException npe) {
-                       MessagingUtils.messageDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
-                                "Could not open ChecklistView. The hierarchy is corrupted!", npe);
-                    }
-                } else if (selectedElement instanceof TaxonNode) {
-                    ChecklistEditorInput input = new ChecklistEditorInput(((TaxonNode) selectedElement));
-                    try {
-                        EditorUtil.open(input);
-                    } catch (PartInitException e) {
-                       MessagingUtils.error(OpenChecklistEditorHandler.class, "Could not open ChecklistView", e);
-                    } catch (NullPointerException npe) {
-                       MessagingUtils.messageDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
-                                "Could not open ChecklistView. The hierarchy is corrupted!", npe);
-                    }
-                }
-            }
-        }
-        return null;
-    }
+       @Override
+       protected void open(ExecutionEvent event, ITaxonTreeNode entity) {
+               if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE)) {
+                       if (StringUtils.isBlank(PreferencesUtil.getPreferenceStore().getString(IPreferenceKeys.DISTRIBUTION_AREA_OCCURENCE_STATUS) )){
+                               MessagingUtils.informationDialog("No Areas to display", "Please choose the areas you want to display. "
+                                               + "For this go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.");
+                               this.dispose();
+                               return;
+                       }
+                       if (entity instanceof Classification) {
+                               ChecklistEditorInput input = new ChecklistEditorInput(((Classification) entity));
+                               try {
+                                       EditorUtil.open(input);
+                               } catch (PartInitException e) {
+                                       MessagingUtils.error(OpenChecklistEditorHandler.class, "Could not open Distribution Editor", e);
+                               } catch (NullPointerException npe) {
+                                       MessagingUtils.messageDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
+                                                       "Could not open Distribution Editor. The hierarchy is corrupted!", npe);
+                               }
+                       } else if (entity instanceof TaxonNode) {
+                               ChecklistEditorInput input = new ChecklistEditorInput((TaxonNode) entity);
+                               try {
+                                       EditorUtil.open(input);
+                               } catch (PartInitException e) {
+                                       MessagingUtils.error(OpenChecklistEditorHandler.class, "Could not open Distribution Editor", e);
+                               } catch (NullPointerException npe) {
+                                       MessagingUtils.messageDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
+                                                       "Could not open Distribution Editor. The hierarchy is corrupted!", npe);
+                               }
+                       }
+               }               
+       }
 }
index f8e3350..73d4598 100644 (file)
@@ -29,23 +29,21 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
  */
 public class OpenParentHandler extends AbstractHandler implements IHandler {
 
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-        */
        /** {@inheritDoc} */
        public Object execute(ExecutionEvent event) throws ExecutionException {
-               Taxon parent = EditorUtil.getActiveMultiPageTaxonEditor().getTaxon().getTaxonomicParent();
-               
-               if(parent != null){
-                       try {
-                               EditorUtil.openTaxonNode(parent.getUuid());
-                       } catch (PartInitException e) {
-                               throw new RuntimeException("Error opening parent taxon", e);
-                       } catch (Exception e) {
-                               MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
-                       }
-               }
-               
-               return null;
+               throw new RuntimeException("Open parent not supported anymore");
+//             Taxon parent = EditorUtil.getActiveMultiPageTaxonEditor().getTaxon().getTaxonomicParent();
+//             
+//             if(parent != null){
+//                     try {
+//                             EditorUtil.openTaxonNode(parent.getUuid());
+//                     } catch (PartInitException e) {
+//                             throw new RuntimeException("Error opening parent taxon", e);
+//                     } catch (Exception e) {
+//                             MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+//                     }
+//             }
+//             
+//             return null;
        }
 }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenSpecimenEditorForTypeSpecimenHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenSpecimenEditorForTypeSpecimenHandler.java
new file mode 100644 (file)
index 0000000..3cbc0a4
--- /dev/null
@@ -0,0 +1,32 @@
+package eu.etaxonomy.taxeditor.editor.handler.defaultHandler;
+import java.util.UUID;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.ui.PartInitException;
+
+import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
+import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+
+public class DefaultOpenSpecimenEditorForTypeSpecimenHandler extends
+               DefaultOpenHandlerBase<SpecimenTypeDesignation> {
+
+       @Override
+       protected SpecimenTypeDesignation getEntity(UUID uuid) {
+               return CdmStore.getCommonService().find(SpecimenTypeDesignation.class, uuid);
+       }
+
+       @Override
+       protected void open(ExecutionEvent event, SpecimenTypeDesignation entity) {
+        try {
+            EditorUtil.open(new DerivateViewEditorInput(entity.getUuid()));
+        } catch (PartInitException e) {
+            MessagingUtils.error(DefaultOpenSpecimenEditorForTypeSpecimenHandler.class, "Derivative Editor could not be opened", e);
+        }              
+       }
+
+}
@@ -12,7 +12,7 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 
-public class DefaultOpenTaxonEditorForTaxonHandler extends DefaultOpenHandlerBase<TaxonBase> {
+public class DefaultOpenTaxonEditorForTaxonBaseHandler extends DefaultOpenHandlerBase<TaxonBase> {
 
     @Override
     protected TaxonBase getEntity(UUID uuid) {
@@ -24,7 +24,7 @@ public class DefaultOpenTaxonEditorForTaxonHandler extends DefaultOpenHandlerBas
         try {
             EditorUtil.openTaxonBase(entity.getUuid());
         } catch (PartInitException e) {
-            MessagingUtils.error(DefaultOpenTaxonEditorForTaxonHandler.class, "Could not open taxon editor for taxon/synonym "+entity, e);
+            MessagingUtils.error(DefaultOpenTaxonEditorForTaxonBaseHandler.class, "Could not open taxon editor for taxon/synonym "+entity, e);
         }
     }
 
index 7a190f4..e75a126 100644 (file)
@@ -91,9 +91,8 @@ public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            key = CdmStore.getService(IPolytomousKeyService.class).merge(key,true).getMergedEntity();
-        }
+       key = CdmStore.getService(IPolytomousKeyService.class).merge(key,true).getMergedEntity();
+      
     }
 
     @Override
index 03a4b1a..61544ab 100644 (file)
@@ -47,6 +47,6 @@ public class PolytomousKeyGraphEditor extends
 
        @Override
        protected IContentProvider getContentProvider() {
-               return new PolytomousKeyContentProvider();
+               return new PolytomousKeyGraphContentProvider();
        }
 }
index 2806b80..d9be7cb 100644 (file)
@@ -1123,21 +1123,10 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
                                AbstractGroupedContainer.this.handleSplitText(text);
                        }
 
-                       @Override
-                       public void keyPressed(KeyEvent e) {
-                               // TODO Auto-generated method stub
-                               
-                       }
-
-                       @Override
-                       public void keyReleased(KeyEvent e) {
-                               // TODO Auto-generated method stub
-                               
-                       }
                };
 
                getNameViewer().getTextWidget().addVerifyListener(lineBreakListener);
-               getNameViewer().getTextWidget().addKeyListener(lineBreakListener);
+               
        }
 
        abstract class LabelEllipsisListener extends ControlAdapter {
index 8ef88c0..adf1728 100644 (file)
@@ -44,7 +44,9 @@ import org.eclipse.swt.events.VerifyListener;
  * @created 19.05.2008
  * @version 1.0
  */
-public abstract class LineBreakListener implements VerifyListener, KeyListener {
+
+public abstract class LineBreakListener implements VerifyListener{
+
 
        private static String LINE_BREAK = System.getProperty("line.separator");
        
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/GroupBasionymContributionItem.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/GroupBasionymContributionItem.java
deleted file mode 100644 (file)
index 0f42bf5..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * 
- */
-package eu.etaxonomy.taxeditor.editor.name.handler;
-
-import org.apache.log4j.Logger;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.ISelectionService;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.CompoundContributionItem;
-import org.eclipse.ui.menus.CommandContributionItem;
-import org.eclipse.ui.menus.CommandContributionItemParameter;
-
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
-import eu.etaxonomy.cdm.model.name.NameRelationshipType;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.labels.ILabelImageStrategy;
-import eu.etaxonomy.taxeditor.labels.LabelImageProvider;
-
-/**
- * <p>GroupBasionymContributionItem class.</p>
- *
- * @author p.ciardelli
- * @version $Id: $
- */
-public class GroupBasionymContributionItem extends CompoundContributionItem {
-       @SuppressWarnings("unused")
-       private static final Logger logger = Logger.getLogger(GroupBasionymContributionItem.class);
-
-       /**
-        * <p>Constructor for GroupBasionymContributionItem.</p>
-        */
-       public GroupBasionymContributionItem() {}
-
-       /**
-        * <p>Constructor for GroupBasionymContributionItem.</p>
-        *
-        * @param id a {@link java.lang.String} object.
-        */
-       public GroupBasionymContributionItem(String id) {
-               super(id);
-       }
-       
-
-       /** {@inheritDoc} */
-       @Override
-       protected IContributionItem[] getContributionItems() {
-               
-               IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-               
-               ISelectionService selectionService = window.getSelectionService();
-               
-               ISelection selection = selectionService.getSelection();
-               
-               if(selection instanceof IStructuredSelection){
-                       Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
-                       
-                       if(selectedObject != null && selectedObject instanceof TaxonBase){
-                               
-                               TaxonNameBase name = (TaxonNameBase) HibernateProxyHelper.deproxy(((TaxonBase) selectedObject).getName());
-                               
-                               if(name != null && name.getHomotypicalGroup().getTypifiedNames().size() > 1){
-                               
-                                       CommandContributionItemParameter parameter = 
-                                               new CommandContributionItemParameter(
-                                                               window, null, getCommand(name), SWT.NONE);
-                                       
-                                       parameter.label = getLabel(name);               
-                                                       
-                                       return new IContributionItem[] {
-                                                       new CommandContributionItem(parameter)
-                                       };
-                               }
-                               
-                       }
-               }
-               
-               return new IContributionItem[]{};
-       }
-
-       /**
-        * @param name
-        * @return
-        */
-       private String getCommand(TaxonNameBase name) {
-               if(name.isGroupsBasionym()){
-                       return "eu.etaxonomy.taxeditor.editor.name.removeBasionym" ;
-               }
-               return "eu.etaxonomy.taxeditor.editor.name.setBasionym";
-       }
-
-       /**
-        * @param name
-        * @return
-        */
-       private String getLabel(TaxonNameBase name) {
-               ILabelImageStrategy strategy = LabelImageProvider.getLabelStrategy(name);
-               LabelImageProvider labelProvider = new LabelImageProvider(strategy);
-               return (name.isGroupsBasionym() ? "Remove" : "Set")
-                       + " as " + labelProvider.getNameRelationTypeDescription(NameRelationshipType.BASIONYM()) + " for Homotypic Group";
-       }
-}
index 8569346..3afdefc 100644 (file)
 
 package eu.etaxonomy.taxeditor.editor.name.handler;
 
+import java.util.Set;
+
+import org.eclipse.core.expressions.PropertyTester;
 import org.eclipse.jface.viewers.IStructuredSelection;
 
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * <p>NameEditorMenuPropertyTester class.</p>
@@ -26,7 +32,7 @@ import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
  * @created Jun 22, 2010
  * @version 1.0
  */
-public class NameEditorMenuPropertyTester extends org.eclipse.core.expressions.PropertyTester {
+public class NameEditorMenuPropertyTester extends PropertyTester {
 
        private static final String ACCEPTED = "isAcceptedTaxon";
        private static final String SYNONYM = "isSynonym";
@@ -36,7 +42,8 @@ public class NameEditorMenuPropertyTester extends org.eclipse.core.expressions.P
        private static final String EMPTY_NAMES = "hasEmptyNames";
        private static final String ACCEPTED_AND_NO_HOMOTYPIC_SYNONYMS = "isAcceptedAndHasNoHomotypicSynonyms";
        private static final String NOT_HOMOTYPIC_SYNONYM_OF_ACCEPTED = "isNotHomotypicSynonymOfAcceptedTaxon";
-
+       private static final String SYNONYM_WITH_HOMOTYPIC_SYNONYMS = "isSynonymInHomotypicalGroupWithMoreSynonyms";
+       private static final String IS_ORPHANED = "isOrphaned";
 
        /**
         * <p>Constructor for NameEditorMenuPropertyTester.</p>
@@ -57,6 +64,11 @@ public class NameEditorMenuPropertyTester extends org.eclipse.core.expressions.P
                        IStructuredSelection selection = (IStructuredSelection) receiver;
 
                        Object selectedElement = selection.getFirstElement();
+                       if(selectedElement instanceof UuidAndTitleCache){
+                           UuidAndTitleCache uuidAndTitleCache = (UuidAndTitleCache<?>)selectedElement;
+                           CdmBase cdmBase = CdmStore.getCommonService().find(uuidAndTitleCache.getType(), uuidAndTitleCache.getUuid());
+                           selectedElement = cdmBase;
+                       }
 
                        if(ACCEPTED.equals(property)){
                                return isAccepted(selectedElement);
@@ -78,9 +90,16 @@ public class NameEditorMenuPropertyTester extends org.eclipse.core.expressions.P
                        }
                        else if(ACCEPTED_AND_NO_HOMOTYPIC_SYNONYMS.equals(property)){
                                return isAcceptedAndHasNoHomotypicSynonyms(selectedElement);
-                       }else if (NOT_HOMOTYPIC_SYNONYM_OF_ACCEPTED.equals(property)){
+                       }
+                       else if (NOT_HOMOTYPIC_SYNONYM_OF_ACCEPTED.equals(property)){
                                return isNotHomotypicSynonymOfAcceptedTaxon(selectedElement);
                        }
+                       else if (SYNONYM_WITH_HOMOTYPIC_SYNONYMS.equals(property)){
+                               return isSynonymInHomotypicalGroupWithMoreSynonyms(selectedElement);
+                       }
+                       else if (IS_ORPHANED.equals(property)){
+                           return isOrphaned(selectedElement);
+                       }
 
                }
 
@@ -96,6 +115,15 @@ public class NameEditorMenuPropertyTester extends org.eclipse.core.expressions.P
                return false;
        }
 
+       private boolean isSynonymInHomotypicalGroupWithMoreSynonyms(Object selectedElement) {
+               if (isSynonym(selectedElement)){
+                       Synonym synonym = (Synonym) selectedElement;
+                       return synonym.getHomotypicGroup().getTypifiedNames().size()>1;
+               }
+               return false;
+       }
+
+
        private boolean isNotHomotypicSynonymOfAcceptedTaxon(Object selectedElement) {
                if (isSynonym(selectedElement)){
                        Synonym synonym = (Synonym) selectedElement;
@@ -143,4 +171,19 @@ public class NameEditorMenuPropertyTester extends org.eclipse.core.expressions.P
        private boolean isAccepted(Object selectedElement) {
                return (selectedElement instanceof Taxon  && ! ((Taxon) selectedElement).isMisapplication()) ? true : false;
        }
+
+       private boolean isOrphaned(Object selectedElement) {
+           if(selectedElement instanceof Taxon){
+               return ((Taxon) selectedElement).isOrphaned();
+           }
+           else if(selectedElement instanceof Synonym){
+               Set<Taxon> acceptedTaxa = ((Synonym) selectedElement).getAcceptedTaxa();
+               for (Taxon taxon : acceptedTaxa) {
+                if(!taxon.isOrphaned()){
+                    return false;
+                }
+            }
+           }
+           return false;
+       }
 }
index 6f4d65b..0d5cee3 100644 (file)
@@ -73,6 +73,7 @@ import eu.etaxonomy.taxeditor.model.IContextListener;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -227,7 +228,14 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
         selectionService.addSelectionListener(this);
         viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
         labelProvider = new ChecklistLabelProvider(this.viewer);
+        
         terms = labelProvider.getNamedAreas();
+        if (terms == null){
+                       MessagingUtils.informationDialog("No Areas to display", "Please choose the areas you want to display. "
+                                       + "Therefore go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.");
+                       this.dispose();
+                       return;
+               }
         filter = new ChecklistEditorFilter();
         createTopComposite(parent);
         loadDataInput();
@@ -303,6 +311,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
 
        private void createToolbarItems() {
                dropListener = new ChecklistDropdownSelectionListener(toolItem, this, terms);
+               
         for (DefinedTermBase<DefinedTermBase> term : terms) {
             if(term!=null){
                 dropListener.add(term);
@@ -468,11 +477,14 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
     /** {@inheritDoc} */
     @Override
     public void dispose() {
-        this.checklistEditorInput.dispose();
-
+       this.checklistEditorInput.dispose();
+       super.dispose();
+        
         conversation.unregisterForDataStoreChanges(this);
-        conversation.close();
-        super.dispose();
+        conversation.unbind();
+       
+        //conversation.close();
+               conversation = null;
     }
 
     /** {@inheritDoc} */
@@ -829,4 +841,6 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
 
         return conversation;
     }
+    
+    
 }
index e922646..4eefc82 100644 (file)
@@ -21,6 +21,7 @@ import org.eclipse.ui.IPersistable;
 import org.eclipse.ui.IPersistableElement;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
@@ -54,12 +55,14 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IEdit
      * @param taxonNode
      */
     public ChecklistEditorInput(TaxonNode taxonNode){
-        super(true);
+        super(false);
         this.conversation = CdmStore.createConversation();
-        this.taxonNode = CdmStore.getCurrentApplicationConfiguration().getTaxonNodeService().load(taxonNode.getUuid());
+        this.taxonNode =CdmStore.getService(ITaxonNodeService.class).load(taxonNode.getUuid(), getTaxonNodePropertyPaths());
        // getChildTaxa(taxonNode);
         classification = taxonNode.getClassification();
+        initSession();
     }
+    
 
     /**
      * @param taxonNode2
@@ -241,5 +244,59 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IEdit
     public ConversationHolder getConversation() {
         return conversation;
     }
+    
+    private List<String> getTaxonNodePropertyPaths() {
+        List<String> taxonNodePropertyPaths = new ArrayList<String>();
+        for(String propertyPath : getTaxonBasePropertyPaths()) {
+            taxonNodePropertyPaths.add("taxon." + propertyPath);
+        }
+        return taxonNodePropertyPaths;
+    }
+
+    private List<String> getTaxonBasePropertyPaths() {
+        List<String> taxonBasePropertyPaths = Arrays.asList(new String[] {
+                "sec",
+                "createdBy",
+                "updatedBy",
+                "annotations",
+                "markers",
+                "credits",
+                "extensions",
+                "rights",
+                "sources",
+                "descriptions",
+                "relationsToThisTaxon",
+                "relationsFromThisTaxon",
+                "taxonNodes",
+                "descriptions.descriptionElements.feature",
+                "descriptions.descriptionElements.area",
+                "descriptions.descriptionElements.status",
+                "descriptions.markers",
+                "name.descriptions",
+                "name.typeDesignations",
+                "name.status",
+                "name.nomenclaturalReference.inReference",
+                "name.taxonBases.taxonNodes",
+                "name.relationsFromThisName",
+                "name.relationsToThisName",
+                "name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.synonym.name.status",
+                "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName",
+                "synonymRelations.synonym.name.status.type",
+                "synonymRelations.synonym.name.relationsToThisName.fromName",
+                "synonymRelations.synonym.name.nomenclaturalReference.inReference.authorship",
+                "synonymRelations.synonym.name.nomenclaturalReference.authorship",
+                "synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations"
+        });
+
+        return taxonBasePropertyPaths;
+    }
+    
+//    @Override
+//    public void dispose(){
+//     conversation.unbind();
+//     conversation.close();
+//     getCdmEntitySession().dispose();
+//     super.dispose();
+//    }
 
 }
index d9da0c0..014ff4f 100644 (file)
@@ -39,6 +39,7 @@ import eu.etaxonomy.cdm.model.description.Distribution;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
index 2acbc4a..2e116e3 100644 (file)
@@ -10,8 +10,8 @@
 
 package eu.etaxonomy.taxeditor.editor.view.concept;
 
-import java.util.HashSet;
-import java.util.Set;
+import java.util.HashMap;
+import java.util.Map;
 
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.Viewer;
@@ -28,42 +28,34 @@ import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
  */
 public class ConceptContentProvider implements IStructuredContentProvider {
 
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.viewers.IContentProvider#dispose()
-        */
        @Override
        public void dispose() {
-               // TODO Auto-generated method stub
                
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
-        */
        @Override
        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-               // TODO Auto-generated method stub
-               
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
-        */
        @Override
        public Object[] getElements(Object inputElement) {
+               Taxon taxon = null;
                if(inputElement instanceof TaxonEditorInput){
-                       Taxon taxon = ((TaxonEditorInput) inputElement).getTaxon();
-                       
-                       Set<TaxonRelationship> filteredTaxonRelations = new HashSet<TaxonRelationship>();
+                       taxon = ((TaxonEditorInput) inputElement).getTaxon();
+               }
+               else if(inputElement instanceof Taxon){
+                       taxon = (Taxon) inputElement;
+               }
+               if(taxon!=null){
+                       Map<TaxonRelationship, Taxon> taxonToTaxonRelationsMap = new HashMap<>();
                        
                        for (TaxonRelationship relationship : taxon.getTaxonRelations()) {
                                if (! relationship.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR()) ||
                                                 relationship.getType().equals(TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN())) {
-                                       filteredTaxonRelations.add(relationship);
+                                       taxonToTaxonRelationsMap.put(relationship, taxon);
                                }
                        }
-                       
-                       return filteredTaxonRelations.toArray();
+                       return taxonToTaxonRelationsMap.entrySet().toArray();
                }
                return new Object[0];
        }
index 6fb3d9c..157defc 100644 (file)
 
 package eu.etaxonomy.taxeditor.editor.view.concept;
 
+import java.util.Map.Entry;
+
 import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.StyledString;
 import org.eclipse.swt.graphics.Image;
 
-import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.cdm.model.common.Representation;
-import eu.etaxonomy.cdm.model.reference.IReference;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
-import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
-import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * @author n.hoffmann
@@ -34,24 +30,18 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class ConceptLabelProvider extends LabelProvider implements IStyledLabelProvider {
 
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
-        */
        @Override
        public Image getImage(Object element) {
-               if(element instanceof TaxonRelationship){
-                       return getTaxonRelationshipImage((TaxonRelationship) element);
+               if(element instanceof Entry){
+                       return getTaxonRelationshipImage((TaxonRelationship) ((Entry<TaxonRelationship, Taxon>) element).getKey());
                }
                return super.getImage(element);
        }
        
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.viewers.ColumnLabelProvider#getText(java.lang.Object)
-        */
        @Override
        public String getText(Object element) {
-               if(element instanceof TaxonRelationship){
-                       return formatRelationship((TaxonRelationship) element);
+               if(element instanceof Entry){
+                       return formatRelationship((Entry<TaxonRelationship, Taxon>) element);
                }
                
                return "";
@@ -59,23 +49,20 @@ public class ConceptLabelProvider extends LabelProvider implements IStyledLabelP
        
        /**
         * Creates a string that holds a representation of the {@link TaxonRelationship} in relation to
-        * the accepted taxon of the currently active {@link MultiPageTaxonEditor}.
+        * the currently selected and accepted taxon.
         * 
         * @param relationship
         * @return a formatted String representation of the relationship
         */
-       private String formatRelationship(TaxonRelationship relationship){
-               Taxon sourceTaxon = EditorUtil.getActiveMultiPageTaxonEditor().getTaxon();
-               TaxonRelationshipTypeInverseContainer container = TaxonRelationshipTypeInverseContainer.CreateFromSource(sourceTaxon, relationship);
-               Taxon relatedTaxon = TaxonRelationshipTypeInverseContainer.RelatedTaxon(sourceTaxon, relationship);
+       private String formatRelationship(Entry<TaxonRelationship, Taxon> entry){
+               Taxon sourceTaxon = entry.getValue();
+               TaxonRelationshipTypeInverseContainer container = TaxonRelationshipTypeInverseContainer.CreateFromSource(sourceTaxon, entry.getKey());
+               Taxon relatedTaxon = TaxonRelationshipTypeInverseContainer.RelatedTaxon(sourceTaxon, entry.getKey());
                String string = String.format("%s %s", container.getAbbreviatedLabel(), relatedTaxon);
                
                return string;
        }
        
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText(java.lang.Object)
-        */
        @Override
        public StyledString getStyledText(Object element) {
                return  new StyledString(getText(element), StyledString.QUALIFIER_STYLER);
index 898301e..3dd020b 100644 (file)
 
 package eu.etaxonomy.taxeditor.editor.view.concept;
 
+import java.util.Map.Entry;
+
 import org.eclipse.jface.action.GroupMarker;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.ListViewer;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.Viewer;
@@ -25,51 +28,80 @@ import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.IWorkbenchPart;
 
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
+import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
+import eu.etaxonomy.taxeditor.model.LineSelection;
 import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
+import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
+import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart;
 
 /**
  * @author n.hoffmann
  * @created Jan 24, 2011
  * @version 1.0
  */
-public class ConceptViewPart extends AbstractCdmEditorViewPart implements IPartContentHasDetails, IPartContentHasSupplementalData{
+public class ConceptViewPart extends AbstractCdmEditorViewPart 
+implements IPartContentHasDetails, IPartContentHasSupplementalData{
 
-       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.concept";
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.concept"; //$NON-NLS-1$
 
-       private ListViewer viewer;
+       private ConceptRelationViewer viewer;
 
        @Override
        protected void selectionChanged_internal(IWorkbenchPart part, ISelection selection) {
+               if(part == this){
+                   return;
+               }
                if(AbstractUtility.getActiveEditor() == null){
                        showEmptyPage();
                        return;
                }
-
-               if(part instanceof BulkEditor){
-                       showEmptyPage();
+               
+        if (part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart) {
+            // do not show empty page as these views are also used to edit the
+            // description selected in this view
+            return;
+        }
+        else if(part instanceof BulkEditor && selection instanceof LineSelection){
+                       if(((LineSelection) selection).getFirstElement() instanceof Taxon){
+                               showViewer(part, (LineSelection) selection);
+                       }
+                       else{
+                               showEmptyPage();
+                       }
                        return;
                }
-
-               if(part instanceof AbstractGraphKeyEditor){
+               else if(part instanceof AbstractGraphKeyEditor){
                        showEmptyPage();
                        return;
                }
-
-               if(part instanceof MultiPageTaxonEditor){
+               else if(part instanceof MultiPageTaxonEditor){
                        if(! part.equals(this.part)){
                                IEditorInput input = ((IEditorPart) part).getEditorInput();
                                showViewer(part, new StructuredSelection(input));
                        }
-                       showViewer();
+               }
+               else {
+                   showEmptyPage();
                }
 
        }
+       
+       @Override
+       protected String createPartTitle(Object selectedObject) {
+               if(selectedObject instanceof TaxonEditorInput){
+                       return super.createPartTitle(((TaxonEditorInput) selectedObject).getTaxon());
+               }
+               return super.createPartTitle(selectedObject);
+       }
 
        @Override
        public boolean onComplete() {
@@ -83,7 +115,7 @@ public class ConceptViewPart extends AbstractCdmEditorViewPart implements IPartC
 
        @Override
        public void createViewer(Composite parent) {
-               viewer = new ListViewer(parent);
+               viewer = new ConceptRelationViewer(parent);
 
                viewer.setContentProvider(new ConceptContentProvider());
                viewer.setLabelProvider(new ConceptLabelProvider());
@@ -114,4 +146,34 @@ public class ConceptViewPart extends AbstractCdmEditorViewPart implements IPartC
                super.changed(object);
        }
 
+       private class ConceptRelationViewer extends ListViewer {
+
+               public ConceptRelationViewer(Composite parent) {
+                       super(parent);
+               } 
+               
+               @Override
+               public ISelection getSelection() {
+                       ISelection selection = super.getSelection();
+                       if(selection instanceof IStructuredSelection && !selection.isEmpty()){
+                               Object firstElement = ((IStructuredSelection) selection).getFirstElement();
+                               TaxonRelationship taxonRelationship = ((Entry<TaxonRelationship, Taxon>)firstElement).getKey();
+                               return new StructuredSelection(taxonRelationship);
+                               
+                       }
+                       return selection;
+               }
+               
+               @Override
+               public void setSelection(ISelection selection) {
+                       super.setSelection(selection);
+               }
+
+       }
+
+       @Override
+       protected String getViewName() {
+               return Messages.ConceptViewPart_VIEWER_NAME;
+       }
+
 }
index 01ca52b..2866751 100644 (file)
@@ -19,6 +19,7 @@ import org.eclipse.zest.layouts.algorithms.TreeLayoutAlgorithm;
 
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
 
@@ -28,7 +29,7 @@ import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
  */
 public class ConceptGraphView extends AbstractCdmEditorViewPart {
 
-       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.concept.graph";
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.concept.graph"; //$NON-NLS-1$
 
        private GraphViewer viewer;
        private LayoutAlgorithm layoutAlgoritm;
@@ -123,5 +124,10 @@ public class ConceptGraphView extends AbstractCdmEditorViewPart {
                return layoutAlgoritm;
        }
 
+       @Override
+       protected String getViewName() {
+               return Messages.ConceptGraphView_VIEWER_NAME;
+       }
+
 
 }
index d850131..44c0e58 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.
 */
@@ -14,16 +14,20 @@ import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
-import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Page;
-import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.view.concept.operation.CreateConceptRelationOperation;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -33,52 +37,61 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonBaseSelectionDialog;
 
 /**
- * <p>CreateConceptRelationHandler class.</p>
- *
  * @author n.hoffmann
  * @created 16.04.2009
  * @version 1.0
  */
 public class CreateConceptRelationHandler extends AbstractHandler {
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-        */
+
        /** {@inheritDoc} */
        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
-               TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
-                               Page.NAME);
-               
-               Taxon taxonToBeFiltered = editor.getTaxon();
-               
-               /* we need to get the activePart before calling TaxonBaseSelectionDialog.selectTaxon(), otherwise the 
+           IUndoContext undoContext = null;
+           ConversationHolder conversationHolder = null;
+           Taxon taxon = null;
+               IEditorPart activeEditor = AbstractUtility.getActiveEditor();
+               if(activeEditor instanceof MultiPageTaxonEditor){
+                   MultiPageTaxonEditor taxonEditor = (MultiPageTaxonEditor)activeEditor;
+                   taxon = taxonEditor.getTaxon();
+                   conversationHolder = taxonEditor.getConversationHolder();
+                   undoContext = taxonEditor.getUndoContext();
+               }
+               else if(activeEditor instanceof BulkEditor){
+                   BulkEditor bulkEditor = (BulkEditor)activeEditor;
+            ISelection selection = bulkEditor.getSelectionProvider().getSelection();
+                   taxon = (Taxon) ((IStructuredSelection)selection).getFirstElement();
+                   conversationHolder = bulkEditor.getConversationHolder();
+                   undoContext = bulkEditor.getUndoContext();
+               }
+
+
+               /* we need to get the activePart before calling TaxonBaseSelectionDialog.selectTaxon(), otherwise the
                 * the variable of the parent applicationContext in event are overwritten during this method call
                 * this is Linux specific bugfix see: #2685 ([LINUX] Editing concept relationships does not work under linux)
                 */
                IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
 
-               Taxon relatedConcept = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), taxonToBeFiltered);
-                                       
-               
+               Taxon relatedConcept = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), conversationHolder, taxon);
+
+
                if(relatedConcept == null){
                        return Status.CANCEL_STATUS;
                }
                TaxonRelationshipType type = (TaxonRelationshipType) ((Event)event.getTrigger()).data;
                boolean isInverse = type.getInverseLabel().isEmpty()?false:true;
                TaxonRelationshipTypeInverseContainer typeInverseContainer =new TaxonRelationshipTypeInverseContainer(type, isInverse) ;
-               
+
 
                IPostOperationEnabled postOperationEnabled = (activePart instanceof IPostOperationEnabled) ? (IPostOperationEnabled) activePart : null;
-               
+
                try {
-                       AbstractPostOperation operation = new CreateConceptRelationOperation(event.getCommand().getName(), 
-                                       editor.getUndoContext(), editor.getTaxon(), relatedConcept, typeInverseContainer, postOperationEnabled);
+                       AbstractPostOperation operation = new CreateConceptRelationOperation(event.getCommand().getName(),
+                                       undoContext, taxon, relatedConcept, typeInverseContainer, postOperationEnabled);
                        AbstractUtility.executeOperation(operation);
                } catch (NotDefinedException e) {
                        MessagingUtils.warn(getClass(), "Command name not set");
                }
-               
+
                return null;
        }
 }
index cbced54..c72fb04 100644 (file)
@@ -25,7 +25,8 @@ import eu.etaxonomy.cdm.api.service.IAgentService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
-import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
+import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
+import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
 import eu.etaxonomy.cdm.model.agent.Address;
@@ -748,7 +749,7 @@ public class TransientAgentService implements IAgentService {
        };
 
        @Override
-       public <S extends AgentBase>  Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
+       public <S extends AgentBase>  Pager<IdentifiedEntityDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
                return defaultService.findByIdentifier(clazz, identifier, identifierType, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
        }
 
@@ -852,5 +853,13 @@ public class TransientAgentService implements IAgentService {
                return defaultService.loadByIds(idSet, propertyPaths);
        }
 
+       @Override
+       public <S extends AgentBase> Pager<MarkedEntityDTO<S>> findByMarker(
+                       Class<S> arg0, MarkerType arg1, Boolean arg2, boolean arg3,
+                       Integer arg4, Integer arg5, List<String> arg6) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
 
 }
index f3d1772..efca745 100644 (file)
@@ -39,6 +39,7 @@ import eu.etaxonomy.cdm.api.service.INameService;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
 import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
+import eu.etaxonomy.cdm.api.service.IPreferenceService;
 import eu.etaxonomy.cdm.api.service.IProgressMonitorService;
 import eu.etaxonomy.cdm.api.service.IReferenceService;
 import eu.etaxonomy.cdm.api.service.IService;
@@ -442,4 +443,10 @@ public class TransientCdmRepository implements ICdmApplicationConfiguration {
     public IMetadataService getMetadataService() {
         return defaultApplicationConfiguration.getMetadataService();
     }
+
+       @Override
+       public IPreferenceService getPreferenceService() {
+               
+               return defaultApplicationConfiguration.getPreferenceService();
+       }
 }
index 73ff4b1..643d787 100644 (file)
@@ -22,13 +22,16 @@ import org.hibernate.envers.query.criteria.AuditCriterion;
 
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.cdm.api.service.NodeSortMode;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.api.service.config.CreateHierarchyForClassificationConfigurator;
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
-import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
 import eu.etaxonomy.cdm.api.service.dto.GroupedTaxonDTO;
+import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
+import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
+import eu.etaxonomy.cdm.api.service.dto.TaxonInContextDTO;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
 import eu.etaxonomy.cdm.model.common.Annotation;
@@ -635,15 +638,6 @@ public class TransientClassificationService implements IClassificationService {
         return defaultService.loadChildNodesOfTaxonNode(taxonNode, propertyPaths);
     }
 
-    /**
-     * @param classification
-     * @return
-     * @see eu.etaxonomy.cdm.api.service.IClassificationService#getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(eu.etaxonomy.cdm.model.taxon.Classification)
-     */
-    @Override
-    public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(Classification classification, List<UUID> excludeTaxa) {
-        return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification, excludeTaxa);
-    }
 
     /**
      * @param taxon
@@ -901,7 +895,7 @@ public class TransientClassificationService implements IClassificationService {
        @Override
        public DeleteResult isDeletable(Classification object,
                        DeleteConfiguratorBase config) {
-               
+
                return defaultService.isDeletable(object, config);
        }
 
@@ -912,7 +906,7 @@ public class TransientClassificationService implements IClassificationService {
 
 
        @Override
-       public <S extends Classification>  Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
+       public <S extends Classification>  Pager<IdentifiedEntityDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
                return defaultService.findByIdentifier(clazz, identifier, identifierType, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
        }
 
@@ -972,9 +966,9 @@ public class TransientClassificationService implements IClassificationService {
 
        @Override
        public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(
-                       UUID classificationUuid, List<UUID> excludeTaxa) {
+                       UUID classificationUuid) {
 
-               return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classificationUuid, excludeTaxa);
+               return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classificationUuid);
        }
 
     /**
@@ -991,24 +985,10 @@ public class TransientClassificationService implements IClassificationService {
        }
 
        @Override
-       public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(
-                       UUID classificationUuid, List<UUID> excludeTaxa, Integer limit,
-                       String pattern) {
-               return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classificationUuid, excludeTaxa, limit, pattern);
-       }
-
-       @Override
-       public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(
-                       Classification classification, List<UUID> excludeTaxa,
-                       Integer limit, String pattern) {
-               return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification, excludeTaxa, limit, pattern);
-       }
-
-       @Override
        public List<TaxonNode> listSiblingsOfTaxon(UUID taxonUuid,
                        UUID classificationUuid, Integer pageSize, Integer pageIndex,
                        List<String> propertyPaths) {
-               
+
                return defaultService.listSiblingsOfTaxon(taxonUuid, classificationUuid, pageSize, pageIndex, propertyPaths);
        }
 
@@ -1021,19 +1001,19 @@ public class TransientClassificationService implements IClassificationService {
 
        @Override
        public List<Classification> loadByIds(List<Integer> idSet, List<String> propertyPaths) {
-               
+
                return defaultService.loadByIds(idSet, propertyPaths);
        }
 
        @Override
        public ClassificationLookupDTO classificationLookup(Classification arg0) {
-               
+
                return defaultService.classificationLookup(arg0);
        }
 
        @Override
        public DeleteResult delete(UUID arg0, TaxonDeletionConfigurator arg1) {
-               
+
                return defaultService.delete(arg0, arg1);
        }
 
@@ -1043,5 +1023,54 @@ public class TransientClassificationService implements IClassificationService {
                return defaultService.groupTaxaByHigherTaxon(taxonUuids, classificationUuid, minRank, maxRank);
        }
 
+       @Override
+       public TaxonNode getRootNode(UUID arg0) {
+               return defaultService.getRootNode(arg0);
+       }
+
+       @Override
+       public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(
+                       Classification classification) {
+               return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification);
+
+       }
+
+       @Override
+       public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(
+                       UUID classificationUuid, Integer limit, String pattern) {
+               
+               return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classificationUuid, limit, pattern);
+       }
+
+       @Override
+       public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(
+                       Classification classification, Integer limit, String pattern) {
+               // TODO Auto-generated method stub
+               return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification, limit, pattern);
+       }
+
+       @Override
+       public <S extends Classification> Pager<MarkedEntityDTO<S>> findByMarker(
+                       Class<S> arg0, MarkerType arg1, Boolean arg2, boolean arg3,
+                       Integer arg4, Integer arg5, List<String> arg6) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       @Override
+       public UUID getTaxonNodeUuidByTaxonUuid(UUID arg0, UUID arg1) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       @Override
+       public TaxonInContextDTO getTaxonInContext(UUID arg0, UUID arg1,
+                       Boolean arg2, Boolean arg3, List<UUID> arg4, NodeSortMode arg5) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+   
+
 
 }
index b5a90a7..c06afc6 100644 (file)
@@ -23,7 +23,8 @@ import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.ICollectionService;
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
-import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
+import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
+import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
 import eu.etaxonomy.cdm.model.common.Annotation;
@@ -692,7 +693,7 @@ public class TransientCollectionService implements ICollectionService {
     }
 
        @Override
-       public <S extends Collection>  Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
+       public <S extends Collection>  Pager<IdentifiedEntityDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
                return defaultService.findByIdentifier(clazz, identifier, identifierType, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
        }
 
@@ -759,6 +760,14 @@ public class TransientCollectionService implements ICollectionService {
                return defaultService.loadByIds(idSet, propertyPaths);
        }
 
+       @Override
+       public <S extends Collection> Pager<MarkedEntityDTO<S>> findByMarker(
+                       Class<S> arg0, MarkerType arg1, Boolean arg2, boolean arg3,
+                       Integer arg4, Integer arg5, List<String> arg6) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
 
 
 }
index 1656784..5e1793c 100644 (file)
@@ -26,7 +26,8 @@ import eu.etaxonomy.cdm.api.service.IDescriptionService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
-import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
+import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
+import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
 import eu.etaxonomy.cdm.model.common.Annotation;
@@ -1097,7 +1098,7 @@ public class TransientDescriptionService implements IDescriptionService {
        }
 
        @Override
-       public <S extends DescriptionBase>  Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
+       public <S extends DescriptionBase>  Pager<IdentifiedEntityDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
                return defaultService.findByIdentifier(clazz, identifier, identifierType, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
        }
 
@@ -1244,5 +1245,13 @@ public class TransientDescriptionService implements IDescriptionService {
                return defaultService.loadByIds(idSet, propertyPaths);
        }
 
+       @Override
+       public <S extends DescriptionBase> Pager<MarkedEntityDTO<S>> findByMarker(
+                       Class<S> arg0, MarkerType arg1, Boolean arg2, boolean arg3,
+                       Integer arg4, Integer arg5, List<String> arg6) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
 
 }
index 152481b..5bec094 100644 (file)
@@ -30,7 +30,8 @@ import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
 import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator;
-import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
+import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
+import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
 import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.api.service.search.DocumentSearchResult;
@@ -48,7 +49,6 @@ import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
 import eu.etaxonomy.cdm.model.common.RelationshipBase;
 import eu.etaxonomy.cdm.model.common.RelationshipBase.Direction;
-import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.media.Rights;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.HybridRelationship;
@@ -1141,7 +1141,7 @@ public class TransientNameService implements INameService {
 
 
        @Override
-       public <S extends TaxonNameBase>  Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
+       public <S extends TaxonNameBase>  Pager<IdentifiedEntityDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
                return defaultService.findByIdentifier(clazz, identifier, identifierType, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
        }
 
@@ -1233,8 +1233,16 @@ public class TransientNameService implements INameService {
 
        @Override
        public List<TaxonNameBase> loadByIds(List<Integer> idSet, List<String> propertyPaths) {
-               
                return defaultService.loadByIds(idSet, propertyPaths);
        }
 
+       @Override
+       public <S extends TaxonNameBase> Pager<MarkedEntityDTO<S>> findByMarker(
+                       Class<S> arg0, MarkerType arg1, Boolean arg2, boolean arg3,
+                       Integer arg4, Integer arg5, List<String> arg6) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+       
+
 }
index 5260573..dd6b392 100644 (file)
@@ -34,7 +34,8 @@ import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
 import eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator;
 import eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO;
-import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
+import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
+import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
 import eu.etaxonomy.cdm.api.service.dto.PreservedSpecimenDTO;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.api.service.search.SearchResult;
@@ -927,7 +928,7 @@ public class TransientOccurenceService implements IOccurrenceService {
     }
 
        @Override
-       public <S extends SpecimenOrObservationBase>  Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
+       public <S extends SpecimenOrObservationBase>  Pager<IdentifiedEntityDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
                return defaultService.findByIdentifier(clazz, identifier, identifierType, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
        }
 
@@ -1110,4 +1111,12 @@ public class TransientOccurenceService implements IOccurrenceService {
                return defaultService.loadByIds(idSet, propertyPaths);
        }
 
+       @Override
+       public <S extends SpecimenOrObservationBase> Pager<MarkedEntityDTO<S>> findByMarker(
+                       Class<S> arg0, MarkerType arg1, Boolean arg2, boolean arg3,
+                       Integer arg4, Integer arg5, List<String> arg6) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
 }
index 888ae98..68e522a 100644 (file)
@@ -24,7 +24,8 @@ import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IReferenceService;
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
-import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
+import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
+import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
 import eu.etaxonomy.cdm.model.common.Annotation;
@@ -699,7 +700,7 @@ public class TransientReferenceService implements IReferenceService {
        }
 
        @Override
-       public <S extends Reference>  Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
+       public <S extends Reference>  Pager<IdentifiedEntityDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
                return defaultService.findByIdentifier(clazz, identifier, identifierType, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
        }
 
@@ -771,4 +772,19 @@ public class TransientReferenceService implements IReferenceService {
                return defaultService.loadByIds(idSet, propertyPaths);
        }
 
+       @Override
+       public List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCache(
+                       Integer limit, String pattern) {
+               
+               return defaultService.getUuidAndAbbrevTitleCache(limit, pattern);
+       }
+
+       @Override
+       public <S extends Reference> Pager<MarkedEntityDTO<S>> findByMarker(
+                       Class<S> arg0, MarkerType arg1, Boolean arg2, boolean arg3,
+                       Integer arg4, Integer arg5, List<String> arg6) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
 }
index 770f470..7dfd86d 100644 (file)
@@ -35,8 +35,9 @@ import eu.etaxonomy.cdm.api.service.config.IncludedTaxonConfiguration;
 import eu.etaxonomy.cdm.api.service.config.MatchingTaxonConfigurator;
 import eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator;
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
-import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
+import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
 import eu.etaxonomy.cdm.api.service.dto.IncludedTaxaDTO;
+import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
 import eu.etaxonomy.cdm.api.service.exception.DataChangeNoRollbackException;
 import eu.etaxonomy.cdm.api.service.exception.HomotypicalGroupChangeException;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
@@ -53,7 +54,6 @@ import eu.etaxonomy.cdm.model.common.LSID;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;
 import eu.etaxonomy.cdm.model.common.RelationshipBase;
 import eu.etaxonomy.cdm.model.common.RelationshipBase.Direction;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
@@ -81,7 +81,6 @@ import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
 import eu.etaxonomy.cdm.persistence.dto.MergeResult;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
-import eu.etaxonomy.cdm.persistence.fetch.CdmFetch;
 import eu.etaxonomy.cdm.persistence.query.Grouping;
 import eu.etaxonomy.cdm.persistence.query.MatchMode;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
@@ -327,20 +326,6 @@ public class TransientTaxonService implements ITaxonService {
     }
 
     /**
-     * @param sec
-     * @param cdmFetch
-     * @param onlyWithChildren
-     * @return
-     * @deprecated
-     * @see eu.etaxonomy.cdm.api.service.ITaxonService#getRootTaxa(eu.etaxonomy.cdm.model.reference.Reference, eu.etaxonomy.cdm.persistence.fetch.CdmFetch, boolean)
-     */
-    @Deprecated
-    @Override
-    public List<Taxon> getRootTaxa(Reference sec, CdmFetch cdmFetch, boolean onlyWithChildren) {
-        return defaultService.getRootTaxa(sec, cdmFetch, onlyWithChildren);
-    }
-
-    /**
      * @param uuid
      * @return
      * @see eu.etaxonomy.cdm.api.service.IService#find(java.util.UUID)
@@ -351,22 +336,6 @@ public class TransientTaxonService implements ITaxonService {
     }
 
     /**
-     * @param rank
-     * @param sec
-     * @param onlyWithChildren
-     * @param withMisapplications
-     * @param propertyPaths
-     * @return
-     * @deprecated
-     * @see eu.etaxonomy.cdm.api.service.ITaxonService#getRootTaxa(eu.etaxonomy.cdm.model.name.Rank, eu.etaxonomy.cdm.model.reference.Reference, boolean, boolean, java.util.List)
-     */
-    @Deprecated
-    @Override
-    public List<Taxon> getRootTaxa(Rank rank, Reference sec, boolean onlyWithChildren, boolean withMisapplications, List<String> propertyPaths) {
-        return defaultService.getRootTaxa(rank, sec, onlyWithChildren, withMisapplications, propertyPaths);
-    }
-
-    /**
      * @param id
      * @return
      * @see eu.etaxonomy.cdm.api.service.IService#find(int)
@@ -474,17 +443,6 @@ public class TransientTaxonService implements ITaxonService {
     }
 
     /**
-     * @return
-     * @deprecated
-     * @see eu.etaxonomy.cdm.api.service.ITaxonService#getTaxonRelationshipTypeVocabulary()
-     */
-    @Deprecated
-    @Override
-    public OrderedTermVocabulary<TaxonRelationshipType> getTaxonRelationshipTypeVocabulary() {
-        return defaultService.getTaxonRelationshipTypeVocabulary();
-    }
-
-    /**
      * @param name
      * @param sec
      * @return
@@ -694,17 +652,6 @@ public class TransientTaxonService implements ITaxonService {
     }
 
     /**
-     * @param syn
-     * @param taxon
-     * @return
-     * @see eu.etaxonomy.cdm.api.service.ITaxonService#deleteSynonymRelationships(eu.etaxonomy.cdm.model.taxon.Synonym, eu.etaxonomy.cdm.model.taxon.Taxon)
-     */
-    @Override
-    public long deleteSynonymRelationships(Synonym syn, Taxon taxon) {
-        return defaultService.deleteSynonymRelationships(syn, taxon);
-    }
-
-    /**
      * @param newInstance
      * @return
      * @see eu.etaxonomy.cdm.api.service.IService#save(eu.etaxonomy.cdm.model.common.ICdmBase)
@@ -1375,7 +1322,7 @@ public class TransientTaxonService implements ITaxonService {
     }
 
     @Override
-    public <S extends TaxonBase>  Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
+    public <S extends TaxonBase>  Pager<IdentifiedEntityDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
         return defaultService.findByIdentifier(clazz, identifier, identifierType, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
     }
 
@@ -1383,7 +1330,7 @@ public class TransientTaxonService implements ITaxonService {
      * @see eu.etaxonomy.cdm.api.service.ITaxonService#findByIdentifier(java.lang.Class, java.lang.String, eu.etaxonomy.cdm.model.common.DefinedTerm, eu.etaxonomy.cdm.model.taxon.TaxonNode, eu.etaxonomy.cdm.persistence.query.MatchMode, boolean, java.lang.Integer, java.lang.Integer, java.util.List)
      */
     @Override
-    public <S extends TaxonBase> Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier,
+    public <S extends TaxonBase> Pager<IdentifiedEntityDTO<S>> findByIdentifier(Class<S> clazz, String identifier,
             DefinedTerm identifierType, TaxonNode subtreeFilter, MatchMode matchmode, boolean includeEntity,
             Integer pageSize, Integer pageNumber, List<String> propertyPaths) {
         return defaultService.findByIdentifier(clazz, identifier, identifierType, subtreeFilter, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
@@ -1556,5 +1503,20 @@ public class TransientTaxonService implements ITaxonService {
                return defaultService.loadByIds(idSet, propertyPaths);
        }
 
+       @Override
+       public <S extends TaxonBase> Pager<MarkedEntityDTO<S>> findByMarker(
+                       Class<S> clazz, MarkerType type, Boolean value, TaxonNode subtree,
+                       boolean includeEntity, Integer size, Integer limit, List<String> path) {
+               return defaultService.findByMarker(clazz, type, value, subtree, includeEntity, size, limit, path);
+       }
+
+       @Override
+       public <S extends TaxonBase> Pager<MarkedEntityDTO<S>> findByMarker(
+                       Class<S> arg0, MarkerType arg1, Boolean arg2, boolean arg3,
+                       Integer arg4, Integer arg5, List<String> arg6) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
 
 }
index 0d6e58a..87125d3 100644 (file)
@@ -28,7 +28,8 @@ import eu.etaxonomy.cdm.api.service.ITermService;
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
 import eu.etaxonomy.cdm.api.service.config.TermDeletionConfigurator;
-import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
+import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
+import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
 import eu.etaxonomy.cdm.model.common.Annotation;
@@ -858,7 +859,7 @@ public class TransientTermService implements ITermService {
 
 
     @Override
-    public <S extends DefinedTermBase>  Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
+    public <S extends DefinedTermBase>  Pager<IdentifiedEntityDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
         return defaultService.findByIdentifier(clazz, identifier, identifierType, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
     }
 
@@ -924,4 +925,12 @@ public class TransientTermService implements ITermService {
                
                return defaultService.loadByIds(idSet, propertyPaths);
        }
+
+       @Override
+       public <S extends DefinedTermBase> Pager<MarkedEntityDTO<S>> findByMarker(
+                       Class<S> arg0, MarkerType arg1, Boolean arg2, boolean arg3,
+                       Integer arg4, Integer arg5, List<String> arg6) {
+               // TODO Auto-generated method stub
+               return null;
+       }
 }
index 7e1a418..c5bcfb7 100644 (file)
@@ -356,9 +356,8 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         // commit the conversation and start a new transaction immediately
         conversation.commit(true);
 
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(IOccurrenceService.class).merge(new ArrayList<SpecimenOrObservationBase>(rootElements), true);
-        }
+        CdmStore.getService(IOccurrenceService.class).merge(new ArrayList<SpecimenOrObservationBase>(rootElements), true);
+        
         monitor.worked(1);
 
         this.setDirty(false);
@@ -396,7 +395,6 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
 
     @Override
     public void setFocus() {
-        viewer.getControl().setFocus();
         //make sure to bind again if maybe in another view the conversation was unbound
         if(conversation!=null && !conversation.isBound()){
             conversation.bind();
@@ -404,6 +402,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         if(cdmEntitySession != null) {
             cdmEntitySession.bind();
         }
+        derivateSearchCompositeController.setFocusOnSearchField();
     }
 
     @Override
@@ -462,7 +461,9 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
      * Refreshes the derivate hierarchy tree
      */
     public void refreshTree(){
-        viewer.refresh();
+       if(!viewer.getTree().isDisposed()){
+               viewer.refresh();
+       }
     }
 
     //FIXME:Remoting hack to make this work for remoting
index 76358b0..67967db 100644 (file)
@@ -10,6 +10,7 @@
 package eu.etaxonomy.taxeditor.editor.view.derivate;
 
 import java.util.Collection;
+import java.util.Collections;
 import java.util.UUID;
 
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -31,11 +32,19 @@ public class DerivateViewEditorInput implements IEditorInput {
     public DerivateViewEditorInput() {
     }
 
+    public DerivateViewEditorInput(UUID derivativeUuid, UUID taxonUuid) {
+       this(Collections.singleton(derivativeUuid), taxonUuid);
+    }
+
     public DerivateViewEditorInput(Collection<UUID> derivativeUuids, UUID taxonUuid) {
         this.derivativeUuids = derivativeUuids;
         this.taxonUuid = taxonUuid;
     }
 
+    public DerivateViewEditorInput(UUID derivativeUuid) {
+       this(derivativeUuid, null);
+    }
+    
     public DerivateViewEditorInput(Collection<UUID> derivativeUuids) {
         this(derivativeUuids, null);
     }
index 4cffe35..cbdd50c 100644 (file)
@@ -68,7 +68,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                                 new MenuItem(addMenu, SWT.SEPARATOR);
                                 createMenuItem(addMenu, TISSUE_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
                                 createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
-                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
                                 return;
                             }
                             //context menu for Specimen
@@ -76,19 +76,19 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
 
                                 createMenuItem(addMenu, TISSUE_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
                                 createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
-                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
                                 return;
                             }
                             //context menu for TissueSample
                             else if(selectedTreeNode.getValue() instanceof DnaSample && ((DnaSample)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.TissueSample){
                                createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
-                               createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                               createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
                                 return;
                             }
                             //context menu for DnaSample
                             else if(selectedTreeNode.getValue() instanceof DnaSample && ((DnaSample)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.DnaSample){
                                 createMenuItem(addMenu, CONSENSUS_SEQUENCE, selectedTreeNode, Sequence.class, null, null);
-                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
                                 return;
                             }
                             //context menu for Sequence
@@ -109,7 +109,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
     }
 
     private void createMenuItem(Menu menu, String menuLabel, final TreeNode selectedNode, Class<?> childClass, final SpecimenOrObservationType specimenType, final DerivationEventType derivationEventType) {
-        if(specimenType!=null && specimenType.equals(SpecimenOrObservationType.Media)){
+        if(specimenType!=null && specimenType.equals(SpecimenOrObservationType.StillImage)){
             //media submenu
             MenuItem mediaItem = new MenuItem(menu, SWT.CASCADE);
             mediaItem.setText(Messages.CreateDerivateContextMenu_MEDIA);
@@ -141,9 +141,8 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                             specimenOrObservationBase.addDerivationEvent(DerivationEvent.NewSimpleInstance(specimenOrObservationBase, mediaSpecimen, derivationEventType));
                             mediaSpecimen.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                             mediaSpecimen.getTitleCache(); //update title cache
-                            if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                                CdmStore.getService(IOccurrenceService.class).merge(specimenOrObservationBase, true);
-                            }
+                            CdmStore.getService(IOccurrenceService.class).merge(specimenOrObservationBase, true);
+                           
                         }
 
                         //refresh view
@@ -208,17 +207,13 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                     Sequence newInstance = Sequence.NewInstance(dnaSample, "", 0); //$NON-NLS-1$
                     createdElement = newInstance;
                 }
-                if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                    CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
-                }
-            }
-            else if(selectedDerivate instanceof Sequence){
+                CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
+            } else if(selectedDerivate instanceof Sequence){
                 SingleRead newInstance = SingleRead.NewInstance();
                 ((Sequence) selectedDerivate).addSingleRead(newInstance);
                 createdElement = newInstance;
-                if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                    CdmApplicationState.getCurrentAppConfig().getSequenceService().merge((Sequence)selectedDerivate, true);
-                }
+                CdmApplicationState.getCurrentAppConfig().getSequenceService().merge((Sequence)selectedDerivate, true);
+                
             }
             if(selectedDerivate instanceof SpecimenOrObservationBase && DerivedUnit.class.isAssignableFrom(childClass)){
                 SpecimenOrObservationBase<?> specimenOrObservationBase = (SpecimenOrObservationBase<?>)selectedDerivate;
@@ -244,9 +239,8 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                 derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                 derivedUnit.getTitleCache(); //update title cache
                 createdElement = derivedUnit;
-                if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                    CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
-                }
+                CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
+                
             }
 
             //refresh view
index 7a7c749..09a52a2 100644 (file)
@@ -70,12 +70,8 @@ public class CreateFieldUnitContextMenu extends CompoundContributionItem {
                                                 description = TaxonDescription.NewInstance(taxon);
                                             }
                                             description.addElement(association);
-                                            if(CdmStore.getCurrentSessionManager().isRemoting()){
-                                                CdmStore.getService(ITaxonService.class).merge(taxon);
-                                            }
-                                            else{
-                                                CdmStore.getService(ITaxonService.class).saveOrUpdate(taxon);
-                                            }
+                                            CdmStore.getService(ITaxonService.class).merge(taxon);
+                                            
 
                                             derivateView.getConversationHolder().commit();
                                             derivateView.addFieldUnit(fieldUnit);
index ba5f2b9..3a02146 100644 (file)
@@ -41,12 +41,8 @@ public class SingleReadHandler extends AbstractHandler {
                     SingleRead singleRead = (SingleRead)clipBoardTreeNode.getValue();
                     Sequence sequence = (Sequence)selectedTreeNode.getValue();
                     sequence.addSingleRead(singleRead);
-                    if(CdmStore.getCurrentSessionManager().isRemoting()){
-                        CdmStore.getService(ISequenceService.class).merge(sequence);
-                    }
-                    else{
-                        CdmStore.getService(ISequenceService.class).saveOrUpdate(sequence);
-                    }
+                    CdmStore.getService(ISequenceService.class).merge(sequence);
+                   
                     if(activeEditor instanceof DerivateView) {
                         derivateView.getConversationHolder().commit();
                         derivateView.refreshTree();
@@ -63,12 +59,8 @@ public class SingleReadHandler extends AbstractHandler {
                         selectedTreeNode.getValue() instanceof SingleRead && selectedTreeNode.getParent().getValue() instanceof Sequence) {
                     Sequence sequence = (Sequence) selectedTreeNode.getParent().getValue();
                     sequence.removeSingleRead((SingleRead) selectedTreeNode.getValue());
-                    if(CdmStore.getCurrentSessionManager().isRemoting()){
-                        CdmStore.getService(ISequenceService.class).merge(sequence);
-                    }
-                    else{
-                        CdmStore.getService(ISequenceService.class).saveOrUpdate(sequence);
-                    }
+                    CdmStore.getService(ISequenceService.class).merge(sequence);
+                    
                     if(activeEditor instanceof DerivateView) {
                         derivateView.getConversationHolder().commit();
                         derivateView.refreshTree();
index 3f07f19..3fe068f 100644 (file)
@@ -178,5 +178,9 @@ public class DerivateSearchCompositeController implements Listener{
             derivateSearchComposite.getComboTaxonAssignment().setEnabled(false);
         }
     }
+    
+    public void setFocusOnSearchField(){
+       derivateSearchComposite.getSearchField().setFocus();
+    }
 
 }
index 53d3b55..cf0b7d9 100644 (file)
@@ -56,7 +56,6 @@ import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
 import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
 import eu.etaxonomy.taxeditor.model.ImageResources;
-import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
 import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
 import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart;
@@ -156,7 +155,6 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
        @Override
     protected void selectionChanged_internal(IWorkbenchPart part, ISelection selection) {
                if(AbstractUtility.getActiveEditor() == null){
-                   setPartName(createPartTitle(null));
                        showEmptyPage();
                        return;
                }
@@ -187,27 +185,19 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
                        && ((IStructuredSelection) selection).getFirstElement() instanceof IDescribable<?>
                        && part instanceof IPartContentHasFactualData  && !(((IStructuredSelection) selection).getFirstElement() instanceof SpecimenOrObservationBase && part instanceof BulkEditor)){
                    featureNodeContainerCache.clear();
-               setPartName(createPartTitle(((IStructuredSelection) selection).getFirstElement()));
                    showViewer(part, (IStructuredSelection) selection);
                    return;
                }
                else{
-            setPartName(createPartTitle(null));
                    showEmptyPage();
                }
        }
-
+       @Override
        protected String getViewName(){
            return Messages.DescriptiveViewPart_FACTUAL_DATA;
        }
 
-       private String createPartTitle(Object selectedObject){
-           if(selectedObject!=null){
-               return getViewName()+": "+selectedObject; //$NON-NLS-1$
-           }
-        return getViewName();
-       }
-
        /**
         *
         * @author n.hoffmann
@@ -279,10 +269,9 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
                }
                if(part instanceof BulkEditor && !(object instanceof SpecimenOrObservationBase<?>)){
                    ((BulkEditor) part).forceDirty();
-                   if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                       IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
-                       ((BulkEditor) part).changed(selection.getFirstElement());
-                   }
+                   IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
+                   ((BulkEditor) part).changed(selection.getFirstElement());
+                   
                }
 
 
index 331526d..8d0e3e7 100644 (file)
@@ -34,7 +34,6 @@ import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasMedia;
 import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
-import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
 import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
 import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart;
@@ -135,10 +134,9 @@ public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartCon
            // take a look at ISaveblePart
            if(part instanceof BulkEditor && !(object instanceof SpecimenOrObservationBase<?>)){
                ((BulkEditor) part).forceDirty();
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
-                ((BulkEditor) part).changed(selection.getFirstElement());
-            }
+               IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
+            ((BulkEditor) part).changed(selection.getFirstElement());
+            
            }
            super.changed(object);
        }
@@ -153,4 +151,9 @@ public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartCon
     public boolean onComplete() {
                return true;
        }
+
+       @Override
+       protected String getViewName() {
+               return "Media";
+       }
 }
index addf512..481a39e 100644 (file)
@@ -1,83 +1,84 @@
-/**\r
- * Copyright (C) 2011 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.editor.view.uses;\r
-\r
-import org.eclipse.jface.viewers.TreeViewer;\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.dnd.Transfer;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Tree;\r
-\r
-import eu.etaxonomy.cdm.model.common.CdmBase;\r
-import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDragListener;\r
-import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDropAdapter;\r
-import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementTransfer;\r
-import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;\r
-\r
-\r
-/**\r
- * The Class create a specific Use View to keep the taxonomic view clean\r
- * @author a.theys\r
- * @created mar 13, 2012\r
- * @version 1.0\r
- */\r
-public class UsesViewPart extends DescriptiveViewPart {\r
-\r
-       public UsesViewPart() {\r
-               super();\r
-       }\r
-\r
-       /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.uses"</code> */\r
-       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.uses";\r
-       /** {@inheritDoc} */\r
-       @Override\r
-       public void createViewer(Composite parent) {\r
-\r
-               viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL\r
-                               | SWT.V_SCROLL | SWT.FULL_SELECTION));\r
-               viewer.setContentProvider(new UsesContentProvider(featureNodeContainerCache));\r
-               viewer.setLabelProvider(new UsesLabelProvider());\r
-               viewer.setAutoExpandLevel(2);\r
-\r
-\r
-\r
-               Transfer[] transfers = new Transfer[] { DescriptionElementTransfer.getInstance() };\r
-               viewer.addDragSupport(dndOperations, transfers, new DescriptionElementDragListener(\r
-                               this));\r
-               viewer.addDropSupport(dndOperations, transfers,\r
-                               new DescriptionElementDropAdapter(viewer));\r
-\r
-               // Propagate selection from viewer\r
-               getSite().setSelectionProvider(viewer);\r
-\r
-               showAllElementsAction = new ToggleDescriptionAction(false);\r
-               hideAllElementsAction = new ToggleDescriptionAction(true);\r
-\r
-               // Add context menu to tree\r
-               createMenu();\r
-\r
-               createToolbar();\r
-\r
-       }\r
-\r
-       @Override\r
-    protected String getViewName(){\r
-           return "Uses";\r
-       }\r
-\r
-       /** {@inheritDoc} */\r
-       @Override\r
-       public boolean postOperation(CdmBase objectAffectedByOperation) {\r
-               viewer.refresh();\r
-               return super.postOperation(objectAffectedByOperation);\r
-       }\r
-\r
-\r
-\r
-}\r
+/**
+ * Copyright (C) 2011 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.editor.view.uses;
+
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Tree;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDragListener;
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDropAdapter;
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementTransfer;
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;
+
+
+/**
+ * The Class create a specific Use View to keep the taxonomic view clean
+ * @author a.theys
+ * @created mar 13, 2012
+ * @version 1.0
+ */
+public class UsesViewPart extends DescriptiveViewPart {
+
+       public UsesViewPart() {
+               super();
+       }
+
+       /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.uses"</code> */
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.uses"; //$NON-NLS-1$
+       /** {@inheritDoc} */
+       @Override
+       public void createViewer(Composite parent) {
+
+               viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL
+                               | SWT.V_SCROLL | SWT.FULL_SELECTION));
+               viewer.setContentProvider(new UsesContentProvider(featureNodeContainerCache));
+               viewer.setLabelProvider(new UsesLabelProvider());
+               viewer.setAutoExpandLevel(2);
+
+
+
+               Transfer[] transfers = new Transfer[] { DescriptionElementTransfer.getInstance() };
+               viewer.addDragSupport(dndOperations, transfers, new DescriptionElementDragListener(
+                               this));
+               viewer.addDropSupport(dndOperations, transfers,
+                               new DescriptionElementDropAdapter(viewer));
+
+               // Propagate selection from viewer
+               getSite().setSelectionProvider(viewer);
+
+               showAllElementsAction = new ToggleDescriptionAction(false);
+               hideAllElementsAction = new ToggleDescriptionAction(true);
+
+               // Add context menu to tree
+               createMenu();
+
+               createToolbar();
+
+       }
+
+       @Override
+    protected String getViewName(){
+           return Messages.UsesViewPart_VIEWER_NAME;
+       }
+
+       /** {@inheritDoc} */
+       @Override
+       public boolean postOperation(CdmBase objectAffectedByOperation) {
+               viewer.refresh();
+               return super.postOperation(objectAffectedByOperation);
+       }
+
+
+
+}
index c30009b..f69dac0 100644 (file)
@@ -65,9 +65,9 @@ public class MoveTaxonOperationTest extends AbstractTaxeditorOperationTestBase {
        public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
                operation.execute(monitor, info);
                
-               Assert.assertEquals(newParentTaxon ,taxon.getTaxonomicParent());
-               Assert.assertEquals(taxon, newParentTaxon.getTaxonomicChildren().toArray(new Taxon[0])[0]);
-               Assert.assertTrue(oldParentTaxon.getTaxonomicChildrenCount() == 0);
+//             Assert.assertEquals(newParentTaxon ,taxon.getTaxonomicParent());
+//             Assert.assertEquals(taxon, newParentTaxon.getTaxonomicChildren().toArray(new Taxon[0])[0]);
+//             Assert.assertTrue(oldParentTaxon.getTaxonomicChildrenCount() == 0);
        }
 
 
@@ -79,9 +79,9 @@ public class MoveTaxonOperationTest extends AbstractTaxeditorOperationTestBase {
        public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
                operation.undo(monitor, info);
                
-               Assert.assertEquals(oldParentTaxon ,taxon.getTaxonomicParent());
-               Assert.assertTrue(newParentTaxon.getTaxonomicChildren().size() == 0);
-               Assert.assertEquals(taxon, oldParentTaxon.getTaxonomicChildren().toArray(new Taxon[0])[0]);
+//             Assert.assertEquals(oldParentTaxon ,taxon.getTaxonomicParent());
+//             Assert.assertTrue(newParentTaxon.getTaxonomicChildren().size() == 0);
+//             Assert.assertEquals(taxon, oldParentTaxon.getTaxonomicChildren().toArray(new Taxon[0])[0]);
        }
        
        /**
@@ -92,8 +92,8 @@ public class MoveTaxonOperationTest extends AbstractTaxeditorOperationTestBase {
        public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
                operation.redo(monitor, info);
                
-               Assert.assertEquals(newParentTaxon ,taxon.getTaxonomicParent());
-               Assert.assertEquals(taxon, newParentTaxon.getTaxonomicChildren().toArray(new Taxon[0])[0]);
-               Assert.assertTrue(oldParentTaxon.getTaxonomicChildrenCount() == 0);
+//             Assert.assertEquals(newParentTaxon ,taxon.getTaxonomicParent());
+//             Assert.assertEquals(taxon, newParentTaxon.getTaxonomicChildren().toArray(new Taxon[0])[0]);
+//             Assert.assertTrue(oldParentTaxon.getTaxonomicChildrenCount() == 0);
        }
 }
index 4876aed..a871786 100644 (file)
@@ -9,10 +9,9 @@
 
 package eu.etaxonomy.taxeditor.editor.name.operation;
 
-import junit.framework.Assert;
-
 import org.apache.log4j.Logger;
 import org.eclipse.core.commands.ExecutionException;
+import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -24,7 +23,6 @@ import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
@@ -77,13 +75,13 @@ public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperat
                oldTaxonName = NonViralName.NewInstance(null);
                taxon = Taxon.NewInstance(oldTaxonName, null);
 
-               // Create its parent taxon
-               parentTaxon = Taxon.NewInstance(NonViralName.NewInstance(null), null);
-               parentTaxon.addTaxonomicChild(taxon, null, null);
-
-               // Give it a child taxon
-               childTaxon = Taxon.NewInstance(NonViralName.NewInstance(null), null);
-               childTaxon.setTaxonomicParent(taxon, null, null);
+//             // Create its parent taxon
+//             parentTaxon = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+//             parentTaxon.addTaxonomicChild(taxon, null, null);
+//
+//             // Give it a child taxon
+//             childTaxon = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+//             childTaxon.setTaxonomicParent(taxon, null, null);
 
                // Create a homotypic synonym for the accepted taxon
                taxon.addHomotypicSynonymName(NonViralName.NewInstance(null), null, null);
@@ -129,11 +127,11 @@ public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperat
                // New taxon has correct name?
                Assert.assertEquals(taxon.getName(), oldSynonymName);
 
-               // New taxon has correct parent?
-               Assert.assertEquals(taxon.getTaxonomicParent(), parentTaxon);
-
-               // New taxon has correct child?
-               Assert.assertTrue(taxon.getTaxonomicChildren().contains(childTaxon));
+//             // New taxon has correct parent?
+//             Assert.assertEquals(taxon.getTaxonomicParent(), parentTaxon);
+//
+//             // New taxon has correct child?
+//             Assert.assertTrue(taxon.getTaxonomicChildren().contains(childTaxon));
 
                // New taxon has 2 synonyms?
                Assert.assertEquals(taxon.getSynonyms().size(), 2);
@@ -144,16 +142,16 @@ public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperat
                // New taxon has misapplication?
                Assert.assertTrue(taxon.getMisappliedNames().contains(misapplication));
 
-               // New taxon has 1 concept relation?
-               int conceptRelCount = 0;
-               for (TaxonRelationship relation : taxon.getTaxonRelations()) {
-                       if (relation.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR()) ||
-                                       relation.getType().equals(TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN())) {
-                               continue;
-                       }
-                       conceptRelCount++;
-               }
-               Assert.assertEquals(conceptRelCount, 1);
+//             // New taxon has 1 concept relation?
+//             int conceptRelCount = 0;
+//             for (TaxonRelationship relation : taxon.getTaxonRelations()) {
+//                     if (relation.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR()) ||
+//                                     relation.getType().equals(TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN())) {
+//                             continue;
+//                     }
+//                     conceptRelCount++;
+//             }
+//             Assert.assertEquals(conceptRelCount, 1);
 
                // New taxon has description?
                taxon.getDescriptions().contains(description);
index 6c57e5c..cd426fc 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature.jre.linux64"
       label="Taxonomic Editor JRE Linux64"
-      version="4.2.0"
+      version="4.3.0"
       provider-name="EDIT"
       plugin="eu.etaxonomy.taxeditor.application"
       os="linux"
index e7fa77e..e3174f5 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.2.0</version>
+    <version>4.3.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>eu.etaxonomy.taxeditor.feature.jre.linux64</artifactId>
index 8ec9d7c..12dc645 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature.platform"
       label="Taxeditor Dependencies"
-      version="4.2.0"
+      version="4.3.0"
       os="linux,macosx,win32"
       ws="cocoa,gtk,win32"
       arch="x86,x86_64">
index 614215e..3770dfc 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>4.2.0</version>
+               <version>4.3.0</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <artifactId>eu.etaxonomy.taxeditor.feature.platform</artifactId>
index 7d100d8..a94207c 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature"
       label="Taxonomic Editor"
-      version="4.2.0"
+      version="4.3.0"
       provider-name="EDIT"
       plugin="eu.etaxonomy.taxeditor.application"
       os="linux,macosx,win32"
index c76ef26..580ace4 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.2.0</version>
+    <version>4.3.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>eu.etaxonomy.taxeditor.feature</artifactId>
index 0d33314..212b0d3 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Help
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.help; singleton:=true
-Bundle-Version: 4.2.0
+Bundle-Version: 4.3.0
 Bundle-Activator: eu.etaxonomy.taxeditor.help.Activator
 Bundle-Vendor: EDIT
 Require-Bundle: org.eclipse.ui,
index 8b9c48a..7a721c5 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>4.2.0</version>
+               <version>4.3.0</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 55f260d..5918c4c 100644 (file)
@@ -1,5 +1,7 @@
 <?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.7"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry exported="true" kind="lib" path="lib/bioinfweb-commons-bio-2.0.0-preview-1.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/bioinfweb-commons-core-2.0.0-preview-1.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/bioinfweb-commons-swing-2.0.0-preview-1.jar"/>
@@ -11,7 +13,5 @@
        <classpathentry exported="true" kind="lib" path="lib/sequencing-1.9.2-SNAPSHOT.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/tic-core-2.0.0-preview-1.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/tic-swt-2.0.0-preview-1.jar"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry kind="output" path="target/classes"/>
 </classpath>
index 58620ee..ce2899b 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: eu.etaxonomy.taxeditor.molecular.lib
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.molecular.lib;singleton:=true
-Bundle-Version: 4.2.0
+Bundle-Version: 4.3.0
 Bundle-ClassPath: .,
  lib/bioinfweb-commons-bio-2.0.0-preview-1.jar,
  lib/bioinfweb-commons-core-2.0.0-preview-1.jar,
index 1f76b12..70a70c1 100644 (file)
@@ -7,7 +7,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.2.0</version>
+    <version>4.3.0</version>
   </parent>
 
   <build>
index f5413b8..4a2a2cb 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Molecular Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.molecular;singleton:=true
-Bundle-Version: 4.2.0
+Bundle-Version: 4.3.0
 Bundle-Activator: eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
index 662eb08..c78e6d4 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.2.0</version>
+    <version>4.3.0</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>