tabbed_properties branch merged into trunk completely
authorn.hoffmann <n.hoffmann@localhost>
Wed, 9 Jun 2010 16:51:58 +0000 (16:51 +0000)
committern.hoffmann <n.hoffmann@localhost>
Wed, 9 Jun 2010 16:51:58 +0000 (16:51 +0000)
130 files changed:
.gitattributes
taxeditor-store/META-INF/MANIFEST.MF
taxeditor-store/icons/Thumbs.db [deleted file]
taxeditor-store/icons/add.gif
taxeditor-store/icons/back.gif [new file with mode: 0644]
taxeditor-store/icons/binary.gif [new file with mode: 0644]
taxeditor-store/icons/bookmark.gif [new file with mode: 0644]
taxeditor-store/icons/category.gif [new file with mode: 0644]
taxeditor-store/icons/clear.gif [new file with mode: 0644]
taxeditor-store/icons/close.gif [new file with mode: 0644]
taxeditor-store/icons/collapseall.gif [new file with mode: 0644]
taxeditor-store/icons/configs.gif [new file with mode: 0644]
taxeditor-store/icons/console.gif [new file with mode: 0644]
taxeditor-store/icons/dates.gif [new file with mode: 0644]
taxeditor-store/icons/debug.gif [new file with mode: 0644]
taxeditor-store/icons/delete.gif
taxeditor-store/icons/eclipse.gif [new file with mode: 0644]
taxeditor-store/icons/expandAll.jpg [new file with mode: 0644]
taxeditor-store/icons/export.gif [new file with mode: 0644]
taxeditor-store/icons/filter.gif [new file with mode: 0644]
taxeditor-store/icons/flat.gif [new file with mode: 0644]
taxeditor-store/icons/font.gif [new file with mode: 0644]
taxeditor-store/icons/forward.gif [new file with mode: 0644]
taxeditor-store/icons/help.gif [new file with mode: 0644]
taxeditor-store/icons/hierarchical.gif [new file with mode: 0644]
taxeditor-store/icons/home_nav.gif [new file with mode: 0644]
taxeditor-store/icons/horizontal.gif [new file with mode: 0644]
taxeditor-store/icons/import_wiz.gif [new file with mode: 0644]
taxeditor-store/icons/lockedstate.gif [new file with mode: 0644]
taxeditor-store/icons/maximize.gif [new file with mode: 0644]
taxeditor-store/icons/min.gif [new file with mode: 0644]
taxeditor-store/icons/plugin.gif [new file with mode: 0644]
taxeditor-store/icons/print_edit.gif [new file with mode: 0644]
taxeditor-store/icons/progress_stop.gif [new file with mode: 0644]
taxeditor-store/icons/properties.gif [new file with mode: 0644]
taxeditor-store/icons/refresh.gif [new file with mode: 0644]
taxeditor-store/icons/restore.gif [new file with mode: 0644]
taxeditor-store/icons/run.gif [new file with mode: 0644]
taxeditor-store/icons/saveall_edit.gif [new file with mode: 0644]
taxeditor-store/icons/saveas_edit.gif [new file with mode: 0644]
taxeditor-store/icons/search.gif [new file with mode: 0644]
taxeditor-store/icons/search_src.gif [new file with mode: 0644]
taxeditor-store/icons/settings.gif [new file with mode: 0644]
taxeditor-store/icons/smartmode_co.gif [new file with mode: 0644]
taxeditor-store/icons/sort.gif [new file with mode: 0644]
taxeditor-store/icons/step_done.gif [new file with mode: 0644]
taxeditor-store/icons/synced.gif [new file with mode: 0644]
taxeditor-store/icons/thin_close_view.gif [new file with mode: 0644]
taxeditor-store/icons/thin_max_view.gif [new file with mode: 0644]
taxeditor-store/icons/thin_restore_view.GIF [new file with mode: 0644]
taxeditor-store/icons/trash.gif [new file with mode: 0644]
taxeditor-store/icons/update.gif [new file with mode: 0644]
taxeditor-store/icons/validate.gif [new file with mode: 0644]
taxeditor-store/icons/vertical.gif [new file with mode: 0644]
taxeditor-store/icons/view_menu.gif [new file with mode: 0644]
taxeditor-store/icons/waiting.gif [new file with mode: 0644]
taxeditor-store/icons/web.gif [new file with mode: 0644]
taxeditor-store/plugin.xml
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/CdmDataSourceRepository.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/handler/CloseConnectionHandler.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/view/CdmDataSourceLabelProvider.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/view/CdmDataSourceView.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/DatasourceLauncherDialog.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/LoginDialog.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/NewReferenceInputDialog.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/AbstractFilteredCdmResourceSelectionDialog.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredAgentSelectionDialog.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredNameSelectionDialog.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredPersonSelectionDialog.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredReferenceSelectionDialog.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonNodeSelectionDialog.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonSelectionDialog.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonomicTreeSelectionDialog.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTeamOrPersonBaseSelectionDialog.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/NomenclaturalCodeWizardPage.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/ColorFactory.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/IContextListener.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/IPartContentHasDetails.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/ImageResources.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/LineSelection.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/MementoHelper.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/NameHelper.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/Resources.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/TextHelper.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/AbstractSpecificReferenceWizardPage.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/BookDetailsWizardPage.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewAuthorWizard.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewAuthorWizardPage.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewGenericReferenceWizardPage.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewNameWizard.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewNameWizardPage.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewReferenceWizard.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/AddMediaToImageGalleryOperation.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/AddImageToDescriptionElementOperation.java with 73% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/ChangeDescriptionElementType.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateNameRelationOperation.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateSynonymInExistingHomotypicalGroupOperation.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateSynonymInExisitingHomotypicalGroupOperation.java with 92% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateTaxonDescriptionOperation.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateTaxonNodeOperation.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateTaxonomicTreeOperation.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteMediaOperation.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteImageOperation.java with 76% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteNameRelationOperation.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/MoveMediaInListOperation.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/MoveImageInListOperation.java with 55% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/InitializeDbPreferences.java [deleted file]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/Resources.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicEditorGeneralPreferences.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/ExtensionTypeMenuPreferences.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/FeatureMenuPreferences.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/LanguageMenuPreferences.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/MarkerTypeMenuPreferences.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NameRelationshipTypeMenuPreferences.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NameTypeDesignationStatusMenuPreferences.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NamedAreaTypeMenuPreferences.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NomenclaturalStatusTypeMenuPreferences.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/PresenceAbsenceMenuPreferences.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/DistributionStatusMenuPreferences.java with 81% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/RankMenuPreferences.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/SpecimenTypeDesignationStatusMenuPreferences.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/TaxonRelationshipTypeMenuPreferences.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/VocabularyTermWizard.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizards/VocabularyTermWizard.java with 89% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/VocabularyTermWizardPage.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizards/VocabularyTermWizardPage.java with 98% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/store/LoginManager.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/store/VocabularyStore.java
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/view/UserManagerView.java
taxeditor-store/src/test/java/eu/etaxonomy/taxeditor/store/CdmStoreTest.java
taxeditor-store/src/test/java/eu/etaxonomy/taxeditor/store/operations/CreateSynonymInExisitingHomotypicalGroupOperationTest.java
taxeditor-store/src/test/resources/dbscripts/001_cdm.ddl [deleted file]

index f4d68eb1305ff608a5d4efa14915130e6aa625ae..3305fb34b50e61c80b732c1ec2f73947d97f7147 100644 (file)
@@ -430,7 +430,6 @@ taxeditor-store/icons/2_pronged_equal_small.gif -text
 taxeditor-store/icons/3_pronged_equal.GIF -text
 taxeditor-store/icons/3_pronged_equal_small.GIF -text
 taxeditor-store/icons/EDIT-logo.jpg -text
-taxeditor-store/icons/Thumbs.db -text
 taxeditor-store/icons/a_no_bg.gif -text
 taxeditor-store/icons/accepted.gif -text
 taxeditor-store/icons/accepted_small.gif -text
@@ -441,38 +440,64 @@ taxeditor-store/icons/add_no_bg2.gif -text
 taxeditor-store/icons/alt_window_16.gif -text
 taxeditor-store/icons/alt_window_32.gif -text
 taxeditor-store/icons/autonym_no_bg.gif -text
+taxeditor-store/icons/back.gif -text
 taxeditor-store/icons/basionym.gif -text
 taxeditor-store/icons/basionym_no_bg.gif -text
+taxeditor-store/icons/binary.gif -text
+taxeditor-store/icons/bookmark.gif -text
+taxeditor-store/icons/category.gif -text
 taxeditor-store/icons/change.gif -text
+taxeditor-store/icons/clear.gif -text
+taxeditor-store/icons/close.gif -text
 taxeditor-store/icons/close_view.gif -text
+taxeditor-store/icons/collapseall.gif -text
 taxeditor-store/icons/concept.gif -text
 taxeditor-store/icons/concept_no_bg.gif -text
+taxeditor-store/icons/configs.gif -text
+taxeditor-store/icons/console.gif -text
 taxeditor-store/icons/correction_change.gif -text
 taxeditor-store/icons/cprj_obj.gif -text
+taxeditor-store/icons/dates.gif -text
 taxeditor-store/icons/db.gif -text
+taxeditor-store/icons/debug.gif -text
 taxeditor-store/icons/delete.gif -text
 taxeditor-store/icons/delete_edit.gif -text
+taxeditor-store/icons/eclipse.gif -text
 taxeditor-store/icons/edit_16x16.gif -text
 taxeditor-store/icons/edit_16x16.ico -text
 taxeditor-store/icons/edit_256color.ICO -text
 taxeditor-store/icons/error_co.gif -text
+taxeditor-store/icons/expandAll.jpg -text
+taxeditor-store/icons/export.gif -text
 taxeditor-store/icons/file_obj.gif -text
+taxeditor-store/icons/filter.gif -text
+taxeditor-store/icons/flat.gif -text
+taxeditor-store/icons/font.gif -text
 taxeditor-store/icons/form_banner.gif -text
+taxeditor-store/icons/forward.gif -text
 taxeditor-store/icons/garland_logo.png -text
+taxeditor-store/icons/help.gif -text
 taxeditor-store/icons/help_topic.gif -text
 taxeditor-store/icons/heterosyn.gif -text
 taxeditor-store/icons/heterosyn_no_bg.gif -text
 taxeditor-store/icons/heterosyn_original_no_bg.gif -text
+taxeditor-store/icons/hierarchical.gif -text
+taxeditor-store/icons/home_nav.gif -text
 taxeditor-store/icons/homonym.gif -text
 taxeditor-store/icons/homonym_no_bg.gif -text
 taxeditor-store/icons/homosyn.gif -text
 taxeditor-store/icons/homosyn_no_bg.gif -text
 taxeditor-store/icons/homosyn_original_no_bg.gif -text
+taxeditor-store/icons/horizontal.gif -text
 taxeditor-store/icons/icon.ico -text
 taxeditor-store/icons/icon.png -text
+taxeditor-store/icons/import_wiz.gif -text
 taxeditor-store/icons/large_image.gif -text
 taxeditor-store/icons/linkto_help.gif -text
+taxeditor-store/icons/lockedstate.gif -text
 taxeditor-store/icons/ma_12x12.gif -text
+taxeditor-store/icons/maximize.gif -text
+taxeditor-store/icons/min.gif -text
 taxeditor-store/icons/misapplied.gif -text
 taxeditor-store/icons/misapplied_no_bg.gif -text
 taxeditor-store/icons/move.gif -text
@@ -483,33 +508,60 @@ taxeditor-store/icons/open.gif -text
 taxeditor-store/icons/orthovariant.gif -text
 taxeditor-store/icons/orthovariant_no_bg.gif -text
 taxeditor-store/icons/pic_not_found.PNG -text
+taxeditor-store/icons/plugin.gif -text
+taxeditor-store/icons/print_edit.gif -text
 taxeditor-store/icons/prj_obj.gif -text
+taxeditor-store/icons/progress_stop.gif -text
+taxeditor-store/icons/properties.gif -text
 taxeditor-store/icons/quick_add.gif -text
 taxeditor-store/icons/quickfix_error_obj.gif -text
 taxeditor-store/icons/quickfix_warning_obj.gif -text
+taxeditor-store/icons/refresh.gif -text
 taxeditor-store/icons/rel_no_bg.gif -text
 taxeditor-store/icons/repsyn.gif -text
 taxeditor-store/icons/repsyn_no_bg.gif -text
+taxeditor-store/icons/restore.gif -text
+taxeditor-store/icons/run.gif -text
 taxeditor-store/icons/sample.gif -text
 taxeditor-store/icons/save.gif -text
 taxeditor-store/icons/save_edit.gif -text
+taxeditor-store/icons/saveall_edit.gif -text
+taxeditor-store/icons/saveas_edit.gif -text
+taxeditor-store/icons/search.gif -text
+taxeditor-store/icons/search_src.gif -text
+taxeditor-store/icons/settings.gif -text
+taxeditor-store/icons/smartmode_co.gif -text
+taxeditor-store/icons/sort.gif -text
+taxeditor-store/icons/step_done.gif -text
 taxeditor-store/icons/swap.gif -text
 taxeditor-store/icons/swap2.gif -text
+taxeditor-store/icons/synced.gif -text
 taxeditor-store/icons/tax_to_syn.gif -text
 taxeditor-store/icons/text.gif -text
 taxeditor-store/icons/th_horizontal.gif -text
 taxeditor-store/icons/th_vertical.gif -text
+taxeditor-store/icons/thin_close_view.gif -text
+taxeditor-store/icons/thin_max_view.gif -text
+taxeditor-store/icons/thin_restore_view.GIF -text
+taxeditor-store/icons/trash.gif -text
 taxeditor-store/icons/undo.gif -text
 taxeditor-store/icons/unknown.gif -text
 taxeditor-store/icons/unknown_no_bg.gif -text
+taxeditor-store/icons/update.gif -text
+taxeditor-store/icons/validate.gif -text
+taxeditor-store/icons/vertical.gif -text
+taxeditor-store/icons/view_menu.gif -text
+taxeditor-store/icons/waiting.gif -text
 taxeditor-store/icons/warn_tsk.gif -text
 taxeditor-store/icons/warning_co.gif -text
+taxeditor-store/icons/web.gif -text
 taxeditor-store/p2.inf -text
 taxeditor-store/plugin.xml -text
 taxeditor-store/pom.xml -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/CdmDataSourceRepository.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/handler/AbstractDataSourceHandler.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/handler/ChangeConnectionHandler.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/handler/CloseConnectionHandler.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/handler/CreateDataSourceHandler.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/handler/DeleteDataSourceHandler.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/handler/EditDataSourceHandler.java -text
@@ -522,19 +574,9 @@ taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSo
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceSQLServerWizardPage.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceTypeSelectionWizardPage.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceWizard.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/DatasourceLauncherDialog.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/LoginDialog.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/NewReferenceInputDialog.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/UriDialog.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/AbstractFilteredCdmResourceSelectionDialog.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredAgentSelectionDialog.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredNameSelectionDialog.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredPersonSelectionDialog.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredReferenceSelectionDialog.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonNodeSelectionDialog.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonSelectionDialog.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonomicTreeSelectionDialog.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTeamOrPersonBaseSelectionDialog.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowDataSourceViewHandler.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowLoginWindowHandler.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowUserManagerViewHandler.java -text
@@ -564,22 +606,36 @@ taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/labels/LabelImageProvider.j
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/labels/ZoologicalNameLabelStrategy.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractDataChangeBehaviour.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/ColorFactory.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/CommonHelper.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/DataChangeBridge.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/IContextListener.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/IDataChangeBehavior.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/IPartContentHasDetails.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/ImageResources.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/LineSelection.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/MementoHelper.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/NameHelper.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/NomenclaturalCodeHelper.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/Resources.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/TaxonTransfer.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/TextHelper.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/TimeHelper.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/AbstractSpecificReferenceWizardPage.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/BookDetailsWizardPage.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewAuthorWizard.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewAuthorWizardPage.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewGenericReferenceWizardPage.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewNameWizard.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewNameWizardPage.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewReferenceWizard.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/AbstractPersistentPostOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/AbstractPostOperation.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/AddImageToDescriptionElementOperation.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/AddMediaToImageGalleryOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/ChangeAcceptedTaxonToSynonymOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/ChangeConceptRelationshipTypeOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/ChangeConceptToSynonymOperation.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/ChangeDescriptionElementType.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/ChangeHomotypicGroupOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/ChangeHomotypicalGroupBasionymOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/ChangeSynonymToAcceptedTaxonOperation.java -text
@@ -589,7 +645,8 @@ taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/ChangeSynonymToM
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateConceptRelationOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateDescriptionElementOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateImageOperation.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateSynonymInExisitingHomotypicalGroupOperation.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateNameRelationOperation.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateSynonymInExistingHomotypicalGroupOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateSynonymInNewGroupOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateTaxonDescriptionOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateTaxonNodeOperation.java -text
@@ -597,15 +654,16 @@ taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateTaxonomicT
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateUserOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteConceptRelationOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteDescriptionElementOperation.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteImageOperation.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteMediaOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteMisapplicationOperation.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteNameRelationOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteSynonymOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteTaxonDescriptionOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteTreeNodeOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteUserOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/EditUserOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/IPostOperationEnabled.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/MoveImageInListOperation.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/MoveMediaInListOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/MoveTaxonOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/RemoveHomotypicalGroupBasionymOperation.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/RemoveImageFromDescriptionElementOperation.java -text
@@ -615,10 +673,10 @@ taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java -t
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/DescriptionPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/InitNomenclaturalCodePrefDialog.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/InitializeDbPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/MatchingPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/NomenclaturalCodePreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/Resources.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicEditorGeneralPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/AbstractMatchingPreferences.java -text
@@ -626,19 +684,20 @@ taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/NonVira
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/ReferenceMatchingPreference.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/TeamOrPersonMatchingPreference.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/AbstractMenuPreferences.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/DistributionStatusMenuPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/ExtensionTypeMenuPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/FeatureMenuPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/LanguageMenuPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/MarkerTypeMenuPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NameRelationshipTypeMenuPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NameTypeDesignationStatusMenuPreferences.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NamedAreaTypeMenuPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NomenclaturalStatusTypeMenuPreferences.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/PresenceAbsenceMenuPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/RankMenuPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/SpecimenTypeDesignationStatusMenuPreferences.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/TaxonRelationshipTypeMenuPreferences.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizards/VocabularyTermWizard.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizards/VocabularyTermWizardPage.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/VocabularyTermWizard.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/VocabularyTermWizardPage.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/store/LoginManager.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/store/StoreUtil.java -text
@@ -675,7 +734,6 @@ taxeditor-store/src/test/java/eu/etaxonomy/taxeditor/store/operations/DeleteMisa
 taxeditor-store/src/test/java/eu/etaxonomy/taxeditor/store/operations/DeleteSynonymOperationTest.java -text
 taxeditor-store/src/test/java/eu/etaxonomy/taxeditor/store/operations/MoveTaxonOperationTest.java -text
 taxeditor-store/src/test/java/eu/etaxonomy/taxeditor/store/operations/SwapSynonymAndAcceptedOperationTest.java -text
-taxeditor-store/src/test/resources/dbscripts/001_cdm.ddl -text
 taxeditor-store/src/test/resources/eu/etaxonomy/cdm/applicationContext-test.xml -text
 taxeditor-store/src/test/resources/eu/etaxonomy/cdm/cdm.datasources.xml -text
 taxeditor-store/src/test/resources/eu/etaxonomy/cdm/cdmfs.xml -text
index 296e43065bd0bd15842e158cc2b6660da6571a2a..2262a366c21db35cf66443a383d6e3b485663845 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: EDIT Taxonomic Editor - DataStore Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.store;singleton:=true
-Bundle-Version: 2.1.1.qualifier
+Bundle-Version: 2.1.0.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin
 Bundle-Vendor: EDIT
 Export-Package: dbscripts,
@@ -13,17 +13,20 @@ Export-Package: dbscripts,
  eu.etaxonomy.taxeditor.datasource.view,
  eu.etaxonomy.taxeditor.datasource.wizard,
  eu.etaxonomy.taxeditor.dialogs,
- eu.etaxonomy.taxeditor.dialogs.filteredSelection,
+ eu.etaxonomy.taxeditor.forms.section,
+ eu.etaxonomy.taxeditor.forms.section.reference,
  eu.etaxonomy.taxeditor.handler,
  eu.etaxonomy.taxeditor.io,
  eu.etaxonomy.taxeditor.io.wizard,
  eu.etaxonomy.taxeditor.labels,
  eu.etaxonomy.taxeditor.model;uses:="eu.etaxonomy.cdm.model.common,eu.etaxonomy.cdm.model.name,eu.etaxonomy.cdm.model.taxon",
+ eu.etaxonomy.taxeditor.newWizards,
  eu.etaxonomy.taxeditor.operations,
  eu.etaxonomy.taxeditor.parser,
  eu.etaxonomy.taxeditor.preference,
+ eu.etaxonomy.taxeditor.preference.matching,
  eu.etaxonomy.taxeditor.preference.menu,
- eu.etaxonomy.taxeditor.preference.wizards,
+ eu.etaxonomy.taxeditor.preference.wizard,
  eu.etaxonomy.taxeditor.store,
  eu.etaxonomy.taxeditor.store.internal,
  eu.etaxonomy.taxeditor.store.operations,
@@ -31,8 +34,12 @@ Export-Package: dbscripts,
  eu.etaxonomy.taxeditor.user.handler,
  eu.etaxonomy.taxeditor.user.view,
  eu.etaxonomy.taxeditor.user.wizard
-Require-Bundle: org.eclipse.ui;bundle-version="3.5.1",
- eu.etaxonomy.cdmlib;bundle-version="2.3.0"
+Require-Bundle: org.eclipse.osgi;bundle-version="3.5.2",
+ org.eclipse.ui;bundle-version="3.5.1",
+ eu.etaxonomy.cdmlib;bundle-version="2.3.0",
+ org.eclipse.jface.text,
+ org.eclipse.ui.forms,
+ org.eclipse.core.runtime;bundle-version="3.5.0"
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Import-Package: junit.framework,
  org.eclipse.core.commands,
@@ -46,8 +53,8 @@ Import-Package: junit.framework,
  org.eclipse.swt,
  org.eclipse.swt.graphics,
  org.eclipse.swt.widgets,
- org.eclipse.ui,
  org.eclipse.ui.editors.text,
+ org.eclipse.ui.forms.widgets,
  org.eclipse.ui.ide.undo,
  org.junit,
  org.osgi.framework
diff --git a/taxeditor-store/icons/Thumbs.db b/taxeditor-store/icons/Thumbs.db
deleted file mode 100644 (file)
index 1078be4..0000000
Binary files a/taxeditor-store/icons/Thumbs.db and /dev/null differ
index 29c2aeed0136355699ccb3c61b355d570a60d95f..252d7ebcb8c74d6e5de66ef0eb8856622a0e9d89 100644 (file)
Binary files a/taxeditor-store/icons/add.gif and b/taxeditor-store/icons/add.gif differ
diff --git a/taxeditor-store/icons/back.gif b/taxeditor-store/icons/back.gif
new file mode 100644 (file)
index 0000000..4fb4150
Binary files /dev/null and b/taxeditor-store/icons/back.gif differ
diff --git a/taxeditor-store/icons/binary.gif b/taxeditor-store/icons/binary.gif
new file mode 100644 (file)
index 0000000..e3eeb74
Binary files /dev/null and b/taxeditor-store/icons/binary.gif differ
diff --git a/taxeditor-store/icons/bookmark.gif b/taxeditor-store/icons/bookmark.gif
new file mode 100644 (file)
index 0000000..8eefad3
Binary files /dev/null and b/taxeditor-store/icons/bookmark.gif differ
diff --git a/taxeditor-store/icons/category.gif b/taxeditor-store/icons/category.gif
new file mode 100644 (file)
index 0000000..5ef0ed7
Binary files /dev/null and b/taxeditor-store/icons/category.gif differ
diff --git a/taxeditor-store/icons/clear.gif b/taxeditor-store/icons/clear.gif
new file mode 100644 (file)
index 0000000..af30a42
Binary files /dev/null and b/taxeditor-store/icons/clear.gif differ
diff --git a/taxeditor-store/icons/close.gif b/taxeditor-store/icons/close.gif
new file mode 100644 (file)
index 0000000..1aca259
Binary files /dev/null and b/taxeditor-store/icons/close.gif differ
diff --git a/taxeditor-store/icons/collapseall.gif b/taxeditor-store/icons/collapseall.gif
new file mode 100644 (file)
index 0000000..a2d80a9
Binary files /dev/null and b/taxeditor-store/icons/collapseall.gif differ
diff --git a/taxeditor-store/icons/configs.gif b/taxeditor-store/icons/configs.gif
new file mode 100644 (file)
index 0000000..c984fba
Binary files /dev/null and b/taxeditor-store/icons/configs.gif differ
diff --git a/taxeditor-store/icons/console.gif b/taxeditor-store/icons/console.gif
new file mode 100644 (file)
index 0000000..a598f60
Binary files /dev/null and b/taxeditor-store/icons/console.gif differ
diff --git a/taxeditor-store/icons/dates.gif b/taxeditor-store/icons/dates.gif
new file mode 100644 (file)
index 0000000..96aae05
Binary files /dev/null and b/taxeditor-store/icons/dates.gif differ
diff --git a/taxeditor-store/icons/debug.gif b/taxeditor-store/icons/debug.gif
new file mode 100644 (file)
index 0000000..d90a29f
Binary files /dev/null and b/taxeditor-store/icons/debug.gif differ
index 559e462985f439553de36c89f65392eae3e9a44e..b6922ac11cf64e16a15cf2976cdaa1e40118abed 100644 (file)
Binary files a/taxeditor-store/icons/delete.gif and b/taxeditor-store/icons/delete.gif differ
diff --git a/taxeditor-store/icons/eclipse.gif b/taxeditor-store/icons/eclipse.gif
new file mode 100644 (file)
index 0000000..eb7b90c
Binary files /dev/null and b/taxeditor-store/icons/eclipse.gif differ
diff --git a/taxeditor-store/icons/expandAll.jpg b/taxeditor-store/icons/expandAll.jpg
new file mode 100644 (file)
index 0000000..63b0d80
Binary files /dev/null and b/taxeditor-store/icons/expandAll.jpg differ
diff --git a/taxeditor-store/icons/export.gif b/taxeditor-store/icons/export.gif
new file mode 100644 (file)
index 0000000..5a0837d
Binary files /dev/null and b/taxeditor-store/icons/export.gif differ
diff --git a/taxeditor-store/icons/filter.gif b/taxeditor-store/icons/filter.gif
new file mode 100644 (file)
index 0000000..3d061d7
Binary files /dev/null and b/taxeditor-store/icons/filter.gif differ
diff --git a/taxeditor-store/icons/flat.gif b/taxeditor-store/icons/flat.gif
new file mode 100644 (file)
index 0000000..1ef74cf
Binary files /dev/null and b/taxeditor-store/icons/flat.gif differ
diff --git a/taxeditor-store/icons/font.gif b/taxeditor-store/icons/font.gif
new file mode 100644 (file)
index 0000000..6538949
Binary files /dev/null and b/taxeditor-store/icons/font.gif differ
diff --git a/taxeditor-store/icons/forward.gif b/taxeditor-store/icons/forward.gif
new file mode 100644 (file)
index 0000000..e2f8c3e
Binary files /dev/null and b/taxeditor-store/icons/forward.gif differ
diff --git a/taxeditor-store/icons/help.gif b/taxeditor-store/icons/help.gif
new file mode 100644 (file)
index 0000000..ae2c4c0
Binary files /dev/null and b/taxeditor-store/icons/help.gif differ
diff --git a/taxeditor-store/icons/hierarchical.gif b/taxeditor-store/icons/hierarchical.gif
new file mode 100644 (file)
index 0000000..2344861
Binary files /dev/null and b/taxeditor-store/icons/hierarchical.gif differ
diff --git a/taxeditor-store/icons/home_nav.gif b/taxeditor-store/icons/home_nav.gif
new file mode 100644 (file)
index 0000000..4472e8c
Binary files /dev/null and b/taxeditor-store/icons/home_nav.gif differ
diff --git a/taxeditor-store/icons/horizontal.gif b/taxeditor-store/icons/horizontal.gif
new file mode 100644 (file)
index 0000000..d590470
Binary files /dev/null and b/taxeditor-store/icons/horizontal.gif differ
diff --git a/taxeditor-store/icons/import_wiz.gif b/taxeditor-store/icons/import_wiz.gif
new file mode 100644 (file)
index 0000000..d38085a
Binary files /dev/null and b/taxeditor-store/icons/import_wiz.gif differ
diff --git a/taxeditor-store/icons/lockedstate.gif b/taxeditor-store/icons/lockedstate.gif
new file mode 100644 (file)
index 0000000..e637951
Binary files /dev/null and b/taxeditor-store/icons/lockedstate.gif differ
diff --git a/taxeditor-store/icons/maximize.gif b/taxeditor-store/icons/maximize.gif
new file mode 100644 (file)
index 0000000..5e5999b
Binary files /dev/null and b/taxeditor-store/icons/maximize.gif differ
diff --git a/taxeditor-store/icons/min.gif b/taxeditor-store/icons/min.gif
new file mode 100644 (file)
index 0000000..7402dc9
Binary files /dev/null and b/taxeditor-store/icons/min.gif differ
diff --git a/taxeditor-store/icons/plugin.gif b/taxeditor-store/icons/plugin.gif
new file mode 100644 (file)
index 0000000..8493df4
Binary files /dev/null and b/taxeditor-store/icons/plugin.gif differ
diff --git a/taxeditor-store/icons/print_edit.gif b/taxeditor-store/icons/print_edit.gif
new file mode 100644 (file)
index 0000000..04cb84b
Binary files /dev/null and b/taxeditor-store/icons/print_edit.gif differ
diff --git a/taxeditor-store/icons/progress_stop.gif b/taxeditor-store/icons/progress_stop.gif
new file mode 100644 (file)
index 0000000..dc47edf
Binary files /dev/null and b/taxeditor-store/icons/progress_stop.gif differ
diff --git a/taxeditor-store/icons/properties.gif b/taxeditor-store/icons/properties.gif
new file mode 100644 (file)
index 0000000..1dc19a3
Binary files /dev/null and b/taxeditor-store/icons/properties.gif differ
diff --git a/taxeditor-store/icons/refresh.gif b/taxeditor-store/icons/refresh.gif
new file mode 100644 (file)
index 0000000..e383147
Binary files /dev/null and b/taxeditor-store/icons/refresh.gif differ
diff --git a/taxeditor-store/icons/restore.gif b/taxeditor-store/icons/restore.gif
new file mode 100644 (file)
index 0000000..258e536
Binary files /dev/null and b/taxeditor-store/icons/restore.gif differ
diff --git a/taxeditor-store/icons/run.gif b/taxeditor-store/icons/run.gif
new file mode 100644 (file)
index 0000000..57f4102
Binary files /dev/null and b/taxeditor-store/icons/run.gif differ
diff --git a/taxeditor-store/icons/saveall_edit.gif b/taxeditor-store/icons/saveall_edit.gif
new file mode 100644 (file)
index 0000000..ef0eab5
Binary files /dev/null and b/taxeditor-store/icons/saveall_edit.gif differ
diff --git a/taxeditor-store/icons/saveas_edit.gif b/taxeditor-store/icons/saveas_edit.gif
new file mode 100644 (file)
index 0000000..466bfb1
Binary files /dev/null and b/taxeditor-store/icons/saveas_edit.gif differ
diff --git a/taxeditor-store/icons/search.gif b/taxeditor-store/icons/search.gif
new file mode 100644 (file)
index 0000000..a751669
Binary files /dev/null and b/taxeditor-store/icons/search.gif differ
diff --git a/taxeditor-store/icons/search_src.gif b/taxeditor-store/icons/search_src.gif
new file mode 100644 (file)
index 0000000..d540a01
Binary files /dev/null and b/taxeditor-store/icons/search_src.gif differ
diff --git a/taxeditor-store/icons/settings.gif b/taxeditor-store/icons/settings.gif
new file mode 100644 (file)
index 0000000..906c0f5
Binary files /dev/null and b/taxeditor-store/icons/settings.gif differ
diff --git a/taxeditor-store/icons/smartmode_co.gif b/taxeditor-store/icons/smartmode_co.gif
new file mode 100644 (file)
index 0000000..542dddc
Binary files /dev/null and b/taxeditor-store/icons/smartmode_co.gif differ
diff --git a/taxeditor-store/icons/sort.gif b/taxeditor-store/icons/sort.gif
new file mode 100644 (file)
index 0000000..6311cc0
Binary files /dev/null and b/taxeditor-store/icons/sort.gif differ
diff --git a/taxeditor-store/icons/step_done.gif b/taxeditor-store/icons/step_done.gif
new file mode 100644 (file)
index 0000000..9cacb96
Binary files /dev/null and b/taxeditor-store/icons/step_done.gif differ
diff --git a/taxeditor-store/icons/synced.gif b/taxeditor-store/icons/synced.gif
new file mode 100644 (file)
index 0000000..870934b
Binary files /dev/null and b/taxeditor-store/icons/synced.gif differ
diff --git a/taxeditor-store/icons/thin_close_view.gif b/taxeditor-store/icons/thin_close_view.gif
new file mode 100644 (file)
index 0000000..44b6151
Binary files /dev/null and b/taxeditor-store/icons/thin_close_view.gif differ
diff --git a/taxeditor-store/icons/thin_max_view.gif b/taxeditor-store/icons/thin_max_view.gif
new file mode 100644 (file)
index 0000000..94ed448
Binary files /dev/null and b/taxeditor-store/icons/thin_max_view.gif differ
diff --git a/taxeditor-store/icons/thin_restore_view.GIF b/taxeditor-store/icons/thin_restore_view.GIF
new file mode 100644 (file)
index 0000000..942d60c
Binary files /dev/null and b/taxeditor-store/icons/thin_restore_view.GIF differ
diff --git a/taxeditor-store/icons/trash.gif b/taxeditor-store/icons/trash.gif
new file mode 100644 (file)
index 0000000..bf961b3
Binary files /dev/null and b/taxeditor-store/icons/trash.gif differ
diff --git a/taxeditor-store/icons/update.gif b/taxeditor-store/icons/update.gif
new file mode 100644 (file)
index 0000000..1b724a6
Binary files /dev/null and b/taxeditor-store/icons/update.gif differ
diff --git a/taxeditor-store/icons/validate.gif b/taxeditor-store/icons/validate.gif
new file mode 100644 (file)
index 0000000..2b347ac
Binary files /dev/null and b/taxeditor-store/icons/validate.gif differ
diff --git a/taxeditor-store/icons/vertical.gif b/taxeditor-store/icons/vertical.gif
new file mode 100644 (file)
index 0000000..50a54e0
Binary files /dev/null and b/taxeditor-store/icons/vertical.gif differ
diff --git a/taxeditor-store/icons/view_menu.gif b/taxeditor-store/icons/view_menu.gif
new file mode 100644 (file)
index 0000000..a492838
Binary files /dev/null and b/taxeditor-store/icons/view_menu.gif differ
diff --git a/taxeditor-store/icons/waiting.gif b/taxeditor-store/icons/waiting.gif
new file mode 100644 (file)
index 0000000..0930dac
Binary files /dev/null and b/taxeditor-store/icons/waiting.gif differ
diff --git a/taxeditor-store/icons/web.gif b/taxeditor-store/icons/web.gif
new file mode 100644 (file)
index 0000000..ec6cca4
Binary files /dev/null and b/taxeditor-store/icons/web.gif differ
index d65f8e917d7d8d46551ba9a4389df7c5e8181fe6..bb422c9056125751423ee9446342b985e029c226 100644 (file)
@@ -22,7 +22,7 @@
       </page>
       <page
             category="eu.etaxonomy.taxeditor.preferences.description"
-            class="eu.etaxonomy.taxeditor.preference.menu.DistributionStatusMenuPreferences"
+            class="eu.etaxonomy.taxeditor.preference.menu.PresenceAbsenceMenuPreferences"
             id="eu.etaxonomy.taxeditor.preferences.distributionStatus"
             name="Distribution Status">
       </page>
             id="eu.etaxonomy.taxeditor.preferences.nameTypeDesignationStatus"
             name="Name Type Designation Status">
       </page>
+      <page
+            category="eu.etaxonomy.taxeditor.preferences.description"
+            class="eu.etaxonomy.taxeditor.preference.menu.NamedAreaTypeMenuPreferences"
+            id="eu.etaxonomy.taxeditor.preferences.namedAreaType"
+            name="Named Area Type">
+      </page>
       <page
             category="eu.etaxonomy.taxeditor.preferences.general"
             class="eu.etaxonomy.taxeditor.preference.MatchingPreferences"
                label="Delete"
                style="push">
          </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.store.datasource.separator2"
+               visible="true">
+         </separator>
+         <command
+               commandId="eu.etaxonomy.taxeditor.store.datasource.close"
+               label="Close Active Connection"
+               style="push">
+         </command>
       </menuContribution>
       <menuContribution
             locationURI="popup:eu.etaxonomy.taxeditor.store.userManagerView">
             id="eu.etaxonomy.taxeditor.store.datasource.delete"
             name="Delete Datasource">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.datasource.handler.CloseConnectionHandler"
+            id="eu.etaxonomy.taxeditor.store.datasource.close"
+            name="Close Active Connection">
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.commands">
                        id="org.eclipse.ui.views.ProgressView">  
                </view>  
        </extension>
+<extension
+            point="org.eclipse.ui.themes">
+         <themeElementCategory
+               id="eu.etaxonomy.taxeditor.preferences.themeElementCategory"
+               label="Taxonomic Editor">
+            <description>
+               Color and font definitions for the EDIT Taxonomic Editor
+            </description>
+         </themeElementCategory>
+         <colorDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory"
+               id="eu.etaxonomy.taxeditor.preferences.colorDefinition.listBackground"
+               label="List Background"
+               value="150,150,150">
+         </colorDefinition>
+         <colorDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory"
+               id="eu.etaxonomy.taxeditor.preferences.colorDefinition.textDefault"
+               label="Global Text Color"
+               value="0,0,0">
+         </colorDefinition>
+         <colorDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory"
+               id="eu.etaxonomy.taxeditor.preferences.colorDefinition.colorCompositeIrrelevant"
+               label="Global Color Composite Irrelevant"
+               value="241,139,18">
+         </colorDefinition>
+         <colorDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory"
+               id="eu.etaxonomy.taxeditor.preferences.colorDefinition.textDisabled"
+               label="Global Text Color Disabled"
+               value="150,150,150">
+         </colorDefinition>
+         <colorDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory"
+               id="eu.etaxonomy.taxeditor.preferences.colorDefinition.textBackgroundDisabled"
+               label="Global Background Color Disabled"
+               value="230,230,230">
+         </colorDefinition>
+         <themeElementCategory
+               id="eu.etaxonomy.taxeditor.preferences.themeElementCategory.detailsView"
+               label="Details View"
+               parentId="eu.etaxonomy.taxeditor.preferences.themeElementCategory">
+            <description>
+               Colors and fonts for the details view
+            </description>
+         </themeElementCategory>
+         <colorDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.detailsView"
+               id="eu.etaxonomy.taxeditor.preferences.colorDefinition.listBackgroundOdd"
+               label="Entity Element List Background Odd"
+               value="230,230,230">
+         </colorDefinition>
+         <colorDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.detailsView"
+               id="eu.etaxonomy.taxeditor.preferences.colorDefinition.listBackgroundEven"
+               label="Entity Element List Background Even"
+               value="255,255,255">
+         </colorDefinition>
+         <themeElementCategory
+               id="eu.etaxonomy.taxeditor.preferences.themeElementCategory.nameEditor"
+               label="Name Editor"
+               parentId="eu.etaxonomy.taxeditor.preferences.themeElementCategory">
+            <description>
+               Colors and fonts for the name editor
+            </description>
+         </themeElementCategory>
+         <colorDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.nameEditor"
+               id="eu.etaxonomy.taxeditor.preferences.colorDefinition.nameEditor.colorCompositeBackground"
+               label="Composite Background"
+               value="250, 250, 250">
+         </colorDefinition>
+         <colorDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.nameEditor"
+               id="eu.etaxonomy.taxeditor.preferences.colorDefinition.nameEditor.colorCompositeSelected"
+               label="Composite Selected"
+               value="210, 210, 210">
+         </colorDefinition>
+         <fontDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.nameEditor"
+               id="eu.etaxonomy.taxeditor.preferences.fontDefinition.nameEditor.accepted"
+               label="Accepted Taxon Font"
+               value="Georgia-regular-12">
+         </fontDefinition>
+         <fontDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.nameEditor"
+               id="eu.etaxonomy.taxeditor.preferences.fontDefinition.nameEditor.synonym"
+               label="Synonym Font"
+               value="Georgia-regular-10">
+         </fontDefinition>
+         <fontDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.nameEditor"
+               id="eu.etaxonomy.taxeditor.preferences.fontDefinition.nameEditor.misapplication"
+               label="Misapplication Font"
+               value="Georgia-regular-10">
+         </fontDefinition>
+         <fontDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.nameEditor"
+               id="eu.etaxonomy.taxeditor.preferences.fontDefinition.nameEditor.concept"
+               label="Concept Font"
+               value="Georgia-regular-10">
+         </fontDefinition>
+         <fontDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.nameEditor"
+               id="eu.etaxonomy.taxeditor.preferences.fontDefinition.nameEditor.default"
+               label="Default Font"
+               value="Georgia-regular-10">
+         </fontDefinition>
+         <themeElementCategory
+               id="eu.etaxonomy.taxeditor.preferences.themeElementCategory.searchView"
+               label="Search View"
+               parentId="eu.etaxonomy.taxeditor.preferences.themeElementCategory">
+            <description>
+               Colors and fonts for the search view
+            </description>
+         </themeElementCategory>
+         <colorDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.searchView"
+               id="eu.etaxonomy.taxeditor.preferences.colorDefinition.searchView.foreground"
+               label="Search View Foreground"
+               value="192, 192, 192">
+         </colorDefinition>
+         <colorDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.searchView"
+               id="eu.etaxonomy.taxeditor.preferences.colorDefinition.searchView.focus"
+               label="Search View Focus"
+               value="0, 0, 0">
+         </colorDefinition>
+         <fontDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.searchView"
+               id="eu.etaxonomy.taxeditor.preferences.fontDefinition.searchView.accepted"
+               isEditable="true"
+               label="Accepted font"
+               value="Arial-regular-10">
+            <description>
+               The font that is used for accepted taxa in the search result list.
+            </description>
+         </fontDefinition>
+         <fontDefinition
+               categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.searchView"
+               id="eu.etaxonomy.taxeditor.preferences.fontDefinition.searchView.synonym"
+               isEditable="true"
+               label="Synonym font"
+               value="Arial-italic-10">
+         <description>
+            The font that is used for synonyms in the search result list.
+         </description>
+      </fontDefinition>
+      <fontDefinition
+            categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory.searchView"
+            id="eu.etaxonomy.taxeditor.preferences.fontDefinition.searchView.other"
+            isEditable="true"
+            label="Other font"
+            value="Lucida Grande-regular-11">
+         <description>
+            The font used by default in the search result list.
+         </description>
+      </fontDefinition>
+      </extension>
        
 </plugin>
index e5dee2d70bdfd0dc1508042fc594c3915f9062cd..c8f509ab11c86908644c117398cee791af271cfc 100644 (file)
@@ -9,22 +9,14 @@
 \r
 package eu.etaxonomy.taxeditor.datasource;\r
 \r
-import java.io.BufferedReader;\r
 import java.io.File;\r
-import java.io.FileInputStream;\r
 import java.io.FileNotFoundException;\r
-import java.io.FileOutputStream;\r
-import java.io.IOException;\r
-import java.io.InputStreamReader;\r
-import java.io.OutputStreamWriter;\r
-import java.io.UnsupportedEncodingException;\r
 import java.util.ArrayList;\r
 import java.util.List;\r
 \r
 import org.apache.log4j.Logger;\r
 import org.eclipse.core.runtime.IPath;\r
-import org.eclipse.ui.PlatformUI;\r
-import org.eclipse.ui.WorkbenchException;\r
+import org.eclipse.ui.IMemento;\r
 import org.eclipse.ui.XMLMemento;\r
 \r
 import eu.etaxonomy.cdm.database.CdmDataSource;\r
@@ -32,7 +24,9 @@ import eu.etaxonomy.cdm.database.CdmPersistentDataSource;
 import eu.etaxonomy.cdm.database.DataSourceNotFoundException;\r
 import eu.etaxonomy.cdm.database.ICdmDataSource;\r
 import eu.etaxonomy.cdm.model.name.NomenclaturalCode;\r
+import eu.etaxonomy.taxeditor.model.MementoHelper;\r
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
 import eu.etaxonomy.taxeditor.store.StoreUtil;\r
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;\r
 \r
@@ -46,7 +40,7 @@ public class CdmDataSourceRepository{
        private static final String DEFAULT_DATASOURCE_NAME = "cdm";\r
        \r
        private static ICdmDataSource currentDataSource;\r
-       private static XMLMemento memento;\r
+       private static IMemento memento;\r
        private static String lastUsedDataSourceName;\r
        \r
        public static String getLastUsedDataSourceName(){\r
@@ -138,17 +132,11 @@ public class CdmDataSourceRepository{
         * @return\r
         */\r
        public static boolean changeDataSource(final ICdmDataSource dataSource) {\r
-\r
-               // TODO Close all open editors before showing progress monitor\r
-               if (!StoreUtil.closeAll()) {\r
-                       // User has canceled operation   \r
-                       return false;\r
-               }\r
+               saveAsCurrentDatabaseToMemento(dataSource);\r
+               CdmStore.close();\r
+               \r
+               CdmStore.initialize(dataSource);\r
                \r
-               memento.putString(CURRENT_DATASOURCE, dataSource.getName());\r
-               saveMementoToFile(memento);\r
-               PlatformUI.getWorkbench().restart();\r
-       \r
                return true;\r
        }\r
 \r
@@ -173,6 +161,13 @@ public class CdmDataSourceRepository{
         * Memento Handling                                                                              *\r
         *********************************************************/\r
        \r
+       private static void saveAsCurrentDatabaseToMemento(ICdmDataSource dataSource){\r
+               if(memento == null)\r
+                       memento = readMemento();\r
+               memento.putString(CURRENT_DATASOURCE, dataSource.getName());\r
+               saveMementoToFile(memento);\r
+       }\r
+       \r
        /*\r
         * Answer the workbench state file.\r
         */\r
@@ -185,30 +180,18 @@ public class CdmDataSourceRepository{
                return path.toFile();\r
        }\r
        \r
-       private static XMLMemento readMemento(){\r
-               File stateFile = getDataSourceStateFile();\r
-               FileInputStream input;\r
+       private static IMemento readMemento(){\r
                try {\r
-                       input = new FileInputStream(stateFile);\r
-                       BufferedReader reader = new BufferedReader(\r
-                                       new InputStreamReader(input, "utf-8")); //$NON-NLS-1$\r
-                       return XMLMemento.createReadRoot(reader);\r
+                       return MementoHelper.readMementoFromFile(getDataSourceStateFile());\r
                } catch (FileNotFoundException e) {\r
-                       // first start the file is not there\r
                        return initializeMemento();\r
-               } catch (WorkbenchException e) {\r
-                       logger.error("Exception while reading the memento", e);\r
-               } catch (UnsupportedEncodingException e) {\r
-                       logger.error("Exception while reading the memento", e);\r
                }\r
-\r
-               return null;\r
        }\r
        \r
        /**\r
         * \r
         */\r
-       private static XMLMemento initializeMemento() {\r
+       private static IMemento initializeMemento() {\r
                \r
                XMLMemento memento = XMLMemento.createWriteRoot(TAG_DATASOURCE);\r
                memento.putString(CURRENT_DATASOURCE, DEFAULT_DATASOURCE_NAME);\r
@@ -220,25 +203,7 @@ public class CdmDataSourceRepository{
        /*\r
         * Save the workbench UI in a persistence file.\r
         */\r
-       private static boolean saveMementoToFile(XMLMemento memento) {\r
-               // Save it to a file.\r
-               // XXX: nobody currently checks the return value of this method.\r
-               File stateFile = getDataSourceStateFile();\r
-               if (stateFile == null) {\r
-                       return false;\r
-               }\r
-               try {\r
-                       FileOutputStream stream = new FileOutputStream(stateFile);\r
-                       OutputStreamWriter writer = new OutputStreamWriter(stream, "utf-8"); //$NON-NLS-1$\r
-                       memento.save(writer);\r
-                       writer.close();\r
-               } catch (IOException e) {\r
-                       stateFile.delete();\r
-                       logger.error("Could not save datasource state");\r
-                       return false;\r
-               }\r
-\r
-               // Success !\r
-               return true;\r
+       private static IMemento saveMementoToFile(IMemento memento) {\r
+               return MementoHelper.saveMementoToFile(memento, getDataSourceStateFile());\r
        }       \r
 }
\ No newline at end of file
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/handler/CloseConnectionHandler.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/handler/CloseConnectionHandler.java
new file mode 100644 (file)
index 0000000..362afe6
--- /dev/null
@@ -0,0 +1,55 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.datasource.handler;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.database.CdmDataSource;
+import eu.etaxonomy.taxeditor.datasource.view.CdmDataSourceView;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+
+/**
+ * @author n.hoffmann
+ * @created Mar 22, 2010
+ * @version 1.0
+ */
+public class CloseConnectionHandler extends AbstractHandler {
+       private static final Logger logger = Logger
+                       .getLogger(CloseConnectionHandler.class);
+
+       /* (non-Javadoc)
+        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+        */
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               Shell shell = HandlerUtil.getActiveShell(event);
+               
+               boolean confirmed = MessageDialog.openConfirm(shell, "Confirm Datasource Close", "Do you really want to close the datasource connection?\n\n");
+               
+               
+               if(confirmed){
+                       CdmStore.close();
+               }
+               
+               CdmDataSourceView view = (CdmDataSourceView) StoreUtil.getView(CdmDataSourceView.ID, true);
+               
+               view.refresh();
+               
+               return null;
+       }
+}
index 164be551db28871021ea49192c2aad8a9e69e7a3..6fbd2145a96e2939ec6ba220cd175bd756d21d8c 100644 (file)
 
 package eu.etaxonomy.taxeditor.datasource.view;
 
+import java.util.Map;
+
 import org.eclipse.jface.viewers.ITableLabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.swt.graphics.Image;
 
 import eu.etaxonomy.cdm.database.ICdmDataSource;
-import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
+import eu.etaxonomy.cdm.model.common.CdmMetaData;
+import eu.etaxonomy.cdm.model.common.CdmMetaData.MetaDataPropertyName;
 import eu.etaxonomy.taxeditor.model.ImageResources;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * @author n.hoffmann
@@ -32,8 +36,11 @@ public class CdmDataSourceLabelProvider extends LabelProvider implements ITableL
        public Image getColumnImage(Object element, int columnIndex) {
                // No image at the moment.
                // TODO display image in colum 0 if the datasource is connected
+               
+               
                if(columnIndex == 0){
                        ICdmDataSource dataSource = (ICdmDataSource) element;
+                       
                        String key = isCurrentDataSource(dataSource) ? ImageResources.IMG_DATASOURCE_CONNECTED : ImageResources.IMG_DATASOURCE_DISCONNECTED;
                        
                        return ImageResources.getImage(key);
@@ -48,6 +55,13 @@ public class CdmDataSourceLabelProvider extends LabelProvider implements ITableL
         */
        public String getColumnText(Object element, int columnIndex) {
                ICdmDataSource dataSource = (ICdmDataSource) element;
+               
+               Map<MetaDataPropertyName, CdmMetaData> metaData = null;
+               
+               if(isCurrentDataSource(dataSource)){
+                       metaData = CdmStore.getCommonService().getCdmMetaData();
+               }
+               
                switch (columnIndex){
                        case 1:
                                return dataSource.getName();
@@ -66,12 +80,34 @@ public class CdmDataSourceLabelProvider extends LabelProvider implements ITableL
                                        return "";
                                }
                                return dataSource.getNomenclaturalCode().name();
+                       case 6:
+                               if(metaData != null){
+                                       CdmMetaData createDate = metaData.get(MetaDataPropertyName.DB_CREATE_DATE);
+                                       if(createDate != null){
+                                               return createDate.getValue(); 
+                                       }
+                               }
+                       case 7:
+                               if(metaData != null){
+                                       CdmMetaData schemaVersion = metaData.get(MetaDataPropertyName.DB_SCHEMA_VERSION);
+                                       if(schemaVersion != null){
+                                               return schemaVersion.getValue();
+                                       }
+                               }
+                       case 8:
+                               if(metaData != null){
+                                       CdmMetaData createNote = metaData.get(MetaDataPropertyName.DB_CREATE_NOTE);
+                                       if(createNote != null){
+                                               return createNote.getValue(); 
+                                       }
+                               }
                }
-               return null;
+               return "-";
        }
        
        private boolean isCurrentDataSource(ICdmDataSource dataSource){
-               String current = CdmDataSourceRepository.getCurrentDataSource().getName();
-               return current.equals(dataSource.getName());
+               ICdmDataSource currentDataSource = CdmStore.getDataSource();
+               
+               return currentDataSource != null && currentDataSource.getName().equals(dataSource.getName());
        }
 }
index c60af359bff5ed6c06bc9767ced81c279ecf5a0d..73f11a4329532acf9ffbcda4dc41af8880a2f0ec 100644 (file)
@@ -32,6 +32,8 @@ import org.eclipse.ui.part.ViewPart;
 
 import eu.etaxonomy.cdm.database.ICdmDataSource;
 import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
+import eu.etaxonomy.taxeditor.model.IContextListener;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
 
 /**
@@ -39,7 +41,7 @@ import eu.etaxonomy.taxeditor.store.StoreUtil;
  * @created 14.04.2009
  * @version 1.0
  */
-public class CdmDataSourceView extends ViewPart{
+public class CdmDataSourceView extends ViewPart implements IContextListener{
        
        public static String ID = "eu.etaxonomy.taxeditor.store.datasource.datasourceView";
        
@@ -50,6 +52,8 @@ public class CdmDataSourceView extends ViewPart{
        
        @Override
        public void createPartControl(Composite parent) {
+               CdmStore.addContextListener(this);
+               
                // Create top composite
                FillLayout fillLayout = new FillLayout();
                fillLayout.marginWidth = 0;
@@ -61,6 +65,8 @@ public class CdmDataSourceView extends ViewPart{
                
                tableViewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL
                                                                                                | SWT.V_SCROLL | SWT.FULL_SELECTION);
+               getSite().setSelectionProvider(tableViewer);
+               
                createColumns(tableViewer);
                
                tableViewer.setContentProvider(new CdmDataSourceContentProvider());
@@ -108,8 +114,8 @@ public class CdmDataSourceView extends ViewPart{
        // This will create the columns for the table
        private void createColumns(TableViewer viewer) {
                Table table = viewer.getTable();
-               String[] titles = {"Connected", "Name", "Server", "Type", "Database", "Nomenclatural Code"};
-               int[] bounds = { 20, 100, 100, 100 , 100, 150};
+               String[] titles = {"Connected", "Name", "Server", "Type", "Database", "Nomenclatural Code", "Created", "CDM Version", "Notes"};
+               int[] bounds = { 20, 100, 100, 100 , 100, 150, 100, 100, 100};
 
                for (int i = 0; i < titles.length; i++) {
                        TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
@@ -127,9 +133,19 @@ public class CdmDataSourceView extends ViewPart{
                tableViewer.refresh();  
        }
 
+       @Override
+       public void dispose() {
+               CdmStore.removeContextListener(this);
+               super.dispose();
+       }
 
        @Override
        public void setFocus() {
                tableViewer.getControl().setFocus();
        }
+
+       public boolean onContextEvent(EventType eventType) {
+               tableViewer.refresh();  
+               return true;
+       }
 }
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/DatasourceLauncherDialog.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/DatasourceLauncherDialog.java
deleted file mode 100644 (file)
index 6720a6a..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.dialogs;
-
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.database.ICdmDataSource;
-import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-
-/**
- * @author n.hoffmann
- * @created 06.07.2009
- * @version 1.0
- */
-public class DatasourceLauncherDialog extends TitleAreaDialog {
-
-
-       private static final Logger logger = Logger
-                       .getLogger(DatasourceLauncherDialog.class);
-       private Combo combo_dataSources;
-       private int selection;
-       private List<ICdmDataSource> dataSources;
-       private Button okButton;
-       private Button button_toggle;
-       private String message = "Choose a data source to connect to";
-       
-       /**
-        * @param parentShell
-        * @param message Text to display. Specify null for default text.
-        */
-       public DatasourceLauncherDialog(Shell parentShell, String message) {
-               super(parentShell);
-
-               if (message != null) {
-                       this.message = message;
-               }
-               dataSources = CdmDataSourceRepository.getAll();
-               selection = -1;
-               String lastUsedDataSourceName = CdmDataSourceRepository.getLastUsedDataSourceName();
-               for(ICdmDataSource dataSource : dataSources){
-                       selection++;
-                       if(dataSource.getName().equals(lastUsedDataSourceName)){
-                               break;
-                       }
-               }
-       }
-       
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.jface.dialogs.TitleAreaDialog#createContents(org.eclipse.swt.widgets.Composite)
-        */
-       protected Control createContents(Composite parent) {
-           Control contents = super.createContents(parent);
-
-               setTitle("Choose Datasource");
-               setMessage(message);
-               
-               this.getShell().setText("Datasource Launcher Not the same");
-               
-           return contents;
-         }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
-        */
-       @Override
-       protected Control createDialogArea(Composite parent) {
-        Composite container = (Composite) super.createDialogArea(parent);
-        
-        // create composite
-        Composite composite = new Composite(container, SWT.NULL);
-        composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-        
-        GridLayout layout = new GridLayout();
-        layout.numColumns = 2;
-        composite.setLayout(layout);
-        
-        final CLabel label_dataSources = new CLabel(composite, SWT.NULL); 
-        label_dataSources.setText("Datasource:");
-        
-               combo_dataSources = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
-               combo_dataSources.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
-                | GridData.HORIZONTAL_ALIGN_FILL));
-               int i = 0;
-               
-               for (ICdmDataSource dataSource : dataSources){
-                       String name = dataSource.getName() != null ? dataSource.getName() : "datasource name not set";
-                       String server = dataSource.getServer() != null ? dataSource.getServer() : "local";
-                       String dataBase = dataSource.getDatabase() != null ? dataSource.getDatabase() : "database name not set";
-                       
-                       combo_dataSources.add(name + " [" + server + " - " + dataBase + "]", i++);
-               }
-               
-               combo_dataSources.addSelectionListener(new SelectionAdapter(){
-
-                       /* (non-Javadoc)
-                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-                        */
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               selection = combo_dataSources.getSelectionIndex();
-                       }                       
-               });
-               
-               combo_dataSources.select(selection);
-               
-               Composite toggle = new Composite(composite, SWT.NULL);
-               toggle.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
-               toggle.setLayout(new RowLayout(SWT.HORIZONTAL));
-               
-               button_toggle = new Button(toggle, SWT.CHECK);          
-               
-               CLabel label_info = new CLabel(toggle, SWT.NULL);
-               label_info.setText("Do not show this dialog on startup (may be configured in Preferences)");
-               
-               button_toggle.addSelectionListener(new SelectionAdapter(){
-                       /* (non-Javadoc)
-                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-                        */
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               PreferencesUtil.getPreferenceStore().setValue(PreferencesUtil.SHOW_DATASOURCE_CHOOSER, false);
-                       }
-               });
-               
-        applyDialogFont(composite);
-        return composite;
-       }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
-     */
-    protected void createButtonsForButtonBar(Composite parent) {
-        // create OK and Cancel buttons by default
-        okButton = createButton(parent, IDialogConstants.OK_ID,
-                IDialogConstants.OK_LABEL, true);
-        createButton(parent, IDialogConstants.CANCEL_ID,
-                IDialogConstants.CANCEL_LABEL, false);
-        //do this here because setting the text will set enablement on the ok
-        // button
-        combo_dataSources.setFocus();
-    }
-    
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.dialogs.Dialog#okPressed()
-        */
-       @Override
-       protected void okPressed() {
-               super.okPressed();
-               ICdmDataSource chosenDataSource = dataSources.get(selection);           
-               CdmDataSourceRepository.setCurrentDataSource(chosenDataSource);
-       }
-}
index 92e7a38d8a4ede0668c118e15bd6c468d02dc377..e69da00299f43d1eac5e58f711a0b62bc2b10e3e 100644 (file)
@@ -19,9 +19,9 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
-import org.springframework.security.BadCredentialsException;
-import org.springframework.security.LockedException;
-import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.LockedException;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
index e795bcc761166d54e5c3680a022534920b546de3..9c7899cd750394e96edaf2aefcdbf9613f3257df 100644 (file)
@@ -30,23 +30,9 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;\r
 import org.eclipse.swt.widgets.Text;\r
 \r
-import eu.etaxonomy.cdm.model.reference.Article;\r
-import eu.etaxonomy.cdm.model.reference.Book;\r
-import eu.etaxonomy.cdm.model.reference.BookSection;\r
-import eu.etaxonomy.cdm.model.reference.CdDvd;\r
-import eu.etaxonomy.cdm.model.reference.Database;\r
-import eu.etaxonomy.cdm.model.reference.Generic;\r
-import eu.etaxonomy.cdm.model.reference.InProceedings;\r
-import eu.etaxonomy.cdm.model.reference.Journal;\r
-import eu.etaxonomy.cdm.model.reference.Patent;\r
-import eu.etaxonomy.cdm.model.reference.PersonalCommunication;\r
-import eu.etaxonomy.cdm.model.reference.PrintSeries;\r
-import eu.etaxonomy.cdm.model.reference.Proceedings;\r
 import eu.etaxonomy.cdm.model.reference.ReferenceBase;\r
+import eu.etaxonomy.cdm.model.reference.ReferenceFactory;\r
 import eu.etaxonomy.cdm.model.reference.ReferenceType;\r
-import eu.etaxonomy.cdm.model.reference.Report;\r
-import eu.etaxonomy.cdm.model.reference.Thesis;\r
-import eu.etaxonomy.cdm.model.reference.WebPage;\r
 \r
 /**\r
  * A simple input dialog for soliciting an input string from the user.\r
@@ -54,6 +40,8 @@ import eu.etaxonomy.cdm.model.reference.WebPage;
  * This concrete dialog class can be instantiated as is, or further subclassed as\r
  * required.\r
  * </p>\r
+ * \r
+ * TODO Replace this with a proper wizard that allows for sophisticated reference editing\r
  */\r
 public class NewReferenceInputDialog extends Dialog {\r
        private static final Logger logger = Logger\r
@@ -148,57 +136,60 @@ public class NewReferenceInputDialog extends Dialog {
         */\r
        private void createReference() {\r
                String key = refCombo.getText();\r
+               \r
                // TODO replace w more generic method when cdmlib matures accordingly\r
                if  (ReferenceType.Article.getMessage().equals(key)) {\r
-                       reference = Article.NewInstance();\r
+                       reference = ReferenceFactory.newArticle();\r
                }\r
-               if  (ReferenceType.Book.getMessage().equals(key)) {\r
-                       reference = Book.NewInstance();\r
+               else if  (ReferenceType.Book.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newBook();\r
                }\r
-               if  (ReferenceType.BookSection.getMessage().equals(key)) {\r
-                       reference = BookSection.NewInstance();\r
+               else if  (ReferenceType.BookSection.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newBookSection();\r
                }\r
-               if  (ReferenceType.CdDvd.getMessage().equals(key)) {\r
-                       reference = CdDvd.NewInstance();\r
+               else if  (ReferenceType.CdDvd.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newCdDvd();\r
                }\r
-               if  (ReferenceType.Database.getMessage().equals(key)) {\r
-                       reference = Database.NewInstance();\r
+               else if  (ReferenceType.Database.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newDatabase();\r
                }\r
-               if  (ReferenceType.Generic.getMessage().equals(key)) {\r
-                       reference = Generic.NewInstance();\r
+               else if  (ReferenceType.Generic.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newGeneric();\r
                }\r
-               if  (ReferenceType.InProceedings.getMessage().equals(key)) {\r
-                       reference = InProceedings.NewInstance();\r
+               else if  (ReferenceType.InProceedings.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newInProceedings();\r
                }\r
-               if  (ReferenceType.Journal.getMessage().equals(key)) {\r
-                       reference = Journal.NewInstance();\r
+               else if  (ReferenceType.Journal.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newJournal();\r
                }\r
-               if  (ReferenceType.Map.getMessage().equals(key)) {\r
-                       reference = eu.etaxonomy.cdm.model.reference.Map.NewInstance();\r
+               else if  (ReferenceType.Map.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newMap();\r
                }\r
-               if  (ReferenceType.Patent.getMessage().equals(key)) {\r
-                       reference = Patent.NewInstance();\r
+               else if  (ReferenceType.Patent.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newPatent();\r
                }\r
-               if  (ReferenceType.PersonalCommunication.getMessage().equals(key)) {\r
-                       reference = PersonalCommunication.NewInstance();\r
+               else if  (ReferenceType.PersonalCommunication.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newPersonalCommunication();\r
                }\r
-               if  (ReferenceType.PrintSeries.getMessage().equals(key)) {\r
-                       reference = PrintSeries.NewInstance();\r
+               else if  (ReferenceType.PrintSeries.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newPrintSeries();\r
                }\r
-               if  (ReferenceType.Proceedings.getMessage().equals(key)) {\r
-                       reference = Proceedings.NewInstance();\r
+               else if  (ReferenceType.Proceedings.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newProceedings();\r
                }\r
-               if  (ReferenceType.Report.getMessage().equals(key)) {\r
-                       reference = Report.NewInstance();\r
+               else if  (ReferenceType.Report.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newReport();\r
                }\r
-               if  (ReferenceType.Thesis.getMessage().equals(key)) {\r
-                       reference = Thesis.NewInstance();\r
+               else if  (ReferenceType.Thesis.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newThesis();\r
                }\r
-               if  (ReferenceType.WebPage.getMessage().equals(key)) {\r
-                       reference = WebPage.NewInstance();\r
+               else if  (ReferenceType.WebPage.getMessage().equals(key)) {\r
+                       reference = ReferenceFactory.newWebPage();\r
                }\r
+               \r
+               // fill the cache\r
                if (reference != null) {\r
-                       reference.setTitleCache(refText.getText());\r
+                       reference.setTitleCache(refText.getText(), true);\r
                }\r
        }\r
 \r
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/AbstractFilteredCdmResourceSelectionDialog.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/AbstractFilteredCdmResourceSelectionDialog.java
deleted file mode 100644 (file)
index 0fa24b3..0000000
+++ /dev/null
@@ -1,303 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.dialogs.filteredSelection;
-
-import java.text.Collator;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.UUID;
-
-import org.apache.log4j.Logger;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
-
-import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
-import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
-
-/**
- * @author n.hoffmann
- * @created 04.06.2009
- * @version 1.0
- */
-public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends CdmBase> extends
-               FilteredItemsSelectionDialog {
-       private static final Logger logger = Logger
-                       .getLogger(AbstractFilteredCdmResourceSelectionDialog.class);
-
-
-       protected List<UuidAndTitleCache<T>> model;
-       private Set<T> transientCdmObjects = new HashSet<T>();
-       private String settings;        
-       
-       /**
-        * @param shell
-        */
-       protected AbstractFilteredCdmResourceSelectionDialog(Shell shell, String title, boolean multi, String settings, T cdmObject) {
-               super(shell, multi);
-               setTitle(title);
-               setMessage("Use * for wildcard, or ? to see all entries");
-               this.settings = settings;
-               
-               initModel();
-               
-               if (cdmObject != null) {
-                       // If agent is not persistent, add it to the model
-                       if (isObjectTransient(cdmObject)) {
-                               addObjectToModel(cdmObject);
-                       }
-                       setInitialPattern(getTitleCache(cdmObject));
-               }
-               
-               ILabelProvider labelProvider = new FilteredCdmResourceLabelProvider();
-               setListLabelProvider(labelProvider);
-               setDetailsLabelProvider(labelProvider);
-               
-//             setSelectionHistory(new ResourceSelectionHistory());
-       }
-       
-       /**
-        * @param dialog
-        * @return
-        */
-       protected static <TYPE extends CdmBase> TYPE getSelectionFromDialog(AbstractFilteredCdmResourceSelectionDialog<TYPE> dialog) {
-               if (dialog.open() == Window.CANCEL) {
-                       return null;
-               }
-               
-               UUID uuid = dialog.getSelectedUuidAndTitleCache().getUuid();
-               if(uuid == null){
-                       return null;
-               }       
-               return dialog.getCdmObjectByUuid(uuid);
-       }
-       
-       /**
-        * Check if object was created during the life of this dialog. If not,
-        * retrieve it from the CdmStore.
-        * 
-        * @param cdmUuid
-        * @return
-        */
-       protected T getCdmObjectByUuid(UUID cdmUuid) {
-               for (T cdmObject : transientCdmObjects) {
-                       if (cdmObject.getUuid().equals(cdmUuid)) {
-                               return cdmObject;
-                       }
-               }
-               return getPersistentObject(cdmUuid);
-       }
-       
-       /**
-        * @param cdmUuid
-        * @return
-        */
-       abstract protected T getPersistentObject(UUID uuid);
-
-       /**
-        * @param cdmObject
-        */
-       protected void addObjectToModel(T cdmObject) {
-               model.add(new UuidAndTitleCache(cdmObject.getClass(), cdmObject.getUuid(), getTitleCache(cdmObject)));
-               transientCdmObjects.add(cdmObject);
-       }
-
-       /**
-        * @param cdmObject
-        * @return
-        */
-       protected boolean isObjectTransient(T cdmObject) {
-               return (getPersistentObject(cdmObject.getUuid()) == null);
-       }
-
-       /**
-        * @param cdmObject
-        * @return
-        */
-       private String getTitleCache(T cdmObject) {
-               if (cdmObject instanceof IIdentifiableEntity) {
-                       return ((IIdentifiableEntity) cdmObject).getTitleCache();                       
-               }
-               return null;
-       }
-
-       /**
-        * 
-        */
-       abstract protected void initModel();
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createFilter()
-        */
-       @Override
-       protected ItemsFilter createFilter() {
-               return new ItemsFilter() {
-
-                       @Override
-                       public boolean isConsistentItem(Object item) {
-                               return false;
-                       }
-
-                       @Override
-                       public boolean matchItem(Object item) {
-                               String text = null;
-                               if(item instanceof UuidAndTitleCache){
-                                       text = ((UuidAndTitleCache) item).getTitleCache();
-                               }else if(item instanceof String){
-                                       text = (String) item;
-                               }
-                               if (text != null) {
-                                       logger.info(text + " " + matches(text));// + " " + model.size());
-                               } else {
-                                       logger.info("null");
-                               }
-                               return text != null ? matches(text) : false;
-                       }
-                       
-               };
-       }
-       
-
-       /**
-        * Set the filter input to the Agent's title cache 
-        * 
-        * @param teamOrPerson
-        */
-       protected void setPattern(T cdmObject) {
-               ((Text) getPatternControl()).setText(getTitleCache(cdmObject));
-       }
-       
-       /* (non-Javadoc)
-       * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#fillContentProvider(org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.AbstractContentProvider, org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter, org.eclipse.core.runtime.IProgressMonitor)
-       */
-       @Override
-       protected void fillContentProvider(AbstractContentProvider contentProvider,
-               ItemsFilter itemsFilter, IProgressMonitor progressMonitor)
-               throws CoreException {
-               try {
-                       progressMonitor.beginTask("Looking for names", model.size()); // Why no progress monitor?
-                       for(UuidAndTitleCache<T> element : model){
-                               contentProvider.add(element, itemsFilter);
-                               if (progressMonitor.isCanceled()) {
-                                       throw new OperationCanceledException();
-                               }
-                               progressMonitor.worked(1);
-                       }
-               }
-               finally {
-                       progressMonitor.done();
-               }
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#getDialogSettings()
-        */
-       @Override
-       protected IDialogSettings getDialogSettings() {
-               IDialogSettings settings = TaxeditorStorePlugin.getDefault().getDialogSettings().getSection(getSettings());
-
-               if (settings == null) {
-                       settings = TaxeditorStorePlugin.getDefault().getDialogSettings().addNewSection(getSettings());
-               }
-               return settings;
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#getElementName(java.lang.Object)
-        */
-       @Override
-       public String getElementName(Object item) {
-               return ((UuidAndTitleCache) item).getTitleCache();
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#getItemsComparator()
-        */
-       @Override
-       protected Comparator getItemsComparator() {
-               return new Comparator<UuidAndTitleCache>() {
-                       public int compare(UuidAndTitleCache entity1,
-                                       UuidAndTitleCache entity2) {
-                               Collator collator = Collator.getInstance();
-                               return collator.compare(entity1.getTitleCache(), entity2.getTitleCache());
-                       }
-               };
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#validateItem(java.lang.Object)
-        */
-       @Override
-       protected IStatus validateItem(Object item) {
-               return Status.OK_STATUS;
-       }
-       
-       /**
-       * @return
-       */
-       protected UuidAndTitleCache getSelectedUuidAndTitleCache() {
-               Object[] result = getResult();
-               return result[0] == null ? null : (UuidAndTitleCache) result[0];
-       }
-       
-       public String getSettings()  {
-               if(settings == null){
-                       throw new IllegalStateException("No SETTINGS set.");
-               }
-               return settings;
-       }
-       
-       /**
-        * 
-        * @author n.hoffmann
-        * @created Oct 19, 2009
-        * @version 1.0
-        */
-       private class ResourceSelectionHistory extends SelectionHistory {
-           /*
-           * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.SelectionHistory#restoreItemFromMemento(org.eclipse.ui.IMemento)
-               */
-               protected Object restoreItemFromMemento(IMemento element) {
-                       return element.getString("resource"); //$NON-NLS-1$
-               }
-               /*
-                * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.SelectionHistory#storeItemToMemento(java.lang.Object,
-                *      org.eclipse.ui.IMemento)
-                */
-               protected void storeItemToMemento(Object item, IMemento element) {
-                       element.putString("resource", item.toString()); //$NON-NLS-1$
-               }
-       }
-       
-       public class FilteredCdmResourceLabelProvider extends LabelProvider {
-               public String getText(Object element) {
-                       if (element == null) {
-                               return null;
-                       }
-                       return ((UuidAndTitleCache) element).getTitleCache();
-               }                       
-       };
-
-}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredAgentSelectionDialog.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredAgentSelectionDialog.java
deleted file mode 100644 (file)
index 7a74f76..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.dialogs.filteredSelection;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.UUID;
-
-import org.apache.log4j.Logger;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.model.agent.AgentBase;
-import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor;
-import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * @author n.hoffmann
- * @created Sep 10, 2009
- * @version 1.0
- */
-public class FilteredAgentSelectionDialog extends
-               AbstractFilteredCdmResourceSelectionDialog<AgentBase> {
-       private static final Logger logger = Logger
-                       .getLogger(FilteredAgentSelectionDialog.class);
-       
-       /**
-        * Dialog can be initialized with an agent. Otherwise, leave
-        * agent == NULL.  
-        * 
-        * @param shell
-        * @param agent
-        * @return
-        */
-       public static AgentBase selectAgent(Shell shell, AgentBase agent) {
-               FilteredAgentSelectionDialog dialog = new FilteredAgentSelectionDialog(shell, 
-                               "Choose authors or institutions", false, agent);
-               return getSelectionFromDialog(dialog);
-       }
-       
-       private Set<AgentBase> transientAgents = new HashSet<AgentBase>();
-       
-       /**
-       * @param shell
-       * @param title
-        * @param agent 
-       */
-       protected FilteredAgentSelectionDialog(Shell shell, String title, boolean multi, AgentBase agent) {
-               super(shell, title, multi, FilteredAgentSelectionDialog.class.getCanonicalName(), agent);
-       }
-       
-       /* (non-Javadoc)
-       * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
-       */
-       @Override
-       protected Control createExtendedContentArea(Composite parent) {
-               Link link = new Link(parent, SWT.NONE);
-               link.setText("Click link to create a new <A>author</A> or <A>author team</A>.");
-               link.addListener (SWT.Selection, new Listener () {
-                       public void handleEvent(Event event) {
-                               InputDialog dialog = new InputDialog(getShell(), "Create " + event.text, "Enter new " + event.text, "", null);
-                               if (dialog.open() == Window.OK) {
-                                       
-                                       TeamOrPersonBase teamOrPerson = ("author").equals(event.text) ? Person.NewInstance() : Team.NewInstance();
-                                       teamOrPerson.setTitleCache(dialog.getValue());
-                                       teamOrPerson.setNomenclaturalTitle(dialog.getValue());
-                                       
-                                       addObjectToModel(teamOrPerson);
-                                       setPattern(teamOrPerson);
-                               }
-                       }
-               });
-               return link;
-       }
-       
-       /**
-        * @author p.ciardelli
-        * @created 18.09.2009
-        * @version 1.0
-        */
-       public class DetailsLabelProvider extends LabelProvider {
-               /* (non-Javadoc)
-                * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
-                */
-               public String getText(Object element) {
-                       AgentBase agent = getCdmObjectByUuid(((UuidAndTitleCache<AgentBase>) element).getUuid());
-                       if (agent instanceof INomenclaturalAuthor) {
-                               return "Nomenclatural title: '" + ((INomenclaturalAuthor) agent).getNomenclaturalTitle() + "'"; 
-                       } else {
-                               return "'" + agent.getTitleCache() + "' is not a nomenclatural author."; 
-                       }
-               }
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObect(java.util.UUID)
-        */
-       @Override
-       protected AgentBase getPersistentObject(UUID cdmUuid) {
-               return CdmStore.getAgentService().load(cdmUuid);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()
-        */
-       @Override
-       protected void initModel() {
-               model = CdmStore.getAgentService().getUuidAndTitleCache();
-       }
-}
\ No newline at end of file
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredNameSelectionDialog.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredNameSelectionDialog.java
deleted file mode 100644 (file)
index 7f9c935..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.dialogs.filteredSelection;
-
-import java.util.UUID;
-
-import org.apache.log4j.Logger;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.taxeditor.parser.ParseHandler;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * @author n.hoffmann
- * @created 04.06.2009
- * @version 1.0
- */
-public class FilteredNameSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<TaxonNameBase> {
-       private static final Logger logger = Logger
-                       .getLogger(FilteredNameSelectionDialog.class);
-
-       /**
-        * Creates a filtered selection dialog to select a name.
-        * 
-        * @param shell
-        *                              The shell for displaying this widget
-        * @param name
-        *                              A name that should be selected when the dialog opens
-        * @return
-        *                              A name object upon selection
-        */
-       public static TaxonNameBase selectName(Shell shell, TaxonNameBase name) {
-               FilteredNameSelectionDialog dialog = new FilteredNameSelectionDialog(shell, 
-                               "Choose a name", false, name);
-               return getSelectionFromDialog(dialog);
-       }
-       
-       /**
-       * @param shell
-       * @param title
-        * @param name 
-       */
-       protected FilteredNameSelectionDialog(Shell shell, String title, boolean multi, TaxonNameBase name) {
-               super(shell, title, multi, FilteredNameSelectionDialog.class.getCanonicalName(), name);
-       }
-       
-       /* (non-Javadoc)
-       * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
-       */
-       @Override
-       protected Control createExtendedContentArea(Composite parent) {
-               Link link = new Link(parent, SWT.NONE);
-               link.setText("Click <A>here</A> to create a new name.");
-               link.addListener (SWT.Selection, new Listener () {
-                       public void handleEvent(Event event) {
-                               // TODO replace this with a wizard
-                               
-                               InputDialog dialog = new InputDialog(getShell(), "Create a name", "Enter new name", "", null);
-                               if (dialog.open() == Window.OK) {
-                                       
-                                       TaxonNameBase name = ParseHandler.quickParse(dialog.getValue());
-                                       
-                                       addObjectToModel(name);
-                                       setPattern(name);
-                               }
-                       }
-               });
-               return link;
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
-        */
-       @Override
-       protected TaxonNameBase getPersistentObject(UUID cdmUuid) {
-               return CdmStore.getNameService().load(cdmUuid);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()
-        */
-       @Override
-       protected void initModel() {
-               model = CdmStore.getNameService().getUuidAndTitleCache();               
-       }
-}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredPersonSelectionDialog.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredPersonSelectionDialog.java
deleted file mode 100644 (file)
index df83d0f..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.dialogs.filteredSelection;
-
-import java.util.UUID;
-
-import org.apache.log4j.Logger;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * @author n.hoffmann
- * @created Sep 24, 2009
- * @version 1.0
- */
-public class FilteredPersonSelectionDialog extends
-               AbstractFilteredCdmResourceSelectionDialog<Person> {
-       private static final Logger logger = Logger
-       .getLogger(FilteredPersonSelectionDialog.class);
-       
-       public static Person selectPerson(Shell shell, Person person){
-               FilteredPersonSelectionDialog dialog = new FilteredPersonSelectionDialog(shell, 
-                               "Choose a person", false, FilteredPersonSelectionDialog.class.getCanonicalName(), person);
-               return getSelectionFromDialog(dialog); 
-       }
-       
-       /**
-        * @param shell
-        * @param title
-        * @param multi
-        * @param settings
-        * @param cdmObject
-        */
-       protected FilteredPersonSelectionDialog(Shell shell, String title,
-                       boolean multi, String settings, Person cdmObject) {
-               super(shell, title, multi, settings, cdmObject);
-       }
-
-
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
-        */
-       @Override
-       protected Person getPersistentObject(UUID uuid) {
-               return (Person) CdmStore.getAgentService().load(uuid);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#initModel()
-        */
-       @Override
-       protected void initModel() {
-               model = CdmStore.getAgentService().getPersonUuidAndNomenclaturalTitle();
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
-        */
-       @Override
-       protected Control createExtendedContentArea(Composite parent) {
-               return null;
-       }
-}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredReferenceSelectionDialog.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredReferenceSelectionDialog.java
deleted file mode 100644 (file)
index 409b50f..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.dialogs.filteredSelection;
-
-import java.util.UUID;
-
-import org.apache.log4j.Logger;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.model.reference.ReferenceBase;
-import eu.etaxonomy.taxeditor.dialogs.NewReferenceInputDialog;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * @author n.hoffmann
- * @created 04.06.2009
- * @version 1.0
- */
-public class FilteredReferenceSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<ReferenceBase> {
-       private static final Logger logger = Logger
-                       .getLogger(FilteredReferenceSelectionDialog.class);
-
-       private static final String SHOW_AUTHORS = "ShowAuthors"; //$NON-NLS-1$
-       
-       private Button button_showAuthors;
-       private ShowReferencesWithAuthorAction showReferencesWithAuthorAction;
-       private String showAuthorsText = "Include authors in reference name";
-       private boolean showAuthors = false;
-
-       private AbstractContentProvider contentProviderTmp;
-
-       private ItemsFilter itemsFilterTmp;
-       
-       /**
-       * @param reference 
-        * @param taxon
-       * @return
-       */
-       public static ReferenceBase selectReference(Shell shell, ReferenceBase reference) {
-               FilteredReferenceSelectionDialog dialog = new FilteredReferenceSelectionDialog(shell, 
-                               "Choose a reference", false, (ReferenceBase) reference);
-               return getSelectionFromDialog(dialog);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#fillContentProvider(org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.AbstractContentProvider, org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter, org.eclipse.core.runtime.IProgressMonitor)
-        */
-       @Override
-       protected void fillContentProvider(AbstractContentProvider contentProvider,
-                       ItemsFilter itemsFilter, IProgressMonitor progressMonitor)
-                       throws CoreException {
-               super.fillContentProvider(contentProvider, itemsFilter, progressMonitor);
-               contentProviderTmp = contentProvider;
-               itemsFilterTmp = itemsFilter;
-       }
-       
-       protected void reloadModel(){
-               try {
-                       super.fillContentProvider(contentProviderTmp, itemsFilterTmp, null);
-               } catch (CoreException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               }
-       }
-       
-       
-       /**
-       * @param shell
-       * @param title
-        * @param reference 
-       */
-       protected FilteredReferenceSelectionDialog(Shell shell, String title, boolean multi, ReferenceBase reference) {
-               super(shell, title, multi, FilteredReferenceSelectionDialog.class.getCanonicalName(), reference);
-               showReferencesWithAuthorAction = new ShowReferencesWithAuthorAction();
-       }
-       
-       /* (non-Javadoc)
-       * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
-       */
-       @Override
-       protected Control createExtendedContentArea(Composite parent) {
-               
-               Composite composite = new Composite(parent, SWT.NONE);
-               
-               composite.setLayout(new GridLayout());
-               
-               
-               button_showAuthors = new Button(composite, SWT.CHECK);
-               button_showAuthors.setText(showAuthorsText);
-               
-               button_showAuthors.addSelectionListener(new SelectionAdapter() {
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               showReferencesWithAuthorAction.run();
-                       }
-               });
-               
-               Link link = new Link(composite, SWT.NONE);
-               link.setText("Click <A>here</A> to create a new reference.");
-               link.addListener (SWT.Selection, new Listener () {
-                       public void handleEvent(Event event) {
-                               
-                               NewReferenceInputDialog dialog = new NewReferenceInputDialog(getShell());
-                                                               
-                               if (dialog.open() == Window.OK) {
-                                       
-                                       ReferenceBase reference = dialog.getReference();
-                                       
-                                       addObjectToModel(reference);
-                                       setPattern(reference);
-                               }
-                       }
-               });
-               return composite;
-       }
-       
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#restoreDialog(org.eclipse.jface.dialogs.IDialogSettings)
-        */
-       protected void restoreDialog(IDialogSettings settings) {
-               if (settings.get(SHOW_AUTHORS) != null) {
-                       showAuthors = settings.getBoolean(SHOW_AUTHORS);
-               }
-               setShowAuthorButtons(showAuthors);
-               super.restoreDialog(settings);
-               
-       }
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#storeDialog(org.eclipse.jface.dialogs.IDialogSettings)
-        */
-       @Override
-       protected void storeDialog(IDialogSettings settings) {
-               settings.put(SHOW_AUTHORS, showAuthors);
-               
-               super.storeDialog(settings);            
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
-        */
-       @Override
-       protected ReferenceBase getPersistentObject(UUID cdmUuid) {
-               return CdmStore.getReferenceService().load(cdmUuid);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()
-        */
-       @Override
-       protected void initModel() {
-               if(showAuthors){
-                       model = CdmStore.getReferenceService().getUuidAndTitleCache();
-               }else{
-                       model = CdmStore.getReferenceService().getUuidAndTitle();
-               }
-       }
-       
-       private void setShowAuthorButtons(boolean showAuthors){
-               button_showAuthors.setSelection(showAuthors);
-               showReferencesWithAuthorAction.setChecked(showAuthors);
-       }
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#fillViewMenu(org.eclipse.jface.action.IMenuManager)
-        */
-       @Override
-       protected void fillViewMenu(IMenuManager menuManager) {
-               super.fillViewMenu(menuManager);
-               menuManager.add(showReferencesWithAuthorAction);
-       }
-       
-       private class ShowReferencesWithAuthorAction extends Action{
-               public ShowReferencesWithAuthorAction(){
-                       super(showAuthorsText, IAction.AS_CHECK_BOX);
-               }
-               
-               public void run(){
-                       showAuthors = showAuthors ? false : true;
-                       setShowAuthorButtons(showAuthors);
-                       initModel();
-               }
-       }
-}
\ No newline at end of file
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonNodeSelectionDialog.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonNodeSelectionDialog.java
deleted file mode 100644 (file)
index d0cb23d..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-/**\r
- * \r
- */\r
-package eu.etaxonomy.taxeditor.dialogs.filteredSelection;\r
-\r
-import java.util.List;\r
-import java.util.UUID;\r
-\r
-import org.apache.log4j.Logger;\r
-import org.eclipse.core.runtime.CoreException;\r
-import org.eclipse.core.runtime.IProgressMonitor;\r
-import org.eclipse.core.runtime.OperationCanceledException;\r
-import org.eclipse.jface.viewers.ILabelProvider;\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.events.SelectionAdapter;\r
-import org.eclipse.swt.events.SelectionEvent;\r
-import org.eclipse.swt.layout.GridData;\r
-import org.eclipse.swt.layout.GridLayout;\r
-import org.eclipse.swt.widgets.Combo;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Control;\r
-import org.eclipse.swt.widgets.Label;\r
-import org.eclipse.swt.widgets.Shell;\r
-\r
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;\r
-import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
-import eu.etaxonomy.cdm.model.taxon.TaxonomicTree;\r
-import eu.etaxonomy.taxeditor.store.CdmStore;\r
-\r
-/**\r
- * @author p.ciardelli\r
- *\r
- */\r
-public class FilteredTaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<TaxonNode> {  \r
-       \r
-       private static final Logger logger = Logger\r
-                       .getLogger(FilteredTaxonNodeSelectionDialog.class);\r
-\r
-       \r
-       /**\r
-        * @param taxon\r
-        * @return\r
-        */\r
-       public static TaxonNode selectTaxonNode(Shell shell, String title, List<UUID> excludeTaxa, TaxonNode node) {\r
-               FilteredTaxonNodeSelectionDialog dialog = new FilteredTaxonNodeSelectionDialog(shell, \r
-                               title,\r
-                               excludeTaxa,\r
-                               false,\r
-                               node);\r
-               return getSelectionFromDialog(dialog);\r
-       }\r
-\r
-       private List<UuidAndTitleCache> allTaxonBases;\r
-\r
-       private Combo taxonomicTreeSelectionCombo;\r
-\r
-       private List<TaxonomicTree> taxonomicTrees;\r
-       \r
-       private TaxonomicTree selectedTaxonomicTree;\r
-       \r
-       private List<UUID> excludeTaxa;\r
-\r
-       /**\r
-        * \r
-        * \r
-        * @param shell\r
-        * @param title\r
-        */\r
-       protected FilteredTaxonNodeSelectionDialog(Shell shell, String title, List<UUID> excludeTaxa, boolean multi, TaxonNode node) {\r
-               super(shell, title, multi, FilteredTaxonNodeSelectionDialog.class.getCanonicalName(), node);\r
-               \r
-               this.excludeTaxa = excludeTaxa;\r
-               \r
-               ILabelProvider labelProvider = new FilteredCdmResourceLabelProvider();\r
-\r
-               setListLabelProvider(labelProvider);\r
-               setDetailsLabelProvider(labelProvider);\r
-               \r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#fillContentProvider(org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.AbstractContentProvider, org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter, org.eclipse.core.runtime.IProgressMonitor)\r
-        */\r
-       @Override\r
-       protected void fillContentProvider(AbstractContentProvider contentProvider,\r
-                       ItemsFilter itemsFilter, IProgressMonitor progressMonitor)\r
-                       throws CoreException {\r
-               \r
-               try {\r
-                       progressMonitor.beginTask("Looking for taxa", model.size()); // Why no progres monitor?\r
-                       if(excludeTaxa == null){\r
-                               for(UuidAndTitleCache taxon : model){\r
-                                       contentProvider.add(taxon, itemsFilter);\r
-       \r
-                                       if (progressMonitor.isCanceled()) {\r
-                                               throw new OperationCanceledException();\r
-                                       }\r
-                                       progressMonitor.worked(1);\r
-                               }\r
-                       }else{\r
-                               for(UuidAndTitleCache taxon : model){\r
-                                       if( ! excludeTaxa.contains(taxon.getUuid())){\r
-                                               contentProvider.add(taxon, itemsFilter);\r
-                                       }\r
-       \r
-                                       if (progressMonitor.isCanceled()) {\r
-                                               throw new OperationCanceledException();\r
-                                       }\r
-                                       progressMonitor.worked(1);\r
-                               }\r
-                       }\r
-               }\r
-               finally {\r
-                       progressMonitor.done();\r
-               }\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)\r
-        */\r
-       @Override\r
-       protected Control createExtendedContentArea(Composite parent) {\r
-               \r
-               // TODO tree selection is disabled at the moment and the first tree will always be used. \r
-               // change this once we are working with multiple trees\r
-//             return createTreeSelectionCombo(parent);\r
-               \r
-               return null;\r
-       }\r
-       \r
-       /*\r
-        * currently disabled tree selection composite\r
-        */\r
-       private Control createTreeSelectionCombo(Composite parent){\r
-               Composite taxonomicTreeSelection = new Composite(parent, SWT.NULL);\r
-               taxonomicTreeSelection.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));\r
-               \r
-               GridLayout layout = new GridLayout();\r
-               taxonomicTreeSelection.setLayout(layout);\r
-               \r
-               Label label = new Label(taxonomicTreeSelection, SWT.NULL);\r
-               // TODO not working is not really true but leave it there to remind everyone that this is under construction\r
-               label.setText("Select Taxonomic Tree (not completely working at the moment)");\r
-               taxonomicTreeSelectionCombo = new Combo(taxonomicTreeSelection, SWT.BORDER | SWT.READ_ONLY);\r
-               taxonomicTreeSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true));\r
-               \r
-               for(TaxonomicTree tree : taxonomicTrees){\r
-                       taxonomicTreeSelectionCombo.add(tree.getName().getText(), taxonomicTrees.indexOf(tree));\r
-               }\r
-               \r
-               // TODO remember last selection\r
-               \r
-               taxonomicTreeSelectionCombo.addSelectionListener(new SelectionAdapter(){\r
-\r
-                       /* (non-Javadoc)\r
-                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
-                        */\r
-                       @Override\r
-                       public void widgetSelected(SelectionEvent e) {\r
-                               selectedTaxonomicTree = taxonomicTrees.get(taxonomicTreeSelectionCombo.getSelectionIndex());\r
-                       }\r
-                       \r
-               });\r
-               \r
-               return taxonomicTreeSelection;\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)\r
-        */\r
-       @Override\r
-       protected TaxonNode getPersistentObject(UUID uuid) {\r
-               return CdmStore.getTaxonTreeService().getTaxonNodeByUuid(uuid);\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()\r
-        */\r
-       @Override\r
-       protected void initModel() {\r
-               // default to first tree \r
-               // TODO this will be problematic and can only be seen as workaround \r
-               taxonomicTrees = CdmStore.getTaxonTreeService().list(null, null, null, null, null);\r
-               selectedTaxonomicTree = taxonomicTrees.iterator().next();\r
-               model = CdmStore.getTaxonTreeService().getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByTaxonomicTree(selectedTaxonomicTree);\r
-       }\r
-}
\ No newline at end of file
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonSelectionDialog.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonSelectionDialog.java
deleted file mode 100644 (file)
index 0be696d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.dialogs.filteredSelection;
-
-import java.util.UUID;
-
-import org.apache.log4j.Logger;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * @author n.hoffmann
- * @created Sep 21, 2009
- * @version 1.0
- */
-public class FilteredTaxonSelectionDialog extends
-               AbstractFilteredCdmResourceSelectionDialog<TaxonBase> {
-       private static final Logger logger = Logger
-                       .getLogger(FilteredTaxonSelectionDialog.class);
-       
-       
-       /**
-       * @param taxon
-       * @return
-       */
-       public static TaxonBase selectTaxon(Shell shell) {
-               FilteredTaxonSelectionDialog dialog = new FilteredTaxonSelectionDialog(shell, 
-                               "Choose a taxon", false, null);
-               return getSelectionFromDialog(dialog);
-       }
-       
-       /**
-       * @param shell
-       * @param title
-       */
-       protected FilteredTaxonSelectionDialog(Shell shell, String title, boolean multi, TaxonBase taxon) {
-               super(shell, title, multi, FilteredReferenceSelectionDialog.class.getCanonicalName(), taxon);
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
-        */
-       @Override
-       protected Control createExtendedContentArea(Composite parent) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
-        */
-       @Override
-       protected TaxonBase getPersistentObject(UUID uuid) {
-               return CdmStore.getTaxonService().load(uuid);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()
-        */
-       @Override
-       protected void initModel() {
-               model = CdmStore.getTaxonService().getUuidAndTitleCache();
-       }
-}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonomicTreeSelectionDialog.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTaxonomicTreeSelectionDialog.java
deleted file mode 100644 (file)
index 4da0ed3..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.dialogs.filteredSelection;
-
-import java.util.UUID;
-
-import org.apache.log4j.Logger;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.model.taxon.TaxonomicTree;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * @author n.hoffmann
- * @created Sep 21, 2009
- * @version 1.0
- */
-public class FilteredTaxonomicTreeSelectionDialog extends
-               AbstractFilteredCdmResourceSelectionDialog<TaxonomicTree> {
-       
-       private static final Logger logger = Logger
-       .getLogger(FilteredTaxonomicTreeSelectionDialog.class);
-
-       
-       /**
-       * @param taxon
-       * @return
-       */
-       public static TaxonomicTree selectTaxonomicTree(Shell shell) {
-               FilteredTaxonomicTreeSelectionDialog dialog = new FilteredTaxonomicTreeSelectionDialog(shell, 
-                               "Choose a taxonomic tree", false, "", null);
-               return getSelectionFromDialog(dialog);
-       }
-       
-       /**
-        * @param shell
-        * @param title
-        * @param multi
-        * @param settings
-        */
-       protected FilteredTaxonomicTreeSelectionDialog(Shell shell, String title,
-                       boolean multi, String settings, TaxonomicTree tree) {
-               super(shell, title, multi, settings, tree);
-       }
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
-        */
-       @Override
-       protected Control createExtendedContentArea(Composite parent) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
-        */
-       @Override
-       protected TaxonomicTree getPersistentObject(UUID cdmUuid) {
-               return CdmStore.getTaxonTreeService().getTaxonomicTreeByUuid(cdmUuid);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()
-        */
-       @Override
-       protected void initModel() {
-               model = CdmStore.getTaxonTreeService().getUuidAndTitleCache();
-       }
-}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTeamOrPersonBaseSelectionDialog.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/dialogs/filteredSelection/FilteredTeamOrPersonBaseSelectionDialog.java
deleted file mode 100644 (file)
index 54f9450..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.dialogs.filteredSelection;
-
-import java.util.UUID;
-
-import org.apache.log4j.Logger;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * @author n.hoffmann
- * @created Sep 24, 2009
- * @version 1.0
- */
-public class FilteredTeamOrPersonBaseSelectionDialog extends
-               AbstractFilteredCdmResourceSelectionDialog<TeamOrPersonBase> {
-       private static final Logger logger = Logger
-               .getLogger(FilteredTeamOrPersonBaseSelectionDialog.class);
-       
-       public static TeamOrPersonBase selectTeamOrPersonBase(Shell shell, TeamOrPersonBase teamOrPersonBase){
-               FilteredTeamOrPersonBaseSelectionDialog dialog = new FilteredTeamOrPersonBaseSelectionDialog(shell,
-                               "Choose Team or Person", false, FilteredTeamOrPersonBaseSelectionDialog.class.getCanonicalName(), teamOrPersonBase);
-               return getSelectionFromDialog(dialog);
-       }
-       
-       /**
-        * @param shell
-        * @param title
-        * @param multi
-        * @param settings
-        * @param cdmObject
-        */
-       protected FilteredTeamOrPersonBaseSelectionDialog(Shell shell,
-                       String title, boolean multi, String settings,
-                       TeamOrPersonBase cdmObject) {
-               super(shell, title, multi, settings, cdmObject);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
-        */
-       @Override
-       protected TeamOrPersonBase getPersistentObject(UUID uuid) {
-               return (TeamOrPersonBase) CdmStore.getAgentService().load(uuid);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#initModel()
-        */
-       @Override
-       protected void initModel() {
-               model = CdmStore.getAgentService().getTeamOrPersonBaseUuidAndNomenclaturalTitle();
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
-        */
-       @Override
-       protected Control createExtendedContentArea(Composite parent) {
-               return null;
-       }
-}
index e72bb48fe7dd014ea12931d4f0c1d849f41384f1..e676c050112226d800510c915a470c9d94bb4b80 100644 (file)
@@ -1,91 +1,91 @@
-// $Id$\r
-/**\r
-* Copyright (C) 2007 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
-\r
-package eu.etaxonomy.taxeditor.io.wizard;\r
-\r
-import org.apache.log4j.Logger;\r
-import org.eclipse.jface.wizard.WizardPage;\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.events.SelectionAdapter;\r
-import org.eclipse.swt.events.SelectionEvent;\r
-import org.eclipse.swt.layout.FillLayout;\r
-import org.eclipse.swt.layout.GridLayout;\r
-import org.eclipse.swt.widgets.Button;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Group;\r
-\r
-import eu.etaxonomy.cdm.io.common.IImportConfigurator;\r
-import eu.etaxonomy.cdm.model.name.NomenclaturalCode;\r
-import eu.etaxonomy.taxeditor.model.NomenclaturalCodeHelper;\r
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;\r
-\r
-/**\r
- * @author p.ciardelli\r
- * @created 11.09.2009\r
- * @version 1.0\r
- */\r
-public class NomenclaturalCodeWizardPage extends WizardPage {\r
-       \r
-       \r
-       \r
-       private IImportConfigurator configurator;\r
-\r
-       /**\r
-        * \r
-        */\r
-       public NomenclaturalCodeWizardPage() {\r
-               super("Choose nomenclatural code");\r
-               \r
-               this.setTitle("Choose nomenclatural code");\r
-               \r
-               this.setDescription("Choose which code to use for imported names.");\r
-       }\r
-\r
-       /**\r
-        * @param configurator\r
-        */\r
-       public NomenclaturalCodeWizardPage(IImportConfigurator configurator) {\r
-               this();\r
-               this.configurator = configurator;\r
-       }\r
-\r
-       private static final Logger logger = Logger\r
-                       .getLogger(NomenclaturalCodeWizardPage.class);\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)\r
-        */\r
-       public void createControl(Composite parent) {\r
-               Composite container = new Composite(parent, SWT.NULL);\r
-               container.setLayout(new FillLayout());\r
-                               \r
-               final Group group = new Group(container, SWT.NONE);\r
-               group.setLayout(new GridLayout());\r
-               \r
-               NomenclaturalCode preferredCode = PreferencesUtil.getPreferredNomenclaturalCode();\r
-               \r
-               // set preferred code as default\r
-               configurator.setNomenclaturalCode(preferredCode);\r
-               \r
-               for (final NomenclaturalCode code : NomenclaturalCodeHelper.getSupportedCodes()) {\r
-                       Button button = new Button(group, SWT.RADIO);\r
-                       button.setText(NomenclaturalCodeHelper.getDescription(code));\r
-                       button.setData(code);\r
-                       button.setSelection(preferredCode.equals(code));\r
-                       button.addSelectionListener(new SelectionAdapter() {\r
-                               public void widgetSelected(SelectionEvent e) {\r
-                                       configurator.setNomenclaturalCode((NomenclaturalCode) e.widget.getData());\r
-                               }\r
-                       });\r
-               }               \r
-               \r
-               setControl(container);\r
-       }\r
-}\r
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.io.wizard;
+
+import org.apache.log4j.Logger;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+
+import eu.etaxonomy.cdm.io.common.IImportConfigurator;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.taxeditor.model.NomenclaturalCodeHelper;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+
+/**
+ * @author p.ciardelli
+ * @created 11.09.2009
+ * @version 1.0
+ */
+public class NomenclaturalCodeWizardPage extends WizardPage {
+       
+       
+       
+       private IImportConfigurator configurator;
+
+       /**
+        * 
+        */
+       public NomenclaturalCodeWizardPage() {
+               super("Choose nomenclatural code");
+               
+               this.setTitle("Choose nomenclatural code");
+               
+               this.setDescription("Choose which code to use for imported names.");
+       }
+
+       /**
+        * @param configurator
+        */
+       public NomenclaturalCodeWizardPage(IImportConfigurator configurator) {
+               this();
+               this.configurator = configurator;
+       }
+
+       private static final Logger logger = Logger
+                       .getLogger(NomenclaturalCodeWizardPage.class);
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+        */
+       public void createControl(Composite parent) {
+               Composite container = new Composite(parent, SWT.NULL);
+               container.setLayout(new FillLayout());
+                               
+               final Group group = new Group(container, SWT.NONE);
+               group.setLayout(new GridLayout());
+               
+               NomenclaturalCode preferredCode = PreferencesUtil.getPreferredNomenclaturalCode();
+               
+               // set preferred code as default
+               configurator.setNomenclaturalCode(preferredCode);
+               
+               for (final NomenclaturalCode code : NomenclaturalCodeHelper.getSupportedCodes()) {
+                       Button button = new Button(group, SWT.RADIO);
+                       button.setText(NomenclaturalCodeHelper.getDescription(code));
+                       button.setData(code);
+                       button.setSelection(preferredCode.equals(code));
+                       button.addSelectionListener(new SelectionAdapter() {
+                               public void widgetSelected(SelectionEvent e) {
+                                       configurator.setNomenclaturalCode((NomenclaturalCode) e.widget.getData());
+                               }
+                       });
+               }               
+               
+               setControl(container);
+       }
+}
\ No newline at end of file
index 20207aa54288fbd52edc37f8a1891a3bff64242a..d62fc28f5e0bc213de3263b4e2a83398f40c04ea 100644 (file)
@@ -10,6 +10,8 @@
 
 package eu.etaxonomy.taxeditor.model;
 
+import java.lang.reflect.InvocationTargetException;
+
 import org.apache.log4j.Logger;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.operations.IOperationHistory;
@@ -22,19 +24,24 @@ import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.SubProgressMonitor;
 import org.eclipse.jface.action.IStatusLineManager;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.resource.ColorRegistry;
 import org.eclipse.jface.resource.FontRegistry;
-import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
+import org.eclipse.ui.progress.IProgressService;
 import org.eclipse.ui.themes.ITheme;
 import org.eclipse.ui.themes.IThemeManager;
 
-import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 
 /**
@@ -60,10 +67,25 @@ public abstract class AbstractUtility {
                        .getActiveWorkbenchWindow().getActivePage();
        }
        
-       public static IViewPart getView(String id) throws PartInitException{
-               return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(id);
+       public static IViewPart showView(String id){
+               try {
+                       return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(id);
+               } catch (PartInitException e) {
+                       logger.error("Could not open view: " + id, e);
+                       throw new RuntimeException(e);
+               }
        }
        
+       public static IViewPart getView(String id, boolean restore){
+               IViewReference[] references = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences();
+               for (IViewReference reference : references){
+                       if(reference.getId().equals(id)){
+                               return reference.getView(restore);
+                       }
+               }
+               return null;
+       }
+               
        public static boolean closeAll() {
                return getActivePage().closeAllEditors(true);
        }
@@ -92,6 +114,10 @@ public abstract class AbstractUtility {
                return getCurrentTheme().getFontRegistry();
        }
        
+       public static Font getFont(String symbolicName){
+               return getFontRegistry().get(symbolicName);
+       }
+       
        /**
         * Color registered to the plugin may be obtained with the Eclipse themeing functionality.
         * Thus colors are editable by the user via Preferences->General->Appearance->Colors and Fonts
@@ -102,6 +128,15 @@ public abstract class AbstractUtility {
                return getCurrentTheme().getColorRegistry();
        }
        
+       /**
+        * 
+        * @param symbolicName
+        * @return
+        */
+       public static Color getColor(String symbolicName){
+               return getColorRegistry().get(symbolicName);
+       }
+       
        /**
         * Open a message box that informs the user about unimplemented functionality.
         * This method is for developer convenience.
@@ -121,6 +156,10 @@ public abstract class AbstractUtility {
        public static void errorDialog(String title, String message){
                MessageDialog.openError(getShell(), title, message);
        }
+
+       public static boolean confirmDialog(String title, String message) {
+               return MessageDialog.openQuestion(getShell(), title, message);
+       }
        
        public static IStatus executeOperation(IUndoableOperation operation){
                if(getOperationHistory() == null){
@@ -146,6 +185,7 @@ public abstract class AbstractUtility {
                return status;
                } catch (ExecutionException e) {
                        logger.error("Error executing operation: " + operation.getLabel(), e);
+                       errorDialog("Error executing operation: " + operation.getLabel(), "Please refer to the error log.");
                }
         finally {
                
@@ -200,6 +240,7 @@ public abstract class AbstractUtility {
         if (progressMonitor instanceof NullProgressMonitor) {
             return progressMonitor;
         }
+        
         return new SubProgressMonitor(progressMonitor, steps, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
     }
     
@@ -217,5 +258,34 @@ public abstract class AbstractUtility {
                newMonitor.worked(steps);
        }
 
+       /**
+        * Present a progress dialog to the user. This dialog will block the UI
+        * 
+        * @param runnable an implementation of {@link IRunnableWithProgress}
+        */
+       public static void busyCursorWhile(IRunnableWithProgress runnable){
+               IWorkbench workbench = PlatformUI.getWorkbench();
+               IProgressService progressService = workbench.getProgressService();
+               try {
+                       progressService.busyCursorWhile(runnable);
+               } catch (InvocationTargetException e) {
+                       logger.error("InvocationTargetException while running busy cursor", e);
+               } catch (InterruptedException e) {
+                       logger.error("InterruptedException while running busy cursor", e);
+               }
+       }
+       
+       public static void runAsynchroneously(IRunnableWithProgress runnable){
+               IWorkbench workbench = PlatformUI.getWorkbench();
+               IProgressService progressService = workbench.getProgressService();
+               
+               try {
+                       progressService.run(true, false, runnable);
+               } catch (InvocationTargetException e) {
+                       logger.error("InvocationTargetException while running busy cursor", e);
+               } catch (InterruptedException e) {
+                       logger.error("InterruptedException while running busy cursor", e);
+               }
+       }
 
 }
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/ColorFactory.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/ColorFactory.java
new file mode 100644 (file)
index 0000000..1598b40
--- /dev/null
@@ -0,0 +1,23 @@
+/**
+ * 
+ */
+package eu.etaxonomy.taxeditor.model;
+
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.ui.themes.IColorFactory;
+
+/**
+ * @author n.hoffmann
+ *
+ */
+public class ColorFactory implements IColorFactory {
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.themes.IColorFactory#createColor()
+        */
+       public RGB createColor() {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+}
index 587cf1ac2da22cecedac43f0997b02cceb8fb229..023c271406863f52baee6efea3bfeab677b56509 100644 (file)
@@ -67,10 +67,15 @@ public class DescriptionHelper {
                        Distribution distribution = (Distribution) element;\r
                        \r
                        NamedArea area = distribution.getArea();\r
-                       PresenceAbsenceTermBase<?> status = distribution.getStatus();\r
-                       \r
-                       if (status != null) {\r
-                               cache =  area.getLabel() + ", " + status.getLabel();\r
+                       if(area != null){\r
+                               cache =  area.getLabel();\r
+                               \r
+                               PresenceAbsenceTermBase<?> status = distribution.getStatus();\r
+                               if (status == null){\r
+                                       cache += ", no status";\r
+                               }else {\r
+                                       cache += ", " + status.getLabel();\r
+                               }\r
                        }\r
                }\r
                return cache == null ? "" : cache;\r
@@ -132,7 +137,15 @@ public class DescriptionHelper {
         */\r
        public static String getObjectDescription(Object element) {\r
                if (element instanceof IdentifiableEntity) {\r
-                       return ((IdentifiableEntity) element).getTitleCache();\r
+                       try{\r
+                               return ((IdentifiableEntity) element).getTitleCache();\r
+                       }catch(Exception e){\r
+                               // TODO we have to make sure that we will never get here. \r
+                               // It is not clear at the moment how we can accomplish that.\r
+                               String result = "Error initializing title cache for object";\r
+                               logger.error(result);\r
+                               return "TODO" + result;\r
+                       }\r
                }\r
                if (element instanceof OriginalSourceBase) {\r
                        OriginalSourceBase originalSource = (OriginalSourceBase) element;\r
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/IContextListener.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/IContextListener.java
new file mode 100644 (file)
index 0000000..c8be32e
--- /dev/null
@@ -0,0 +1,29 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.model;
+
+
+/**
+ * @author n.hoffmann
+ * @created Mar 23, 2010
+ * @version 1.0
+ */
+public interface IContextListener {
+
+       public enum EventType{
+               START,
+               STOP,
+               ABOUT_TO_STOP
+       }
+       
+       public boolean onContextEvent(EventType eventType);
+       
+}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/IPartContentHasDetails.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/IPartContentHasDetails.java
new file mode 100644 (file)
index 0000000..64b2bac
--- /dev/null
@@ -0,0 +1,24 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.model;
+
+
+/**
+ * Clients implementing this interface indicate, that the data they present is suitable for the details view
+ * and that the details view should handle selection from the implmenting part.
+ * 
+ * @author n.hoffmann
+ * @created Apr 20, 2010
+ * @version 1.0
+ */
+public interface IPartContentHasDetails {
+
+}
index 69224a275174174ad8b4890f97b02271032452ce..3f455b8ca975030fcd610419f49ac62840cf73e5 100644 (file)
@@ -43,7 +43,11 @@ public class ImageResources {
        /* ***************************************************************************************
        ICONS
        ************************************************************************************** */
+       public static final String ADD_ICON = "add_icon";
+       public static final String TRASH_ICON = "trash_icon";
+       public static final String BROWSE_ICON = "browse_icon";
        public static final String EDIT_ICON = "edit_icon";
+       public static final String EDIT_LOGO_ICON = "edit_logo_icon";
        public static final String WARNING_ICON = "warning_icon";
        public static final String BLACK_SQUARE_ICON = "black_square_icon";
        public static final String HOMOTYPIC_SYN_ICON = "homotypic_syn_icon";
@@ -73,6 +77,9 @@ public class ImageResources {
        public static final String THREE_PRONGED_EQUAL = "3_pronged_equal";
        public static final String TWO_PRONGED_EQUAL = "2_pronged_equal";
        public static final String MISAPPLIED_NAME = "misapplied_name";
+       public static final String EXPAND_ALL = "expand_all";
+       public static final String COLLAPSE_ALL = "collapse_all";
+       
 
        
        /***************************************************************************
@@ -144,7 +151,13 @@ public class ImageResources {
     }
 
        protected void initializeImageRegistry(ImageRegistry registry) {
-               registerImage(registry, EDIT_ICON, "edit_16x16.ico");
+               registerImage(registry, ADD_ICON, 
+                               "add.gif");
+               registerImage(registry, TRASH_ICON, 
+                               "trash.gif");
+               registerImage(registry, EDIT_ICON, 
+                               "text.gif");
+               registerImage(registry, EDIT_LOGO_ICON, "edit_16x16.ico");
                registerImage(registry, WARNING_ICON,
                                "warn_tsk.gif");
                registerImage(registry, BLACK_SQUARE_ICON,
@@ -203,6 +216,12 @@ public class ImageResources {
                                "2_pronged_equal_small.GIF");           
                registerImage(registry, MISAPPLIED_NAME, 
                                "ma_12x12.gif");                
+               registerImage(registry, EXPAND_ALL, 
+                               "expandAll.jpg");
+               registerImage(registry, COLLAPSE_ALL, 
+                               "collapseall.gif");
+               registerImage(registry, BROWSE_ICON, 
+                               "prj_obj.gif");
        }
 
        private void registerImage(ImageRegistry registry, String key,
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/LineSelection.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/LineSelection.java
new file mode 100644 (file)
index 0000000..c255c77
--- /dev/null
@@ -0,0 +1,84 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2007 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
+\r
+package eu.etaxonomy.taxeditor.model;\r
+\r
+import java.util.Iterator;\r
+import java.util.List;\r
+\r
+import org.apache.log4j.Logger;\r
+import org.eclipse.jface.text.IDocument;\r
+import org.eclipse.jface.text.ITextSelection;\r
+import org.eclipse.jface.text.TextSelection;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.jface.viewers.StructuredSelection;\r
+\r
+/**\r
+ * Extending <code>TextSelection</code> allows us to keep using Eclipse's text selection, while\r
+ * <code>IStructuredSelection</code> can be used to send an object associated with the selection,\r
+ * i.e. a property source, to the workbench selection service.\r
+ *   \r
+ * @author p.ciardelli\r
+ * @created 03.07.2009\r
+ * @version 1.0\r
+ */\r
+public class LineSelection extends TextSelection implements IStructuredSelection {\r
+       @SuppressWarnings("unused")\r
+       private static final Logger logger = Logger.getLogger(LineSelection.class);\r
+\r
+       private StructuredSelection structuredSelection;\r
+       \r
+       /**\r
+        * \r
+        */\r
+       public LineSelection(ITextSelection selection, IDocument document, Object selectedObject) {\r
+               super(document, selection.getOffset(), selection.getLength());\r
+               if (selectedObject != null) {\r
+                       this.structuredSelection = new StructuredSelection(selectedObject);\r
+               } else {\r
+                       this.structuredSelection = StructuredSelection.EMPTY;\r
+               }\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.IStructuredSelection#getFirstElement()\r
+        */\r
+       public Object getFirstElement() {\r
+               return structuredSelection.getFirstElement();\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.IStructuredSelection#iterator()\r
+        */\r
+       public Iterator<?> iterator() {\r
+               return structuredSelection.iterator();\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.IStructuredSelection#size()\r
+        */\r
+       public int size() {\r
+               return structuredSelection.size();\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.IStructuredSelection#toArray()\r
+        */\r
+       public Object[] toArray() {\r
+               return structuredSelection.toArray();\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.IStructuredSelection#toList()\r
+        */\r
+       public List<?> toList() {\r
+               return structuredSelection.toList();\r
+       }\r
+}\r
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/MementoHelper.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/MementoHelper.java
new file mode 100644 (file)
index 0000000..42c984a
--- /dev/null
@@ -0,0 +1,76 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.model;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+
+import org.apache.log4j.Logger;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.XMLMemento;
+
+/**
+ * @author n.hoffmann
+ * @created Mar 29, 2010
+ * @version 1.0
+ */
+public class MementoHelper {
+       private static final Logger logger = Logger.getLogger(MementoHelper.class);
+
+       
+       public static IMemento readMementoFromFile(File stateFile) throws FileNotFoundException{
+               FileInputStream input;
+               try {
+                       input = new FileInputStream(stateFile);
+                       BufferedReader reader = new BufferedReader(
+                                       new InputStreamReader(input, "utf-8")); //$NON-NLS-1$
+                       return XMLMemento.createReadRoot(reader);
+               } catch (WorkbenchException e) {
+                       logger.error("Exception while reading the memento", e);
+               } catch (UnsupportedEncodingException e) {
+                       logger.error("Exception while reading the memento", e);
+               }
+
+               return null;
+       }
+       
+       /*
+        * Save the workbench UI in a persistence file.
+        */
+       public static IMemento saveMementoToFile(IMemento memento, File stateFile) {
+               if (stateFile == null || memento == null) {
+                       return null;
+               }
+               try {
+                       FileOutputStream stream = new FileOutputStream(stateFile);
+                       OutputStreamWriter writer = new OutputStreamWriter(stream, "utf-8"); //$NON-NLS-1$
+                       
+                       ((XMLMemento)memento).save(writer);
+                       
+                       writer.close();
+               } catch (IOException e) {
+                       stateFile.delete();
+                       logger.error("Could not save datasource state");
+                       return null;
+               }
+
+               // Success !
+               return memento;
+       }       
+}
index 6e34096618e3423522313bf4f6dddd7f4e235db0..773798f907f5d19115ef4a9248b9c7a7ed707bc3 100644 (file)
@@ -9,8 +9,6 @@
 
 package eu.etaxonomy.taxeditor.model;
 
-import eu.etaxonomy.cdm.common.CdmUtils;
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 
@@ -35,12 +33,7 @@ public class NameHelper {
        public static String getDisplayNameWithRef(TaxonBase taxonBase) {
                TaxonNameBase name = taxonBase.getName();
                if (name != null) {
-                       name = HibernateProxyHelper.deproxy(name, TaxonNameBase.class);
-                       if (name.getFullTitleCache() == null || name.getFullTitleCache().length() == 0) {
-                               return CdmUtils.Nz(name.getTitleCache());
-                       } else {
-                               return name.getFullTitleCache();
-                       }
+                       return name.generateFullTitle();
                }
                return "";
        }       
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/Resources.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/Resources.java
deleted file mode 100644 (file)
index 0f72bfc..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.model;
-
-import java.util.HashMap;
-import java.util.Set;
-
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.resource.FontRegistry;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.editors.text.EditorsUI;
-
-
-/**
- * @author n.hoffmann
- * @created 18.03.2009
- * @version 1.0
- * 
- * @deprecated migrate to org.eclipse.ui.themes or at least handle this a little bit more eclipse like
- */
-public class Resources {
-       
-       private static Resources instance;
-       
-       public static Resources getInstance(){
-               if(instance == null){
-                       instance = new Resources();
-               }
-               return instance;
-       }
-       
-       
-       /* ***************************************************************************************
-               PREFERENCES
-       ************************************************************************************** */
-       public static final String INITIALIZED = "initialized";
-       public static final String INITIALIZE_W_TESTDATA = "init_w_testdata";
-       
-       /* ***************************************************************************************
-               STRINGS
-       ************************************************************************************** */
-       public static final String MISAPPLIED_NAME = "misappliedname";
-       public static final String BASIONYM = "basionym";
-       public static final String SYNONYM = "synonym";
-       public static final String HOMOTYPIC_SYNONYM = "homotypic_synonym";
-       public static final String HETEROTYPIC_SYNONYM = "heterotypic_synonym";
-       public static final String NAMERELATION = "namerelation";
-       public static final String TAXON = "taxon";
-       public static final String HOMOTYPIC_GROUP = "homotypicgroup";
-       public static final String QUICK_NAME_TAXON = "quick_name_taxon";
-       public static final String PROPERTY_SHEET_CHANGE = "property_sheet_change";
-       public static final String REFRESH_NAMEVIEWER = "refresh_name_viewer";
-       
-       /* ***************************************************************************************
-       FONTS
-       ************************************************************************************** */       
-       public static final String MENU_ITEM_ITALICS_FONT = "menu_item_italics_font";
-       public static final String ACCEPTED_TAXON_FONT = "accepted_taxon_font";
-       public static final String SYNONYM_FONT = "synonym_font";
-       public static final String MISAPPLIEDNAME_FONT = "misappliedname_font";
-       public static final String CONCEPT_FONT = "concept_font";
-       public static final String DATASOURCE_FONT = "datasource_font";
-       public static final String CHOOSE_NAME_TEXT_FONT = "choose_name_text_font";
-       public static final String FONT_DEFAULT_PROMPT = "default_prompt_font";
-       
-       /* ***************************************************************************************
-       COLORS
-       ************************************************************************************** */
-       public static final String COLOR_COMPOSITE_BACKGROUND = "group_gray_background_color";
-       public static final String PROP_SHEET_RED = "property_sheet_red";
-       public static final String SEARCH_VIEW_FOREGROUND = "search_view_foreground";
-       public static final String SEARCH_VIEW_FOCUS = "search_view_focus";
-       public static final String COLOR_COMPOSITE_SELECTED = "color_list_selection";
-       public static final String COLOR_LIST_BACKGROUND = "color_list_background";
-       
-
-       /***************************************************************************
-        * FONT REGISTRY
-        **************************************************************************/
-       private FontRegistry fontRegistry;
-
-       private FontRegistry getFontRegistry() {
-               if (fontRegistry == null) {
-                       fontRegistry = new FontRegistry(Display.getCurrent());
-
-                       fontRegistry.put(DATASOURCE_FONT,
-                                       new FontData[] { new FontData("Arial", 8, SWT.NONE) });
-                       fontRegistry.put(MENU_ITEM_ITALICS_FONT,
-                                       new FontData[] { new FontData("Arial", 9, SWT.ITALIC) });
-                       fontRegistry.put(ACCEPTED_TAXON_FONT,
-                                       new FontData[] { new FontData("Georgia", 12, SWT.NONE) });
-                       fontRegistry.put(SYNONYM_FONT,
-                                       new FontData[] { new FontData("Georgia", 10, SWT.NONE) });
-                       fontRegistry.put(MISAPPLIEDNAME_FONT,
-                                       new FontData[] { new FontData("Georgia", 10, SWT.NONE) });
-                       fontRegistry.put(CONCEPT_FONT,
-                                       new FontData[] { new FontData("Georgia", 10, SWT.NONE) });
-                       fontRegistry.put(CHOOSE_NAME_TEXT_FONT,
-                                       new FontData[] { new FontData("Arial", 12, SWT.BOLD) });
-                       fontRegistry.put(FONT_DEFAULT_PROMPT,
-                                       new FontData[] { new FontData("Georgia", 10, SWT.ITALIC) });
-               }
-               return fontRegistry;
-       }
-
-       public static Font getFont(String key) {
-               return getInstance().getFontRegistry().get(key);
-       }
-       
-       /**
-        * @param font
-        */
-       public static Font italicizeFont(Font font) {
-               FontData fontData = font.getFontData()[0];
-               fontData.setStyle(fontData.getStyle() | SWT.ITALIC);
-               Font italFont = new Font(Display.getDefault(), fontData);
-               
-               int i = 0;
-               String fontName = "italic";
-               Set<?> keySet = getInstance().getFontRegistry().getKeySet();
-               while (keySet.contains(fontName + i)) {
-                       i++;
-               }
-               getInstance().getFontRegistry().put(fontName + i, italFont.getFontData());
-               
-               return italFont;
-       }
-
-       /***************************************************************************
-        * COLOR MAP
-        **************************************************************************/
-       private static HashMap<String, Color> colorRegistry;
-       
-       public static Color getColor(String key) {
-               return getInstance().getColorRegistry().get(key);
-       }
-       
-       private HashMap<String, Color> getColorRegistry() {
-               if (colorRegistry == null) {
-                        colorRegistry = new HashMap<String, Color>();
-                        
-                        RGB currentLineRGB = PreferenceConverter.getColor(
-                                        EditorsUI.getPreferenceStore(), "currentLineColor");
-                        Color currentLineColor = new Color(null, currentLineRGB);
-                                                
-                        colorRegistry.put(COLOR_COMPOSITE_BACKGROUND,
-                                        new Color(null, 250, 250, 250));
-                        colorRegistry.put(PROP_SHEET_RED,
-                                        new Color(null, 255, 0, 0));           
-                        colorRegistry.put(SEARCH_VIEW_FOREGROUND,
-                                        new Color(null, 192, 192, 192));       
-                        colorRegistry.put(SEARCH_VIEW_FOCUS,
-                                        new Color(null, 0, 0, 0));     
-//                      colorRegistry.put(COLOR_COMPOSITE_SELECTED, 
-//                                      Display.getDefault().getSystemColor(SWT.COLOR_LIST_SELECTION));
-                        colorRegistry.put(COLOR_COMPOSITE_SELECTED, 
-                                        currentLineColor);              
-                        colorRegistry.put(COLOR_LIST_BACKGROUND, 
-                                        Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
-               }
-               EditorsUI.getPreferenceStore();
-               return colorRegistry;
-       }
-}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/TextHelper.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/TextHelper.java
new file mode 100644 (file)
index 0000000..8f2490a
--- /dev/null
@@ -0,0 +1,62 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.model;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @author n.hoffmann
+ * @created Mar 30, 2010
+ * @version 1.0
+ */
+public class TextHelper {
+       private static final Logger logger = Logger.getLogger(TextHelper.class);
+       
+       public static final String ELLIPSIS = "...";
+               
+       /**
+        * @param textValue
+        * @param control
+        * @return
+        * @see org.eclipse.jface.dialogs.Dialog#shortenText(String, Control)
+        */
+       public static String shortenText(String textValue, Control control) {
+               if (textValue == null) {
+                       return null;
+               }
+               GC gc = new GC(control);
+               int maxWidth = control.getBounds().width;
+               int maxExtent = gc.textExtent(textValue).x;
+               if (maxExtent < maxWidth) {
+                       gc.dispose();
+                       return textValue;
+               }
+               int length = textValue.length();
+               int charsToClip = Math.round(0.95f*length * (1 - ((float)maxWidth/maxExtent)));
+               
+               int end = length - charsToClip;
+               while (end > 0) {
+                       String s1 = textValue.substring(0, end);
+                       String s = s1 + ELLIPSIS;
+                       int l = gc.textExtent(s).x;
+                       if (l < maxWidth) {
+                               gc.dispose();
+                               return s;
+                       }
+                       end--;
+               }
+               gc.dispose();
+               return textValue;
+               
+       }
+}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/AbstractSpecificReferenceWizardPage.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/AbstractSpecificReferenceWizardPage.java
new file mode 100644 (file)
index 0000000..2b34d7b
--- /dev/null
@@ -0,0 +1,31 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.newWizards;
+
+import org.apache.log4j.Logger;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author n.hoffmann
+ * @created Apr 16, 2010
+ * @version 1.0
+ */
+public abstract class AbstractSpecificReferenceWizardPage extends WizardPage {
+
+
+       private static final Logger logger = Logger
+                       .getLogger(AbstractSpecificReferenceWizardPage.class);
+
+       protected AbstractSpecificReferenceWizardPage(String pageName) {
+               super(pageName);
+       }
+}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/BookDetailsWizardPage.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/BookDetailsWizardPage.java
new file mode 100644 (file)
index 0000000..bba7317
--- /dev/null
@@ -0,0 +1,39 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.newWizards;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author n.hoffmann
+ * @created Apr 16, 2010
+ * @version 1.0
+ */
+public class BookDetailsWizardPage extends AbstractSpecificReferenceWizardPage {
+
+
+       private static final Logger logger = Logger
+                       .getLogger(BookDetailsWizardPage.class);
+
+       protected BookDetailsWizardPage(String pageName) {
+               super(pageName);
+               // TODO Auto-generated constructor stub
+       }
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+        */
+       public void createControl(Composite parent) {
+               // TODO Auto-generated method stub
+
+       }
+}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewAuthorWizard.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewAuthorWizard.java
new file mode 100644 (file)
index 0000000..c6b636b
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * 
+ */
+package eu.etaxonomy.taxeditor.newWizards;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+/**
+ * 
+ * @author n.hoffmann
+ * @created Apr 16, 2010
+ * @version 1.0
+ */
+public class NewAuthorWizard extends Wizard implements INewWizard {
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.wizard.Wizard#performFinish()
+        */
+       @Override
+       public boolean performFinish() {
+               // TODO Auto-generated method stub
+               return false;
+       }
+
+       public void init(IWorkbench workbench, IStructuredSelection selection) {
+               // TODO Auto-generated method stub
+               
+       }
+}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewAuthorWizardPage.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewAuthorWizardPage.java
new file mode 100644 (file)
index 0000000..f6a111e
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * 
+ */
+package eu.etaxonomy.taxeditor.newWizards;
+
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * 
+ * @author n.hoffmann
+ * @created Apr 16, 2010
+ * @version 1.0
+ */
+public class NewAuthorWizardPage extends WizardPage {
+
+       protected NewAuthorWizardPage(String pageName) {
+               super(pageName);
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+        */
+       public void createControl(Composite parent) {
+               Composite container = new Composite(parent, SWT.NULL);
+               
+               setControl(container);
+       }
+
+}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewGenericReferenceWizardPage.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewGenericReferenceWizardPage.java
new file mode 100644 (file)
index 0000000..7e48da7
--- /dev/null
@@ -0,0 +1,103 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.newWizards;
+
+import org.apache.log4j.Logger;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+import eu.etaxonomy.cdm.model.agent.AgentBase;
+
+/**
+ * @author n.hoffmann
+ * @created Apr 16, 2010
+ * @version 1.0
+ */
+public class NewGenericReferenceWizardPage extends WizardPage {
+
+
+       private static final Logger logger = Logger
+                       .getLogger(NewGenericReferenceWizardPage.class);
+       
+       private Combo combo_referenceType;
+       private Text text_title;
+       private AgentBase selection_agent;
+       private Text text_editor;
+       private Text text_series;
+       private Text text_volume;
+       private Text text_pages;
+
+       protected NewGenericReferenceWizardPage(String pageName) {
+               super(pageName);
+       }
+
+       /**
+        * 
+        */
+       public void createControl(Composite parent) {
+               setTitle("General");
+               setDescription("General information for a reference.");
+               
+               Composite container = new Composite(parent, SWT.NULL);
+               container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+               
+               container.setLayout(new GridLayout(2, false));
+               
+               createLabel(container, "Reference Type");
+               combo_referenceType = new Combo(container, SWT.NULL);
+               top(combo_referenceType);
+               
+               createLabel(container, "Title");
+               text_title = new Text(container, SWT.NULL);
+               top(text_title);
+               
+//             createLabel(container, "Author Team");
+//             selection_agent = FilteredAgentSelectionDialog.selectAgent(getShell(), null);
+               
+//             composite_timePeriod
+               
+               createLabel(container, "Editor");
+               text_editor = new Text(container, SWT.NULL);
+               top(text_editor);
+               
+               createLabel(container, "Series");
+               text_series = new Text(container, SWT.NULL);
+               top(text_series);
+               
+               createLabel(container, "Volume");
+               text_volume = new Text(container, SWT.NULL);
+               top(text_volume);
+               
+               createLabel(container, "Pages");
+               text_pages = new Text(container, SWT.NULL);
+               top(text_pages);
+               
+               setControl(container);
+       }
+       
+       
+       private Label createLabel(Composite parent, String labelString){
+               Label label = new Label(parent, SWT.NULL);
+               label.setText(labelString);
+               return label;
+       }
+       
+       private void top(Control control){
+               control.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+       }
+}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewNameWizard.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewNameWizard.java
new file mode 100644 (file)
index 0000000..95c0cc1
--- /dev/null
@@ -0,0 +1,66 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.newWizards;
+
+import org.apache.log4j.Logger;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+import eu.etaxonomy.cdm.model.name.NonViralName;
+
+/**
+ * @author n.hoffmann
+ * @created Apr 16, 2010
+ * @version 1.0
+ */
+public class NewNameWizard extends Wizard implements INewWizard {
+       private static final Logger logger = Logger.getLogger(NewNameWizard.class);
+
+       public static final String NEW_NAME = "NEW_NAME";
+
+       private NewNameWizardPage page;
+       
+       public NewNameWizard(){
+               setWindowTitle("New Scientific Name");
+       }
+       
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.jface.wizard.Wizard#addPages()
+        */
+       @Override
+       public void addPages() {
+               page = new NewNameWizardPage(NEW_NAME);
+               
+               addPage(page);
+       }
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.wizard.Wizard#performFinish()
+        */
+       @Override
+       public boolean performFinish() {
+               
+               // TODO
+               
+               return false;
+       }
+
+       public void init(IWorkbench workbench, IStructuredSelection selection) {
+               
+       }
+       
+       public NonViralName getName() {
+               return null;
+       }
+}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewNameWizardPage.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewNameWizardPage.java
new file mode 100644 (file)
index 0000000..1caaee9
--- /dev/null
@@ -0,0 +1,43 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.newWizards;
+
+import org.apache.log4j.Logger;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author n.hoffmann
+ * @created Apr 16, 2010
+ * @version 1.0
+ */
+public class NewNameWizardPage extends WizardPage {
+       private static final Logger logger = Logger
+                       .getLogger(NewNameWizardPage.class);
+
+       /**
+        * @param pageName
+        */
+       public NewNameWizardPage(String pageName) {
+               super(pageName);
+       }
+
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+        */
+       public void createControl(Composite parent) {
+               Composite container = new Composite(parent, SWT.NULL);
+               
+               setControl(container);
+       }
+}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewReferenceWizard.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/newWizards/NewReferenceWizard.java
new file mode 100644 (file)
index 0000000..a809254
--- /dev/null
@@ -0,0 +1,57 @@
+/**
+ * 
+ */
+package eu.etaxonomy.taxeditor.newWizards;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+import eu.etaxonomy.cdm.model.reference.ReferenceBase;
+
+/**
+ * 
+ * @author n.hoffmann
+ * @created Apr 16, 2010
+ * @version 1.0
+ */
+public class NewReferenceWizard extends Wizard implements INewWizard{
+
+       public static final String NEW_REFERENCE = "NEW_REFERENCE";
+
+       private NewGenericReferenceWizardPage page;
+       
+       public NewReferenceWizard(){
+               setWindowTitle("New Reference");
+       }
+       
+       @Override
+       public void addPages() {
+               page = new NewGenericReferenceWizardPage(NEW_REFERENCE);
+               
+               addPage(page);
+       }
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.wizard.Wizard#performFinish()
+        */
+       @Override
+       public boolean performFinish() {
+               
+               // TODO 
+               
+               
+               return false;
+       }
+
+       public void init(IWorkbench workbench, IStructuredSelection selection) {
+               // TODO Auto-generated method stub
+               
+       }
+       
+       public ReferenceBase getReference(){
+               return null;
+       }
+
+}
similarity index 73%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/AddImageToDescriptionElementOperation.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/AddMediaToImageGalleryOperation.java
index 15150250c3dfcb2e03964c15fc7abf965e1c0ff3..671a411b87480da6f38a3a0b2bf07f0b24e8d623 100644 (file)
@@ -16,8 +16,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;\r
 \r
 import eu.etaxonomy.cdm.api.utility.ImagesUtility;\r
-import eu.etaxonomy.cdm.model.description.DescriptionElementBase;\r
-import eu.etaxonomy.cdm.model.media.ImageFile;\r
+import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
+import eu.etaxonomy.cdm.model.media.Media;\r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
 /**\r
  * @author p.ciardelli\r
@@ -25,10 +25,10 @@ import eu.etaxonomy.cdm.model.taxon.Taxon;
  * @version 1.0\r
  * @author n.hoffmann\r
  */\r
-public class AddImageToDescriptionElementOperation extends AbstractPostOperation {\r
+public class AddMediaToImageGalleryOperation extends AbstractPostOperation {\r
        \r
-       private DescriptionElementBase element;\r
-       private ImageFile image;\r
+       private DescriptionBase description;\r
+       private Media media;\r
 \r
        /**\r
         * @param name\r
@@ -37,12 +37,13 @@ public class AddImageToDescriptionElementOperation extends AbstractPostOperation
         * @param element\r
         * @param postOperationEnabled\r
         */\r
-       public AddImageToDescriptionElementOperation(String label,\r
+       public AddMediaToImageGalleryOperation(String label,\r
                        IUndoContext undoContext, Taxon taxon,\r
-                       DescriptionElementBase element, IPostOperationEnabled postOperationEnabled) {\r
+                       DescriptionBase description, IPostOperationEnabled postOperationEnabled) {\r
                super(label, undoContext, taxon, postOperationEnabled);\r
-               \r
-               this.element = element;\r
+\r
+               this.description = description;\r
+               media = Media.NewInstance();\r
        }\r
 \r
        /* (non-Javadoc)\r
@@ -53,10 +54,12 @@ public class AddImageToDescriptionElementOperation extends AbstractPostOperation
                        throws ExecutionException {\r
 \r
                monitor.worked(20);\r
-               image = ImagesUtility.addImagePart(element);\r
+               \r
+               ImagesUtility.addMediaToGallery(description, media);\r
+               \r
                monitor.worked(40);\r
         \r
-               return postExecute(image);\r
+               return postExecute(media);\r
        }\r
 \r
        /* (non-Javadoc)\r
@@ -74,7 +77,7 @@ public class AddImageToDescriptionElementOperation extends AbstractPostOperation
        @Override\r
        public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
-               ImagesUtility.removeImage(element, image);\r
-               return postExecute(element);\r
+               ImagesUtility.removeMediaFromGallery(description, media);\r
+               return postExecute(description);\r
        }\r
 }\r
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/ChangeDescriptionElementType.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/ChangeDescriptionElementType.java
new file mode 100644 (file)
index 0000000..1407e10
--- /dev/null
@@ -0,0 +1,92 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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.operations;\r
+\r
+import java.lang.reflect.Method;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+\r
+import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
+import eu.etaxonomy.cdm.model.description.DescriptionElementBase;\r
+import eu.etaxonomy.cdm.model.description.Distribution;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.TextData;\r
+\r
+/**\r
+ * @author e.-m.lee\r
+ * @date 25.05.2010\r
+ *\r
+ */\r
+public class ChangeDescriptionElementType extends AbstractPostOperation {\r
+\r
+       private DescriptionElementBase sourceElement;\r
+       private DestinationType destinationType;\r
+       private DescriptionElementBase destinationElement;\r
+\r
+       public enum DestinationType {\r
+               TextData,\r
+               Distribution\r
+       }\r
+       \r
+       /**\r
+        * @param label\r
+        * @param undoContext\r
+        */\r
+       public ChangeDescriptionElementType(String label, DescriptionElementBase sourceType, DestinationType destinationType, IPostOperationEnabled postOperation, \r
+                       IUndoContext undoContext) {\r
+               super(label, undoContext, postOperation);\r
+               this.sourceElement = sourceType;\r
+               this.destinationType = destinationType;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               DescriptionBase inDescription = sourceElement.getInDescription();\r
+               Feature feature = sourceElement.getFeature();\r
+               switch (destinationType) {\r
+                       case TextData:          destinationElement = TextData.NewInstance();\r
+                                                               break;\r
+                       case Distribution:      destinationElement = Distribution.NewInstance();\r
+               }\r
+               destinationElement.setFeature(feature);\r
+               inDescription.addElement(destinationElement);\r
+               inDescription.removeElement(sourceElement);\r
+               return postExecute(destinationElement);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+}\r
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateNameRelationOperation.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateNameRelationOperation.java
new file mode 100644 (file)
index 0000000..bd7bef0
--- /dev/null
@@ -0,0 +1,80 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.operations;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+
+import eu.etaxonomy.cdm.model.name.NameRelationshipType;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+
+/**
+ * @author n.hoffmann
+ * @created Mar 30, 2010
+ * @version 1.0
+ */
+public class CreateNameRelationOperation extends AbstractPostOperation {
+
+
+       private static final Logger logger = Logger
+                       .getLogger(CreateNameRelationOperation.class);
+       private TaxonBase taxonBase;
+       private TaxonNameBase relatedName;
+       private NameRelationshipType type;
+
+       public CreateNameRelationOperation(String label, IUndoContext undoContext, TaxonBase taxonBase, TaxonNameBase relatedName, NameRelationshipType type, IPostOperationEnabled postOperationEnabled) {
+               super(label, undoContext, postOperationEnabled);
+               this.taxonBase = taxonBase;
+               this.relatedName = relatedName;
+               this.type = type;
+       }
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+        */
+       @Override
+       public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+                       throws ExecutionException {
+               
+               TaxonNameBase fromName = taxonBase.getName();
+               
+               fromName.addRelationshipToName(relatedName, type, null);
+               
+               return postExecute(taxonBase);
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+        */
+       @Override
+       public IStatus redo(IProgressMonitor monitor, IAdaptable info)
+                       throws ExecutionException {
+               return execute(monitor, info);
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+        */
+       @Override
+       public IStatus undo(IProgressMonitor monitor, IAdaptable info)
+                       throws ExecutionException {
+               TaxonNameBase fromName = taxonBase.getName();
+               
+               fromName.removeRelationToTaxonName(relatedName);
+               
+               return postExecute(taxonBase);
+       }
+}
@@ -26,7 +26,7 @@ import eu.etaxonomy.taxeditor.store.StoreUtil;
  * @created 02.02.2009\r
  * @version 1.0\r
  */\r
-public class CreateSynonymInExisitingHomotypicalGroupOperation extends\r
+public class CreateSynonymInExistingHomotypicalGroupOperation extends\r
                AbstractPostOperation {\r
 \r
        private HomotypicalGroup group;\r
@@ -34,7 +34,7 @@ public class CreateSynonymInExisitingHomotypicalGroupOperation extends
 \r
        private SynonymRelationship synonymRelationship;\r
        \r
-       public CreateSynonymInExisitingHomotypicalGroupOperation(String label,\r
+       public CreateSynonymInExistingHomotypicalGroupOperation(String label,\r
                        IUndoContext undoContext, Taxon taxon, HomotypicalGroup group, TaxonNameBase newSynonymName, IPostOperationEnabled postOperationEnabled) {\r
                super(label, undoContext, taxon, postOperationEnabled);\r
                this.group = group;\r
index 6a5e0602ca57e10bec811514e90816c24e13d8bc..8105c5da2212afb9b086030a776d046d45d43b25 100644 (file)
@@ -15,7 +15,10 @@ import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;\r
 import org.eclipse.core.runtime.IStatus;\r
 \r
+import eu.etaxonomy.cdm.model.description.Feature;\r
 import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
+import eu.etaxonomy.cdm.model.description.TextData;\r
+import eu.etaxonomy.cdm.model.media.Media;\r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
 import eu.etaxonomy.taxeditor.store.StoreUtil;\r
 \r
@@ -52,7 +55,13 @@ public class CreateTaxonDescriptionOperation extends AbstractPostOperation {
                description = TaxonDescription.NewInstance(taxon);\r
                monitor.worked(20);\r
 \r
-               description.setImageGallery(isImageGallery);\r
+               if(isImageGallery){\r
+                       description.setImageGallery(isImageGallery);\r
+                       // add the description element to hold the media elements for this image gallery\r
+                       TextData element = TextData.NewInstance(Feature.IMAGE());\r
+                       element.addMedia(Media.NewInstance());\r
+                       description.addElement(element);\r
+               }\r
                monitor.worked(40);\r
 \r
                return postExecute(description);\r
index 6280115b4120c3f03a9f81210ec5898f55929400..2bc18b2590ececa1c527bb4bd002e81502ce872a 100644 (file)
@@ -26,6 +26,7 @@ import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.ITreeNode;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonomicTree;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
@@ -85,7 +86,12 @@ public class CreateTaxonNodeOperation extends AbstractPersistentPostOperation {
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
                bind();
-               newTaxon.setSec(parentNode.getReference());
+               if(parentNode instanceof TaxonNode){
+                       Taxon parentTaxon = ((TaxonNode) parentNode).getTaxon();
+                       newTaxon.setSec(parentTaxon.getSec());
+               }else{
+                       newTaxon.setSec(parentNode.getReference()); 
+               }
                monitor.worked(20);
 
                // add the taxon
index c9a3e151a8d719dc9daddddaec5b6a577906fff6..60ce5cb3c6aaa2b1df1bb33cadc89f0008dab155 100644 (file)
@@ -20,13 +20,11 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.model.reference.Generic;
 import eu.etaxonomy.cdm.model.reference.ReferenceBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonomicTree;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
 
 /**
  * @author n.hoffmann
@@ -109,30 +107,4 @@ public class CreateTaxonomicTreeOperation extends AbstractPersistentPostOperatio
                // TODO Auto-generated method stub
                return null;
        }
-       
-       private TaxonomicTree createTaxonomicTreeIsolated(){
-               // get a new conversation
-               ConversationHolder conversation = CdmStore.NewTransactionalConversation();
-               try{
-                       TaxonomicTree tree = TaxonomicTree.NewInstance(treeLabel);
-                       ReferenceBase reference;
-                       if(referenceUuid == null){
-                               reference = Generic.NewInstance();
-                               reference.setTitleCache(treeLabel);
-                       }else{
-                               reference = CdmStore.getReferenceService().load(referenceUuid);
-                       }
-                       
-                       tree.setReference(reference);
-                       tree.setMicroReference(microReference);
-                       
-                       CdmStore.getTaxonTreeService().save(tree);
-                       
-                       conversation.commit(true);
-                       
-                       return tree;
-               }finally{
-                       conversation.close();
-               }
-       }
 }
similarity index 76%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteImageOperation.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteMediaOperation.java
index 0ac382be83209497de47fe4717f429373703e4a4..04a06fddb89d0e21e6bbc102fa1893f6e00a534e 100644 (file)
@@ -18,18 +18,17 @@ import org.eclipse.core.runtime.IStatus;
 \r
 import eu.etaxonomy.cdm.api.utility.ImagesUtility;\r
 import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
-import eu.etaxonomy.cdm.model.media.ImageFile;\r
+import eu.etaxonomy.cdm.model.media.Media;\r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
-import eu.etaxonomy.taxeditor.store.StoreUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
  * @created 31.03.2009\r
  * @version 1.0\r
  */\r
-public class DeleteImageOperation extends AbstractPostOperation {\r
+public class DeleteMediaOperation extends AbstractPostOperation {\r
        \r
-       private ImageFile imageFile;\r
+       private Media media;\r
 \r
        private DescriptionBase<?> description;\r
 \r
@@ -39,11 +38,11 @@ public class DeleteImageOperation extends AbstractPostOperation {
         * @param taxon\r
         * @param url\r
         */\r
-       public DeleteImageOperation(String label, IUndoContext undoContext,\r
-                       Taxon taxon, DescriptionBase<?> description, ImageFile imageFile, IPostOperationEnabled postOperationEnabled) {\r
+       public DeleteMediaOperation(String label, IUndoContext undoContext,\r
+                       Taxon taxon, DescriptionBase<?> description, Media media, IPostOperationEnabled postOperationEnabled) {\r
                super(label, undoContext, taxon, postOperationEnabled);\r
                \r
-               this.imageFile = imageFile;\r
+               this.media = media;\r
                this.description = description;\r
        }\r
 \r
@@ -55,7 +54,7 @@ public class DeleteImageOperation extends AbstractPostOperation {
                        throws ExecutionException {\r
 \r
                monitor.worked(20);\r
-       ImagesUtility.removeTaxonImage(taxon, description, imageFile);\r
+       ImagesUtility.removeMediaFromGallery(description, media);\r
                monitor.worked(40);\r
 \r
                return postExecute(null);\r
@@ -77,7 +76,7 @@ public class DeleteImageOperation extends AbstractPostOperation {
        public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
                \r
-               ImagesUtility.addTaxonImage(taxon, description, imageFile);\r
+               ImagesUtility.addMediaToGallery(description, media);\r
                \r
                return postExecute(null);\r
        }\r
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteNameRelationOperation.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteNameRelationOperation.java
new file mode 100644 (file)
index 0000000..b9de685
--- /dev/null
@@ -0,0 +1,73 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.operations;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+
+import eu.etaxonomy.cdm.model.name.NameRelationship;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+
+/**
+ * @author n.hoffmann
+ * @created Mar 30, 2010
+ * @version 1.0
+ */
+public class DeleteNameRelationOperation extends AbstractPostOperation {
+
+
+       private static final Logger logger = Logger
+                       .getLogger(DeleteNameRelationOperation.class);
+       private NameRelationship nameRelationship;
+
+       public DeleteNameRelationOperation(String label, IUndoContext undoContext, NameRelationship nameRelationship,
+                       IPostOperationEnabled postOperationEnabled) {
+               super(label, undoContext, postOperationEnabled);
+               this.nameRelationship = nameRelationship;
+       }
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+        */
+       @Override
+       public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+                       throws ExecutionException {
+               
+               TaxonNameBase fromName = nameRelationship.getFromName();
+               
+               fromName.removeRelationToTaxonName(nameRelationship.getToName());
+               
+               return postExecute(null);
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+        */
+       @Override
+       public IStatus redo(IProgressMonitor monitor, IAdaptable info)
+                       throws ExecutionException {
+               return execute(monitor, info);
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+        */
+       @Override
+       public IStatus undo(IProgressMonitor monitor, IAdaptable info)
+                       throws ExecutionException {
+               // TODO Auto-generated method stub
+               return null;
+       }
+}
similarity index 55%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/MoveImageInListOperation.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/MoveMediaInListOperation.java
index 96400e01b170f7bf73939ef0b1cfea1a37442746..d02972315ccbff2c96438f1e35bfa16cdf35b820 100644 (file)
@@ -9,27 +9,37 @@
 \r
 package eu.etaxonomy.taxeditor.operations;\r
 \r
+import java.util.Collections;\r
+import java.util.List;\r
+import java.util.Set;\r
+\r
+import org.apache.log4j.Logger;\r
 import org.eclipse.core.commands.ExecutionException;\r
 import org.eclipse.core.commands.operations.IUndoContext;\r
 import org.eclipse.core.runtime.IAdaptable;\r
 import org.eclipse.core.runtime.IProgressMonitor;\r
 import org.eclipse.core.runtime.IStatus;\r
 \r
-import eu.etaxonomy.cdm.api.utility.ImagesUtility;\r
+import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;\r
-import eu.etaxonomy.cdm.model.media.ImageFile;\r
+import eu.etaxonomy.cdm.model.media.Media;\r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
-import eu.etaxonomy.taxeditor.store.StoreUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
  * @created 05.02.2009\r
  * @version 1.0\r
  */\r
-public class MoveImageInListOperation extends AbstractPostOperation {\r
+public class MoveMediaInListOperation extends AbstractPostOperation {\r
 \r
-       private DescriptionElementBase element;\r
-       private ImageFile image;\r
+       private static final Logger logger = Logger\r
+               .getLogger(MoveMediaInListOperation.class);\r
+       \r
+       public static final int UP = 1;\r
+       public static final int DOWN = -1;\r
+       \r
+       private DescriptionBase description;\r
+       private Media media;\r
        private int direction;\r
 \r
        /**\r
@@ -41,13 +51,13 @@ public class MoveImageInListOperation extends AbstractPostOperation {
         * @param i \r
         * @param editor\r
         */\r
-       public MoveImageInListOperation(String label, IUndoContext undoContext,\r
-                       Taxon taxon, DescriptionElementBase element, ImageFile image,\r
+       public MoveMediaInListOperation(String label, IUndoContext undoContext,\r
+                       Taxon taxon, DescriptionBase description, Media media,\r
                        int direction, IPostOperationEnabled postOperationEnabled) {\r
                super(label, undoContext, taxon, postOperationEnabled);\r
                \r
-               this.element = element;\r
-               this.image = image;\r
+               this.description = description;\r
+               this.media = media;\r
                this.direction = direction;\r
        }\r
 \r
@@ -59,10 +69,11 @@ public class MoveImageInListOperation extends AbstractPostOperation {
                        throws ExecutionException {\r
 \r
                monitor.worked(20);\r
-       ImagesUtility.moveImage(element, image, direction);\r
+               \r
+               moveMedia(description, media, direction);\r
                monitor.worked(40);\r
 \r
-               return postExecute(image);\r
+               return postExecute(media);\r
        }\r
 \r
        /* (non-Javadoc)\r
@@ -80,7 +91,34 @@ public class MoveImageInListOperation extends AbstractPostOperation {
        @Override\r
        public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
-               ImagesUtility.moveImage(element, image, direction * -1);\r
-               return postExecute(null);\r
+               moveMedia(description, media, direction * -1);\r
+               return postExecute(media);\r
+       }\r
+       \r
+       private void moveMedia(DescriptionBase description, Media media, int direction){\r
+               Set<DescriptionElementBase> elements = description.getElements();\r
+               \r
+               if(elements.size() != 1){\r
+                       logger.error("More than one description element in this image gallery");\r
+               }\r
+               \r
+               DescriptionElementBase element = elements.iterator().next();\r
+               \r
+               List<Media> medias = element.getMedia();\r
+               \r
+               int index = medias.indexOf(media);\r
+               int newIndex = index + direction;\r
+               \r
+               if(index < 0){\r
+                       return;\r
+               }\r
+               \r
+               if (newIndex >= 0 && newIndex < medias.size()) {\r
+                       try{\r
+                               Collections.swap(medias, newIndex, index);\r
+                       }catch(ArrayIndexOutOfBoundsException e){\r
+                               logger.error("", e);\r
+                       }\r
+               }       \r
        }\r
 }\r
index a545ac6a87bd8403449a29f624d1d912bc483bba..6fe3135429591996af0d9d925386ab424c7770c3 100644 (file)
@@ -255,7 +255,9 @@ public class ParseHandler{
                if(duplicateCombinationAuthorTeams.size() > 0){
                        name.setCombinationAuthorTeam(duplicateCombinationAuthorTeams.iterator().next());
                        ReferenceBase reference = (ReferenceBase) name.getNomenclaturalReference();
-                       reference.setAuthorTeam(duplicateCombinationAuthorTeams.iterator().next());
+                       if(reference != null){
+                               reference.setAuthorTeam(duplicateCombinationAuthorTeams.iterator().next());
+                       }
                        // FIXME TODO resolve multiple duplications. We use first match for a start.
                }
                
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/InitializeDbPreferences.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/InitializeDbPreferences.java
deleted file mode 100644 (file)
index d58342c..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/**\r
-* Copyright (C) 2007 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
-\r
-package eu.etaxonomy.taxeditor.preference;\r
-\r
-import org.eclipse.jface.preference.PreferencePage;\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.events.SelectionAdapter;\r
-import org.eclipse.swt.events.SelectionEvent;\r
-import org.eclipse.swt.layout.GridLayout;\r
-import org.eclipse.swt.widgets.Button;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Control;\r
-import org.eclipse.ui.IWorkbench;\r
-import org.eclipse.ui.IWorkbenchPreferencePage;\r
-\r
-import eu.etaxonomy.taxeditor.model.Resources;\r
-\r
-/**\r
- * @author p.ciardelli\r
- * @created 01.07.2008\r
- * @version 1.0\r
- */\r
-public class InitializeDbPreferences extends PreferencePage implements\r
-               IWorkbenchPreferencePage {\r
-\r
-       public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.preferences.initdb";\r
-\r
-       private Button btnInit;\r
-//     private Button btnTestData;\r
-       \r
-       public InitializeDbPreferences() {\r
-               super();\r
-               setDescription("If you choose this option, taxonomic tree will be empty next time the Editor is started.");\r
-       }\r
-\r
-       /**\r
-        * Create contents of the preference page\r
-        * @param parent\r
-        */\r
-       @Override\r
-       public Control createContents(Composite parent) {\r
-\r
-               Composite container = new Composite(parent, SWT.NULL);\r
-               container.setLayout(new GridLayout());\r
-\r
-               btnInit = new Button(container, SWT.CHECK);\r
-               btnInit.setText("Initialize datastore on next application start");\r
-               btnInit.addSelectionListener(new SelectionAdapter() {\r
-\r
-                       @Override\r
-                       public void widgetSelected(SelectionEvent e) {\r
-                               if (btnInit.getSelection() == true) {\r
-                                       \r
-                                       // Enable test data option\r
-//                                     btnTestData.setEnabled(true);\r
-                                       \r
-                               } else {\r
-                               \r
-                                       // Disable test data option, set selected to "false"\r
-//                                     btnTestData.setEnabled(false);\r
-//                                     btnTestData.setSelection(false);\r
-                               }\r
-                       }\r
-                       \r
-               });\r
-               \r
-               return container;\r
-       }\r
-\r
-       /**\r
-        * Initialize the preference page\r
-        */\r
-       public void init(IWorkbench workbench) {\r
-               setPreferenceStore(PreferencesUtil.getPreferenceStore());\r
-       }\r
-       \r
-       @Override\r
-       protected void performDefaults() {\r
-               btnInit.setSelection(false);\r
-//             btnTestData.setSelection(false);\r
-               super.performDefaults();\r
-       }\r
-       \r
-       @Override       \r
-       public boolean performOk() {\r
-               boolean doReinitialize = !(btnInit.getSelection());\r
-//             boolean doInitTestdata = btnTestData.getSelection();\r
-               \r
-               PreferencesUtil.getPreferenceStore().setValue(Resources.INITIALIZED, doReinitialize);\r
-//             UiUtil.getPrefStore().setValue(ITaxEditorConstants.INITIALIZE_W_TESTDATA, doInitTestdata);              \r
-               return true;\r
-       }\r
-}\r
index 0f5b45f20286ac78708a2599d36322921f4b129e..78e767cffba5e97baf37d6a4298d0f570efc2056 100644 (file)
@@ -15,12 +15,16 @@ import java.util.List;
 import java.util.Set;\r
 \r
 import org.apache.log4j.Logger;\r
+import org.eclipse.jface.dialogs.Dialog;\r
+import org.eclipse.jface.dialogs.MessageDialog;\r
 import org.eclipse.jface.preference.IPreferenceStore;\r
+import org.eclipse.swt.widgets.Shell;\r
 import org.eclipse.ui.IEditorInput;\r
 \r
 import eu.etaxonomy.cdm.api.service.config.ITaxonServiceConfigurator;\r
 import eu.etaxonomy.cdm.api.service.config.impl.TaxonServiceConfiguratorImpl;\r
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;\r
+import eu.etaxonomy.cdm.model.common.AnnotationType;\r
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
 import eu.etaxonomy.cdm.model.common.ExtensionType;\r
 import eu.etaxonomy.cdm.model.common.ICdmBase;\r
@@ -30,8 +34,10 @@ import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.common.TermBase;\r
 import eu.etaxonomy.cdm.model.description.Feature;\r
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;\r
+import eu.etaxonomy.cdm.model.location.NamedAreaType;\r
 import eu.etaxonomy.cdm.model.media.RightsTerm;\r
 import eu.etaxonomy.cdm.model.name.NameRelationshipType;\r
+import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;\r
 import eu.etaxonomy.cdm.model.name.NomenclaturalCode;\r
 import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;\r
 import eu.etaxonomy.cdm.model.name.Rank;\r
@@ -42,6 +48,7 @@ import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
 import eu.etaxonomy.cdm.strategy.match.MatchException;\r
 import eu.etaxonomy.cdm.strategy.match.MatchMode;\r
 import eu.etaxonomy.taxeditor.model.NomenclaturalCodeHelper;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
 import eu.etaxonomy.taxeditor.store.VocabularyStore;\r
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;\r
 \r
@@ -62,7 +69,7 @@ public class PreferencesUtil {
        public static final String TAXON_SERVICE_CONFIGURATOR_NAMES = "taxonServiceConfigurator.doNamesWithoutTaxa";\r
        public static final String TAXON_SERVICE_CONFIGURATOR_COMMON_NAMES = "taxonServiceConfigurator.doTaxaByCommonNames";\r
        \r
-       public static final String SHOW_DATASOURCE_CHOOSER = "dataSourceChooser.show";\r
+       public static final String SHOW_DEBUG_INFORMATION = "showDebugInformation";\r
 \r
        public static final String PREFERRED_TERMS_CHANGE = "preferred_terms";\r
 \r
@@ -72,6 +79,10 @@ public class PreferencesUtil {
        \r
        public static final String MATCH_STRATEGY_PREFIX = "matchStrategy.";\r
        \r
+       public static final String EDIT_MAP_SERVICE_ACCES_POINT = "editMapServiceAccessPoint";\r
+       \r
+       public static final String SHOULD_CONNECT_AT_STARTUP = "shouldConnectAtStartup";\r
+       \r
        /**\r
         * \r
         * @return\r
@@ -188,6 +199,12 @@ public class PreferencesUtil {
                return DefaultMatchStrategy.NewInstance(clazz);\r
        }\r
        \r
+       \r
+       public static String getDateFormatPattern(){\r
+               // TODO make this configurable in properties\r
+               String pattern = "Y-M-d H:m";\r
+               return pattern;\r
+       }\r
        /**\r
         * Generic method to get term preferences for a term vocabulary\r
         * \r
@@ -226,13 +243,13 @@ public class PreferencesUtil {
        }\r
        \r
        \r
-       /** @return a <code>List</code> containing user preferred <code>Feature</code> terms */\r
+       /** @return a <code>List</code> containing user preferred <code>SpecimenTypeDesignationStatus</code> terms */\r
        public static List<SpecimenTypeDesignationStatus> getPreferredSpecimenTypeDesignationStatus() { return getPreferredTerms(VocabularyStore.getSpecimenTypeDesignationStatus());}\r
 \r
-       /** @return a <code>List</code> containing user preferred <code>Feature</code> terms */\r
-       public static List<SpecimenTypeDesignationStatus> getPreferredNameTypeDesignationStatus() { return getPreferredTerms(VocabularyStore.getNameTypeDesignationStatus());}\r
+       /** @return a <code>List</code> containing user preferred <code>NameTypeDesignationStatus</code> terms */\r
+       public static List<NameTypeDesignationStatus> getPreferredNameTypeDesignationStatus() { return getPreferredTerms(VocabularyStore.getNameTypeDesignationStatus()); }\r
        \r
-       /** @return a <code>List</code> containing user preferred <code>Feature</code> terms */\r
+       /** @return a <code>List</code> containing user preferred <code>TaxonRelationshipTypes</code> terms */\r
        public static List<TaxonRelationshipType> getPreferredTaxonRelationshipTypes() { return getPreferredTerms(VocabularyStore.getTaxonRelationshipTypes());}\r
        \r
        /** @return a <code>List</code> containing user preferred <code>Feature</code> terms */\r
@@ -242,7 +259,7 @@ public class PreferencesUtil {
        public static List<Rank> getPreferredRanks() { return getPreferredTerms(VocabularyStore.getRanks());}\r
        \r
        /** @return a <code>List</code> containing user preferred  <code>PresenceAbsenceTermBase</code> terms */\r
-       public static List<PresenceAbsenceTermBase<PresenceAbsenceTermBase<?>>> getPreferredPresenceAbsenceTerms(){ return getPreferredTerms(VocabularyStore.getPresenceAbsenceTerms());}\r
+       public static List<PresenceAbsenceTermBase> getPreferredPresenceAbsenceTerms(){ return getPreferredTerms(VocabularyStore.getPresenceAbsenceTerms());}\r
        \r
        /** @return a <code>List</code> containing user preferred  <code>NomenclaturalStatusType</code> terms */\r
        public static List<NomenclaturalStatusType> getPreferredNomenclaturalStatusTypes(){     return getPreferredTerms(VocabularyStore.getNomenclaturalStatusTypes());}\r
@@ -262,6 +279,12 @@ public class PreferencesUtil {
        /** @return     a <code>List</code> containing user preferred  <code>RightsType</code> terms  */\r
        public static List<RightsTerm> getPreferredRightsTypes() {      return getPreferredTerms(VocabularyStore.getRightsTypes());}\r
        \r
+       /** @return     a <code>List</code> containing user preferred  <code>NamedAreaType</code> terms  */\r
+       public static List<NamedAreaType> getPreferredNamedAreaTypes() { return getPreferredTerms(VocabularyStore.getNamedAreaTypes()); } \r
+       \r
+       /** @return     a <code>List</code> containing user preferred  <code>AnnotationType</code> terms  */\r
+       public static List<AnnotationType> getPreferredAnnotationTypes() { return getPreferredTerms(VocabularyStore.getAnnotationTypes()); } \r
+       \r
        \r
        /**\r
         * Generic method to set term preferences\r
@@ -275,6 +298,15 @@ public class PreferencesUtil {
                }\r
        }\r
        \r
+       public static <T extends TermBase> void addTermToPreferredTerms(T term){\r
+\r
+//             VocabularyEnum vocabulary = VocabularyEnum.getVocabularyEnum(term.getClass());\r
+//             \r
+//             getPreferenceStore().setValue(getPreferenceKey(term), VocabularyStore.getTermVocabulary(vocabulary).getTerms().contains(term));\r
+//             \r
+//             firePreferencesChanged(term.getClass());\r
+       }\r
+       \r
        /**\r
         * Construct a unique key using the CdmBase object's uuid\r
         * \r
@@ -341,6 +373,9 @@ public class PreferencesUtil {
                configurator.setTaxonPropertyPath(Arrays.asList("$", \r
                                "titleCache", "name", "name.$"));\r
                \r
+               configurator.setSynonymPropertyPath(Arrays.asList("$", \r
+                               "titleCache", "name", "name.$", "synonymRelations.relatedTo.*"));\r
+               \r
                // DEFAULT VALUES               \r
                // match mode default only\r
                configurator.setMatchMode(eu.etaxonomy.cdm.persistence.query.MatchMode.BEGINNING);\r
@@ -379,5 +414,34 @@ public class PreferencesUtil {
        public static void setDefaults() {\r
                getPreferenceStore().setDefault(TAXON_SERVICE_CONFIGURATOR_TAXA, true);\r
                getPreferenceStore().setDefault(TAXON_SERVICE_CONFIGURATOR_SYNONYMS, true);\r
+               getPreferenceStore().setDefault(EDIT_MAP_SERVICE_ACCES_POINT, "http://edit.br.fgov.be/edit_wp5/v1/areas.php");\r
+       }\r
+\r
+       public static void checkNomenclaturalCode() {   \r
+               // First time Editor is opened, no nomenclatural code has been set\r
+               if (PreferencesUtil.getPreferredNomenclaturalCode() == null) {\r
+\r
+                       logger.info("No nomencatural code set.");\r
+                       \r
+                       Shell shell = StoreUtil.getShell();\r
+                       \r
+                       // Query user re: preferred nom. code\r
+                       Dialog dialog = new InitNomenclaturalCodePrefDialog(shell);\r
+                       dialog.open();\r
+                       \r
+                       // Short message confirming user's choice\r
+                       NomenclaturalCode code = PreferencesUtil.getPreferredNomenclaturalCode();\r
+                       MessageDialog.openInformation(shell, "Nomenclatural code set", \r
+                                       "The following has been set as your preferred nomenclatural code:\n\n\t" + \r
+                                       NomenclaturalCodeHelper.getDescription(code) + "\n\nYou can change the nomenclatural code at any time in the \"Preferences\" menu.");\r
+               }\r
+       }\r
+\r
+       public static String getMapServiceAccessPoint() {\r
+               return getPreferenceStore().getString(EDIT_MAP_SERVICE_ACCES_POINT);\r
+       }\r
+\r
+       public static boolean shouldConnectAtStartUp() {\r
+               return getPreferenceStore().getBoolean(SHOULD_CONNECT_AT_STARTUP);\r
        }\r
 }\r
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/Resources.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/Resources.java
new file mode 100644 (file)
index 0000000..63ce860
--- /dev/null
@@ -0,0 +1,52 @@
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.preference;
+
+
+
+/**
+ * This interface provides convenient access to the theme resources defined in this packages plugin.xml
+ * 
+ * @author n.hoffmann
+ * @created 18.03.2009
+ * @version 1.0
+ */
+public interface Resources {
+       
+       /* ***************************************************************************************
+       FONTS
+       ************************************************************************************** */       
+       public static final String ACCEPTED_TAXON_FONT = "eu.etaxonomy.taxeditor.preferences.fontDefinition.nameEditor.accepted";
+       public static final String SYNONYM_FONT = "eu.etaxonomy.taxeditor.preferences.fontDefinition.nameEditor.synonym";
+       public static final String MISAPPLIEDNAME_FONT = "eu.etaxonomy.taxeditor.preferences.fontDefinition.nameEditor.misapplication";
+       public static final String CONCEPT_FONT = "eu.etaxonomy.taxeditor.preferences.fontDefinition.nameEditor.concept";
+       public static final String FONT_DEFAULT_PROMPT = "eu.etaxonomy.taxeditor.preferences.fontDefinition.nameEditor.default";
+       
+       public static final String FONT_SEARCH_VIEW_ACCEPTED = "eu.etaxonomy.taxeditor.preferences.fontDefinition.searchView.accepted";
+       public static final String FONT_SEARCH_VIEW_SYNONYM = "eu.etaxonomy.taxeditor.preferences.fontDefinition.searchView.synonym";
+       public static final String FONT_SEARCH_VIEW_OTHER = "eu.etaxonomy.taxeditor.preferences.fontDefinition.searchView.other";
+       
+       /* ***************************************************************************************
+       COLORS
+       ************************************************************************************** */
+       public static final String COLOR_COMPOSITE_BACKGROUND = "eu.etaxonomy.taxeditor.preferences.colorDefinition.nameEditor.colorCompositeBackground";
+       public static final String COLOR_COMPOSITE_SELECTED = "eu.etaxonomy.taxeditor.preferences.colorDefinition.nameEditor.colorCompositeSelected";
+       public static final String COLOR_COMPOSITE_IRRELEVANT = "eu.etaxonomy.taxeditor.preferences.colorDefinition.colorCompositeIrrelevant";
+       
+       public static final String SEARCH_VIEW_FOREGROUND = "eu.etaxonomy.taxeditor.preferences.colorDefinition.searchView.foreground";
+       public static final String SEARCH_VIEW_FOCUS = "eu.etaxonomy.taxeditor.preferences.colorDefinition.searchView.focus";
+
+       public static final String COLOR_LIST_BACKGROUND = "eu.etaxonomy.taxeditor.preferences.colorDefinition.listBackground";
+       public static final String COLOR_FONT_DEFAULT = "eu.etaxonomy.taxeditor.preferences.colorDefinition.textDefault";
+       public static final String COLOR_TEXT_DISABLED = "eu.etaxonomy.taxeditor.preferences.colorDefinition.textDisabled";
+       public static final String COLOR_TEXT_DISABLED_BACKGROUND = "eu.etaxonomy.taxeditor.preferences.colorDefinition.textBackgroundDisabled";
+       
+       
+}
index 551783ae486ac4609d149784f2a76338ae566886..38facfcf7b89a4529780a2eae13eb572a2ce0d32 100644 (file)
@@ -14,6 +14,8 @@ import org.apache.log4j.Logger;
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.layout.GridData;
@@ -22,6 +24,7 @@ import org.eclipse.swt.layout.RowLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
 
@@ -34,8 +37,13 @@ public class TaxonomicEditorGeneralPreferences extends PreferencePage implements
                IWorkbenchPreferencePage {
        private static final Logger logger = Logger
                        .getLogger(TaxonomicEditorGeneralPreferences.class);
-       private Button button_toggle;
 
+       boolean showUuidInSupplementalView;
+
+       private String editMapServiceAccessPoint;
+
+       private boolean shouldConnectAtStartup;
+       
        /* (non-Javadoc)
         * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
         */
@@ -45,22 +53,45 @@ public class TaxonomicEditorGeneralPreferences extends PreferencePage implements
                final GridLayout gridLayout = new GridLayout();
                container.setLayout(gridLayout);
                
-               getShowDatasourceLauncher(container);
+               createShowUuidInSupplementalView(container);
+               createMapServiceAccessPoint(container);
+               createShouldConnectAtStartUp(container);
                
                return container;
        }
 
-       private Control getShowDatasourceLauncher(Composite parent){
-               Composite toggle = new Composite(parent, SWT.NULL);
-               toggle.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
-               toggle.setLayout(new RowLayout(SWT.HORIZONTAL));
+       private void createMapServiceAccessPoint(Composite composite) {
+               editMapServiceAccessPoint = PreferencesUtil.getMapServiceAccessPoint();
+               
+//             Composite composite = createComposite(parent);
+               
+               CLabel label = new CLabel(composite, SWT.NULL);
+               label.setText("EDIT Map Service Access Point:");
                
-               button_toggle = new Button(toggle, SWT.CHECK);          
+               final Text text = new Text(composite, SWT.BORDER);
+               text.setText(editMapServiceAccessPoint);
+               text.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+               
+               text.addModifyListener(new ModifyListener() {
+                       
+                       public void modifyText(ModifyEvent e) {
+                               editMapServiceAccessPoint = text.getText();
+                       }
+               });
+       }
+
+       private void createShowUuidInSupplementalView(Composite parent){
+               showUuidInSupplementalView = getPreferenceStore().getBoolean(PreferencesUtil.SHOW_DEBUG_INFORMATION);
                
-               CLabel label_info = new CLabel(toggle, SWT.NULL);
-               label_info.setText("Show datasource selection dialog when editor starts.");
+               Composite composite = createComposite(parent);
+               
+               final Button button_toggle = new Button(composite, SWT.CHECK);          
+               
+               
+               button_toggle.setText("Show UUID and object ID in supplemental data view.");
+               
+               button_toggle.setSelection(showUuidInSupplementalView);
                
-               button_toggle.setSelection(getPreferenceStore().getBoolean(PreferencesUtil.SHOW_DATASOURCE_CHOOSER));
                
                button_toggle.addSelectionListener(new SelectionAdapter(){
                        /* (non-Javadoc)
@@ -68,12 +99,41 @@ public class TaxonomicEditorGeneralPreferences extends PreferencePage implements
                         */
                        @Override
                        public void widgetSelected(SelectionEvent e) {
-                               super.widgetSelected(e);
-                               getPreferenceStore().setValue(PreferencesUtil.SHOW_DATASOURCE_CHOOSER, button_toggle.getSelection());
+                               showUuidInSupplementalView = button_toggle.getSelection();
                        }
                });
                
-               return toggle;
+       }
+       
+       private void createShouldConnectAtStartUp(Composite parent){
+               shouldConnectAtStartup = getPreferenceStore().getBoolean(PreferencesUtil.SHOULD_CONNECT_AT_STARTUP);
+               
+               Composite composite = createComposite(parent);
+               
+               final Button button_toggle = new Button(composite, SWT.CHECK);          
+               
+               
+               button_toggle.setText("Connect to last used datasource when launching.");
+               
+               button_toggle.setSelection(shouldConnectAtStartup);
+               
+               
+               button_toggle.addSelectionListener(new SelectionAdapter(){
+                       /* (non-Javadoc)
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+                        */
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               shouldConnectAtStartup = button_toggle.getSelection();
+                       }
+               });
+       }
+       
+       private Composite createComposite(Composite parent){
+               Composite composite = new Composite(parent, SWT.NULL);
+               composite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
+               composite.setLayout(new RowLayout(SWT.HORIZONTAL));
+               return composite;
        }
        
        /* (non-Javadoc)
@@ -83,5 +143,13 @@ public class TaxonomicEditorGeneralPreferences extends PreferencePage implements
                setPreferenceStore(PreferencesUtil.getPreferenceStore());
        }
 
-
+       @Override
+       public boolean performOk() {            
+               
+               getPreferenceStore().setValue(PreferencesUtil.SHOW_DEBUG_INFORMATION, showUuidInSupplementalView);
+               getPreferenceStore().setValue(PreferencesUtil.EDIT_MAP_SERVICE_ACCES_POINT, editMapServiceAccessPoint);
+               getPreferenceStore().setValue(PreferencesUtil.SHOULD_CONNECT_AT_STARTUP, shouldConnectAtStartup);
+               
+               return super.performOk();
+       }
 }
index db9d1cc644023f75af947e97e62e100b8eaf32fc..c061e0ca072d89f3880cdf04fec234cd374ca06c 100644 (file)
@@ -18,7 +18,7 @@ import org.eclipse.swt.events.SelectionEvent;
 
 import eu.etaxonomy.cdm.model.common.ExtensionType;
 import eu.etaxonomy.cdm.model.common.VocabularyEnum;
-import eu.etaxonomy.taxeditor.preference.wizards.VocabularyTermWizard;
+import eu.etaxonomy.taxeditor.preference.wizard.VocabularyTermWizard;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.store.VocabularyStore;
 
@@ -64,4 +64,4 @@ public class ExtensionTypeMenuPreferences extends AbstractMenuPreferences<Extens
                        }
                });
        }
-}
+}
\ No newline at end of file
index 3d7a85473b0a196765e2ddfd5e3ef8a360478fa2..5e9c4ecff714547e9b2d4bc6c5d54c1e576b7ee3 100644 (file)
-/**\r
-* Copyright (C) 2007 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.preference.menu;\r
-\r
-import org.eclipse.jface.viewers.StructuredSelection;\r
-import org.eclipse.jface.wizard.WizardDialog;\r
-import org.eclipse.swt.events.MouseAdapter;\r
-import org.eclipse.swt.events.MouseEvent;\r
-import org.eclipse.swt.events.SelectionAdapter;\r
-import org.eclipse.swt.events.SelectionEvent;\r
-\r
-import eu.etaxonomy.cdm.model.common.VocabularyEnum;\r
-import eu.etaxonomy.cdm.model.description.Feature;\r
-import eu.etaxonomy.taxeditor.preference.wizards.VocabularyTermWizard;\r
-import eu.etaxonomy.taxeditor.store.StoreUtil;\r
-import eu.etaxonomy.taxeditor.store.VocabularyStore;\r
-\r
-/**\r
- * @author p.ciardelli\r
- * @created 17.09.2008\r
- * @version 1.0\r
- * @author n.hoffmann\r
- */\r
-public class FeatureMenuPreferences extends AbstractMenuPreferences<Feature> {\r
-\r
-       public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.preferences.feature";\r
-       \r
-       public FeatureMenuPreferences() {\r
-               super(VocabularyStore.getFeatures(), \r
-                               "Feature Preferences", \r
-                               "Choose which features you would like to use for descriptive elements.", \r
-                               true);\r
-       }\r
-       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.taxeditor.preference.AbstractMenuPreferences#addEditButtonListeners()\r
-        * \r
-        * TODO refactor into superclass\r
-        */\r
-       @Override\r
-       protected void addNewButtonListeners() {\r
-               newButton.addSelectionListener(new SelectionAdapter(){\r
-                       /* (non-Javadoc)\r
-                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
-                        */\r
-                       @Override\r
-                       public void widgetSelected(SelectionEvent e) {\r
-                               super.widgetSelected(e);\r
-                               VocabularyTermWizard<Feature> wizard = new VocabularyTermWizard<Feature>(VocabularyEnum.Feature); \r
-                               \r
-                               WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);\r
-                           dialog.open();\r
-                           \r
-                           tableViewer.setInput(VocabularyStore.getFeatures());\r
-                       }\r
-               });\r
-       }\r
-       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.taxeditor.preference.AbstractMenuPreferences#addEditButtonListeners()\r
-        */\r
-       @Override\r
-       protected void addEditButtonListeners() {\r
-               editButton.addSelectionListener(new SelectionAdapter(){\r
-                       /* (non-Javadoc)\r
-                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
-                        */\r
-                       @Override\r
-                       public void widgetSelected(SelectionEvent e) {\r
-                               super.widgetSelected(e);\r
-                               Feature selection = (Feature) ((StructuredSelection) tableViewer.getSelection()).getFirstElement();\r
-                               \r
-                               VocabularyTermWizard<Feature> wizard = new VocabularyTermWizard<Feature>(VocabularyEnum.Feature, selection); \r
-                               \r
-                               WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);\r
-                           dialog.open();\r
-                           \r
-                           tableViewer.setInput(VocabularyStore.getFeatures());\r
-                           tableViewer.reveal(selection);\r
-                       }\r
-               });\r
-       }\r
-       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.taxeditor.preference.AbstractMenuPreferences#addEditButtonListeners()\r
-        * \r
-        * TODO refactor into superclass\r
-        */\r
-//     @Override\r
-//     protected void addDeleteButtonListeners() {\r
-//             removeButton.addMouseListener(new MouseAdapter(){\r
-//\r
-//                     /* (non-Javadoc)\r
-//                      * @see org.eclipse.swt.events.MouseAdapter#mouseUp(org.eclipse.swt.events.MouseEvent)\r
-//                      */\r
-//                     @Override\r
-//                     public void mouseUp(MouseEvent e) {\r
-//                             super.mouseUp(e);\r
-//\r
-//                             Feature selected = (Feature) ((StructuredSelection) tableViewer.getSelection()).getFirstElement();\r
-//                         \r
-//                             VocabularyStore.delete(selected);\r
-//                             \r
-//                             \r
-//                         tableViewer.setInput(VocabularyStore.getFeatures());\r
-//                     }\r
-//                     \r
-//             });\r
-//     }\r
-}\r
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.preference.menu;
+
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+
+import eu.etaxonomy.cdm.model.common.VocabularyEnum;
+import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.taxeditor.preference.wizard.VocabularyTermWizard;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.store.VocabularyStore;
+
+/**
+ * @author p.ciardelli
+ * @created 17.09.2008
+ * @version 1.0
+ * @author n.hoffmann
+ */
+public class FeatureMenuPreferences extends AbstractMenuPreferences<Feature> {
+
+       public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.preferences.feature";
+       
+       public FeatureMenuPreferences() {
+               super(VocabularyStore.getFeatures(), 
+                               "Feature Preferences", 
+                               "Choose which features you would like to use for descriptive elements.", 
+                               true);
+       }
+       
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.preference.AbstractMenuPreferences#addEditButtonListeners()
+        * 
+        * TODO refactor into superclass
+        */
+       @Override
+       protected void addNewButtonListeners() {
+               newButton.addSelectionListener(new SelectionAdapter(){
+                       /* (non-Javadoc)
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+                        */
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               super.widgetSelected(e);
+                               VocabularyTermWizard<Feature> wizard = new VocabularyTermWizard<Feature>(VocabularyEnum.Feature); 
+                               
+                               WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);
+                           dialog.open();
+                           
+                           tableViewer.setInput(VocabularyStore.getFeatures());
+                       }
+               });
+       }
+       
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.preference.AbstractMenuPreferences#addEditButtonListeners()
+        */
+       @Override
+       protected void addEditButtonListeners() {
+               editButton.addSelectionListener(new SelectionAdapter(){
+                       /* (non-Javadoc)
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+                        */
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               super.widgetSelected(e);
+                               Feature selection = (Feature) ((StructuredSelection) tableViewer.getSelection()).getFirstElement();
+                               
+                               VocabularyTermWizard<Feature> wizard = new VocabularyTermWizard<Feature>(VocabularyEnum.Feature, selection); 
+                               
+                               WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);
+                           dialog.open();
+                           
+                           tableViewer.setInput(VocabularyStore.getFeatures());
+                           tableViewer.reveal(selection);
+                       }
+               });
+       }
+       
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.preference.AbstractMenuPreferences#addEditButtonListeners()
+        * 
+        * TODO refactor into superclass
+        */
+//     @Override
+//     protected void addDeleteButtonListeners() {
+//             removeButton.addMouseListener(new MouseAdapter(){
+//
+//                     /* (non-Javadoc)
+//                      * @see org.eclipse.swt.events.MouseAdapter#mouseUp(org.eclipse.swt.events.MouseEvent)
+//                      */
+//                     @Override
+//                     public void mouseUp(MouseEvent e) {
+//                             super.mouseUp(e);
+//
+//                             Feature selected = (Feature) ((StructuredSelection) tableViewer.getSelection()).getFirstElement();
+//                         
+//                             VocabularyStore.delete(selected);
+//                             
+//                             
+//                         tableViewer.setInput(VocabularyStore.getFeatures());
+//                     }
+//                     
+//             });
+//     }
+}
\ No newline at end of file
index 87df4f2effd92ebc802861d364601b9c67c1fc8c..b80188bc0e9f8cab3cfa2f2dfbdb81d695aa0f1c 100644 (file)
@@ -1,78 +1,78 @@
-// $Id$\r
-/**\r
-* Copyright (C) 2007 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
-\r
-package eu.etaxonomy.taxeditor.preference.menu;\r
-\r
-import org.eclipse.jface.viewers.ITableLabelProvider;\r
-import org.eclipse.jface.viewers.LabelProvider;\r
-import org.eclipse.jface.viewers.ViewerComparator;\r
-import org.eclipse.swt.graphics.Image;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Control;\r
-\r
-import eu.etaxonomy.cdm.model.common.Language;\r
-import eu.etaxonomy.taxeditor.store.VocabularyStore;\r
-\r
-/**\r
- * @author p.ciardelli\r
- * @created 24.08.2009\r
- * @version 1.0\r
- */\r
-public class LanguageMenuPreferences extends AbstractMenuPreferences<Language> {\r
-       \r
-       public final static String ID = "eu.etaxonomy.taxeditor.preferences.languages";\r
-       \r
-       /**\r
-        * @param initialVocabulary\r
-        * @param title\r
-        * @param description\r
-        */\r
-       public LanguageMenuPreferences() {\r
-               super(VocabularyStore.getLanguages(), \r
-                               "Language Preferences", \r
-                               "Configure language preferences.",\r
-                               false);\r
-       }\r
-       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.taxeditor.preference.AbstractMenuPreferences#createContents(org.eclipse.swt.widgets.Composite)\r
-        */\r
-       @Override\r
-       public Control createContents(Composite parent) {\r
-               Control control = super.createContents(parent);\r
-               \r
-               tableViewer.setLabelProvider(new LanguagePreferenceLabelProvider());\r
-               tableViewer.setComparator(new ViewerComparator());\r
-               \r
-               return control;\r
-       }\r
-               \r
-       class LanguagePreferenceLabelProvider extends LabelProvider implements ITableLabelProvider{\r
-\r
-               /* (non-Javadoc)\r
-                * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)\r
-                */\r
-               public Image getColumnImage(Object element, int columnIndex) {\r
-                       return null;\r
-               }\r
-\r
-               /* (non-Javadoc)\r
-                * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)\r
-                */\r
-               public String getColumnText(Object element, int columnIndex) {\r
-                       String description = ((Language)element).getDescription();\r
-                       if (description == null) {\r
-                               description = ((Language)element).getLabel() + " - Warning: no description - not shown in menus";\r
-                       }\r
-                       return description;\r
-               }\r
-               \r
-               }\r
-}\r
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.preference.menu;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.taxeditor.store.VocabularyStore;
+
+/**
+ * @author p.ciardelli
+ * @created 24.08.2009
+ * @version 1.0
+ */
+public class LanguageMenuPreferences extends AbstractMenuPreferences<Language> {
+       
+       public final static String ID = "eu.etaxonomy.taxeditor.preferences.languages";
+       
+       /**
+        * @param initialVocabulary
+        * @param title
+        * @param description
+        */
+       public LanguageMenuPreferences() {
+               super(VocabularyStore.getLanguages(), 
+                               "Language Preferences", 
+                               "Configure language preferences.",
+                               false);
+       }
+       
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.preference.AbstractMenuPreferences#createContents(org.eclipse.swt.widgets.Composite)
+        */
+       @Override
+       public Control createContents(Composite parent) {
+               Control control = super.createContents(parent);
+               
+               tableViewer.setLabelProvider(new LanguagePreferenceLabelProvider());
+               tableViewer.setComparator(new ViewerComparator());
+               
+               return control;
+       }
+               
+       class LanguagePreferenceLabelProvider extends LabelProvider implements ITableLabelProvider{
+
+               /* (non-Javadoc)
+                * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+                */
+               public Image getColumnImage(Object element, int columnIndex) {
+                       return null;
+               }
+
+               /* (non-Javadoc)
+                * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+                */
+               public String getColumnText(Object element, int columnIndex) {
+                       String description = ((Language)element).getDescription();
+                       if (description == null) {
+                               description = ((Language)element).getLabel() + " - Warning: no description - not shown in menus";
+                       }
+                       return description;
+               }
+               
+               }
+}
\ No newline at end of file
index ab316fe8da0b0de776130905549af5cb77824c96..1e5f2333303cb45859a4274ef72bfc8cac77d306 100644 (file)
@@ -39,4 +39,4 @@ public class MarkerTypeMenuPreferences extends AbstractMenuPreferences<MarkerTyp
                                "Choose which markers to display",
                                false);
        }
-}
+}
\ No newline at end of file
index 3f97eaeeeef15345f81122f750bac1652e91e68d..2d21a3aecf6c69491b050ac37bfa0dde63991883 100644 (file)
@@ -82,4 +82,4 @@ public class NameRelationshipTypeMenuPreferences extends
                        return super.getColumnText(element, columnIndex);
                }
        }
-}
+}
\ No newline at end of file
index 43b6faf41de31c2439d309b5359a0735ee67a68c..3a2d93ed41e17e96cb2cd72ed1f0932fdb33e6c2 100644 (file)
@@ -10,7 +10,7 @@
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
+import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
 import eu.etaxonomy.taxeditor.store.VocabularyStore;
 
 /**
@@ -19,7 +19,7 @@ import eu.etaxonomy.taxeditor.store.VocabularyStore;
  * @version 1.0
  */
 public class NameTypeDesignationStatusMenuPreferences extends
-               AbstractMenuPreferences<SpecimenTypeDesignationStatus> {
+               AbstractMenuPreferences<NameTypeDesignationStatus> {
        /**
         * @param initialVocabulary
         * @param title
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NamedAreaTypeMenuPreferences.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NamedAreaTypeMenuPreferences.java
new file mode 100644 (file)
index 0000000..2492470
--- /dev/null
@@ -0,0 +1,37 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.preference.menu;
+
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+
+import eu.etaxonomy.cdm.model.location.NamedAreaType;
+import eu.etaxonomy.taxeditor.store.VocabularyStore;
+
+/**
+ * @author n.hoffmann
+ * @created May 11, 2010
+ * @version 1.0
+ */
+public class NamedAreaTypeMenuPreferences extends AbstractMenuPreferences<NamedAreaType> {
+
+       private static final Logger logger = Logger
+                       .getLogger(NamedAreaTypeMenuPreferences.class);
+       
+       public NamedAreaTypeMenuPreferences(Set<NamedAreaType> initialVocabulary,
+                       String title, String description, boolean editable) {
+               super(VocabularyStore.getNamedAreaTypes(), 
+                               "Named Area Types", 
+                               "Edit displayed named area types", 
+                               true);
+       }
+}
\ No newline at end of file
index 244fadd6cfe238bd675b792655dfe51095f6d463..84a92e2c15ab736223ff411481d2c807283b9dfc 100644 (file)
@@ -28,4 +28,4 @@ public class NomenclaturalStatusTypeMenuPreferences extends
                                false);
        }
        
-}
+}
\ No newline at end of file
similarity index 81%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/DistributionStatusMenuPreferences.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/PresenceAbsenceMenuPreferences.java
index a07422c5ac764a51d7a1894bd1ccad38e0baf2da..aa269bd0772832594fe571a51b91475c8601ef25 100644 (file)
@@ -20,7 +20,7 @@ import eu.etaxonomy.taxeditor.store.VocabularyStore;
  * @created 25.06.2009
  * @version 1.0
  */
-public class DistributionStatusMenuPreferences extends AbstractMenuPreferences<PresenceAbsenceTermBase<PresenceAbsenceTermBase<?>>> implements
+public class PresenceAbsenceMenuPreferences extends AbstractMenuPreferences<PresenceAbsenceTermBase> implements
                IWorkbenchPreferencePage {
 
 
@@ -30,11 +30,11 @@ public class DistributionStatusMenuPreferences extends AbstractMenuPreferences<P
         * @param title
         * @param description
         */
-       public DistributionStatusMenuPreferences() {
+       public PresenceAbsenceMenuPreferences() {
                super(VocabularyStore.getPresenceAbsenceTerms(), 
                                "Distribution Status Preferences", 
                                "Choose which distribution states should be shown.",
                                false);
        }
        
-}
+}
\ No newline at end of file
index 1fe67d680b0b65c9e0b390f438a565e8644b6f37..fb8a9e39ef23f15415b877f7c03d8dfd4d5cd614 100644 (file)
@@ -1,37 +1,37 @@
-/**\r
-* Copyright (C) 2007 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.preference.menu;\r
-\r
-import org.eclipse.ui.IWorkbenchPreferencePage;\r
-\r
-import eu.etaxonomy.cdm.model.name.Rank;\r
-import eu.etaxonomy.taxeditor.store.VocabularyStore;\r
-\r
-/**\r
- * Allows the user to choose which <code>Rank</code>s to display in the \r
- * <code>PropertySheet</code> drop-down menu for <code>TaxonNameBase</code>.\r
- * \r
- * @author p.ciardelli\r
- * @created 17.09.2008\r
- * @version 1.0\r
- * @author n.hoffmann\r
- */\r
-public class RankMenuPreferences extends AbstractMenuPreferences<Rank> implements\r
-               IWorkbenchPreferencePage {\r
-\r
-       public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.preferences.ranks";\r
-\r
-       public RankMenuPreferences() {\r
-               super(VocabularyStore.getRanks(), \r
-                               "Rank Preferences", \r
-                               "Choose which ranks to display in the property sheet drop-down menu.",\r
-                               false);\r
-       }\r
-\r
-}\r
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.preference.menu;
+
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+import eu.etaxonomy.cdm.model.name.Rank;
+import eu.etaxonomy.taxeditor.store.VocabularyStore;
+
+/**
+ * Allows the user to choose which <code>Rank</code>s to display in the 
+ * <code>PropertySheet</code> drop-down menu for <code>TaxonNameBase</code>.
+ * 
+ * @author p.ciardelli
+ * @created 17.09.2008
+ * @version 1.0
+ * @author n.hoffmann
+ */
+public class RankMenuPreferences extends AbstractMenuPreferences<Rank> implements
+               IWorkbenchPreferencePage {
+
+       public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.preferences.ranks";
+
+       public RankMenuPreferences() {
+               super(VocabularyStore.getRanks(), 
+                               "Rank Preferences", 
+                               "Choose which ranks to display in the property sheet drop-down menu.",
+                               false);
+       }
+
+}
\ No newline at end of file
index 8cbde92d1222165f8b84c19d10b19733a87cdd5d..20ad193ea29514267f9466f0403332a21eb96879 100644 (file)
@@ -32,4 +32,4 @@ public class SpecimenTypeDesignationStatusMenuPreferences extends
                                false);
        }
 
-}
+}
\ No newline at end of file
index 65787b92d02c27723faddc1a88cc6fa044f20f39..8a168be460b53f118179bfecc5a8d501ba70becf 100644 (file)
@@ -33,4 +33,4 @@ public class TaxonRelationshipTypeMenuPreferences extends
                                false);
        }
        
-}
+}
\ No newline at end of file
similarity index 89%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizards/VocabularyTermWizard.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/VocabularyTermWizard.java
index 7d88af07806d7c502d6ca335e9da574bf45a7264..fb39d8cf6fa192da6eefe27206da196a47d32cf1 100644 (file)
@@ -8,11 +8,12 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.preference.wizards;
+package eu.etaxonomy.taxeditor.preference.wizard;
 
 import org.apache.log4j.Logger;
 import org.eclipse.jface.wizard.Wizard;
 
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.common.Representation;
 import eu.etaxonomy.cdm.model.common.VocabularyEnum;
@@ -66,7 +67,7 @@ public class VocabularyTermWizard<T extends DefinedTermBase> extends Wizard {
        @Override
        public boolean performFinish() {
 
-//             ConversationHolder conversation = CdmStore.NewTransactionalConversation();
+               ConversationHolder conversation = CdmStore.createConversation();
                
                if(editMode){
                        VocabularyStore.updateVocabulary(getTerm());
@@ -74,7 +75,7 @@ public class VocabularyTermWizard<T extends DefinedTermBase> extends Wizard {
                        VocabularyStore.saveTerm(getTerm(), getVocabulary());
                }
                
-//             conversation.commit(true);
+               conversation.commit(false);
                
                return true;
        }
@@ -112,11 +113,9 @@ public class VocabularyTermWizard<T extends DefinedTermBase> extends Wizard {
                        }
                        
                } catch (InstantiationException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
+                       logger.error("InstantiationException when setting term", e);
                } catch (IllegalAccessException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
+                       logger.error("IllegalAccessException when setting term", e);
                }
                
        }
similarity index 98%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizards/VocabularyTermWizardPage.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/VocabularyTermWizardPage.java
index b5433ea55627650035904d96647e999f6381d388..60c70fcdbe4b3db69bcc3fba7888273e4e135244 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.preference.wizards;
+package eu.etaxonomy.taxeditor.preference.wizard;
 
 
 import org.apache.log4j.Logger;
index e47bb1d485ae30e687f19f44e1bcd32ad57d8d12..386392e0e2e521e8a3b5ef04fd7cd0c5db452f1b 100644 (file)
@@ -9,23 +9,28 @@
 
 package eu.etaxonomy.taxeditor.store;
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.log4j.Logger;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
-import org.springframework.security.providers.ProviderManager;
+import org.springframework.security.authentication.ProviderManager;
 
 import eu.etaxonomy.cdm.api.application.CdmApplicationController;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IAgentService;
 import eu.etaxonomy.cdm.api.service.ICommonService;
 import eu.etaxonomy.cdm.api.service.ILocationService;
+import eu.etaxonomy.cdm.api.service.IMediaService;
 import eu.etaxonomy.cdm.api.service.INameService;
 import eu.etaxonomy.cdm.api.service.IReferenceService;
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.api.service.ITaxonTreeService;
 import eu.etaxonomy.cdm.api.service.ITermService;
@@ -35,6 +40,7 @@ import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurato
 import eu.etaxonomy.cdm.api.service.config.ITaxonServiceConfigurator;
 import eu.etaxonomy.cdm.database.DataSourceNotFoundException;
 import eu.etaxonomy.cdm.database.DatabaseSchemaMismatchException;
+import eu.etaxonomy.cdm.database.DatabaseTypeEnum;
 import eu.etaxonomy.cdm.database.DbSchemaValidation;
 import eu.etaxonomy.cdm.database.ICdmDataSource;
 import eu.etaxonomy.cdm.ext.IEditGeoService;
@@ -45,10 +51,12 @@ import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.reference.ReferenceBase;
 import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
-import eu.etaxonomy.taxeditor.dialogs.DatasourceLauncherDialog;
+import eu.etaxonomy.taxeditor.datasource.view.CdmDataSourceView;
+import eu.etaxonomy.taxeditor.dialogs.LoginDialog;
 import eu.etaxonomy.taxeditor.io.ExportHandler;
 import eu.etaxonomy.taxeditor.io.ImportHandler;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.model.IContextListener;
+import eu.etaxonomy.taxeditor.model.IContextListener.EventType;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 
 /**
@@ -82,8 +90,12 @@ public class CdmStore{
        
        private Language language;
        
+       private static ListenerList contextListeners = new ListenerList();
+       
        private static ICdmDataSource cdmDatasource;
        
+       private boolean isConnected;
+       
        
        /**
         * 
@@ -91,84 +103,138 @@ public class CdmStore{
         * @return
         */
        protected static CdmStore getDefault(){
-               if(instance == null){
+               if(instance != null && instance.isConnected){
+                       return instance;
+               }else if(instance == null){
                        
-                       // Prompt user for datasource if there are more than one
-                       if(PreferencesUtil.getPreferenceStore().getBoolean(PreferencesUtil.SHOW_DATASOURCE_CHOOSER) 
-                               && CdmDataSourceRepository.getAll().size() > 1){
-                               createDatasourceChooser(null);
-                       }else{
-                               // Start default cdm database
-                               instance = initialize(DEFAULT_DB_SCHEMA_VALIDATION, DEFAULT_APPLICATION_CONTEXT);
-                       }
+                       initialize();
+                       
+                       return instance;
+               }else if(!instance.isConnected){
+                       
+                       StoreUtil.warningDialog("No datasource connection", "Application is not connected to a datastore.");
+                       
+                       // TODO open datasource view
+                       
+               }       
+               return null;
+       }
+       
+       /**
+        * Initialize the with the last edited datasource
+        */
+       public static void initialize() {
                
-               }
+               ICdmDataSource datasource = CdmDataSourceRepository.getCurrentDataSource();
                
-               return instance;
+               initialize(datasource);
+       }
+       
+       /**
+        * Initialize with a specific datasource
+        * 
+        * @param datasource
+        */
+       public static void initialize(ICdmDataSource datasource) {
+               initialize(datasource, DEFAULT_DB_SCHEMA_VALIDATION, DEFAULT_APPLICATION_CONTEXT);
        }
        
-       private static CdmStore initialize(DbSchemaValidation dbSchemaValidation, Resource applicationContextBean){     
+       /**
+        * Initialize and provide
+        * 
+        * @param datasource
+        * @param dbSchemaValidation
+        * @param applicationContextBean
+        */
+       private static void initialize(final ICdmDataSource datasource, final DbSchemaValidation dbSchemaValidation, final Resource applicationContextBean){    
+               if(isActive()){
+//                     close();
+                       logger.error("Application context already initialized.");
+                       return;
+               }
                
                logger.info("Initializing application context ...");
                
-               cdmDatasource = CdmDataSourceRepository.getCurrentDataSource();
-               
                try {
-                       if (!cdmDatasource.testConnection()) {
-                               createDatasourceChooser("The database for the chosen datasource '" + cdmDatasource + "' \n could not be connected to." +
-                                               "Please choose a new data source to connect to");
-                       } else {
-                               instance = new CdmStore(cdmDatasource, dbSchemaValidation, applicationContextBean);
-                               logger.info("Application context initialized.");
+                       if (datasource.testConnection()) {
+                               cdmDatasource = datasource;
+                               
+                               ProgressMonitorDialog progressMonitorDialog = new ProgressMonitorDialog(StoreUtil.getShell());
+                               IRunnableWithProgress runnable = new IRunnableWithProgress() {
+                                       
+                                       public void run(IProgressMonitor monitor) throws InvocationTargetException,
+                                                       InterruptedException {
+                                               String message = "";
+                                               if(cdmDatasource.getDatabaseType().equals(DatabaseTypeEnum.H2)){
+                                                       message = " local CDM Store ";
+                                               }else{
+                                                       message = " CDM Community Store ";
+                                               }
+                                               message += "'" + cdmDatasource.getName() + "'";
+                                               
+                                               monitor.beginTask("Establishing connection to" + message, 10);
+                                               // TODO get real feedback from CDMStore initialisation process
+                                               monitor.worked(3);
+                                               
+                                               instance = new CdmStore(datasource, dbSchemaValidation, applicationContextBean);
+                                               
+                                               monitor.done();
+                                       }
+                               };
+                               
+                               progressMonitorDialog.run(false, false, runnable);
                                
                                if (!getCommonService().isDatabaseSchemaCompatible()) {
+                                       close();
                                        // Show the datasource chooser
                                        if(CdmDataSourceRepository.getAll().size() > 1){
-                                               createDatasourceChooser("The database schema for the chosen " +
-                                                               "datasource '" + cdmDatasource + "' \n is not valid for this version of the taxonomic editor. \n" +
-                                                               "Please choose a new data source to connect to");
+                                               // Show an error message
+                                               StoreUtil.errorDialog("DatabaseCompatibilityCheck failed", "The database schema for the chosen " +
+                                                               "datasource '" + datasource + "' \n is not valid for this version of the taxonomic editor. \n" +
+                                                               "Please choose a new data source to connect to in the Datasource View.");
+                                               
+                                               // Show datasource view if not shown yet
+                                               StoreUtil.showView(CdmDataSourceView.ID);
                                        } else {
                                                throw new DatabaseSchemaMismatchException();
                                        }
-                               }
-                       }
-                       return instance;
+                               } else {
+                                       notifyContextStart();
+                               
+                                       logger.info("Application context initialized.");
+                               }                               
+                       }                       
                } catch (DataSourceNotFoundException e) {
                        StoreUtil.errorDialog("Chosen Datasource is not available", "Could not connect to the chosen " +
-                                       "datasource '" + cdmDatasource + "'. Please check settings in datasources.xml. If the datasource " +
+                                       "datasource '" + datasource + "'. Please check settings in datasources.xml. If the datasource " +
                                                        "is located on a remote machine, make sure you are connected to the network.");
                        logger.error(e);
                } catch (NullPointerException e){
                        StoreUtil.errorDialog("Corrupt Datasource", "The configuration for the chosen " +
-                                       "datasource '" + cdmDatasource + "' is corrupt. Please check settings in datasources.xml.");
+                                       "datasource '" + datasource + "' is corrupt. Please check settings in datasources.xml.");
                        logger.error(e);
                } catch (DatabaseSchemaMismatchException e){
                        StoreUtil.errorDialog("Database Schema incompatible", "The database schema for the chosen " +
-                                       "datasource '" + cdmDatasource + "' is not valid for this version of the taxonomic editor.");
+                                       "datasource '" + datasource + "' is not valid for this version of the taxonomic editor.");
                        logger.error(e);
                } catch (Exception e){
                        StoreUtil.errorDialog("Unknown Datasource Error", "An error occurred while connecting to the datasource." +
                                        "Please refer to the error log.");
                        logger.error(e);
                } 
-               
-               // FIXME present datasource chooser dialog instead of closing the workbench
-               PlatformUI.getWorkbench().close();
-               return null;
        }
 
        /**
-        * Creates the datasource chooser.
-        * @param message Message to show. Specify null if none.
+        * Closes the current application context
         */
-       private static void createDatasourceChooser(String message) {
-               DatasourceLauncherDialog chooseDataSource = new DatasourceLauncherDialog(StoreUtil.getShell(), message);
-               if(chooseDataSource.open() == Status.OK){
-                       instance = initialize(DEFAULT_DB_SCHEMA_VALIDATION, DEFAULT_APPLICATION_CONTEXT);
-               }else{
-                       // no datasource chosen.
-                       logger.warn("No datasource chosen. Exiting now.");
-                       PlatformUI.getWorkbench().close();
+       public static void close(){
+               notifyContextAboutToStop();
+               if(isActive() && StoreUtil.closeAll()){
+                       notifyContextStop();
+                       instance.getApplicationController().close();
+                       instance.isConnected = false;
+                       cdmDatasource = null;
+                       
                }
        }
 
@@ -177,7 +243,12 @@ public class CdmStore{
         */
        private CdmStore(ICdmDataSource dataSource, DbSchemaValidation dbSchemaValidation, Resource applicationContextBean) {
                try {
+                       // this should be more modulized 
                        applicationController = CdmApplicationController.NewInstance(applicationContextBean, dataSource, dbSchemaValidation, false);
+                       // 
+                       isConnected = true;             
+                       
+                       cdmDatasource = dataSource;
                } catch (Exception e) {
                        throw new RuntimeException(e);
                }
@@ -196,28 +267,10 @@ public class CdmStore{
                }
                return null;
        }
-       
-
-       @Deprecated
-       public static CdmApplicationController getApplicationControllerWillBeObsolete(){
-               return getDefault().getApplicationController();
-       }
 
        /*
         * CONVERSATIONS
         */
-       
-       /**
-        * Create a new conversation and bind resources to it
-        * 
-        * @return
-        */
-       public static ConversationHolder NewConversation(){
-               
-               ConversationHolder conversation = getDefault().getApplicationController().NewConversation();
-
-               return conversation;
-       }
 
        /**
         * Creates a new conversation, binds resources to the conversation and 
@@ -225,8 +278,8 @@ public class CdmStore{
         * 
         * @return
         */
-       public static ConversationHolder NewTransactionalConversation() {
-               ConversationHolder conversation = NewConversation();
+       public static ConversationHolder createConversation() {
+               ConversationHolder conversation = getDefault().getApplicationController().NewConversation();
                
                conversation.startTransaction();
                return conversation;
@@ -240,6 +293,8 @@ public class CdmStore{
        
        public static ITaxonTreeService getTaxonTreeService() { return getDefault().getApplicationController().getTaxonTreeService();}
        
+       public static ITaxonNodeService getTaxonNodeService() { return getDefault().getApplicationController().getTaxonNodeService();}
+       
        public static INameService getNameService(){ return getDefault().getApplicationController().getNameService();}
        
        public static IReferenceService getReferenceService(){ return getDefault().getApplicationController().getReferenceService();}
@@ -258,10 +313,12 @@ public class CdmStore{
        
        public static IVocabularyService getVocabularyService() { return getDefault().getApplicationController().getVocabularyService(); }
        
+       public static IMediaService getMediaService() { return getDefault().getApplicationController().getMediaService(); }
+       
        public static IEditGeoService getGeoService(){
                return (IEditGeoService) getDefault().getApplicationController().getBean("editGeoService");
        }
-       
+               
        /*
         * METHODS TO FIND ENTITIES
         */
@@ -374,6 +431,12 @@ public class CdmStore{
                return loginManager;
        }
        
+       private int authenticate(){
+               
+               LoginDialog loginDialog = new LoginDialog(StoreUtil.getShell());
+               return loginDialog.open();
+       }
+       
        /*
         * IMPORT/EXPORT FACTORIES
         */
@@ -398,4 +461,53 @@ public class CdmStore{
                }
                return exportHandler;
        }
+       
+       /**
+        * Whether this CdmStore is currently connected to a datasource
+        * @return
+        */
+       public static boolean isActive(){
+               return instance != null && instance.isConnected;
+       }
+
+       public static void addContextListener(IContextListener listener){
+               contextListeners.add(listener);
+       }
+       
+       public static void removeContextListener(IContextListener listener) {
+               contextListeners.remove(listener);
+       }
+       
+       public static void notifyContextStart() {
+               logger.warn("Application event occured");
+               
+               instance.authenticate();
+               
+               
+               for(Object listener : contextListeners.getListeners()){
+                       ((IContextListener) listener).onContextEvent(EventType.START);
+               }               
+       }
+       
+       public static void notifyContextAboutToStop(){
+               for(Object listener : contextListeners.getListeners()){
+                       ((IContextListener) listener).onContextEvent(EventType.ABOUT_TO_STOP);
+               }       
+       }
+       
+       public static void notifyContextStop() {
+               logger.warn("Application event occured");
+               
+               for(Object listener : contextListeners.getListeners()){
+                       ((IContextListener) listener).onContextEvent(EventType.STOP);
+               }               
+       }
+
+       public static ICdmDataSource getDataSource(){
+               if(isActive()){
+                       return cdmDatasource;
+               }
+               return null;
+       }
+
 }
index beb1adbc60d78adfbb9d9529d395f52f06e8191e..dbb4cc2935ae0d73be5aba5d5a870c5c83374b3b 100644 (file)
@@ -13,9 +13,9 @@ package eu.etaxonomy.taxeditor.store;
 import java.util.Observable;
 
 import org.apache.log4j.Logger;
-import org.springframework.security.Authentication;
-import org.springframework.security.context.SecurityContextHolder;
-import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 
 import eu.etaxonomy.cdm.model.common.User;
 
index f2511b9e5b23da1b3f903c02ead60410f4871b82..1ecca3a1ff71f71501de8317e0959cfaf74f98cb 100644 (file)
 package eu.etaxonomy.taxeditor.store;
 
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
 import java.util.SortedSet;
 
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.common.AnnotationType;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.common.ExtensionType;
 import eu.etaxonomy.cdm.model.common.Language;
@@ -25,8 +27,10 @@ import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.cdm.model.common.VocabularyEnum;
 import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
+import eu.etaxonomy.cdm.model.location.NamedAreaType;
 import eu.etaxonomy.cdm.model.media.RightsTerm;
 import eu.etaxonomy.cdm.model.name.NameRelationshipType;
+import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
 import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
 import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
@@ -51,14 +55,33 @@ public class VocabularyStore {
                SortedSet specimenTypeDesignationStatus = getTermVocabulary(VocabularyEnum.SpecimenTypeDesignationStatus).getTermsOrderedByLabels(CdmStore.getDefaultLanguage());
                return specimenTypeDesignationStatus;
        }
+       
 
+       /**
+       *
+       * @return
+       */
+       public static SortedSet<NameTypeDesignationStatus> getNameTypeDesignationStatus() {
+               SortedSet nameTypeDesignationStatus = getTermVocabulary(VocabularyEnum.NameTypeDesignationStatus).getTermsOrderedByLabels(CdmStore.getDefaultLanguage());
+               return nameTypeDesignationStatus;
+       }
+       
        /**
         * 
         * @return
         */
-       public static SortedSet<SpecimenTypeDesignationStatus> getNameTypeDesignationStatus() {
-               SortedSet nameTypeDesignationStatus = getTermVocabulary(VocabularyEnum.NameTypeDesignationStatus).getTermsOrderedByLabels(CdmStore.getDefaultLanguage());
-               return nameTypeDesignationStatus;
+       public static SortedSet<NamedAreaType> getNamedAreaTypes(){
+               SortedSet namedAreaTypes = getTermVocabulary(VocabularyEnum.NamedAreaType).getTermsOrderedByLabels(CdmStore.getDefaultLanguage());
+               return namedAreaTypes;
+       }
+       
+       /**
+        * 
+        * @return
+        */
+       public static SortedSet<AnnotationType> getAnnotationTypes(){
+               SortedSet annotationTypes = getTermVocabulary(VocabularyEnum.AnnotationType).getTermsOrderedByLabels(CdmStore.getDefaultLanguage());
+               return annotationTypes;
        }
        
        /**
@@ -164,8 +187,8 @@ public class VocabularyStore {
         * @return
         */
        public static Set<ExtensionType> getExtensionTypes() {
-               Set extensionTypes = getTermVocabulary(VocabularyEnum.ExtensionType).getTermsOrderedByLabels(CdmStore.getDefaultLanguage());
-               return extensionTypes;
+               List<ExtensionType> extensionTypes = CdmStore.getTermService().listByTermClass(ExtensionType.class, null, null, null, null);
+               return new HashSet(extensionTypes);
        }
        
        /**
@@ -193,7 +216,7 @@ public class VocabularyStore {
         *  
         * @return
         */
-       public static SortedSet<PresenceAbsenceTermBase<PresenceAbsenceTermBase<?>>> getPresenceAbsenceTerms() {
+       public static SortedSet<PresenceAbsenceTermBase> getPresenceAbsenceTerms() {
                SortedSet presenceAbsenceTerms = getTermVocabulary(VocabularyEnum.PresenceTerm).getTermsOrderedByLabels(CdmStore.getDefaultLanguage());
                        presenceAbsenceTerms.addAll(getTermVocabulary(VocabularyEnum.AbsenceTerm).getTermsOrderedByLabels(CdmStore.getDefaultLanguage()));
 
@@ -239,4 +262,5 @@ public class VocabularyStore {
        public static TermVocabulary<DefinedTermBase> getTermVocabulary(VocabularyEnum vocabularyType){
                return CdmStore.getVocabularyService().getVocabulary(vocabularyType);
        }
+
 }
index e51551bb7847957e1336f8318d629bca41e2037f..f4b2250b2425f34def0889481ea78015ec2d149d 100644 (file)
@@ -31,6 +31,7 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.model.IContextListener;
 import eu.etaxonomy.taxeditor.operations.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -39,7 +40,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created 01.07.2009
  * @version 1.0
  */
-public class UserManagerView extends ViewPart implements IConversationEnabled, IPostOperationEnabled{
+public class UserManagerView extends ViewPart implements IConversationEnabled, IPostOperationEnabled, IContextListener{
        private static final Logger logger = Logger
                        .getLogger(UserManagerView.class);
        
@@ -54,8 +55,7 @@ public class UserManagerView extends ViewPart implements IConversationEnabled, I
         */
        @Override
        public void createPartControl(Composite parent) {
-               
-               conversation = CdmStore.NewTransactionalConversation();
+               CdmStore.addContextListener(this);
                
                FillLayout fillLayout = new FillLayout();
                fillLayout.marginWidth = 0;
@@ -65,7 +65,7 @@ public class UserManagerView extends ViewPart implements IConversationEnabled, I
                
                listViewer = new ListViewer(parent, SWT.MULTI | SWT.H_SCROLL
                                | SWT.V_SCROLL | SWT.FULL_SELECTION);
-               
+               getSite().setSelectionProvider(listViewer);
                MenuManager menuMgr = new MenuManager();
                menuMgr.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
                getSite().registerContextMenu(menuMgr, listViewer);
@@ -77,21 +77,10 @@ public class UserManagerView extends ViewPart implements IConversationEnabled, I
                listViewer.setContentProvider(new UserManagerContentProvider());
                listViewer.setLabelProvider(new UserManagerLabelProvider());
                                
-               listViewer.setInput(getAllUser());
+               if(CdmStore.isActive()){
+                       listViewer.setInput(getAllUser());
+               }
                
-//             listViewer.addDoubleClickListener(new IDoubleClickListener() {
-//                     
-//                     public void doubleClick(DoubleClickEvent event) {
-//                             if (event.getSelection() instanceof StructuredSelection) {
-//                                     
-//                                     Object element = ((StructuredSelection) event
-//                                                     .getSelection()).getFirstElement();
-//                                     if (element instanceof User) {
-//                                             handler = new EditUserHandler();
-//                                     }
-//                             }
-//                     }
-//             });
                
                this.addListenerObject(new FocusAdapter() {
                        /* (non-Javadoc)
@@ -111,7 +100,9 @@ public class UserManagerView extends ViewPart implements IConversationEnabled, I
         */
        @Override
        public void setFocus() {
-               conversation.bind();
+               if(conversation != null){
+                       conversation.bind();
+               }
                listViewer.getControl().setFocus();
        }
 
@@ -121,10 +112,12 @@ public class UserManagerView extends ViewPart implements IConversationEnabled, I
         * @see eu.etaxonomy.taxeditor.operations.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
         */
        public boolean postOperation(CdmBase objectAffectedByOperation) {
-               List<User> allUsers = getAllUser();
-               
-               listViewer.setInput(allUsers);
-               listViewer.refresh();
+               if(CdmStore.isActive()){
+                       List<User> allUsers = getAllUser();
+                       
+                       listViewer.setInput(allUsers);
+                       listViewer.refresh();
+               }
                
                return true;
        }
@@ -134,6 +127,7 @@ public class UserManagerView extends ViewPart implements IConversationEnabled, I
         * @return
         */
        private List<User> getAllUser(){
+               conversation = CdmStore.createConversation();
                return CdmStore.getUserService().list(null, null, null, null, null);
        }
 
@@ -150,14 +144,23 @@ public class UserManagerView extends ViewPart implements IConversationEnabled, I
        public void update(CdmDataChangeMap changeEvents) {
                // data changes can only be generate here at the moment
        }
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.part.WorkbenchPart#dispose()
-        */
+
        @Override
        public void dispose() {
+               CdmStore.removeContextListener(this);
                super.dispose();
-               conversation.close();
+       }
+
+       public boolean onContextEvent(EventType eventType) {
+               switch(eventType){
+               case START:
+                       listViewer.setInput(getAllUser());
+                       break;
+               case STOP:
+                       listViewer.setInput(null);
+                       break;
+               }
+               return true;
        }
        
 }
index 2ab40e6d6f1e4814ade5249a066522e03ca5d3ec..aebe703a4463511eef6ba329d45998cbbafd4704 100644 (file)
@@ -39,7 +39,7 @@ public class CdmStoreTest /*extends CdmIntegrationTest */{
        @BeforeClass
        public static void setUp() throws Exception {
                cdmStore = CdmStore.getDefault();
-               conversation = CdmStore.NewConversation();
+               conversation = CdmStore.createConversation();
        }
        
        /**
index cfe755f5ec5b0c5f6ff788b8a5f9dd1171fca571..7c65041b363c05db6b0a5862a6794f5201d7d82a 100644 (file)
@@ -21,7 +21,7 @@ import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
 import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.operations.CreateSynonymInExisitingHomotypicalGroupOperation;
+import eu.etaxonomy.taxeditor.operations.CreateSynonymInExistingHomotypicalGroupOperation;
 
 /**
  * @author n.hoffmann
@@ -49,12 +49,12 @@ public class CreateSynonymInExisitingHomotypicalGroupOperationTest extends Abstr
                homotypicalGroup = HomotypicalGroup.NewInstance();
                newSynonymName = NonViralName.NewInstance(null);
                
-               operation = new CreateSynonymInExisitingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
+               operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
                                                        undoContext, taxon, homotypicalGroup, newSynonymName, postOperation);
        }
 
        /**
-        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExisitingHomotypicalGroupOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
+        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExistingHomotypicalGroupOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
         * 
         * Homotypic group is the Taxons homotypic group, so we expect the synonym to be homotypic to the accepted taxon.
         * 
@@ -70,7 +70,7 @@ public class CreateSynonymInExisitingHomotypicalGroupOperationTest extends Abstr
        }
        
        /**
-        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExisitingHomotypicalGroupOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
+        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExistingHomotypicalGroupOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
         * 
         * Homotypic group is not the accepted taxons. Heterotypic synonym should be created.
         * 
@@ -88,7 +88,7 @@ public class CreateSynonymInExisitingHomotypicalGroupOperationTest extends Abstr
        
 
        /**
-        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExisitingHomotypicalGroupOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
+        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExistingHomotypicalGroupOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
         * @throws ExecutionException 
         */
        @Test
@@ -102,7 +102,7 @@ public class CreateSynonymInExisitingHomotypicalGroupOperationTest extends Abstr
        }
        
        /**
-        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExisitingHomotypicalGroupOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
+        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExistingHomotypicalGroupOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
         * @throws ExecutionException 
         */
        @Test
@@ -114,7 +114,7 @@ public class CreateSynonymInExisitingHomotypicalGroupOperationTest extends Abstr
        }
 
        /**
-        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExisitingHomotypicalGroupOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
+        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExistingHomotypicalGroupOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
         * @throws ExecutionException 
         */
        @Test
@@ -130,7 +130,7 @@ public class CreateSynonymInExisitingHomotypicalGroupOperationTest extends Abstr
        }
        
        /**
-        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExisitingHomotypicalGroupOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
+        * Test method for {@link eu.etaxonomy.taxeditor.operations.CreateSynonymInExistingHomotypicalGroupOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
         * @throws ExecutionException 
         */
        @Test
diff --git a/taxeditor-store/src/test/resources/dbscripts/001_cdm.ddl b/taxeditor-store/src/test/resources/dbscripts/001_cdm.ddl
deleted file mode 100644 (file)
index ccf3949..0000000
+++ /dev/null
@@ -1,606 +0,0 @@
-create table Address (id integer not null, created timestamp, uuid varchar(255), updated timestamp, locality varchar(255), location_errorradius integer, location_latitude double, location_longitude double, pobox varchar(255), postcode varchar(255), region varchar(255), street varchar(255), createdby_id integer, updatedby_id integer, contact_id integer, country_id integer, location_referencesystem_id integer, primary key (id));
-create table Agent (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, code varchar(255), name varchar(255), nomenclaturaltitle varchar(255), firstname varchar(255), lastname varchar(255), lifespan_end varchar(255), lifespan_start varchar(255), prefix varchar(255), suffix varchar(255), createdby_id integer, updatedby_id integer, contact_id integer, ispartof_id integer, primary key (id));
-create table Agent_Agent (Agent_id integer not null, teammembers_id integer not null);
-create table Agent_Annotation (Agent_id integer not null, annotations_id integer not null, primary key (Agent_id, annotations_id), unique (annotations_id));
-create table Agent_DefinedTermBase (Agent_id integer not null, types_id integer not null, primary key (Agent_id, types_id));
-create table Agent_Extension (Agent_id integer not null, extensions_id integer not null, primary key (Agent_id, extensions_id), unique (extensions_id));
-create table Agent_Marker (Agent_id integer not null, markers_id integer not null, primary key (Agent_id, markers_id), unique (markers_id));
-create table Agent_Media (Agent_id integer not null, media_id integer not null, primary key (Agent_id, media_id), unique (media_id));
-create table Agent_OriginalSource (Agent_id integer not null, sources_id integer not null, primary key (Agent_id, sources_id), unique (sources_id));
-create table Agent_Rights (Agent_id integer not null, rights_id integer not null, primary key (Agent_id, rights_id));
-create table Annotation (id integer not null, created timestamp, uuid varchar(255), updated timestamp, text varchar(4096), annotatedObj_type varchar(255), annotatedObj_id integer not null, linkbackurlstr varchar(255), createdby_id integer, updatedby_id integer, language_id integer, annotationtype_id integer, commentator_id integer, primary key (id));
-create table Annotation_Annotation (Annotation_id integer not null, annotations_id integer not null, primary key (Annotation_id, annotations_id), unique (annotations_id));
-create table Annotation_Marker (Annotation_id integer not null, markers_id integer not null, primary key (Annotation_id, markers_id), unique (markers_id));
-create table CDM_VIEW (id integer not null, created timestamp, uuid varchar(255), description varchar(255), name varchar(255), reference varbinary(255), createdby_id integer, primary key (id));
-create table CDM_VIEW_CDM_VIEW (CDM_VIEW_id integer not null, superviews_id integer not null, primary key (CDM_VIEW_id, superviews_id), unique (superviews_id));
-create table Collection (id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, code varchar(255), codestandard varchar(255), name varchar(255), townorlocation varchar(255), createdby_id integer, updatedby_id integer, institute_id integer, supercollection_id integer, primary key (id));
-create table Collection_Annotation (Collection_id integer not null, annotations_id integer not null, primary key (Collection_id, annotations_id), unique (annotations_id));
-create table Collection_Extension (Collection_id integer not null, extensions_id integer not null, primary key (Collection_id, extensions_id), unique (extensions_id));
-create table Collection_Marker (Collection_id integer not null, markers_id integer not null, primary key (Collection_id, markers_id), unique (markers_id));
-create table Collection_Media (Collection_id integer not null, media_id integer not null, primary key (Collection_id, media_id), unique (media_id));
-create table Collection_OriginalSource (Collection_id integer not null, sources_id integer not null, primary key (Collection_id, sources_id), unique (sources_id));
-create table Collection_Rights (Collection_id integer not null, rights_id integer not null, primary key (Collection_id, rights_id));
-create table Contact (id integer not null, created timestamp, uuid varchar(255), updated timestamp, email varchar(255), fax varchar(255), phone varchar(255), url varchar(255), createdby_id integer, updatedby_id integer, primary key (id));
-create table DefinedTermBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, uri varchar(255), orderindex integer, iso639_1 varchar(2), iso639_2 varchar(3), symmetric boolean, transitive boolean, defaultcolor varchar(255), supportscommontaxonname boolean, supportsdistribution boolean, supportsindividualassociation boolean, supportsquantitativedata boolean, supportstaxoninteraction boolean, supportstextdata boolean, pointapproximation_errorradius integer, pointapproximation_latitude double, pointapproximation_longitude double, validperiod_end varchar(255), validperiod_start varchar(255), iso3166_a2 varchar(2), createdby_id integer, updatedby_id integer, kindof_id integer, partof_id integer, vocabulary_id integer, level_id integer, pointapproximation_referencesystem_id integer, shape_id integer, type_id integer, primary key (id));
-create table DefinedTermBase_Continent (DefinedTermBase_id integer not null, continents_id integer not null, primary key (DefinedTermBase_id, continents_id));
-create table DefinedTermBase_Media (DefinedTermBase_id integer not null, media_id integer not null, primary key (DefinedTermBase_id, media_id), unique (media_id));
-create table DefinedTermBase_RecommendedModifierEnumeration (DefinedTermBase_id integer not null, recommendedmodifierenumeration_id integer not null, primary key (DefinedTermBase_id, recommendedmodifierenumeration_id), unique (recommendedmodifierenumeration_id));
-create table DefinedTermBase_Representation (DefinedTermBase_id integer not null, representations_id integer not null, primary key (DefinedTermBase_id, representations_id), unique (representations_id));
-create table DefinedTermBase_StatisticalMeasure (DefinedTermBase_id integer not null, recommendedstatisticalmeasures_id integer not null, primary key (DefinedTermBase_id, recommendedstatisticalmeasures_id));
-create table DefinedTermBase_SupportedCategoricalEnumeration (DefinedTermBase_id integer not null, supportedcategoricalenumerations_id integer not null, primary key (DefinedTermBase_id, supportedcategoricalenumerations_id), unique (supportedcategoricalenumerations_id));
-create table DefinedTermBase_WaterbodyOrCountry (DefinedTermBase_id integer not null, waterbodiesorcountries_id integer not null, primary key (DefinedTermBase_id, waterbodiesorcountries_id));
-create table DerivationEvent (id integer not null, created timestamp, uuid varchar(255), updated timestamp, description varchar(255), timeperiod_end varchar(255), timeperiod_start varchar(255), createdby_id integer, updatedby_id integer, actor_id integer, type_id integer, primary key (id));
-create table DerivationEvent_Annotation (DerivationEvent_id integer not null, annotations_id integer not null, primary key (DerivationEvent_id, annotations_id), unique (annotations_id));
-create table DerivationEvent_Marker (DerivationEvent_id integer not null, markers_id integer not null, primary key (DerivationEvent_id, markers_id), unique (markers_id));
-create table DescriptionBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, createdby_id integer, updatedby_id integer, taxon_fk integer, taxonName_fk integer, primary key (id));
-create table DescriptionBase_Annotation (DescriptionBase_id integer not null, annotations_id integer not null, primary key (DescriptionBase_id, annotations_id), unique (annotations_id));
-create table DescriptionBase_Extension (DescriptionBase_id integer not null, extensions_id integer not null, primary key (DescriptionBase_id, extensions_id), unique (extensions_id));
-create table DescriptionBase_GeoScope (DescriptionBase_id integer not null, geoscopes_id integer not null, primary key (DescriptionBase_id, geoscopes_id), unique (geoscopes_id));
-create table DescriptionBase_Marker (DescriptionBase_id integer not null, markers_id integer not null, primary key (DescriptionBase_id, markers_id), unique (markers_id));
-create table DescriptionBase_OriginalSource (DescriptionBase_id integer not null, sources_id integer not null, primary key (DescriptionBase_id, sources_id), unique (sources_id));
-create table DescriptionBase_ReferenceBase (DescriptionBase_id integer not null, descriptionsources_id integer not null, primary key (DescriptionBase_id, descriptionsources_id));
-create table DescriptionBase_Rights (DescriptionBase_id integer not null, rights_id integer not null, primary key (DescriptionBase_id, rights_id));
-create table DescriptionBase_Scope (DescriptionBase_id integer not null, scopes_id integer not null, primary key (DescriptionBase_id, scopes_id), unique (scopes_id));
-create table DescriptionElementBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), modifyingtext varbinary(255), orderrelevant boolean, name varchar(255), description varbinary(255), createdby_id integer, updatedby_id integer, citation_id integer, feature_id integer, indescription_id integer, language_id integer, area_id integer, status_id integer, associatedspecimenorobservation_id integer, unit_id integer, taxon2_id integer, format_id integer, primary key (id));
-create table DescriptionElementBase_Annotation (DescriptionElementBase_id integer not null, annotations_id integer not null, primary key (DescriptionElementBase_id, annotations_id), unique (annotations_id));
-create table DescriptionElementBase_LanguageString (DescriptionElementBase_id integer not null, multilanguagetext_id integer not null, primary key (DescriptionElementBase_id, multilanguagetext_id), unique (multilanguagetext_id));
-create table DescriptionElementBase_Marker (DescriptionElementBase_id integer not null, markers_id integer not null, primary key (DescriptionElementBase_id, markers_id), unique (markers_id));
-create table DescriptionElementBase_Media (DescriptionElementBase_id integer not null, media_id integer not null, primary key (DescriptionElementBase_id, media_id), unique (media_id));
-create table DescriptionElementBase_Modifier (DescriptionElementBase_id integer not null, modifiers_id integer not null, primary key (DescriptionElementBase_id, modifiers_id), unique (modifiers_id));
-create table DescriptionElementBase_StateData (DescriptionElementBase_id integer not null, states_id integer not null);
-create table DescriptionElementBase_StatisticalMeasurementValue (DescriptionElementBase_id integer not null, statisticalvalues_id integer not null, primary key (DescriptionElementBase_id, statisticalvalues_id), unique (statisticalvalues_id));
-create table DeterminationEvent (id integer not null, created timestamp, uuid varchar(255), updated timestamp, description varchar(255), timeperiod_end varchar(255), timeperiod_start varchar(255), preferredflag boolean not null, createdby_id integer, updatedby_id integer, actor_id integer, identifiedunit_id integer, modifier_id integer, taxon_id integer, primary key (id));
-create table DeterminationEvent_Annotation (DeterminationEvent_id integer not null, annotations_id integer not null, primary key (DeterminationEvent_id, annotations_id), unique (annotations_id));
-create table DeterminationEvent_Marker (DeterminationEvent_id integer not null, markers_id integer not null, primary key (DeterminationEvent_id, markers_id), unique (markers_id));
-create table DeterminationEvent_ReferenceBase (DeterminationEvent_id integer not null, references_id integer not null, primary key (DeterminationEvent_id, references_id));
-create table Extension (id integer not null, created timestamp, uuid varchar(255), updated timestamp, value varchar(255), createdby_id integer, updatedby_id integer, type_id integer, primary key (id));
-create table FeatureNode (id integer not null, created timestamp, uuid varchar(255), updated timestamp, createdby_id integer, updatedby_id integer, feature_id integer, parent_fk integer, primary key (id));
-create table FeatureTree (id integer not null, created timestamp, uuid varchar(255), updated timestamp, uri varchar(255), descriptionseparated boolean not null, createdby_id integer, updatedby_id integer, root_id integer, primary key (id));
-create table FeatureTree_Representation (FeatureTree_id integer not null, representations_id integer not null, primary key (FeatureTree_id, representations_id), unique (representations_id));
-create table GatheringEvent (id integer not null, created timestamp, uuid varchar(255), updated timestamp, description varchar(255), timeperiod_end varchar(255), timeperiod_start varchar(255), absoluteelevation integer, absoluteelevationerror integer, collectingmethod varchar(255), distancetoground integer, distancetowatersurface integer, exactlocation_errorradius integer, exactlocation_latitude double, exactlocation_longitude double, createdby_id integer, updatedby_id integer, actor_id integer, exactlocation_referencesystem_id integer, locality_id integer, primary key (id));
-create table GatheringEvent_Annotation (GatheringEvent_id integer not null, annotations_id integer not null, primary key (GatheringEvent_id, annotations_id), unique (annotations_id));
-create table GatheringEvent_DefinedTermBase (GatheringEvent_id integer not null, collectingareas_id integer not null, primary key (GatheringEvent_id, collectingareas_id));
-create table GatheringEvent_Marker (GatheringEvent_id integer not null, markers_id integer not null, primary key (GatheringEvent_id, markers_id), unique (markers_id));
-create table GenBankAccession (id integer not null, created timestamp, uuid varchar(255), updated timestamp, accessionnumber varchar(255), uri varchar(255), createdby_id integer, updatedby_id integer, primary key (id));
-create table GrantedAuthorityImpl (id integer not null, created timestamp, uuid varchar(255), authority varchar(255), createdby_id integer, primary key (id), unique (authority));
-create table HomotypicalGroup (id integer not null, created timestamp, uuid varchar(255), updated timestamp, createdby_id integer, updatedby_id integer, primary key (id));
-create table HomotypicalGroup_Annotation (HomotypicalGroup_id integer not null, annotations_id integer not null, primary key (HomotypicalGroup_id, annotations_id), unique (annotations_id));
-create table HomotypicalGroup_Marker (HomotypicalGroup_id integer not null, markers_id integer not null, primary key (HomotypicalGroup_id, markers_id), unique (markers_id));
-create table HybridRelationship (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), doubtful boolean not null, ruleconsidered varchar(255), createdby_id integer, updatedby_id integer, citation_id integer, relatedfrom_id integer, relatedto_id integer, type_id integer, primary key (id));
-create table HybridRelationship_Annotation (HybridRelationship_id integer not null, annotations_id integer not null, primary key (HybridRelationship_id, annotations_id), unique (annotations_id));
-create table HybridRelationship_Marker (HybridRelationship_id integer not null, markers_id integer not null, primary key (HybridRelationship_id, markers_id), unique (markers_id));
-create table IdentificationKey_Taxon (identificationKey_fk integer not null, taxon_fk integer not null, primary key (identificationKey_fk, taxon_fk));
-create table InstitutionalMembership (id integer not null, created timestamp, uuid varchar(255), updated timestamp, department varchar(255), period_end varchar(255), period_start varchar(255), role varchar(255), createdby_id integer, updatedby_id integer, institute_id integer, person_id integer, primary key (id));
-create table LanguageString (id integer not null, created timestamp, uuid varchar(255), updated timestamp, text varchar(4096), createdby_id integer, updatedby_id integer, language_id integer, primary key (id));
-create table LanguageString_Annotation (LanguageString_id integer not null, annotations_id integer not null, primary key (LanguageString_id, annotations_id), unique (annotations_id));
-create table LanguageString_Marker (LanguageString_id integer not null, markers_id integer not null, primary key (LanguageString_id, markers_id), unique (markers_id));
-create table Locus (id integer not null, created timestamp, uuid varchar(255), updated timestamp, description varchar(255), name varchar(255), createdby_id integer, updatedby_id integer, primary key (id));
-create table Marker (id integer not null, created timestamp, uuid varchar(255), updated timestamp, flag boolean not null, markedObj_type varchar(255), markedObj_id integer not null, createdby_id integer, updatedby_id integer, markertype_id integer, primary key (id));
-create table Media (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, description varbinary(255), mediacreated date, title varbinary(255), citationmicroreference varchar(255), createdby_id integer, updatedby_id integer, artist_id integer, citation_id integer, primary key (id));
-create table MediaRepresentation (id integer not null, created timestamp, uuid varchar(255), updated timestamp, mimetype varchar(255), suffix varchar(255), createdby_id integer, updatedby_id integer, media_id integer, primary key (id));
-create table MediaRepresentationPart (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, size integer, uri varchar(255), duration integer, height integer, width integer, createdby_id integer, updatedby_id integer, representation_id integer not null, sortIndex integer, primary key (id));
-create table Media_Annotation (Media_id integer not null, annotations_id integer not null, primary key (Media_id, annotations_id), unique (annotations_id));
-create table Media_DefinedTermBase (Media_id integer not null, geoscopes_id integer not null, primary key (Media_id, geoscopes_id));
-create table Media_Marker (Media_id integer not null, markers_id integer not null, primary key (Media_id, markers_id), unique (markers_id));
-create table Media_Rights (Media_id integer not null, rights_id integer not null, primary key (Media_id, rights_id));
-create table Media_Sequence (Media_id integer not null, usedsequences_id integer not null, primary key (Media_id, usedsequences_id), unique (usedsequences_id));
-create table Media_TaxonBase (Media_id integer not null, coveredtaxa_id integer not null, primary key (Media_id, coveredtaxa_id), unique (coveredtaxa_id));
-create table NameRelationship (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), doubtful boolean not null, ruleconsidered varchar(255), createdby_id integer, updatedby_id integer, citation_id integer, relatedfrom_id integer, relatedto_id integer, type_id integer, primary key (id));
-create table NameRelationship_Annotation (NameRelationship_id integer not null, annotations_id integer not null, primary key (NameRelationship_id, annotations_id), unique (annotations_id));
-create table NameRelationship_Marker (NameRelationship_id integer not null, markers_id integer not null, primary key (NameRelationship_id, markers_id), unique (markers_id));
-create table NomenclaturalStatus (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), ruleconsidered varchar(255), createdby_id integer, updatedby_id integer, citation_id integer, type_id integer, primary key (id));
-create table NomenclaturalStatus_Annotation (NomenclaturalStatus_id integer not null, annotations_id integer not null, primary key (NomenclaturalStatus_id, annotations_id), unique (annotations_id));
-create table NomenclaturalStatus_Marker (NomenclaturalStatus_id integer not null, markers_id integer not null, primary key (NomenclaturalStatus_id, markers_id), unique (markers_id));
-create table OriginalSource (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), idinsource varchar(255), idnamespace varchar(255), sourcedObj_type varchar(255), sourcedObj_id integer not null, createdby_id integer, updatedby_id integer, citation_id integer, primary key (id));
-create table OriginalSource_Annotation (OriginalSource_id integer not null, annotations_id integer not null, primary key (OriginalSource_id, annotations_id), unique (annotations_id));
-create table OriginalSource_Marker (OriginalSource_id integer not null, markers_id integer not null, primary key (OriginalSource_id, markers_id), unique (markers_id));
-create table PermissionGroup (id integer not null, created timestamp, uuid varchar(255), name varchar(255), createdby_id integer, primary key (id));
-create table PermissionGroup_GrantedAuthorityImpl (PermissionGroup_id integer not null, grantedauthorities_id integer not null, primary key (PermissionGroup_id, grantedauthorities_id));
-create table Person_Keyword (person_fk integer not null, keyword_fk integer not null, primary key (person_fk, keyword_fk));
-create table ReferenceBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, hasproblem boolean not null, nomenclaturallyrelevant boolean not null, problemends integer not null, problemstarts integer not null, uri varchar(255), datepublished_end varchar(255), datepublished_start varchar(255), title varchar(255), pages varchar(255), series varchar(255), volume varchar(255), address varchar(255), annote varchar(255), booktitle varchar(255), chapter varchar(255), edition varchar(255), editor varchar(255), eprint varchar(255), howpublished varchar(255), institution varchar(255), journal varchar(255), month varchar(255), note varchar(255), number varchar(255), organization varchar(255), publisher varchar(255), reporttype varchar(255), school varchar(255), year varchar(255), placepublished varchar(255), seriespart varchar(255), isbn varchar(255), issn varchar(255), createdby_id integer, updatedby_id integer, authorteam_id integer, injournal_id integer, crossref_id integer, type_id integer, inseries_id integer, inbook_id integer, inproceedings_id integer, institution_id integer, school_id integer, primary key (id));
-create table ReferenceBase_Annotation (ReferenceBase_id integer not null, annotations_id integer not null, primary key (ReferenceBase_id, annotations_id), unique (annotations_id));
-create table ReferenceBase_Extension (ReferenceBase_id integer not null, extensions_id integer not null, primary key (ReferenceBase_id, extensions_id), unique (extensions_id));
-create table ReferenceBase_Marker (ReferenceBase_id integer not null, markers_id integer not null, primary key (ReferenceBase_id, markers_id), unique (markers_id));
-create table ReferenceBase_Media (ReferenceBase_id integer not null, media_id integer not null, primary key (ReferenceBase_id, media_id), unique (media_id));
-create table ReferenceBase_OriginalSource (ReferenceBase_id integer not null, sources_id integer not null, primary key (ReferenceBase_id, sources_id), unique (sources_id));
-create table ReferenceBase_Rights (ReferenceBase_id integer not null, rights_id integer not null, primary key (ReferenceBase_id, rights_id));
-create table RelationshipTermBase_inverseRepresentation (DefinedTermBase_id integer not null, inverserepresentations_id integer not null, primary key (DefinedTermBase_id, inverserepresentations_id), unique (inverserepresentations_id));
-create table Representation (id integer not null, created timestamp, uuid varchar(255), updated timestamp, text varchar(4096), abbreviatedlabel varchar(255), label varchar(255), createdby_id integer, updatedby_id integer, language_id integer, primary key (id));
-create table Representation_Annotation (Representation_id integer not null, annotations_id integer not null, primary key (Representation_id, annotations_id), unique (annotations_id));
-create table Representation_Marker (Representation_id integer not null, markers_id integer not null, primary key (Representation_id, markers_id), unique (markers_id));
-create table Rights (id integer not null, created timestamp, uuid varchar(255), updated timestamp, text varchar(4096), abbreviatedtext varchar(255), uri varchar(255), createdby_id integer, updatedby_id integer, language_id integer, agent_id integer, type_id integer, primary key (id));
-create table Rights_Annotation (Rights_id integer not null, annotations_id integer not null, primary key (Rights_id, annotations_id), unique (annotations_id));
-create table Rights_Marker (Rights_id integer not null, markers_id integer not null, primary key (Rights_id, markers_id), unique (markers_id));
-create table Sequence (id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, barcode boolean not null, citationmicroreference varchar(255), datesequenced date, length integer, sequence varchar(255), createdby_id integer, updatedby_id integer, locus_id integer, publishedin_id integer, primary key (id));
-create table Sequence_Annotation (Sequence_id integer not null, annotations_id integer not null, primary key (Sequence_id, annotations_id), unique (annotations_id));
-create table Sequence_Extension (Sequence_id integer not null, extensions_id integer not null, primary key (Sequence_id, extensions_id), unique (extensions_id));
-create table Sequence_GenBankAccession (Sequence_id integer not null, genbankaccession_id integer not null, primary key (Sequence_id, genbankaccession_id), unique (genbankaccession_id));
-create table Sequence_Marker (Sequence_id integer not null, markers_id integer not null, primary key (Sequence_id, markers_id), unique (markers_id));
-create table Sequence_Media (Sequence_id integer not null, chromatograms_id integer not null, primary key (Sequence_id, chromatograms_id), unique (chromatograms_id));
-create table Sequence_OriginalSource (Sequence_id integer not null, sources_id integer not null, primary key (Sequence_id, sources_id), unique (sources_id));
-create table Sequence_ReferenceBase (Sequence_id integer not null, citations_id integer not null, primary key (Sequence_id, citations_id), unique (citations_id));
-create table Sequence_Rights (Sequence_id integer not null, rights_id integer not null, primary key (Sequence_id, rights_id));
-create table SpecimenOrObservationBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, definition varbinary(255), individualcount integer, accessionnumber varchar(255), catalognumber varchar(255), collectorsnumber varchar(255), fieldnotes varchar(255), fieldnumber varchar(255), createdby_id integer, updatedby_id integer, lifestage_id integer, sex_id integer, collection_id integer, derivationevent_id integer, storedunder_id integer, preservation_id integer, gatheringevent_id integer, primary key (id));
-create table SpecimenOrObservationBase_Annotation (SpecimenOrObservationBase_id integer not null, annotations_id integer not null, primary key (SpecimenOrObservationBase_id, annotations_id), unique (annotations_id));
-create table SpecimenOrObservationBase_DerivationEvent (originals_id integer not null, derivationevents_id integer not null, primary key (originals_id, derivationevents_id));
-create table SpecimenOrObservationBase_Extension (SpecimenOrObservationBase_id integer not null, extensions_id integer not null, primary key (SpecimenOrObservationBase_id, extensions_id), unique (extensions_id));
-create table SpecimenOrObservationBase_Marker (SpecimenOrObservationBase_id integer not null, markers_id integer not null, primary key (SpecimenOrObservationBase_id, markers_id), unique (markers_id));
-create table SpecimenOrObservationBase_Media (SpecimenOrObservationBase_id integer not null, media_id integer not null, primary key (SpecimenOrObservationBase_id, media_id), unique (media_id));
-create table SpecimenOrObservationBase_OriginalSource (SpecimenOrObservationBase_id integer not null, sources_id integer not null, primary key (SpecimenOrObservationBase_id, sources_id), unique (sources_id));
-create table SpecimenOrObservationBase_Rights (SpecimenOrObservationBase_id integer not null, rights_id integer not null, primary key (SpecimenOrObservationBase_id, rights_id));
-create table SpecimenOrObservationBase_Sequence (SpecimenOrObservationBase_id integer not null, sequences_id integer not null, primary key (SpecimenOrObservationBase_id, sequences_id), unique (sequences_id));
-create table StateData (id integer not null, created timestamp, uuid varchar(255), updated timestamp, modifyingtext varbinary(255), createdby_id integer, updatedby_id integer, state_id integer, primary key (id));
-create table StateData_DefinedTermBase (StateData_id integer not null, modifiers_id integer not null, primary key (StateData_id, modifiers_id), unique (modifiers_id));
-create table StatisticalMeasurementValue (id integer not null, created timestamp, uuid varchar(255), updated timestamp, value double not null, createdby_id integer, updatedby_id integer, type_id integer, primary key (id));
-create table StatisticalMeasurementValue_DefinedTermBase (StatisticalMeasurementValue_id integer not null, modifiers_id integer not null, primary key (StatisticalMeasurementValue_id, modifiers_id), unique (modifiers_id));
-create table SynonymRelationship (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), doubtful boolean not null, partial boolean not null, proparte boolean not null, createdby_id integer, updatedby_id integer, citation_id integer, relatedfrom_id integer, relatedto_id integer, type_id integer, primary key (id));
-create table SynonymRelationship_Annotation (SynonymRelationship_id integer not null, annotations_id integer not null, primary key (SynonymRelationship_id, annotations_id), unique (annotations_id));
-create table SynonymRelationship_Marker (SynonymRelationship_id integer not null, markers_id integer not null, primary key (SynonymRelationship_id, markers_id), unique (markers_id));
-create table TaxonBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, doubtful boolean not null, taxonomicchildrencount integer, createdby_id integer, updatedby_id integer, taxonName_fk integer, sec_id integer, taxonomicparentcache_id integer, primary key (id));
-create table TaxonBase_Annotation (TaxonBase_id integer not null, annotations_id integer not null, primary key (TaxonBase_id, annotations_id), unique (annotations_id));
-create table TaxonBase_Extension (TaxonBase_id integer not null, extensions_id integer not null, primary key (TaxonBase_id, extensions_id), unique (extensions_id));
-create table TaxonBase_Marker (TaxonBase_id integer not null, markers_id integer not null, primary key (TaxonBase_id, markers_id), unique (markers_id));
-create table TaxonBase_OriginalSource (TaxonBase_id integer not null, sources_id integer not null, primary key (TaxonBase_id, sources_id), unique (sources_id));
-create table TaxonBase_Rights (TaxonBase_id integer not null, rights_id integer not null, primary key (TaxonBase_id, rights_id));
-create table TaxonNameBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, appendedphrase varchar(255), hasproblem boolean not null, nomenclaturalmicroreference varchar(255), fullTitleCache varchar(330), problemends integer not null, problemstarts integer not null, protectedfulltitlecache boolean not null, authorshipcache varchar(255), genusoruninomial varchar(255), infragenericepithet varchar(255), infraspecificepithet varchar(255), namecache varchar(255), protectedauthorshipcache boolean, protectednamecache boolean, specificepithet varchar(255), nameapprobation varchar(255), subgenusauthorship varchar(255), anamorphic boolean, binomhybrid boolean, hybridformula boolean, monomhybrid boolean, trinomhybrid boolean, cultivarname varchar(255), acronym varchar(255), breed varchar(255), originalpublicationyear integer, publicationyear integer, createdby_id integer, updatedby_id integer, homotypicalgroup_id integer, nomenclaturalreference_id integer, rank_id integer, basionymauthorteam_id integer, combinationauthorteam_id integer, exbasionymauthorteam_id integer, excombinationauthorteam_id integer, primary key (id));
-create table TaxonNameBase_Annotation (TaxonNameBase_id integer not null, annotations_id integer not null, primary key (TaxonNameBase_id, annotations_id), unique (annotations_id));
-create table TaxonNameBase_Extension (TaxonNameBase_id integer not null, extensions_id integer not null, primary key (TaxonNameBase_id, extensions_id), unique (extensions_id));
-create table TaxonNameBase_HybridRelationship (TaxonNameBase_id integer not null, hybridrelationships_id integer not null, primary key (TaxonNameBase_id, hybridrelationships_id), unique (hybridrelationships_id));
-create table TaxonNameBase_Marker (TaxonNameBase_id integer not null, markers_id integer not null, primary key (TaxonNameBase_id, markers_id), unique (markers_id));
-create table TaxonNameBase_NomenclaturalStatus (TaxonNameBase_id integer not null, status_id integer not null, primary key (TaxonNameBase_id, status_id), unique (status_id));
-create table TaxonNameBase_OriginalSource (TaxonNameBase_id integer not null, sources_id integer not null, primary key (TaxonNameBase_id, sources_id), unique (sources_id));
-create table TaxonNameBase_Rights (TaxonNameBase_id integer not null, rights_id integer not null, primary key (TaxonNameBase_id, rights_id));
-create table TaxonNameBase_TypeDesignationBase (TaxonNameBase_id integer not null, typedesignations_id integer not null, primary key (TaxonNameBase_id, typedesignations_id));
-create table TaxonRelationship (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), doubtful boolean not null, createdby_id integer, updatedby_id integer, citation_id integer, relatedfrom_id integer, relatedto_id integer, type_id integer, primary key (id));
-create table TaxonRelationship_Annotation (TaxonRelationship_id integer not null, annotations_id integer not null, primary key (TaxonRelationship_id, annotations_id), unique (annotations_id));
-create table TaxonRelationship_Marker (TaxonRelationship_id integer not null, markers_id integer not null, primary key (TaxonRelationship_id, markers_id), unique (markers_id));
-create table TermVocabulary (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, uri varchar(255), termsourceuri varchar(255), createdby_id integer, updatedby_id integer, primary key (id));
-create table TermVocabulary_Representation (TermVocabulary_id integer not null, representations_id integer not null, primary key (TermVocabulary_id, representations_id), unique (representations_id));
-create table TypeDesignationBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), notdesignated boolean not null, conservedtype boolean, lectotype boolean, rejectedtype boolean, createdby_id integer, updatedby_id integer, citation_id integer, homotypicalgroup_id integer, typename_id integer, typespecimen_id integer, typestatus_id integer, primary key (id));
-create table TypeDesignationBase_Annotation (TypeDesignationBase_id integer not null, annotations_id integer not null, primary key (TypeDesignationBase_id, annotations_id), unique (annotations_id));
-create table TypeDesignationBase_Marker (TypeDesignationBase_id integer not null, markers_id integer not null, primary key (TypeDesignationBase_id, markers_id), unique (markers_id));
-create table TypeDesignationBase_TaxonNameBase (TypeDesignationBase_id integer not null, typifiednames_id integer not null, primary key (TypeDesignationBase_id, typifiednames_id));
-create table User (id integer not null, created timestamp, uuid varchar(255), accountnonexpired boolean not null, accountnonlocked boolean not null, credentialsnonexpired boolean not null, emailaddress varchar(255), enabled boolean not null, password varchar(255), username varchar(255), createdby_id integer, primary key (id), unique (username));
-create table User_GrantedAuthorityImpl (User_id integer not null, grantedauthorities_id integer not null, primary key (User_id, grantedauthorities_id));
-create table User_PermissionGroup (members_id integer not null, groups_id integer not null, primary key (members_id, groups_id));
-alter table Address add constraint FK1ED033D4132A2FE8 foreign key (location_referencesystem_id) references DefinedTermBase;
-alter table Address add constraint FK1ED033D4EE7A4BF4 foreign key (contact_id) references Contact;
-alter table Address add constraint FK1ED033D4EF7921F6 foreign key (createdby_id) references Agent;
-alter table Address add constraint FK1ED033D42687715A foreign key (country_id) references DefinedTermBase;
-alter table Address add constraint FK1ED033D45BE3EC03 foreign key (updatedby_id) references Agent;
-create index agentTitleCacheIndex on Agent (titleCache);
-alter table Agent add constraint FK3C452E5EE7A4BF4 foreign key (contact_id) references Contact;
-alter table Agent add constraint FK3C452E5EF7921F6 foreign key (createdby_id) references Agent;
-alter table Agent add constraint FK3C452E5A830578 foreign key (ispartof_id) references Agent;
-alter table Agent add constraint FK3C452E55BE3EC03 foreign key (updatedby_id) references Agent;
-alter table Agent_Agent add constraint FKD792890B8CB642F8 foreign key (Agent_id) references Agent;
-alter table Agent_Agent add constraint FKD792890BE9E535F9 foreign key (teammembers_id) references Agent;
-alter table Agent_Annotation add constraint FKDD9D78E9C5F7EC54 foreign key (Agent_id) references Agent;
-alter table Agent_Annotation add constraint FKDD9D78E91E403E0B foreign key (annotations_id) references Annotation;
-alter table Agent_DefinedTermBase add constraint FK7029490CFE425B87 foreign key (Agent_id) references Agent;
-alter table Agent_DefinedTermBase add constraint FK7029490C9A161BED foreign key (types_id) references DefinedTermBase;
-alter table Agent_Extension add constraint FK8AC9EF45C5F7EC54 foreign key (Agent_id) references Agent;
-alter table Agent_Extension add constraint FK8AC9EF45927DE9DF foreign key (extensions_id) references Extension;
-alter table Agent_Marker add constraint FK2EEA0EF4C5F7EC54 foreign key (Agent_id) references Agent;
-alter table Agent_Marker add constraint FK2EEA0EF4777265A1 foreign key (markers_id) references Marker;
-alter table Agent_Media add constraint FKD83AB5EAC5F7EC54 foreign key (Agent_id) references Agent;
-alter table Agent_Media add constraint FKD83AB5EAC2C29593 foreign key (media_id) references Media;
-alter table Agent_OriginalSource add constraint FK774F9E06C5F7EC54 foreign key (Agent_id) references Agent;
-alter table Agent_OriginalSource add constraint FK774F9E063BAB2414 foreign key (sources_id) references OriginalSource;
-alter table Agent_Rights add constraint FK37DDFC91C5F7EC54 foreign key (Agent_id) references Agent;
-alter table Agent_Rights add constraint FK37DDFC91C13F7B21 foreign key (rights_id) references Rights;
-alter table Annotation add constraint FK1A21C74FDF299D00 foreign key (annotationtype_id) references DefinedTermBase;
-alter table Annotation add constraint FK1A21C74FEF7921F6 foreign key (createdby_id) references Agent;
-alter table Annotation add constraint FK1A21C74FE7692740 foreign key (commentator_id) references Agent;
-alter table Annotation add constraint FK1A21C74F5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table Annotation add constraint FK1A21C74FE8D36B00 foreign key (language_id) references DefinedTermBase;
-alter table Annotation_Annotation add constraint FKC99DFE3F994CCE20 foreign key (Annotation_id) references Annotation;
-alter table Annotation_Annotation add constraint FKC99DFE3F1E403E0B foreign key (annotations_id) references Annotation;
-alter table Annotation_Marker add constraint FKB17EAF4A994CCE20 foreign key (Annotation_id) references Annotation;
-alter table Annotation_Marker add constraint FKB17EAF4A777265A1 foreign key (markers_id) references Marker;
-alter table CDM_VIEW add constraint FKC5DE8EF8EF7921F6 foreign key (createdby_id) references Agent;
-alter table CDM_VIEW_CDM_VIEW add constraint FK230A885F7208BB38 foreign key (superviews_id) references CDM_VIEW;
-alter table CDM_VIEW_CDM_VIEW add constraint FK230A885FC00D1213 foreign key (CDM_VIEW_id) references CDM_VIEW;
-create index collectionTitleCacheIndex on Collection (titleCache);
-alter table Collection add constraint FKF078ABECEB38EFF foreign key (supercollection_id) references Collection;
-alter table Collection add constraint FKF078ABEEF7921F6 foreign key (createdby_id) references Agent;
-alter table Collection add constraint FKF078ABE16B9CA77 foreign key (institute_id) references Agent;
-alter table Collection add constraint FKF078ABE5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table Collection_Annotation add constraint FKEA970F70EB62BE9A foreign key (Collection_id) references Collection;
-alter table Collection_Annotation add constraint FKEA970F701E403E0B foreign key (annotations_id) references Annotation;
-alter table Collection_Extension add constraint FKF68FEBDE927DE9DF foreign key (extensions_id) references Extension;
-alter table Collection_Extension add constraint FKF68FEBDEEB62BE9A foreign key (Collection_id) references Collection;
-alter table Collection_Marker add constraint FKF0CA00FBEB62BE9A foreign key (Collection_id) references Collection;
-alter table Collection_Marker add constraint FKF0CA00FB777265A1 foreign key (markers_id) references Marker;
-alter table Collection_Media add constraint FK7320E703EB62BE9A foreign key (Collection_id) references Collection;
-alter table Collection_Media add constraint FK7320E703C2C29593 foreign key (media_id) references Media;
-alter table Collection_OriginalSource add constraint FKA8FC990DEB62BE9A foreign key (Collection_id) references Collection;
-alter table Collection_OriginalSource add constraint FKA8FC990D3BAB2414 foreign key (sources_id) references OriginalSource;
-alter table Collection_Rights add constraint FKF9BDEE98EB62BE9A foreign key (Collection_id) references Collection;
-alter table Collection_Rights add constraint FKF9BDEE98C13F7B21 foreign key (rights_id) references Rights;
-alter table Contact add constraint FK9BEFBC00EF7921F6 foreign key (createdby_id) references Agent;
-alter table Contact add constraint FK9BEFBC005BE3EC03 foreign key (updatedby_id) references Agent;
-alter table DefinedTermBase add constraint FK2E340A6636C6F6F6 foreign key (pointapproximation_referencesystem_id) references DefinedTermBase;
-alter table DefinedTermBase add constraint FK2E340A66EF7921F6 foreign key (createdby_id) references Agent;
-alter table DefinedTermBase add constraint FK2E340A6688206484 foreign key (type_id) references DefinedTermBase;
-alter table DefinedTermBase add constraint FK2E340A6647AF954C foreign key (vocabulary_id) references TermVocabulary;
-alter table DefinedTermBase add constraint FK2E340A663B0DA0EF foreign key (kindof_id) references DefinedTermBase;
-alter table DefinedTermBase add constraint FK2E340A6624AF3F70 foreign key (level_id) references DefinedTermBase;
-alter table DefinedTermBase add constraint FK2E340A665BE3EC03 foreign key (updatedby_id) references Agent;
-alter table DefinedTermBase add constraint FK2E340A66CC0240B6 foreign key (shape_id) references Media;
-alter table DefinedTermBase add constraint FK2E340A66D040DBF0 foreign key (partof_id) references DefinedTermBase;
-alter table DefinedTermBase_Continent add constraint FK45F60AFBE8CE10AA foreign key (DefinedTermBase_id) references DefinedTermBase;
-alter table DefinedTermBase_Continent add constraint FK45F60AFB3927C853 foreign key (continents_id) references DefinedTermBase;
-alter table DefinedTermBase_Media add constraint FK6FC908ABC0DB4934 foreign key (DefinedTermBase_id) references DefinedTermBase;
-alter table DefinedTermBase_Media add constraint FK6FC908ABC2C29593 foreign key (media_id) references Media;
-alter table DefinedTermBase_RecommendedModifierEnumeration add constraint FKA72FB5AED0BDAE9B foreign key (DefinedTermBase_id) references DefinedTermBase;
-alter table DefinedTermBase_RecommendedModifierEnumeration add constraint FKA72FB5AE5255EAFD foreign key (recommendedmodifierenumeration_id) references TermVocabulary;
-alter table DefinedTermBase_Representation add constraint FKAAC8AFE6C0DB4934 foreign key (DefinedTermBase_id) references DefinedTermBase;
-alter table DefinedTermBase_Representation add constraint FKAAC8AFE6B31C4747 foreign key (representations_id) references Representation;
-alter table DefinedTermBase_StatisticalMeasure add constraint FK6FF15DFCD0BDAE9B foreign key (DefinedTermBase_id) references DefinedTermBase;
-alter table DefinedTermBase_StatisticalMeasure add constraint FK6FF15DFCC9CD5B57 foreign key (recommendedstatisticalmeasures_id) references DefinedTermBase;
-alter table DefinedTermBase_SupportedCategoricalEnumeration add constraint FK2170B25CD0BDAE9B foreign key (DefinedTermBase_id) references DefinedTermBase;
-alter table DefinedTermBase_SupportedCategoricalEnumeration add constraint FK2170B25C5AF2C74 foreign key (supportedcategoricalenumerations_id) references TermVocabulary;
-alter table DefinedTermBase_WaterbodyOrCountry add constraint FKCAF4393CE5C0F9E foreign key (DefinedTermBase_id) references DefinedTermBase;
-alter table DefinedTermBase_WaterbodyOrCountry add constraint FKCAF43931603B036 foreign key (waterbodiesorcountries_id) references DefinedTermBase;
-alter table DerivationEvent add constraint FK426BC03EF7921F6 foreign key (createdby_id) references Agent;
-alter table DerivationEvent add constraint FK426BC038524B89D foreign key (type_id) references DefinedTermBase;
-alter table DerivationEvent add constraint FK426BC035BE3EC03 foreign key (updatedby_id) references Agent;
-alter table DerivationEvent add constraint FK426BC03C04DF64 foreign key (actor_id) references Agent;
-alter table DerivationEvent_Annotation add constraint FKEFA0D10B4AAB411A foreign key (DerivationEvent_id) references DerivationEvent;
-alter table DerivationEvent_Annotation add constraint FKEFA0D10B1E403E0B foreign key (annotations_id) references Annotation;
-alter table DerivationEvent_Marker add constraint FKE412C8164AAB411A foreign key (DerivationEvent_id) references DerivationEvent;
-alter table DerivationEvent_Marker add constraint FKE412C816777265A1 foreign key (markers_id) references Marker;
-alter table DescriptionBase add constraint FKFF4D58CDEF7921F6 foreign key (createdby_id) references Agent;
-alter table DescriptionBase add constraint FKFF4D58CDDA93512F foreign key (taxonName_fk) references TaxonNameBase;
-alter table DescriptionBase add constraint FKFF4D58CD5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table DescriptionBase add constraint FKFF4D58CDDE9A3DE3 foreign key (taxon_fk) references TaxonBase;
-alter table DescriptionBase_Annotation add constraint FKF3AD3201F1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
-alter table DescriptionBase_Annotation add constraint FKF3AD32011E403E0B foreign key (annotations_id) references Annotation;
-alter table DescriptionBase_Extension add constraint FKD5D2B32DF1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
-alter table DescriptionBase_Extension add constraint FKD5D2B32D927DE9DF foreign key (extensions_id) references Extension;
-alter table DescriptionBase_GeoScope add constraint FK3ADD7CD5D86445CE foreign key (DescriptionBase_id) references DescriptionBase;
-alter table DescriptionBase_GeoScope add constraint FK3ADD7CD586D04E74 foreign key (geoscopes_id) references DefinedTermBase;
-alter table DescriptionBase_Marker add constraint FK6132140CF1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
-alter table DescriptionBase_Marker add constraint FK6132140C777265A1 foreign key (markers_id) references Marker;
-alter table DescriptionBase_OriginalSource add constraint FK1E2D0B1EF1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
-alter table DescriptionBase_OriginalSource add constraint FK1E2D0B1E3BAB2414 foreign key (sources_id) references OriginalSource;
-alter table DescriptionBase_ReferenceBase add constraint FK76188CAAF1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
-alter table DescriptionBase_ReferenceBase add constraint FK76188CAA45AB7BBA foreign key (descriptionsources_id) references ReferenceBase;
-alter table DescriptionBase_Rights add constraint FK6A2601A9F1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
-alter table DescriptionBase_Rights add constraint FK6A2601A9C13F7B21 foreign key (rights_id) references Rights;
-alter table DescriptionBase_Scope add constraint FKB9257C42D86445CE foreign key (DescriptionBase_id) references DescriptionBase;
-alter table DescriptionBase_Scope add constraint FKB9257C42951A5D40 foreign key (scopes_id) references DefinedTermBase;
-alter table DescriptionElementBase add constraint FK38FE767134AF0E81 foreign key (indescription_id) references DescriptionBase;
-alter table DescriptionElementBase add constraint FK38FE76716561D9B1 foreign key (associatedspecimenorobservation_id) references SpecimenOrObservationBase;
-alter table DescriptionElementBase add constraint FK38FE7671EF7921F6 foreign key (createdby_id) references Agent;
-alter table DescriptionElementBase add constraint FK38FE767110A80E07 foreign key (unit_id) references DefinedTermBase;
-alter table DescriptionElementBase add constraint FK38FE76716D0D7A56 foreign key (format_id) references DefinedTermBase;
-alter table DescriptionElementBase add constraint FK38FE76715E9914B8 foreign key (status_id) references DefinedTermBase;
-alter table DescriptionElementBase add constraint FK38FE76714220AFEB foreign key (feature_id) references DefinedTermBase;
-alter table DescriptionElementBase add constraint FK38FE76719803512F foreign key (citation_id) references ReferenceBase;
-alter table DescriptionElementBase add constraint FK38FE76715BE3EC03 foreign key (updatedby_id) references Agent;
-alter table DescriptionElementBase add constraint FK38FE76719108D9B foreign key (taxon2_id) references TaxonBase;
-alter table DescriptionElementBase add constraint FK38FE76711C3C3FF7 foreign key (area_id) references DefinedTermBase;
-alter table DescriptionElementBase add constraint FK38FE7671E8D36B00 foreign key (language_id) references DefinedTermBase;
-alter table DescriptionElementBase_Annotation add constraint FK7EE5E5DD3B8BB609 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
-alter table DescriptionElementBase_Annotation add constraint FK7EE5E5DD1E403E0B foreign key (annotations_id) references Annotation;
-alter table DescriptionElementBase_LanguageString add constraint FKC753F137ACF5F60B foreign key (multilanguagetext_id) references LanguageString;
-alter table DescriptionElementBase_LanguageString add constraint FKC753F137C086B46F foreign key (DescriptionElementBase_id) references DescriptionElementBase;
-alter table DescriptionElementBase_Marker add constraint FK1CB715E83B8BB609 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
-alter table DescriptionElementBase_Marker add constraint FK1CB715E8777265A1 foreign key (markers_id) references Marker;
-alter table DescriptionElementBase_Media add constraint FK21F70076C2C29593 foreign key (media_id) references Media;
-alter table DescriptionElementBase_Media add constraint FK21F700763B8BB609 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
-alter table DescriptionElementBase_Modifier add constraint FK97E0D105E0960EC4 foreign key (modifiers_id) references DefinedTermBase;
-alter table DescriptionElementBase_Modifier add constraint FK97E0D1053B8BB609 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
-alter table DescriptionElementBase_StateData add constraint FK592D6F6D987CC6A4 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
-alter table DescriptionElementBase_StateData add constraint FK592D6F6D15153604 foreign key (states_id) references StateData;
-alter table DescriptionElementBase_StatisticalMeasurementValue add constraint FK8AF511C2D883945E foreign key (statisticalvalues_id) references StatisticalMeasurementValue;
-alter table DescriptionElementBase_StatisticalMeasurementValue add constraint FK8AF511C28F213219 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
-alter table DeterminationEvent add constraint FK1DB2497EF7921F6 foreign key (createdby_id) references Agent;
-alter table DeterminationEvent add constraint FK1DB2497378D1BD foreign key (modifier_id) references DefinedTermBase;
-alter table DeterminationEvent add constraint FK1DB2497DE9A3E39 foreign key (taxon_id) references TaxonBase;
-alter table DeterminationEvent add constraint FK1DB24974B251DAD foreign key (identifiedunit_id) references SpecimenOrObservationBase;
-alter table DeterminationEvent add constraint FK1DB24975BE3EC03 foreign key (updatedby_id) references Agent;
-alter table DeterminationEvent add constraint FK1DB2497C04DF64 foreign key (actor_id) references Agent;
-alter table DeterminationEvent_Annotation add constraint FKB74F03F76BE0BFDA foreign key (DeterminationEvent_id) references DeterminationEvent;
-alter table DeterminationEvent_Annotation add constraint FKB74F03F71E403E0B foreign key (annotations_id) references Annotation;
-alter table DeterminationEvent_Marker add constraint FK5C475102777265A1 foreign key (markers_id) references Marker;
-alter table DeterminationEvent_Marker add constraint FK5C4751026BE0BFDA foreign key (DeterminationEvent_id) references DeterminationEvent;
-alter table DeterminationEvent_ReferenceBase add constraint FK6248EEF4F3C981EE foreign key (references_id) references ReferenceBase;
-alter table DeterminationEvent_ReferenceBase add constraint FK6248EEF46BE0BFDA foreign key (DeterminationEvent_id) references DeterminationEvent;
-alter table Extension add constraint FK52EF3C1FEF7921F6 foreign key (createdby_id) references Agent;
-alter table Extension add constraint FK52EF3C1FAD392BD3 foreign key (type_id) references DefinedTermBase;
-alter table Extension add constraint FK52EF3C1F5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table FeatureNode add constraint FK4CEED9F8E0AD2C03 foreign key (parent_fk) references FeatureNode;
-alter table FeatureNode add constraint FK4CEED9F8EF7921F6 foreign key (createdby_id) references Agent;
-alter table FeatureNode add constraint FK4CEED9F84220AFEB foreign key (feature_id) references DefinedTermBase;
-alter table FeatureNode add constraint FK4CEED9F85BE3EC03 foreign key (updatedby_id) references Agent;
-alter table FeatureTree add constraint FK4CF19F94EF7921F6 foreign key (createdby_id) references Agent;
-alter table FeatureTree add constraint FK4CF19F94B7892921 foreign key (root_id) references FeatureNode;
-alter table FeatureTree add constraint FK4CF19F945BE3EC03 foreign key (updatedby_id) references Agent;
-alter table FeatureTree_Representation add constraint FK8C458F847C496CB foreign key (FeatureTree_id) references FeatureTree;
-alter table FeatureTree_Representation add constraint FK8C458F8B31C4747 foreign key (representations_id) references Representation;
-alter table GatheringEvent add constraint FK6F1286F3F55AFD89 foreign key (exactlocation_referencesystem_id) references DefinedTermBase;
-alter table GatheringEvent add constraint FK6F1286F38B455EC6 foreign key (locality_id) references LanguageString;
-alter table GatheringEvent add constraint FK6F1286F3EF7921F6 foreign key (createdby_id) references Agent;
-alter table GatheringEvent add constraint FK6F1286F35BE3EC03 foreign key (updatedby_id) references Agent;
-alter table GatheringEvent add constraint FK6F1286F3C04DF64 foreign key (actor_id) references Agent;
-alter table GatheringEvent_Annotation add constraint FK76DDD01BF95F225A foreign key (GatheringEvent_id) references GatheringEvent;
-alter table GatheringEvent_Annotation add constraint FK76DDD01B1E403E0B foreign key (annotations_id) references Annotation;
-alter table GatheringEvent_DefinedTermBase add constraint FK69D9A11A7C34B6D6 foreign key (collectingareas_id) references DefinedTermBase;
-alter table GatheringEvent_DefinedTermBase add constraint FK69D9A11AF95F225A foreign key (GatheringEvent_id) references GatheringEvent;
-alter table GatheringEvent_Marker add constraint FK7B49CF26777265A1 foreign key (markers_id) references Marker;
-alter table GatheringEvent_Marker add constraint FK7B49CF26F95F225A foreign key (GatheringEvent_id) references GatheringEvent;
-alter table GenBankAccession add constraint FK86C1DBF8EF7921F6 foreign key (createdby_id) references Agent;
-alter table GenBankAccession add constraint FK86C1DBF85BE3EC03 foreign key (updatedby_id) references Agent;
-alter table GrantedAuthorityImpl add constraint FKB05CF928EF7921F6 foreign key (createdby_id) references Agent;
-alter table HomotypicalGroup add constraint FK7DECCC18EF7921F6 foreign key (createdby_id) references Agent;
-alter table HomotypicalGroup add constraint FK7DECCC185BE3EC03 foreign key (updatedby_id) references Agent;
-alter table HomotypicalGroup_Annotation add constraint FK7A0351D6BFEAE500 foreign key (HomotypicalGroup_id) references HomotypicalGroup;
-alter table HomotypicalGroup_Annotation add constraint FK7A0351D61E403E0B foreign key (annotations_id) references Annotation;
-alter table HomotypicalGroup_Marker add constraint FK97D36661BFEAE500 foreign key (HomotypicalGroup_id) references HomotypicalGroup;
-alter table HomotypicalGroup_Marker add constraint FK97D36661777265A1 foreign key (markers_id) references Marker;
-alter table HybridRelationship add constraint FK9033CE745831BDC3 foreign key (relatedfrom_id) references TaxonNameBase;
-alter table HybridRelationship add constraint FK9033CE7469ABE292 foreign key (relatedto_id) references TaxonNameBase;
-alter table HybridRelationship add constraint FK9033CE74EF7921F6 foreign key (createdby_id) references Agent;
-alter table HybridRelationship add constraint FK9033CE7455F241D4 foreign key (type_id) references DefinedTermBase;
-alter table HybridRelationship add constraint FK9033CE749803512F foreign key (citation_id) references ReferenceBase;
-alter table HybridRelationship add constraint FK9033CE745BE3EC03 foreign key (updatedby_id) references Agent;
-alter table HybridRelationship_Annotation add constraint FK2C7E7DFA59832240 foreign key (HybridRelationship_id) references HybridRelationship;
-alter table HybridRelationship_Annotation add constraint FK2C7E7DFA1E403E0B foreign key (annotations_id) references Annotation;
-alter table HybridRelationship_Marker add constraint FKCEF2448559832240 foreign key (HybridRelationship_id) references HybridRelationship;
-alter table HybridRelationship_Marker add constraint FKCEF24485777265A1 foreign key (markers_id) references Marker;
-alter table IdentificationKey_Taxon add constraint FKD847ADDC996CD055 foreign key (identificationKey_fk) references Media;
-alter table IdentificationKey_Taxon add constraint FKD847ADDCDE9A3DE3 foreign key (taxon_fk) references TaxonBase;
-alter table InstitutionalMembership add constraint FK3C8E1FF9EF7921F6 foreign key (createdby_id) references Agent;
-alter table InstitutionalMembership add constraint FK3C8E1FF9AAC1B820 foreign key (person_id) references Agent;
-alter table InstitutionalMembership add constraint FK3C8E1FF916B9CA77 foreign key (institute_id) references Agent;
-alter table InstitutionalMembership add constraint FK3C8E1FF95BE3EC03 foreign key (updatedby_id) references Agent;
-alter table LanguageString add constraint FKB5FDC9A9EF7921F6 foreign key (createdby_id) references Agent;
-alter table LanguageString add constraint FKB5FDC9A95BE3EC03 foreign key (updatedby_id) references Agent;
-alter table LanguageString add constraint FKB5FDC9A9E8D36B00 foreign key (language_id) references DefinedTermBase;
-alter table LanguageString_Annotation add constraint FK8400DFA51E403E0B foreign key (annotations_id) references Annotation;
-alter table LanguageString_Annotation add constraint FK8400DFA537998500 foreign key (LanguageString_id) references LanguageString;
-alter table LanguageString_Marker add constraint FK8DA633B0777265A1 foreign key (markers_id) references Marker;
-alter table LanguageString_Marker add constraint FK8DA633B037998500 foreign key (LanguageString_id) references LanguageString;
-alter table Locus add constraint FK462F1BEEF7921F6 foreign key (createdby_id) references Agent;
-alter table Locus add constraint FK462F1BE5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table Marker add constraint FK88F1805AEF7921F6 foreign key (createdby_id) references Agent;
-alter table Marker add constraint FK88F1805AD64DC020 foreign key (markertype_id) references DefinedTermBase;
-alter table Marker add constraint FK88F1805A5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table Media add constraint FK46C7FC4EF7921F6 foreign key (createdby_id) references Agent;
-alter table Media add constraint FK46C7FC490A4D0D2 foreign key (artist_id) references Agent;
-alter table Media add constraint FK46C7FC49803512F foreign key (citation_id) references ReferenceBase;
-alter table Media add constraint FK46C7FC45BE3EC03 foreign key (updatedby_id) references Agent;
-alter table MediaRepresentation add constraint FK1966BDB1EF7921F6 foreign key (createdby_id) references Agent;
-alter table MediaRepresentation add constraint FK1966BDB1C2C29593 foreign key (media_id) references Media;
-alter table MediaRepresentation add constraint FK1966BDB15BE3EC03 foreign key (updatedby_id) references Agent;
-alter table MediaRepresentationPart add constraint FK67A45544E3818E37 foreign key (representation_id) references MediaRepresentation;
-alter table MediaRepresentationPart add constraint FK67A45544EF7921F6 foreign key (createdby_id) references Agent;
-alter table MediaRepresentationPart add constraint FK67A455445BE3EC03 foreign key (updatedby_id) references Agent;
-alter table Media_Annotation add constraint FKA020DAAAC2C29593 foreign key (Media_id) references Media;
-alter table Media_Annotation add constraint FKA020DAAA1E403E0B foreign key (annotations_id) references Annotation;
-alter table Media_DefinedTermBase add constraint FK96F1D7EB8A6C9D18 foreign key (Media_id) references Media;
-alter table Media_DefinedTermBase add constraint FK96F1D7EB86D04E74 foreign key (geoscopes_id) references DefinedTermBase;
-alter table Media_Marker add constraint FKD21E7935C2C29593 foreign key (Media_id) references Media;
-alter table Media_Marker add constraint FKD21E7935777265A1 foreign key (markers_id) references Marker;
-alter table Media_Rights add constraint FKDB1266D2C2C29593 foreign key (Media_id) references Media;
-alter table Media_Rights add constraint FKDB1266D2C13F7B21 foreign key (rights_id) references Rights;
-alter table Media_Sequence add constraint FK61D09FC3282B64 foreign key (Media_id) references Media;
-alter table Media_Sequence add constraint FK61D09FCF29B4761 foreign key (usedsequences_id) references Sequence;
-alter table Media_TaxonBase add constraint FK1ABD49E07C3D0017 foreign key (coveredtaxa_id) references TaxonBase;
-alter table Media_TaxonBase add constraint FK1ABD49E08A6C9D18 foreign key (Media_id) references Media;
-alter table NameRelationship add constraint FK5E5108316CDFF85 foreign key (relatedfrom_id) references TaxonNameBase;
-alter table NameRelationship add constraint FK5E5108328482454 foreign key (relatedto_id) references TaxonNameBase;
-alter table NameRelationship add constraint FK5E51083EF7921F6 foreign key (createdby_id) references Agent;
-alter table NameRelationship add constraint FK5E51083AF619DE3 foreign key (type_id) references DefinedTermBase;
-alter table NameRelationship add constraint FK5E510839803512F foreign key (citation_id) references ReferenceBase;
-alter table NameRelationship add constraint FK5E510835BE3EC03 foreign key (updatedby_id) references Agent;
-alter table NameRelationship_Annotation add constraint FK2E38AC8B7B4CB560 foreign key (NameRelationship_id) references NameRelationship;
-alter table NameRelationship_Annotation add constraint FK2E38AC8B1E403E0B foreign key (annotations_id) references Annotation;
-alter table NameRelationship_Marker add constraint FKE3E463967B4CB560 foreign key (NameRelationship_id) references NameRelationship;
-alter table NameRelationship_Marker add constraint FKE3E46396777265A1 foreign key (markers_id) references Marker;
-alter table NomenclaturalStatus add constraint FK1FFEC88BEF7921F6 foreign key (createdby_id) references Agent;
-alter table NomenclaturalStatus add constraint FK1FFEC88B7029BD9F foreign key (type_id) references DefinedTermBase;
-alter table NomenclaturalStatus add constraint FK1FFEC88B9803512F foreign key (citation_id) references ReferenceBase;
-alter table NomenclaturalStatus add constraint FK1FFEC88B5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table NomenclaturalStatus_Annotation add constraint FKE6E91F838D2CB1D4 foreign key (NomenclaturalStatus_id) references NomenclaturalStatus;
-alter table NomenclaturalStatus_Annotation add constraint FKE6E91F831E403E0B foreign key (annotations_id) references Annotation;
-alter table NomenclaturalStatus_Marker add constraint FK2F5128E8D2CB1D4 foreign key (NomenclaturalStatus_id) references NomenclaturalStatus;
-alter table NomenclaturalStatus_Marker add constraint FK2F5128E777265A1 foreign key (markers_id) references Marker;
-alter table OriginalSource add constraint FK229A496CEF7921F6 foreign key (createdby_id) references Agent;
-alter table OriginalSource add constraint FK229A496C9803512F foreign key (citation_id) references ReferenceBase;
-alter table OriginalSource add constraint FK229A496C5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table OriginalSource_Annotation add constraint FK5B3FF802DC2DCA20 foreign key (OriginalSource_id) references OriginalSource;
-alter table OriginalSource_Annotation add constraint FK5B3FF8021E403E0B foreign key (annotations_id) references Annotation;
-alter table OriginalSource_Marker add constraint FKCF52028DDC2DCA20 foreign key (OriginalSource_id) references OriginalSource;
-alter table OriginalSource_Marker add constraint FKCF52028D777265A1 foreign key (markers_id) references Marker;
-alter table PermissionGroup add constraint FK629941D0EF7921F6 foreign key (createdby_id) references Agent;
-alter table PermissionGroup_GrantedAuthorityImpl add constraint FK5311437CA0971A3 foreign key (PermissionGroup_id) references PermissionGroup;
-alter table PermissionGroup_GrantedAuthorityImpl add constraint FK53114371857F6C2 foreign key (grantedauthorities_id) references GrantedAuthorityImpl;
-alter table Person_Keyword add constraint FK5F559EFF13A443BE foreign key (keyword_fk) references DefinedTermBase;
-alter table Person_Keyword add constraint FK5F559EFFAAC1B7CA foreign key (person_fk) references Agent;
-create index ReferenceBaseTitleCacheIndex on ReferenceBase (titleCache);
-alter table ReferenceBase add constraint FK8F034C9C1A488155 foreign key (inbook_id) references ReferenceBase;
-alter table ReferenceBase add constraint FK8F034C9CEF7921F6 foreign key (createdby_id) references Agent;
-alter table ReferenceBase add constraint FK8F034C9C403E17F4 foreign key (institution_id) references Agent;
-alter table ReferenceBase add constraint FK8F034C9CCCE9AAE2 foreign key (inseries_id) references ReferenceBase;
-alter table ReferenceBase add constraint FK8F034C9CD893F6E6 foreign key (crossref_id) references ReferenceBase;
-alter table ReferenceBase add constraint FK8F034C9CAEC3B8B8 foreign key (school_id) references Agent;
-alter table ReferenceBase add constraint FK8F034C9CE3A02620 foreign key (type_id) references DefinedTermBase;
-alter table ReferenceBase add constraint FK8F034C9CE87E60BF foreign key (inproceedings_id) references ReferenceBase;
-alter table ReferenceBase add constraint FK8F034C9CE019003F foreign key (injournal_id) references ReferenceBase;
-alter table ReferenceBase add constraint FK8F034C9C697665E foreign key (authorteam_id) references Agent;
-alter table ReferenceBase add constraint FK8F034C9C5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table ReferenceBase_Annotation add constraint FKC97616D2F443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
-alter table ReferenceBase_Annotation add constraint FKC97616D21E403E0B foreign key (annotations_id) references Annotation;
-alter table ReferenceBase_Extension add constraint FK81E1703C927DE9DF foreign key (extensions_id) references Extension;
-alter table ReferenceBase_Extension add constraint FK81E1703CF443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
-alter table ReferenceBase_Marker add constraint FK6888095DF443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
-alter table ReferenceBase_Marker add constraint FK6888095D777265A1 foreign key (markers_id) references Marker;
-alter table ReferenceBase_Media add constraint FK3D2F4A61C2C29593 foreign key (media_id) references Media;
-alter table ReferenceBase_Media add constraint FK3D2F4A61F443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
-alter table ReferenceBase_OriginalSource add constraint FK68651F6F3BAB2414 foreign key (sources_id) references OriginalSource;
-alter table ReferenceBase_OriginalSource add constraint FK68651F6FF443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
-alter table ReferenceBase_Rights add constraint FK717BF6FAF443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
-alter table ReferenceBase_Rights add constraint FK717BF6FAC13F7B21 foreign key (rights_id) references Rights;
-alter table RelationshipTermBase_inverseRepresentation add constraint FK98592F33ECEEF4AF foreign key (DefinedTermBase_id) references DefinedTermBase;
-alter table RelationshipTermBase_inverseRepresentation add constraint FK98592F33473FB677 foreign key (inverserepresentations_id) references Representation;
-alter table Representation add constraint FK9C4724EDEF7921F6 foreign key (createdby_id) references Agent;
-alter table Representation add constraint FK9C4724ED5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table Representation add constraint FK9C4724EDE8D36B00 foreign key (language_id) references DefinedTermBase;
-alter table Representation_Annotation add constraint FK371091E147E8AE60 foreign key (Representation_id) references Representation;
-alter table Representation_Annotation add constraint FK371091E11E403E0B foreign key (annotations_id) references Annotation;
-alter table Representation_Marker add constraint FK560063EC47E8AE60 foreign key (Representation_id) references Representation;
-alter table Representation_Marker add constraint FK560063EC777265A1 foreign key (markers_id) references Marker;
-alter table Rights add constraint FK91E56DF7C5F7EC54 foreign key (agent_id) references Agent;
-alter table Rights add constraint FK91E56DF7EF7921F6 foreign key (createdby_id) references Agent;
-alter table Rights add constraint FK91E56DF7E6D2886A foreign key (type_id) references DefinedTermBase;
-alter table Rights add constraint FK91E56DF75BE3EC03 foreign key (updatedby_id) references Agent;
-alter table Rights add constraint FK91E56DF7E8D36B00 foreign key (language_id) references DefinedTermBase;
-alter table Rights_Annotation add constraint FK27CB1E97C13F7B21 foreign key (Rights_id) references Rights;
-alter table Rights_Annotation add constraint FK27CB1E971E403E0B foreign key (annotations_id) references Annotation;
-alter table Rights_Marker add constraint FKB739BBA2C13F7B21 foreign key (Rights_id) references Rights;
-alter table Rights_Marker add constraint FKB739BBA2777265A1 foreign key (markers_id) references Marker;
-create index sequenceTitleCacheIndex on Sequence (titleCache);
-alter table Sequence add constraint FK544ADBE1EF7921F6 foreign key (createdby_id) references Agent;
-alter table Sequence add constraint FK544ADBE1B982A103 foreign key (publishedin_id) references ReferenceBase;
-alter table Sequence add constraint FK544ADBE12DBE1F1F foreign key (locus_id) references Locus;
-alter table Sequence add constraint FK544ADBE15BE3EC03 foreign key (updatedby_id) references Agent;
-alter table Sequence_Annotation add constraint FK1010BA6D1E403E0B foreign key (annotations_id) references Annotation;
-alter table Sequence_Annotation add constraint FK1010BA6DD57FFDD5 foreign key (Sequence_id) references Sequence;
-alter table Sequence_Extension add constraint FK7BE66D41927DE9DF foreign key (extensions_id) references Extension;
-alter table Sequence_Extension add constraint FK7BE66D41D57FFDD5 foreign key (Sequence_id) references Sequence;
-alter table Sequence_GenBankAccession add constraint FK8F69809615C4EF35 foreign key (genbankaccession_id) references GenBankAccession;
-alter table Sequence_GenBankAccession add constraint FK8F698096D57FFDD5 foreign key (Sequence_id) references Sequence;
-alter table Sequence_Marker add constraint FK3D22B278777265A1 foreign key (markers_id) references Marker;
-alter table Sequence_Marker add constraint FK3D22B278D57FFDD5 foreign key (Sequence_id) references Sequence;
-alter table Sequence_Media add constraint FK8E5D91E666ACA7EC foreign key (chromatograms_id) references Media;
-alter table Sequence_Media add constraint FK8E5D91E6D57FFDD5 foreign key (Sequence_id) references Sequence;
-alter table Sequence_OriginalSource add constraint FKD37E7D8A3BAB2414 foreign key (sources_id) references OriginalSource;
-alter table Sequence_OriginalSource add constraint FKD37E7D8AD57FFDD5 foreign key (Sequence_id) references Sequence;
-alter table Sequence_ReferenceBase add constraint FK18D91CBE7291F8A foreign key (citations_id) references ReferenceBase;
-alter table Sequence_ReferenceBase add constraint FK18D91CBED57FFDD5 foreign key (Sequence_id) references Sequence;
-alter table Sequence_Rights add constraint FK4616A015C13F7B21 foreign key (rights_id) references Rights;
-alter table Sequence_Rights add constraint FK4616A015D57FFDD5 foreign key (Sequence_id) references Sequence;
-create index specimenOrObservationBaseTitleCacheIndex on SpecimenOrObservationBase (titleCache);
-alter table SpecimenOrObservationBase add constraint FK21CA3272C8505DB foreign key (preservation_id) references DefinedTermBase;
-alter table SpecimenOrObservationBase add constraint FK21CA3272EF7921F6 foreign key (createdby_id) references Agent;
-alter table SpecimenOrObservationBase add constraint FK21CA32727CC340C5 foreign key (storedunder_id) references TaxonNameBase;
-alter table SpecimenOrObservationBase add constraint FK21CA3272EB62BE9A foreign key (collection_id) references Collection;
-alter table SpecimenOrObservationBase add constraint FK21CA3272E17C9A6B foreign key (sex_id) references DefinedTermBase;
-alter table SpecimenOrObservationBase add constraint FK21CA32728C750E27 foreign key (lifestage_id) references DefinedTermBase;
-alter table SpecimenOrObservationBase add constraint FK21CA32724AAB411A foreign key (derivationevent_id) references DerivationEvent;
-alter table SpecimenOrObservationBase add constraint FK21CA3272F95F225A foreign key (gatheringevent_id) references GatheringEvent;
-alter table SpecimenOrObservationBase add constraint FK21CA32725BE3EC03 foreign key (updatedby_id) references Agent;
-alter table SpecimenOrObservationBase_Annotation add constraint FK365E4F3C3B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
-alter table SpecimenOrObservationBase_Annotation add constraint FK365E4F3C1E403E0B foreign key (annotations_id) references Annotation;
-alter table SpecimenOrObservationBase_DerivationEvent add constraint FK20132036BD59A1AD foreign key (derivationevents_id) references DerivationEvent;
-alter table SpecimenOrObservationBase_DerivationEvent add constraint FK2013203654C216AA foreign key (originals_id) references SpecimenOrObservationBase;
-alter table SpecimenOrObservationBase_Extension add constraint FKE03B82923B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
-alter table SpecimenOrObservationBase_Extension add constraint FKE03B8292927DE9DF foreign key (extensions_id) references Extension;
-alter table SpecimenOrObservationBase_Marker add constraint FK8E6106C73B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
-alter table SpecimenOrObservationBase_Marker add constraint FK8E6106C7777265A1 foreign key (markers_id) references Marker;
-alter table SpecimenOrObservationBase_Media add constraint FK4EEBF7B73B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
-alter table SpecimenOrObservationBase_Media add constraint FK4EEBF7B7C2C29593 foreign key (media_id) references Media;
-alter table SpecimenOrObservationBase_OriginalSource add constraint FK3C4712D93B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
-alter table SpecimenOrObservationBase_OriginalSource add constraint FK3C4712D93BAB2414 foreign key (sources_id) references OriginalSource;
-alter table SpecimenOrObservationBase_Rights add constraint FK9754F4643B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
-alter table SpecimenOrObservationBase_Rights add constraint FK9754F464C13F7B21 foreign key (rights_id) references Rights;
-alter table SpecimenOrObservationBase_Sequence add constraint FKBBF27B0E7EE2770E foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
-alter table SpecimenOrObservationBase_Sequence add constraint FKBBF27B0E35B10F24 foreign key (sequences_id) references Sequence;
-alter table StateData add constraint FKFB1697BBEF7921F6 foreign key (createdby_id) references Agent;
-alter table StateData add constraint FKFB1697BB682A4E4B foreign key (state_id) references DefinedTermBase;
-alter table StateData add constraint FKFB1697BB5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table StateData_DefinedTermBase add constraint FK107321E28E7BF9AB foreign key (StateData_id) references StateData;
-alter table StateData_DefinedTermBase add constraint FK107321E2E0960EC4 foreign key (modifiers_id) references DefinedTermBase;
-alter table StatisticalMeasurementValue add constraint FK2DCE0290EF7921F6 foreign key (createdby_id) references Agent;
-alter table StatisticalMeasurementValue add constraint FK2DCE02904C428112 foreign key (type_id) references DefinedTermBase;
-alter table StatisticalMeasurementValue add constraint FK2DCE02905BE3EC03 foreign key (updatedby_id) references Agent;
-alter table StatisticalMeasurementValue_DefinedTermBase add constraint FK686C42B75C9F4F2B foreign key (StatisticalMeasurementValue_id) references StatisticalMeasurementValue;
-alter table StatisticalMeasurementValue_DefinedTermBase add constraint FK686C42B7E0960EC4 foreign key (modifiers_id) references DefinedTermBase;
-alter table SynonymRelationship add constraint FKF483ADB34BAC703F foreign key (relatedfrom_id) references TaxonBase;
-alter table SynonymRelationship add constraint FKF483ADB3F8991B9D foreign key (relatedto_id) references TaxonBase;
-alter table SynonymRelationship add constraint FKF483ADB3EF7921F6 foreign key (createdby_id) references Agent;
-alter table SynonymRelationship add constraint FKF483ADB380924EEC foreign key (type_id) references DefinedTermBase;
-alter table SynonymRelationship add constraint FKF483ADB39803512F foreign key (citation_id) references ReferenceBase;
-alter table SynonymRelationship add constraint FKF483ADB35BE3EC03 foreign key (updatedby_id) references Agent;
-alter table SynonymRelationship_Annotation add constraint FKF494F15B260A8379 foreign key (SynonymRelationship_id) references SynonymRelationship;
-alter table SynonymRelationship_Annotation add constraint FKF494F15B1E403E0B foreign key (annotations_id) references Annotation;
-alter table SynonymRelationship_Marker add constraint FK7A439066260A8379 foreign key (SynonymRelationship_id) references SynonymRelationship;
-alter table SynonymRelationship_Marker add constraint FK7A439066777265A1 foreign key (markers_id) references Marker;
-create index taxonBaseTitleCacheIndex on TaxonBase (titleCache);
-alter table TaxonBase add constraint FK9249B49BEF7921F6 foreign key (createdby_id) references Agent;
-alter table TaxonBase add constraint FK9249B49BDA93512F foreign key (taxonName_fk) references TaxonNameBase;
-alter table TaxonBase add constraint FK9249B49B7C7B5AED foreign key (taxonomicparentcache_id) references TaxonBase;
-alter table TaxonBase add constraint FK9249B49B5E4A2F85 foreign key (sec_id) references ReferenceBase;
-alter table TaxonBase add constraint FK9249B49B5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table TaxonBase_Annotation add constraint FK41ED09739C9D39 foreign key (TaxonBase_id) references TaxonBase;
-alter table TaxonBase_Annotation add constraint FK41ED09731E403E0B foreign key (annotations_id) references Annotation;
-alter table TaxonBase_Extension add constraint FKF961257B927DE9DF foreign key (extensions_id) references Extension;
-alter table TaxonBase_Extension add constraint FKF961257B9C9D39 foreign key (TaxonBase_id) references TaxonBase;
-alter table TaxonBase_Marker add constraint FK5CDB747E9C9D39 foreign key (TaxonBase_id) references TaxonBase;
-alter table TaxonBase_Marker add constraint FK5CDB747E777265A1 foreign key (markers_id) references Marker;
-alter table TaxonBase_OriginalSource add constraint FK10EFD9903BAB2414 foreign key (sources_id) references OriginalSource;
-alter table TaxonBase_OriginalSource add constraint FK10EFD9909C9D39 foreign key (TaxonBase_id) references TaxonBase;
-alter table TaxonBase_Rights add constraint FK65CF621BC13F7B21 foreign key (rights_id) references Rights;
-alter table TaxonBase_Rights add constraint FK65CF621B9C9D39 foreign key (TaxonBase_id) references TaxonBase;
-create index taxonNameBaseTitleCacheIndex on TaxonNameBase (titleCache);
-alter table TaxonNameBase add constraint FKB4870C6EF7921F6 foreign key (createdby_id) references Agent;
-alter table TaxonNameBase add constraint FKB4870C62B4FEDD6 foreign key (basionymauthorteam_id) references Agent;
-alter table TaxonNameBase add constraint FKB4870C64AC9C024 foreign key (nomenclaturalreference_id) references ReferenceBase;
-alter table TaxonNameBase add constraint FKB4870C6B14B73EF foreign key (combinationauthorteam_id) references Agent;
-alter table TaxonNameBase add constraint FKB4870C6BFEAE500 foreign key (homotypicalgroup_id) references HomotypicalGroup;
-alter table TaxonNameBase add constraint FKB4870C662AD57A2 foreign key (excombinationauthorteam_id) references Agent;
-alter table TaxonNameBase add constraint FKB4870C67F90DF03 foreign key (exbasionymauthorteam_id) references Agent;
-alter table TaxonNameBase add constraint FKB4870C65BE3EC03 foreign key (updatedby_id) references Agent;
-alter table TaxonNameBase add constraint FKB4870C6D7BE55A0 foreign key (rank_id) references DefinedTermBase;
-alter table TaxonNameBase_Annotation add constraint FK9E7794688C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
-alter table TaxonNameBase_Annotation add constraint FK9E7794681E403E0B foreign key (annotations_id) references Annotation;
-alter table TaxonNameBase_Extension add constraint FKC28EE7E6927DE9DF foreign key (extensions_id) references Extension;
-alter table TaxonNameBase_Extension add constraint FKC28EE7E68C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
-alter table TaxonNameBase_HybridRelationship add constraint FK371B728D2D57C7D5 foreign key (hybridrelationships_id) references HybridRelationship;
-alter table TaxonNameBase_HybridRelationship add constraint FK371B728DCDE98DD2 foreign key (TaxonNameBase_id) references TaxonNameBase;
-alter table TaxonNameBase_Marker add constraint FK39E3C1F38C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
-alter table TaxonNameBase_Marker add constraint FK39E3C1F3777265A1 foreign key (markers_id) references Marker;
-alter table TaxonNameBase_NomenclaturalStatus add constraint FK560BA7926615E90D foreign key (status_id) references NomenclaturalStatus;
-alter table TaxonNameBase_NomenclaturalStatus add constraint FK560BA7928C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
-alter table TaxonNameBase_OriginalSource add constraint FKBEA1E2053BAB2414 foreign key (sources_id) references OriginalSource;
-alter table TaxonNameBase_OriginalSource add constraint FKBEA1E2058C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
-alter table TaxonNameBase_Rights add constraint FK42D7AF90C13F7B21 foreign key (rights_id) references Rights;
-alter table TaxonNameBase_Rights add constraint FK42D7AF908C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
-alter table TaxonNameBase_TypeDesignationBase add constraint FKC0D6BBB5C7DF530C foreign key (typedesignations_id) references TypeDesignationBase;
-alter table TaxonNameBase_TypeDesignationBase add constraint FKC0D6BBB58C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
-alter table TaxonRelationship add constraint FK7482BA02E71EF6CE foreign key (relatedfrom_id) references TaxonBase;
-alter table TaxonRelationship add constraint FK7482BA02F8991B9D foreign key (relatedto_id) references TaxonBase;
-alter table TaxonRelationship add constraint FK7482BA02EF7921F6 foreign key (createdby_id) references Agent;
-alter table TaxonRelationship add constraint FK7482BA02F11BD77B foreign key (type_id) references DefinedTermBase;
-alter table TaxonRelationship add constraint FK7482BA029803512F foreign key (citation_id) references ReferenceBase;
-alter table TaxonRelationship add constraint FK7482BA025BE3EC03 foreign key (updatedby_id) references Agent;
-alter table TaxonRelationship_Annotation add constraint FK82C86DAC1E403E0B foreign key (annotations_id) references Annotation;
-alter table TaxonRelationship_Annotation add constraint FK82C86DAC2BD180D9 foreign key (TaxonRelationship_id) references TaxonRelationship;
-alter table TaxonRelationship_Marker add constraint FK69FBDD37777265A1 foreign key (markers_id) references Marker;
-alter table TaxonRelationship_Marker add constraint FK69FBDD372BD180D9 foreign key (TaxonRelationship_id) references TaxonRelationship;
-alter table TermVocabulary add constraint FK487AA692EF7921F6 foreign key (createdby_id) references Agent;
-alter table TermVocabulary add constraint FK487AA6925BE3EC03 foreign key (updatedby_id) references Agent;
-alter table TermVocabulary_Representation add constraint FKA408B63A258E060 foreign key (TermVocabulary_id) references TermVocabulary;
-alter table TermVocabulary_Representation add constraint FKA408B63AB31C4747 foreign key (representations_id) references Representation;
-alter table TypeDesignationBase add constraint FK8AC9DCAE2FB99E97 foreign key (typestatus_id) references DefinedTermBase;
-alter table TypeDesignationBase add constraint FK8AC9DCAEEF7921F6 foreign key (createdby_id) references Agent;
-alter table TypeDesignationBase add constraint FK8AC9DCAE94DB044A foreign key (typespecimen_id) references SpecimenOrObservationBase;
-alter table TypeDesignationBase add constraint FK8AC9DCAEBFEAE500 foreign key (homotypicalgroup_id) references HomotypicalGroup;
-alter table TypeDesignationBase add constraint FK8AC9DCAE9803512F foreign key (citation_id) references ReferenceBase;
-alter table TypeDesignationBase add constraint FK8AC9DCAE4CB0F315 foreign key (typename_id) references TaxonNameBase;
-alter table TypeDesignationBase add constraint FK8AC9DCAE5BE3EC03 foreign key (updatedby_id) references Agent;
-alter table TypeDesignationBase_Annotation add constraint FK4D73278044E9E6D4 foreign key (TypeDesignationBase_id) references TypeDesignationBase;
-alter table TypeDesignationBase_Annotation add constraint FK4D7327801E403E0B foreign key (annotations_id) references Annotation;
-alter table TypeDesignationBase_Marker add constraint FKB914A10B44E9E6D4 foreign key (TypeDesignationBase_id) references TypeDesignationBase;
-alter table TypeDesignationBase_Marker add constraint FKB914A10B777265A1 foreign key (markers_id) references Marker;
-alter table TypeDesignationBase_TaxonNameBase add constraint FKF61156F54D901A92 foreign key (typifiednames_id) references TaxonNameBase;
-alter table TypeDesignationBase_TaxonNameBase add constraint FKF61156F544E9E6D4 foreign key (TypeDesignationBase_id) references TypeDesignationBase;
-alter table User add constraint FK285FEBEF7921F6 foreign key (createdby_id) references Agent;
-alter table User_GrantedAuthorityImpl add constraint FKA2FB64FCCF9BC520 foreign key (User_id) references User;
-alter table User_GrantedAuthorityImpl add constraint FKA2FB64FC1857F6C2 foreign key (grantedauthorities_id) references GrantedAuthorityImpl;
-alter table User_PermissionGroup add constraint FKDD33C17CDA9DCB5F foreign key (groups_id) references PermissionGroup;
-alter table User_PermissionGroup add constraint FKDD33C17C887E3D12 foreign key (members_id) references User;