merge with local branch
authorU-BGBM\k.luther <k.luther@BGBM11732.bgbm.fu-berlin.de>
Wed, 23 Sep 2015 12:29:31 +0000 (14:29 +0200)
committerU-BGBM\k.luther <k.luther@BGBM11732.bgbm.fu-berlin.de>
Wed, 23 Sep 2015 12:29:31 +0000 (14:29 +0200)
428 files changed:
.gitattributes
.gitignore
eu.etaxonomy.taxeditor.application/.classpath
eu.etaxonomy.taxeditor.application/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.application/pom.xml
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchWindowAdvisor.java
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/update/P2Util.java
eu.etaxonomy.taxeditor.application/src/main/resources/log4j.properties [deleted file]
eu.etaxonomy.taxeditor.bulkeditor/.classpath
eu.etaxonomy.taxeditor.bulkeditor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.bulkeditor/pom.xml
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/AnnotatedLineDocumentProvider.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/AnnotatedLineEditor.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/IEntityContainer.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/IEntityPersistenceService.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/LineAnnotation.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorLineDisplay.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/GroupEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameRelationshipEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/OccurrenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/TaxonEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/UserEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/UserCreator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java
eu.etaxonomy.taxeditor.cdmlib/.classpath
eu.etaxonomy.taxeditor.cdmlib/.gitignore
eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.cdmlib/build.properties
eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1-sources.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1-sources.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-easymock-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-inject-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-mock-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-orm-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/pom.xml
eu.etaxonomy.taxeditor.cdmlib/resources/cdm.map.ser [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteController.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationState.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmChangeEvent.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmDataChangeService.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmChangeListener.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmDataChangeService.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCacher.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmEagerLoadingException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmRemotingException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CacheLoader.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmClientCacheException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmEntityCacheKey.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelCacher.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelFieldPropertyFromClass.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmRemoteCacheManager.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmTransientEntityCacher.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/EntityCacherDebugResult.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/ProxyUtils.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/server/CDMServerException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmPersistentRemoteSource.java [moved from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmPersistentRemoteSource.java with 89% similarity]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSource.java [moved from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSource.java with 96% similarity]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSourceBase.java [moved from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceBase.java with 77% similarity]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSourceException.java [moved from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceException.java with 82% similarity]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/ICdmRemoteSource.java [moved from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/ICdmRemoteSource.java with 94% similarity]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CachedCommonServiceImpl.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmAuthenticatedHttpInvokerRequestExecutor.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceInterceptorException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceRequestExecutor.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/ICachedCommonService.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/TermServiceRequestExecutor.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmClientSessionException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySession.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManager.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySession.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionEnabled.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManager.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManagerObserver.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/NullSession.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySession.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySessionManager.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/proxy/AbstractLazyInitializer.java
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/.svnignore [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/jetty-runner-9.2.3.v20140905.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/start-9.2.3.v20140905.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/httpInvokerServiceClients.xml
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/localApplicationContext.xml
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remotingApplicationContext.xml
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_persistence_security.xml [deleted file]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_services_security.xml [deleted file]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/log4j.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/test/resources/eu/etaxonomy/cdm/datasources/cdm.datasources.xml [deleted file]
eu.etaxonomy.taxeditor.editor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties
eu.etaxonomy.taxeditor.editor/build.properties
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.editor/pom.xml
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/MultiPageTaxonEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/group/authority/CdmAuthorityEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/group/authority/CdmAuthorityEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenDerivateViewHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/create/NewSpecimenHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/AbstractIdentificationEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/KeyEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorLabels.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyListContentProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyListEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/RemotingCreateChildPolytomousKeyNodeHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/RemotingCreateSiblingPolytomousKeyNodeHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/CreateNodeOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/DeleteNodeOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/RemotingCreatePolytomousKeyNodeOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/TaxonNameEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeSynonymToAcceptedTaxonHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateHomotypicSynonymHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateSynonymInHomotypicalGroupHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteTaxonBaseHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/MoveSynonymToAnotherAcceptedTaxonHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/SwapSynonymAndAcceptedHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptToSynonymOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeHomotypicalGroupBasionymOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToAcceptedTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToMisapplicationOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateSynonymInExistingHomotypicalGroupOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteMisapplicationOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteTaxonBaseOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/MoveSynonymToAnotherAcceptedTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/SpecimenImportView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientOccurenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientTaxonService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateViewEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/CreateFieldUnitHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/DeleteDerivateOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/MoveDerivateOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveContentProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionElementsHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionToOtherTaxonHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteDescriptionElementOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteSpecimenDescriptionOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteTaxonDescriptionOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/MoveDescriptionElementsOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/MoveDescriptionToOtherTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/resources/log4j.properties [deleted file]
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateSynonymInExisitingHomotypicalGroupOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteDescriptionElementOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperationTest.java
eu.etaxonomy.taxeditor.feature.platform/feature.xml
eu.etaxonomy.taxeditor.feature.platform/pom.xml
eu.etaxonomy.taxeditor.feature/feature.xml
eu.etaxonomy.taxeditor.feature/pom.xml
eu.etaxonomy.taxeditor.help/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.help/pom.xml
eu.etaxonomy.taxeditor.molecular.lib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.molecular.lib/pom.xml
eu.etaxonomy.taxeditor.molecular/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.molecular/pom.xml
eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.navigation/plugin.xml
eu.etaxonomy.taxeditor.navigation/pom.xml
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewLabels.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewPart.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingDeletePolytomousKeyHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingEditPolytomousKeyNodesHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingUpdatePolytomousKeyAllNodesHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/DeleteOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/RemotingDeletePolytomousKeyOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/RemotingUpdatePolytomousKeyAllNodesOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/Root.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonLinkHelper.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigator.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorDataChangeBehavior.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorLabels.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/ChangeAcceptedTaxonToSynonymHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveFactualDataHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveTaxonHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/NavigatorHandlerUtils.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingChangeAcceptedTaxonToSynonymHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingDeleteTaxonNodeHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveFactualDataHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveTaxonNodeHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/ChangeAcceptedTaxonToSynonymOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/EditClassificationOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingChangeAcceptedTaxonToSynonymOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingDeleteTaxonNodeOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveFactualDataOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveTaxonOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/operation/CreateClassification.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/operation/CreatePolytomousKey.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/operation/CreateTaxonNode.java
eu.etaxonomy.taxeditor.navigation/src/test/resources/log4j.properties [deleted file]
eu.etaxonomy.taxeditor.printpublisher/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.printpublisher/pom.xml
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/plugin.xml
eu.etaxonomy.taxeditor.store/pom.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/CdmDataSourceRepository.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/CdmEntitySessionInput.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermEditor.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateDefinedTermOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/DeleteTermBaseOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/CreateFieldUnitHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenInspectSessionsHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ReconnectHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowRemotingLoginWindowHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/SwitchUserHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/UuidParameterConverter.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/AbstractIOManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ExportManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ImportManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/AbcdImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvNameExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvPrintExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExcelNormalExplicitTaxaImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExportToFileDestinationWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/JaxbExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/SddExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/SddImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/TcsImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewAmplificationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewClassificationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewCollectionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewDerivedUnitBaseWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewFieldUnitWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewGrantedAuthorityWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewGroupWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewInstitutionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewNonViralNameWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPersonWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPolytomousKeyWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPrimerWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewReferenceWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTeamWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewUserWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPersistentPostOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostTaxonOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmMergeOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmStorePropertyTester.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/DefaultFeatureTreePreferenecs.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/SpecimenOrObservationPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/AbstractMatchingPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/NonViralNameMatchingPreference.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/ReferenceMatchingPreference.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/TeamOrPersonMatchingPreference.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/AbstractMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/CdmPreferencePage.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/AvailableDistributionPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmAuthenticationException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmUIDataChangeService.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/ContextManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/LoginManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/bar/AuthenticatedUserBar.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonBaseSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractUriWithExceptionLabelElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ISelectableElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LanguageStringWithLabelElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LsidWithExceptionLabelElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/UriWithLabelElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/PolytomousKeyDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/ImageFileElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaMetaElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationPartElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/ProtologueElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitBaseWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitGeneralDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitGeneralWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldUnitGeneralDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldUnitWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GatheringEventWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GeoScopePolyKeyDetailSection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/SequenceGeneralDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/ReferenceDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AbstractOriginalSourceElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/util/ApplicationUtil.java [moved from eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationUtil.java with 84% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/util/OperationsUtil.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmViewPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateContentProvider.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchView.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/InspectSessionsDialog.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/SessionsViewPart.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewPart.java
eu.etaxonomy.taxeditor.store/src/main/resources/log4j.properties [deleted file]
eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/AbstractTaxeditorOperationTestBase.java
eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/RemotingTestUpdateOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/test/resources/log4j.properties [deleted file]
eu.etaxonomy.taxeditor.test/.classpath
eu.etaxonomy.taxeditor.test/.project
eu.etaxonomy.taxeditor.test/.settings/org.eclipse.jdt.core.prefs
eu.etaxonomy.taxeditor.test/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.test/build.properties
eu.etaxonomy.taxeditor.test/lib/byte-buddy-0.5.1.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/dbunit-2.4.9.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/org.springframework.context-3.2.2.RELEASE.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/unitils-core-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/unitils-database-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/unitils-dbmaintainer-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/unitils-dbunit-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/unitils-spring-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/pom.xml
eu.etaxonomy.taxeditor.test/server.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/main/resources/log4j.xml [deleted file]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/application/menu/general/NewMenuTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/BaseRemotingTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CDMServer.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmPersistentRemoteSourceTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmRemoteSourceTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmServerTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/HttpInvokerServicesTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/RemotingSessionAwareTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/CdmServiceCacherTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/PropertyPathsTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemoteLazyLoadingTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemotePersistentCollectionTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/navigation/navigator/contextmenu/ClassificationTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonWizardTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/BaseOperationTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/PolytomousKeyViewPartTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperationTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNameEditorTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/IOServiceExportTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/IOServiceImportTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ServiceInterceptorTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManagerTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/MockSessionOwner.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/MockConversationEnabled.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/CdmServerInfoTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialogTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElementTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElementTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonNodeSelectionElementTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElementTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/util/H2DbSupport.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/.cdmLibrary/writableResources/cdm.datasources.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/datasources.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/cdm/testRemotingApplicationContext.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/lazyloading/CdmEntityCacherTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/PolytomousKeyViewPartTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperationTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNameEditorTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.testDeleteClassificationWithDeleteChildren.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/service/IOServiceExportTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/service/IOServiceImportTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/session/CdmEntitySessionManagerTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/h2/cdmTest.h2.db [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/h2/cdmTest.trace.db [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/imports/ABCDImport.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/imports/NormalExplicitImport.xls [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/imports/SDD.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/imports/SpecimenExcelImport.xls [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/imports/TcsImport.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/log4j.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/server.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/unitils.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product.with.jre
eu.etaxonomy.taxeditor/pom.xml
pom.xml

index e6bb9df13a99bf906f9bb0b0bf78c8ce9ee2a42f..567745fa5e74ebc9de6f4513e4930b6fb1d4e56a 100644 (file)
@@ -142,9 +142,7 @@ eu.etaxonomy.taxeditor.cdmlib/build.properties -text
 eu.etaxonomy.taxeditor.cdmlib/lib/activation-1.1.1.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/antlr-2.7.7.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/aopalliance-1.0.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1-sources.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1-sources.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/avro-1.6.3.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/batik-anim-1.7.jar -text
@@ -306,15 +304,11 @@ eu.etaxonomy.taxeditor.cdmlib/lib/spring-security-remoting-3.1.3.RELEASE.jar -te
 eu.etaxonomy.taxeditor.cdmlib/lib/stax-1.2.0.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/stax-api-1.0.1.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/swagger-annotations-1.3.5.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-easymock-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-inject-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-mock-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-orm-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.3.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.4.2.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.4.2.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.4.2.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.4.2.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.4.2.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/usertype.jodatime-2.0.1.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/usertype.spi-2.0.1.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/validation-api-1.0.0.GA.jar -text
@@ -337,22 +331,57 @@ eu.etaxonomy.taxeditor.cdmlib/lib/yjp-controller-api-redist-9.0.8.jar -text
 eu.etaxonomy.taxeditor.cdmlib/pom.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteController.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/RemotingMonitoredGenericApplicationContext.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/RemotingMonitoredListableBeanFactory.java -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCacher.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/lazyloading/CdmLazyLoader.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmPersistentRemoteSource.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSource.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceBase.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceException.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/ICdmRemoteSource.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmEagerLoadingException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmRemotingException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CacheLoader.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmClientCacheException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmEntityCacheKey.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelCacher.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelFieldPropertyFromClass.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmRemoteCacheManager.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmTransientEntityCacher.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/EntityCacherDebugResult.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/ProxyUtils.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/server/CDMServerException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmPersistentRemoteSource.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSource.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSourceBase.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSourceException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/ICdmRemoteSource.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CachedCommonServiceImpl.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmAuthenticatedHttpInvokerRequestExecutor.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceInterceptorException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceRequestExecutor.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/ICachedCommonService.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/TermServiceRequestExecutor.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmClientSessionException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySession.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManager.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySession.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionEnabled.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManager.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManagerObserver.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySession.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySessionManager.java -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/proxy/AbstractLazyInitializer.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/cdmlib-ehcache.xml -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/.svnignore -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/cdmlib-remote-webapp.war -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/jetty-runner-9.2.3.v20140905.jar -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/start-9.2.3.v20140905.jar -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/config.properties -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/httpInvokerServiceClients.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/localApplicationContext.xml -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remotingApplicationContext.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_persistence_security.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_services_security.xml -text
-eu.etaxonomy.taxeditor.cdmlib/src/test/resources/eu/etaxonomy/cdm/datasources/cdm.datasources.xml -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/log4j.properties -text
 eu.etaxonomy.taxeditor.editor/.classpath -text
 eu.etaxonomy.taxeditor.editor/.project -text
 eu.etaxonomy.taxeditor.editor/META-INF/MANIFEST.MF -text
@@ -374,6 +403,7 @@ eu.etaxonomy.taxeditor.editor/p2.inf -text
 eu.etaxonomy.taxeditor.editor/plugin.xml -text
 eu.etaxonomy.taxeditor.editor/pom.xml -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/CdmDataTransfer.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/CdmEntitySessionInput.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/ChooseFromMultipleTaxonNodesDialog.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorCdmViewer.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorStateManager.java -text
@@ -1262,9 +1292,14 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/Op
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/SelectFeatureTreeWizard.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/SelectFeatureTreeWizardPage.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenDistributionEditorWizardHandler.java -text
+<<<<<<< HEAD
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenInspectSessionsHandler.java -text
+=======
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenHandler.java -text
+>>>>>>> 02176688eaa23a31ff5b71c317cb5ee685483aa4
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenPasswordWizzardHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowLoginWindowHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowRemotingLoginWindowHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/identificationkey/AbstractIdentificaitonKeyWizard.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/AbstractIOManager.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ExportManager.java -text
@@ -1361,7 +1396,6 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/Abst
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostOperation.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostTaxonOperation.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/IPostOperationEnabled.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/MatchStrategyConfigurator.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmPreferences.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmStorePropertyTester.java -text
@@ -1433,6 +1467,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/TermC
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/VocabularyComboElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/DefaultLanguageDialog.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/LoginDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/UriDialog.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteConfiguratorComposite.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteConfiguratorDialog.java -text
@@ -1822,6 +1857,8 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/Cd
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewPart.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/reporting/ReportingViewPart.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/InspectSessionsDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/SessionsViewPart.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/specimenSearch/SpecimenProviderSelectionComposite.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/specimenSearch/SpecimenProviderSelectionController.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/specimenSearch/SpecimenSearchComposite.java -text
@@ -1855,14 +1892,56 @@ eu.etaxonomy.taxeditor.test/.settings/org.eclipse.jdt.core.prefs -text
 eu.etaxonomy.taxeditor.test/META-INF/MANIFEST.MF -text
 eu.etaxonomy.taxeditor.test/build.properties -text
 eu.etaxonomy.taxeditor.test/ide/eclipse/EDITor[!!-~]Tests.launch -text
+eu.etaxonomy.taxeditor.test/lib/byte-buddy-0.5.1.jar -text
 eu.etaxonomy.taxeditor.test/pom.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/cdmlib-ehcache.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/datasources.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/cdm.datasources.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/model/PolytomousKeyTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/model/TaxonNameEditorTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/model/TaxonNavigatorTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/testRemotingApplicationContext.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/taxeditor/lazyloading/CdmEntityCacherTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/taxeditor/remoting/session/CdmEntitySessionManagerTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/h2/cdmTest.h2.db -text
+eu.etaxonomy.taxeditor.test/src/main/resources/h2/cdmTest.trace.db -text
+eu.etaxonomy.taxeditor.test/src/main/resources/log4j.properties -text
 eu.etaxonomy.taxeditor.test/src/main/resources/log4j.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/unitils.properties -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/api/cache/CdmModelGetMethodCacherTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/model/PolytomousKeyTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/model/TaxonNameEditorTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/model/TaxonNavigatorTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/application/menu/general/NewMenuTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/BaseRemotingTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CDMServer.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmPersistentRemoteSourceTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmRemoteSourceTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmServerTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmServerTestManager.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/HttpInvokerServicesTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/CdmEntityCacherTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/CdmServiceCacherTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemoteLazyLoadingTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemotePersistentCollectionTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/navigation/navigator/contextmenu/ClassificationTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonWizardTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operations/OperationTestBase.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ITestService.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ServiceInterceptorTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ServiceRebasingTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/TargetTestService.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/TestService.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManagerTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/MockSessionOwner.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/AbstractEditorTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ContextMenuHelper.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/SwtBotUtils.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/CdmServerInfoTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialogTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/AbstractSelectionElementTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElementTest.java -text
index 5c8b928b8e9810e6ba3615b0efdeead665c5c54d..ee184e8334b2e5f3709f6c32585fac6c41d1c255 100644 (file)
@@ -1,4 +1,5 @@
 /.project
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/*
 eu.etaxonomy.taxeditor.application/.settings
 eu.etaxonomy.taxeditor.application/target
 eu.etaxonomy.taxeditor.bulkeditor/.settings
@@ -8,6 +9,7 @@ eu.etaxonomy.taxeditor.cdmlib/.settings
 eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.jar
 eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.zip
 eu.etaxonomy.taxeditor.cdmlib/dist
+eu.etaxonomy.taxeditor.cdmlib/lib/cdm-server*
 eu.etaxonomy.taxeditor.cdmlib/lib/cdmlib*
 eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.servletbridge.extensionbundle-1.2.0.v20100503.jar
 eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.transforms.hook-1.0.300.v20100719.jar
index 4c7e96f59500b4f98198fb4a11bdf511d1107b48..4c0364cadc7a33d0798a7c7813ef92548fe8cb81 100644 (file)
@@ -3,6 +3,6 @@
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
-       <classpathentry kind="src" path="src/main/resources"/>
+       <classpathentry kind="src" path="src/test/java"/>
        <classpathentry kind="output" path="target/classes"/>
 </classpath>
index 6a5c286864b932de03a3eebef50559186709fc25..e2399fc7e1e00079cdbd7f38ccaaddf6b2a3da95 100644 (file)
@@ -2,14 +2,15 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Application
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.application;singleton:=true
-Bundle-Version: 3.8.0.qualifier
+Bundle-Version: 3.12.0.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.TaxonomicEditorPlugin
 Bundle-Vendor: EDIT
 Bundle-Localization: OSGI-INF/l10n/plugin
 Export-Package: eu.etaxonomy.taxeditor
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.apache.log4j,
+Import-Package: eu.etaxonomy.cdm.database,
+ org.apache.log4j,
  org.eclipse.equinox.app,
  org.eclipse.equinox.p2.repository.metadata,
  org.osgi.framework,
index 2f4db0a333cf6b161c68a17a536f75a8b78d590c..b65dd6df810850792261b49617bd30f8343a04af 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>3.8.0-SNAPSHOT</version>
+    <version>3.12.0-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
index a4d2e6816dc5452ab1f36ae1b54eeadeb5d4852f..bb5b360a311cca20625d70ad041ed5e78a56ccd2 100644 (file)
@@ -12,6 +12,7 @@ import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
 import eu.etaxonomy.taxeditor.update.P2Util;
+import eu.etaxonomy.taxeditor.util.ApplicationUtil;
 
 /**
  * <p>ApplicationWorkbenchWindowAdvisor class.</p>
@@ -47,7 +48,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
                configurer.setShowCoolBar(true);
                configurer.setShowStatusLine(true);
                configurer.setShowPerspectiveBar(true);
-               configurer.setTitle("EDIT Taxonomic Editor " + ApplicationUtil.getVersion());
+               configurer.setTitle(ApplicationUtil.getTitle());
                configurer.setShowProgressIndicator(true);
 
                CdmDataSourceRepository.createDefaultH2DataSource();
index 9e1731c4cf7cdcc7c73745e5bcf39b1d8ef705b1..a286718ff9854c4a23dc879cd655b6fdecd62087 100644 (file)
@@ -7,7 +7,6 @@ import java.util.List;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.IJobChangeEvent;
@@ -16,27 +15,25 @@ import org.eclipse.core.runtime.jobs.JobChangeAdapter;
 import org.eclipse.equinox.internal.p2.ui.ProvUI;
 import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
 import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.equinox.p2.core.IProvisioningAgent;
 import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.operations.ProvisioningJob;
 import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
 import org.eclipse.equinox.p2.operations.Update;
 import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.PlatformUI;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
-import eu.etaxonomy.taxeditor.ApplicationUtil;
 import eu.etaxonomy.taxeditor.TaxonomicEditorPlugin;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.util.ApplicationUtil;
 
 /**
  * This class is a utility class for updating the editor from a p2 update site,
@@ -146,7 +143,7 @@ public class P2Util {
      *
      */
     public static void checkForUpdates() {
-        // the main job which performs the update
+
         Job updateJob = new Job("Update Job") {
             @Override
             public IStatus run(IProgressMonitor monitor) {
@@ -162,6 +159,21 @@ public class P2Util {
      */
     private static IStatus doCheckForUpdates(IProgressMonitor monitor) {
 
+     // force refresh all the caches before
+        IMetadataRepositoryManager metaManager = ProvUI.getMetadataRepositoryManager(ProvisioningUI.getDefaultUI().getSession());
+        URI[] repos = metaManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
+        for(URI repo : repos) {
+            try {
+                metaManager.refreshRepository(repo, monitor);
+            } catch (ProvisionException pe) {
+                IStatus errorStatus = new Status(IStatus.ERROR, TaxonomicEditorPlugin.PLUGIN_ID,
+                        "Error occured while reloading cache.", pe);
+
+            } catch (OperationCanceledException oce) {
+                IStatus errorStatus = new Status(IStatus.ERROR, TaxonomicEditorPlugin.PLUGIN_ID,
+                        "Error occured while reloading cache.", oce);
+            }
+        }
         BundleContext bundleContext = TaxonomicEditorPlugin.getContext();
         ServiceReference reference = bundleContext.getServiceReference(IProvisioningAgent.SERVICE_NAME);
         if (reference == null) {
diff --git a/eu.etaxonomy.taxeditor.application/src/main/resources/log4j.properties b/eu.etaxonomy.taxeditor.application/src/main/resources/log4j.properties
deleted file mode 100644 (file)
index c7c943e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-### ************ APPENDER ***********************************###\r
-\r
-### direct log messages to stdout ###\r
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender\r
-log4j.appender.stdout.Target=System.out\r
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n\r
-\r
-### direct messages to file hibernate.log ###\r
-log4j.appender.file=org.apache.log4j.FileAppender\r
-log4j.appender.file.File=taxeditor.log\r
-log4j.appender.file.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n\r
-\r
-### ************* LOG LEVELS *********************************###\r
-\r
-### set log levels - for more verbose logging change 'info' to 'debug' ###\r
-### levels: error, warn, debug, info\r
-log4j.rootLogger=INFO, stdout\r
-\r
-### set directory-specific levels below\r
-\r
-### basic level for editor directory\r
-log4j.logger.eu.etaxonomy.taxeditor.editor = WARN, stdout \r
-\r
-log4j.logger.eu.etaxonomy.taxeditor.editor.handler = DEBUG, stdout\r
-\r
-### log level for conversation handler\r
-#log4j.logger.eu.etaxonomy.cdm.api.application = DEBUG, stdout\r
index 5ff90b230e62a2d2a915585ed2f290bdcb34c824..3bf936df7eae8e26609924a9acfdfa042f790cce 100644 (file)
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
-       <classpathentry including="**/*.java" kind="src" path="src/main/java"/>\r
-       <classpathentry including="**/*.java" kind="src" path="src/test/java"/>\r
-       <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
+       <classpathentry including="**/*.java" kind="src" path="src/test/java"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
index 60ba65373bc6ef60f733df4ef9d8e4a57d4517ad..7a0db176edd5ca02dd6e4d73528cbdca72ad1e36 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Bulkeditor Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.bulkeditor;singleton:=true
-Bundle-Version: 3.8.0.qualifier
+Bundle-Version: 3.12.0.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.taxeditor.annotatedlineeditor,
@@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.ui,
  eu.etaxonomy.taxeditor.cdmlib
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.core.runtime,
+Import-Package: eu.etaxonomy.taxeditor.editor,
+ org.eclipse.core.runtime,
  org.eclipse.equinox.app,
  org.eclipse.jface.text,
  org.eclipse.jface.text.presentation,
index 7730f3fadd05822f612735572142cc88171b6bac..07624f868605689c9fba37668262da8ed0488779 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.8.0-SNAPSHOT</version>
+               <version>3.12.0-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 5469cb0693d406f40536e6a60776f43933ad8c14..3243ffbe49299cddaee36b43327ac5139893df83 100644 (file)
@@ -237,7 +237,8 @@ public class AnnotatedLineDocumentProvider extends AbstractDocumentProvider {
                                if (annotation instanceof IEntityContainer<?>) {
                                        IEntityContainer<?> container = (IEntityContainer<?>) annotation;
                                        if (container.isMarkedAsNew() || container.isDirty()) {
-                                               persistenceService.save(container.getEntity()); // save
+                                               Object entity = persistenceService.save(container.getEntity()); // save
+                                               container.setEntity(entity);
                                                container.setDirty(false);
                                                container.markAsNew(false);
                                        }
index 08876fef01d643cd5a2869b83dd2472903ec86aa..e1208b01c5083936c05f265642af25d8bcf989df 100644 (file)
@@ -1,12 +1,12 @@
 // $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.
-*/
+ * 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.annotatedlineeditor;
 
 import java.util.Iterator;
@@ -29,6 +29,7 @@ import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -47,290 +48,293 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class AnnotatedLineEditor extends TextEditor implements IConversationEnabled, IPostOperationEnabled {
 
-       protected ConversationHolder conversation;
-
-       private IEntityPersistenceService persistenceService;
-       protected ILineDisplayStrategy lineDisplayStrategy;
-
-
-       /**
-        * <p>Constructor for AnnotatedLineEditor.</p>
-        *
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        */
-       public AnnotatedLineEditor(ConversationHolder conversation) {
-               this.conversation = conversation;
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.editors.text.TextEditor#doSetInput(org.eclipse.ui.IEditorInput)
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected void doSetInput(IEditorInput input) throws CoreException {
-
-               AnnotatedLineDocumentProvider provider = new AnnotatedLineDocumentProvider(input);
-
-               provider.setLineDisplayStrategy(lineDisplayStrategy, input);
-               setDocumentProvider(provider);
-
-               super.doSetInput(input);
-       }
-
-       /**
-        * <p>Setter for the field <code>persistenceService</code>.</p>
-        *
-        * @param persistenceService a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService} object.
-        */
-       protected void setPersistenceService(
-                       IEntityPersistenceService persistenceService) {
-               this.persistenceService = persistenceService;
-       }
-
-       /**
-        * <p>Getter for the field <code>persistenceService</code>.</p>
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService} object.
-        */
-       protected IEntityPersistenceService getPersistenceService() {
-               return persistenceService;
-       }
-
-       /**
-        * <p>Setter for the field <code>lineDisplayStrategy</code>.</p>
-        *
-        * @param lineDisplayStrategy a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.ILineDisplayStrategy} object.
-        */
-       protected void setLineDisplayStrategy(
-                       ILineDisplayStrategy lineDisplayStrategy) {
-               this.lineDisplayStrategy = lineDisplayStrategy;
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       protected ISourceViewer createSourceViewer(Composite parent,
-                       IVerticalRuler ruler, int styles) {
-
-               fAnnotationAccess= getAnnotationAccess();
-               fOverviewRuler= createOverviewRuler(getSharedColors());
-               LineSelectionViewer viewer = new LineSelectionViewer(parent, ruler, getOverviewRuler(),
-                                               isOverviewRulerVisible(), styles);
-//                                             isOverviewRulerVisible(), styles | SWT.WRAP);
-               getSourceViewerDecorationSupport(viewer);
-
-               return viewer;
-       }
-
-       /**
-        * Create an annotated line with an "empty" entity, i.e. using the editor
-        * input's default entity type and a zero-length title cache.
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
-        */
-       public LineAnnotation createAnnotatedLineNewObject() {
-
-               // Create new object
-
-               AnnotatedLineDocumentProvider documentProvider = (AnnotatedLineDocumentProvider) getDocumentProvider();
-               IEntityCreator entityCreator = documentProvider.getEntityCreator(getEditorInput());
-               Object entity = entityCreator.createEntity(null);
-
-               LineAnnotation annotation = createAnnotatedLine(entity);
-               if (annotation != null) {
-                       annotation.markAsNew(true);
-               }
-               return annotation;
-       }
-
-       /**
-        * Create an annotated line, first creating an entity of type "key" - this key
-        * must be recognized by the editor's entity creator.
-        *
-        * @param key a {@link java.lang.Object} object.
-        * @param titleCache a {@link java.lang.String} object.
-        * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
-        */
-       public LineAnnotation createAnnotatedLineNewObject(Object key, String titleCache) {
-
-
-
-               // Create new object
-               Object entity = ((AnnotatedLineDocumentProvider) getDocumentProvider()).
-                                                       getEntityCreator(getEditorInput()).createEntity(key, titleCache);
-               // checks if the creator also saves the entity (in a different conversation), in which case
-               // we need to bind back this editors conversation
-               // we also need to reload the entity because the conversation used to
-               // to create / save the entity may have been closed
-               if(entity != null && ((AnnotatedLineDocumentProvider) getDocumentProvider()).getEntityCreator(getEditorInput()).savesEntity()) {
-                       getConversationHolder().bind();
-                       Object object = CdmStore.getService(IOccurrenceService.class).load(((CdmBase)entity).getUuid());
-                       entity = HibernateProxyHelper.deproxy(object);
-               }
-
-               if(entity == null) {
-                       return null;
-               }
-               LineAnnotation annotation = createAnnotatedLine(entity);
-               if (annotation != null) {
-                       annotation.markAsNew(true);
-               }
-
-               return annotation;
-
-       }
-
-         @Override
-         public boolean isDirty() {
-               return super.isDirty();
-         }
-
-       /**
-        * Creates an annotated line at the end of the document. The annotation contains the entity.
-        *
-        * @param entity a {@link java.lang.Object} object.
-        * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
-        */
-       public LineAnnotation createAnnotatedLine(Object entity) {
-
-               IEditorInput input = getEditorInput();
-               AnnotatedLineDocumentProvider provider = (AnnotatedLineDocumentProvider) getDocumentProvider();
-
-               LineAnnotation annotation = null;
-               try {
-                       annotation = provider.createAnnotatedLine(input, entity);
-
-                       // Jump to new line
-                       IAnnotationModel model = provider.getAnnotationModel(input);
-                       if(model != null){
-                               int start= model.getPosition(annotation).getOffset();
-                               selectAndReveal(start, 0);
-                       }
-
-               } catch (BadLocationException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               }
-               return annotation;
-       }
-
-       /**
-        * <p>removeAnnotatedLine</p>
-        *
-        * @param lineno a int.
-        */
-       public void removeAnnotatedLine(int lineno) {
-               ((AnnotatedLineDocumentProvider) getDocumentProvider()).removeAnnotatedLine(lineno);
-       }
-
-       /**
-        * <p>removeAnnotatedLine</p>
-        *
-        * @param annotation a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
-        */
-       public void removeAnnotatedLine(LineAnnotation annotation) {
-               ((AnnotatedLineDocumentProvider) getDocumentProvider()).removeAnnotatedLine(annotation);
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.texteditor.AbstractTextEditor#doSave(org.eclipse.core.runtime.IProgressMonitor)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void doSave(IProgressMonitor progressMonitor) {
-               if (getConversationHolder() != null) {
-                       if( ! getConversationHolder().isBound()){
-                               getConversationHolder().bind();
-                       }
-                       super.doSave(progressMonitor);
-                       getConversationHolder().commit(true);
-               } else {
-                       super.doSave(progressMonitor);
-               }
-               firePropertyChange(PROP_DIRTY);
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.texteditor.AbstractTextEditor#setFocus()
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void setFocus() {
-               super.setFocus();
-               if (getConversationHolder() != null) {
-                       getConversationHolder().bind();
-               }
-               PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setFocus();
-               // TODO pass focus to underlying widgets
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
-        */
-       /**
-        * <p>getConversationHolder</p>
-        *
-        * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        */
-       @Override
+    protected ConversationHolder conversation;
+
+    private IEntityPersistenceService persistenceService;
+    protected ILineDisplayStrategy lineDisplayStrategy;
+
+
+    /**
+     * <p>Constructor for AnnotatedLineEditor.</p>
+     *
+     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+     */
+    public AnnotatedLineEditor(ConversationHolder conversation) {
+        this.conversation = conversation;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.editors.text.TextEditor#doSetInput(org.eclipse.ui.IEditorInput)
+     */
+    /** {@inheritDoc} */
+    @Override
+    protected void doSetInput(IEditorInput input) throws CoreException {
+
+        AnnotatedLineDocumentProvider provider = new AnnotatedLineDocumentProvider(input);
+
+        provider.setLineDisplayStrategy(lineDisplayStrategy, input);
+        setDocumentProvider(provider);
+
+        super.doSetInput(input);
+    }
+
+    /**
+     * <p>Setter for the field <code>persistenceService</code>.</p>
+     *
+     * @param persistenceService a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService} object.
+     */
+    protected void setPersistenceService(
+            IEntityPersistenceService persistenceService) {
+        this.persistenceService = persistenceService;
+    }
+
+    /**
+     * <p>Getter for the field <code>persistenceService</code>.</p>
+     *
+     * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService} object.
+     */
+    protected IEntityPersistenceService getPersistenceService() {
+        return persistenceService;
+    }
+
+    /**
+     * <p>Setter for the field <code>lineDisplayStrategy</code>.</p>
+     *
+     * @param lineDisplayStrategy a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.ILineDisplayStrategy} object.
+     */
+    protected void setLineDisplayStrategy(
+            ILineDisplayStrategy lineDisplayStrategy) {
+        this.lineDisplayStrategy = lineDisplayStrategy;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected ISourceViewer createSourceViewer(Composite parent,
+            IVerticalRuler ruler, int styles) {
+
+        fAnnotationAccess= getAnnotationAccess();
+        fOverviewRuler= createOverviewRuler(getSharedColors());
+        LineSelectionViewer viewer = new LineSelectionViewer(parent, ruler, getOverviewRuler(),
+                isOverviewRulerVisible(), styles);
+        //                                             isOverviewRulerVisible(), styles | SWT.WRAP);
+        getSourceViewerDecorationSupport(viewer);
+
+        return viewer;
+    }
+
+    /**
+     * Create an annotated line with an "empty" entity, i.e. using the editor
+     * input's default entity type and a zero-length title cache.
+     *
+     * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
+     */
+    public LineAnnotation createAnnotatedLineNewObject() {
+
+        // Create new object
+
+        AnnotatedLineDocumentProvider documentProvider = (AnnotatedLineDocumentProvider) getDocumentProvider();
+        IEntityCreator entityCreator = documentProvider.getEntityCreator(getEditorInput());
+        Object entity = entityCreator.createEntity(null);
+
+        LineAnnotation annotation = createAnnotatedLine(entity);
+        if (annotation != null) {
+            annotation.markAsNew(true);
+        }
+        return annotation;
+    }
+
+    /**
+     * Create an annotated line, first creating an entity of type "key" - this key
+     * must be recognized by the editor's entity creator.
+     *
+     * @param key a {@link java.lang.Object} object.
+     * @param titleCache a {@link java.lang.String} object.
+     * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
+     */
+    public LineAnnotation createAnnotatedLineNewObject(Object key, String titleCache) {
+
+
+
+        // Create new object
+        Object entity = ((AnnotatedLineDocumentProvider) getDocumentProvider()).
+                getEntityCreator(getEditorInput()).createEntity(key, titleCache);
+        // checks if the creator also saves the entity (in a different conversation), in which case
+        // we need to bind back this editors conversation
+        // we also need to reload the entity because the conversation used to
+        // to create / save the entity may have been closed
+        if(entity != null && ((AnnotatedLineDocumentProvider) getDocumentProvider()).getEntityCreator(getEditorInput()).savesEntity()) {
+            getConversationHolder().bind();
+            Object object = CdmStore.getService(IOccurrenceService.class).load(((CdmBase)entity).getUuid());
+            entity = HibernateProxyHelper.deproxy(object);
+        }
+
+        if(entity == null) {
+            return null;
+        }
+        LineAnnotation annotation = createAnnotatedLine(entity);
+        if (annotation != null) {
+            annotation.markAsNew(true);
+        }
+
+        return annotation;
+
+    }
+
+    @Override
+    public boolean isDirty() {
+        return super.isDirty();
+    }
+
+    /**
+     * Creates an annotated line at the end of the document. The annotation contains the entity.
+     *
+     * @param entity a {@link java.lang.Object} object.
+     * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
+     */
+    public LineAnnotation createAnnotatedLine(Object entity) {
+
+        IEditorInput input = getEditorInput();
+        AnnotatedLineDocumentProvider provider = (AnnotatedLineDocumentProvider) getDocumentProvider();
+
+        LineAnnotation annotation = null;
+        try {
+            annotation = provider.createAnnotatedLine(input, entity);
+
+            // Jump to new line
+            IAnnotationModel model = provider.getAnnotationModel(input);
+            if(model != null){
+                int start= model.getPosition(annotation).getOffset();
+                selectAndReveal(start, 0);
+            }
+
+        } catch (BadLocationException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return annotation;
+    }
+
+    /**
+     * <p>removeAnnotatedLine</p>
+     *
+     * @param lineno a int.
+     */
+    public void removeAnnotatedLine(int lineno) {
+        ((AnnotatedLineDocumentProvider) getDocumentProvider()).removeAnnotatedLine(lineno);
+    }
+
+    /**
+     * <p>removeAnnotatedLine</p>
+     *
+     * @param annotation a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
+     */
+    public void removeAnnotatedLine(LineAnnotation annotation) {
+        ((AnnotatedLineDocumentProvider) getDocumentProvider()).removeAnnotatedLine(annotation);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.texteditor.AbstractTextEditor#doSave(org.eclipse.core.runtime.IProgressMonitor)
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void doSave(IProgressMonitor progressMonitor) {
+        if (getConversationHolder() != null) {
+            if( ! getConversationHolder().isBound()){
+                getConversationHolder().bind();
+            }
+            super.doSave(progressMonitor);
+            getConversationHolder().commit(true);
+        } else {
+            super.doSave(progressMonitor);
+        }
+        firePropertyChange(PROP_DIRTY);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.texteditor.AbstractTextEditor#setFocus()
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void setFocus() {
+        super.setFocus();
+        if (getConversationHolder() != null) {
+            getConversationHolder().bind();
+        }
+        ((AbstractBulkEditorInput)getEditorInput()).bind();
+        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setFocus();
+        // TODO pass focus to underlying widgets
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
+     */
+    /**
+     * <p>getConversationHolder</p>
+     *
+     * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+     */
+    @Override
     public ConversationHolder getConversationHolder() {
-               return conversation;
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
-        */
-       /** {@inheritDoc} */
-       @Override
+        return conversation;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
+     */
+    /** {@inheritDoc} */
+    @Override
     public void update(CdmDataChangeMap changeEvents) {}
 
-       /**
-        * Refreshes text in all lines.
-        */
-       protected void refreshLineDisplay() {
-               IDocumentProvider provider = getDocumentProvider();
-               IEditorInput input = getEditorInput();
-               IAnnotationModel model = provider.getAnnotationModel(input);
-               Iterator iter = getDocumentProvider().getAnnotationModel(getEditorInput()).getAnnotationIterator();
-               while (iter.hasNext()) {
-                       Object next = iter.next();
-                       if (next instanceof LineAnnotation) {
-                               LineAnnotation annotation = (LineAnnotation) next;
-                               ((AnnotatedLineDocumentProvider) getDocumentProvider()).
-                                               updateLineFromAnnotation(annotation);
-                       }
-               }
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.operations.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
-        */
-       /** {@inheritDoc} */
-       @Override
+    /**
+     * Refreshes text in all lines.
+     */
+    protected void refreshLineDisplay() {
+        IDocumentProvider provider = getDocumentProvider();
+        IEditorInput input = getEditorInput();
+        IAnnotationModel model = provider.getAnnotationModel(input);
+        Iterator iter = getDocumentProvider().getAnnotationModel(getEditorInput()).getAnnotationIterator();
+        while (iter.hasNext()) {
+            Object next = iter.next();
+            if (next instanceof LineAnnotation) {
+                LineAnnotation annotation = (LineAnnotation) next;
+                ((AnnotatedLineDocumentProvider) getDocumentProvider()).
+                updateLineFromAnnotation(annotation);
+            }
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operations.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    /** {@inheritDoc} */
+    @Override
     public boolean postOperation(CdmBase objectAffectedByOperation) {
-               refreshLineDisplay();
-
-               return true;
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.editors.text.TextEditor#dispose()
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void dispose() {
-               super.dispose();
-               conversation.close();
-       }
-
-       /**
-        * <p>onComplete</p>
-        *
-        * @return a boolean.
-        */
-       @Override
+        refreshLineDisplay();
+
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.editors.text.TextEditor#dispose()
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void dispose() {
+        super.dispose();
+        conversation.close();
+        ((AbstractBulkEditorInput)getEditorInput()).dispose();
+    }
+
+    /**
+     * <p>onComplete</p>
+     *
+     * @return a boolean.
+     */
+    @Override
     public boolean onComplete() {
-               // TODO Auto-generated method stub
-               return false;
-       }
+        // TODO Auto-generated method stub
+        return false;
+    }
+
 
 }
index 9761f55f4acc88096bd846bdcd707ba8d41f2cbb..230d5240eaab76c4503299463099d4e39896920d 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -28,54 +28,56 @@ public interface IEntityContainer<T> {
         * @return a T object.
         */
        T getEntity();
-       
+
+       void setEntity(Object entity);
+
        /**
         * <p>getEditableText</p>
         *
         * @return a {@link java.lang.String} object.
         */
        String getEditableText();
-       
+
        /**
         * <p>getAttachedEntities</p>
         *
         * @return a {@link java.util.Set} object.
         */
        Set<T> getAttachedEntities();
-       
+
        /**
         * <p>markAsMerged</p>
         *
         * @param mergeTarget a T object.
         */
        void markAsMerged(T mergeTarget);
-       
+
        /**
         * <p>markAsDeleted</p>
         */
        void markAsDeleted();
-       
+
        /**
         * <p>markAsNew</p>
         *
         * @param isNew a boolean.
         */
        void markAsNew(boolean isNew);
-       
+
        /**
         * <p>isMarkedAsMerged</p>
         *
         * @return a boolean.
         */
        boolean isMarkedAsMerged();
-       
+
        /**
         * <p>isMarkedAsDeleted</p>
         *
         * @return a boolean.
         */
        boolean isMarkedAsDeleted();
-       
+
        /**
         * <p>isMarkedAsNew</p>
         *
index 39acd4ff0fd996a8c7b58dc9b17dcfdf267b56a4..b57e8b7bc1840b9f5aca90b30eacb9efcc0425ed 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -24,23 +24,23 @@ import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableExcepti
  * @version 1.0
  */
 public interface IEntityPersistenceService<T> {
-       
+
        /**
         * <p>create</p>
         *
         * @param entity a {@link java.lang.Object} object.
         * @return a boolean.
         */
-       boolean create(T entity);
-       
+       T create(T entity);
+
        /**
         * <p>save</p>
         *
         * @param entity a {@link java.lang.Object} object.
         * @return a boolean.
         */
-       boolean save(T entity);
-       
+       T save(T entity);
+
        /**
         * <p>merge</p>
         *
@@ -49,13 +49,13 @@ public interface IEntityPersistenceService<T> {
         * @return a boolean.
         */
        boolean merge(T entity, T mergeTarget);
-       
+
        /**
         * <p>delete</p>
         *
         * @param entity a {@link java.lang.Object} object.
         * @return a boolean.
-        * @throws ReferencedObjectUndeletableException 
+        * @throws ReferencedObjectUndeletableException
         */
        boolean delete(T entity) throws ReferencedObjectUndeletableException;
 }
index 6d30942d829760bdb2dda538c040ac9d01d33cfc..ef4f124b70dada677d4330bf1f5fc6c3980443f8 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -29,7 +29,7 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
 
        /** Constant <code>TYPE_GENERIC="Annotation.TYPE_UNKNOWN"</code> */
        public static final String TYPE_GENERIC = Annotation.TYPE_UNKNOWN;
-       
+
        private T entity;
        private ILineDisplayStrategy lineDisplayStrategy;
 
@@ -38,7 +38,7 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
        private boolean markedAsNew;
        private T mergeTarget;
 
-       
+
        /**
         * <p>Constructor for LineAnnotation.</p>
         *
@@ -51,7 +51,7 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
                this.lineDisplayStrategy = lineDisplayStrategy;
                setType(TYPE_GENERIC);
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.jface.text.source.Annotation#getText()
         */
@@ -60,7 +60,7 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
        public String getText() {
                return getEditableText();
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.jface.text.source.Annotation#setText(java.lang.String)
         */
@@ -68,17 +68,17 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
        @Override
        public void setText(String text) {
                lineDisplayStrategy.setText(text, entity);
-               dirty  = true;          
+               dirty  = true;
                super.setText(text);
        }
-       
+
        /** {@inheritDoc} */
        @Override
        public String toString() {
                // For debugging
                return getText();
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.IEntityContainer#getAttachedEntities()
         */
@@ -87,7 +87,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
         *
         * @return a {@link java.util.Set} object.
         */
-       public Set getAttachedEntities() {
+       @Override
+    public Set getAttachedEntities() {
                // TODO Auto-generated method stub
                return null;
        }
@@ -100,7 +101,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
         *
         * @return a T object.
         */
-       public T getEntity() {
+       @Override
+    public T getEntity() {
                return entity;
        }
 
@@ -112,7 +114,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getEditableText() {
+       @Override
+    public String getEditableText() {
                return lineDisplayStrategy.getText(entity);
        }
 
@@ -124,7 +127,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
         *
         * @return a T object.
         */
-       public T getMergeTarget() {
+       @Override
+    public T getMergeTarget() {
                return mergeTarget;
        }
 
@@ -136,7 +140,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
         *
         * @return a boolean.
         */
-       public boolean isMarkedAsDeleted() {
+       @Override
+    public boolean isMarkedAsDeleted() {
                return super.isMarkedDeleted();
        }
 
@@ -148,7 +153,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
         *
         * @return a boolean.
         */
-       public boolean isMarkedAsMerged() {
+       @Override
+    public boolean isMarkedAsMerged() {
                return markedAsMerged;
        }
 
@@ -160,7 +166,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
         *
         * @return a boolean.
         */
-       public boolean isMarkedAsNew() {
+       @Override
+    public boolean isMarkedAsNew() {
                return markedAsNew;
        }
 
@@ -170,7 +177,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
        /**
         * <p>markAsDeleted</p>
         */
-       public void markAsDeleted() {
+       @Override
+    public void markAsDeleted() {
                super.markDeleted(true);
                if (!isMarkedAsMerged()) {
                        lineDisplayStrategy.setStatusMessage(entity + " deleted.", entity);
@@ -185,7 +193,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
         *
         * @param mergeTarget a T object.
         */
-       public void markAsMerged(T mergeTarget) {
+       @Override
+    public void markAsMerged(T mergeTarget) {
                this.mergeTarget = mergeTarget;
                markedAsMerged = true;
                lineDisplayStrategy.setStatusMessage("'" + entity + "' merged into '" + mergeTarget + "'.", entity);
@@ -195,7 +204,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
         * @see eu.etaxonomy.taxeditor.bulkeditor.IEntityContainer#markAsNew()
         */
        /** {@inheritDoc} */
-       public void markAsNew(boolean isNew) {
+       @Override
+    public void markAsNew(boolean isNew) {
                markedAsNew = isNew;
                lineDisplayStrategy.setStatusMessage("New entity created.", entity);
        }
@@ -204,7 +214,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
         * @see eu.etaxonomy.taxeditor.bulkeditor.IEntityContainer#setDirty(boolean)
         */
        /** {@inheritDoc} */
-       public void setDirty(boolean dirty) {
+       @Override
+    public void setDirty(boolean dirty) {
                this.dirty = dirty;
        }
 
@@ -216,7 +227,8 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
         *
         * @return a boolean.
         */
-       public boolean isDirty() {
+       @Override
+    public boolean isDirty() {
                return dirty;
        }
 
@@ -228,4 +240,12 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
        public String getHoverText() {
                return lineDisplayStrategy.getHoverText(entity);
        }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityContainer#setEntity(java.lang.Object)
+     */
+    @Override
+    public void setEntity(Object entity) {
+        this.entity = (T) entity;
+    }
 }
index 4c97dbfb51582f3a52d614059d26acf2f4b05d12..5b7b601e78eae0be27acafd4fa4c1947d50811a9 100644 (file)
@@ -171,6 +171,7 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                        displayWarningDialog();
                        isInitialFocus = false;
                }
+               super.setFocus();
        }
 
        private void displayWarningDialog() {
index a6ae0fd7787d87e75da2a5d5056b29e14984e8d6..613ee50fb72e90d917b811439686212deb5f7181 100644 (file)
@@ -12,7 +12,6 @@ package eu.etaxonomy.taxeditor.bulkeditor;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
 import org.eclipse.jface.action.IStatusLineManager;
@@ -26,13 +25,11 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.IAnnotatableEntity;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.common.Marker;
-import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.EntityListener;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.ILineDisplayStrategy;
 import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 
 /**
  * <p>BulkEditorLineDisplay class.</p>
@@ -99,8 +96,6 @@ public class BulkEditorLineDisplay implements ILineDisplayStrategy {
                if (entity instanceof IAnnotatableEntity) {
                        IAnnotatableEntity annotatableEntity = (IAnnotatableEntity) HibernateProxyHelper.deproxy(entity);
 
-                       Map<MarkerType, Boolean> editMarkerTypePreferences = PreferencesUtil.getEditMarkerTypePreferences();
-
                        String markerText = "";
                        List<String> markers = new ArrayList<String>();
                        for (Marker marker : annotatableEntity.getMarkers()) {
index 041359836ef7622d6406aa264a7cd826bf50e314..15ca691727c485428c2316c9648b0e3dac73e96a 100644 (file)
@@ -1,34 +1,26 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.bulkeditor.handler;
 
-import java.util.Iterator;
-import java.util.Set;
-import java.util.UUID;
-
 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.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.IWorkbenchPage;
 
+import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IAgentService;
 import eu.etaxonomy.cdm.api.service.IGroupService;
@@ -38,11 +30,8 @@ import eu.etaxonomy.cdm.api.service.IReferenceService;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator;
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
-import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
@@ -50,17 +39,12 @@ import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.cdm.persistence.dao.hibernate.HibernateBeanInitializer;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
 import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
-import eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 
@@ -76,84 +60,75 @@ public class DeleteHandler extends AbstractHandler {
         */
        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
-               
+
                ISelection selection = HandlerUtil.getCurrentSelection(event);
-               
+
                IEditorPart editor = HandlerUtil.getActiveEditor(event);
-               
+
                IEditorInput input = editor.getEditorInput();
-               
+
                if((input instanceof IEntityPersistenceService) && (selection instanceof IStructuredSelection)){
-                       
-                       
+
+
                        IDocumentProvider provider = ((BulkEditor) editor).getDocumentProvider();
-                       LineAnnotationModel model = 
+                       LineAnnotationModel model =
                                        (LineAnnotationModel) provider.getAnnotationModel(input);
-                       
-                       
+
+
                        IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-                       
+
                        IEntityPersistenceService persistenceService = (IEntityPersistenceService) input;
-                       
-                       
+
+
                        for(Object object : structuredSelection.toList()){
-                               
+
                                LineAnnotation annotation = (LineAnnotation) model.getAnnotation(object);
-                               DeleteResult result = new DeleteResult();       
+                               DeleteResult result = new DeleteResult();
                                //result.setError();
                                try {
                                        ICdmApplicationConfiguration controller;
-                                       controller = (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration();
-                                       //persistenceService.delete(object);
+                                       controller = CdmStore.getCurrentApplicationConfiguration();
+
                                        if (object instanceof SpecimenOrObservationBase){
-                                               
                                                IOccurrenceService service = controller.getOccurrenceService();
-                                               SpecimenOrObservationBase persistedObject = service.load(((SpecimenOrObservationBase) object).getUuid());
-                                               if (persistedObject != null){
-                                                       result = service.delete(persistedObject);
-                                               } 
+                                               if (object != null){
+                                                       result = service.delete(((SpecimenOrObservationBase) object).getUuid());
+                                               }
                                        } else if (object instanceof Reference){
                                                IReferenceService service = controller.getReferenceService();
-                                               
-                                               Reference persistedObject = service.load(((Reference) object).getUuid());
-                                               if (persistedObject != null){
-                                                       result = service.delete(persistedObject);
+                                               if (object != null){
+                                                       result = service.delete(((Reference) object).getUuid());
                                                }
-                                               
+
                                        } else if (object instanceof Group){
                                                IGroupService service = controller.getGroupService();
-                                               Group persistedObject = service.load(((Group) object).getUuid());
-                                               if (persistedObject != null){
-                                                       result = service.delete(persistedObject);
+                                               if (object != null){
+                                                       result = service.delete(((Group) object).getUuid());
                                                }
                                        }else if (object instanceof User){
                                                IUserService service = controller.getUserService();
-                                               User persistedObject = service.load(((User) object).getUuid());
-                                               if (persistedObject != null){
-                                                       result = service.delete(persistedObject);
+                                               if (object != null){
+                                                       result = service.delete(((User) object).getUuid());
                                                }
                                        } else if (object instanceof TaxonNameBase){
                                                INameService service = controller.getNameService();
-                                               TaxonNameBase name = service.load(((TaxonNameBase) object).getUuid());
-                                               if (name != null){
+                                               if (object != null){
                                                        NameDeletionConfigurator config = new NameDeletionConfigurator();
-                                                       
-                                                       result = service.delete(name.getUuid(), config);
-                                               } 
+                                                       result = service.delete(((TaxonNameBase) object).getUuid(), config);
+                                               }
                                        } else if (object instanceof TaxonBase){
                                                ITaxonService service = controller.getTaxonService();
-                                               TaxonBase taxonBase = service.load(((TaxonBase) object).getUuid());
-                                               if (taxonBase != null){
+                                               if (object != null){
                                                        if (object instanceof Taxon){
                                                                result = service.deleteTaxon(((TaxonBase) object).getUuid(), null, null);
                                                        }else{
-                                                               result = service.deleteSynonym((Synonym)object, null);
+                                                               result = service.deleteSynonym(((Synonym)object).getUuid(), null);
                                                        }
                                                }
                                        } else if (object instanceof TeamOrPersonBase){
                                                IAgentService service = controller.getAgentService();
-                                               TeamOrPersonBase teamOrPerson = (TeamOrPersonBase)service.load(((TeamOrPersonBase) object).getUuid());
-                                               result = service.delete((TeamOrPersonBase)object);
+                                               //TeamOrPersonBase teamOrPerson = (TeamOrPersonBase)service.load(((TeamOrPersonBase) object).getUuid());
+                                               result = service.delete(((TeamOrPersonBase)object).getUuid());
                                        }
                                } catch (Exception e){
                                        MessagingUtils.errorDialog("Exception occured. Delete not possible", getClass(), e.getMessage(), TaxeditorBulkeditorPlugin.PLUGIN_ID, null, true);
@@ -169,12 +144,11 @@ public class DeleteHandler extends AbstractHandler {
                                                                message+= ", ";
                                                        }
                                                }
-                                               
-                                               
+
+
                                                MessagingUtils.messageDialog("Delete not possible", getClass(), result.getExceptions().toString(), null);
                                        }else{
                                                MessagingUtils.messageDialog("Delete not possible", getClass(), "The object could not be deleted. An exception occured.", null);
-                                               
                                        }
                                }
                                if (result.isOk() ){
@@ -184,11 +158,11 @@ public class DeleteHandler extends AbstractHandler {
                                        }
 
                                }
-                               
-                       }                               
+
+                       }
                }
-       
-               
+
+
                return null;
        }
 
index 8cf5d3357e22a6ace1df8b40854e94f5ff703179..150e3b1aac446277e6e8b579bd454626221ae664 100644 (file)
@@ -14,6 +14,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -35,6 +36,7 @@ import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
 import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.CdmBaseSortProvider;
 import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.TitleCacheComparator;
 import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
+import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -46,7 +48,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @version 1.0
  * @param <T>
  */
-public abstract class AbstractBulkEditorInput<T extends ICdmBase> implements IEditorInput, IEntityPersistenceService<T> {
+public abstract class AbstractBulkEditorInput<T extends ICdmBase> extends CdmEntitySessionInput implements IEditorInput ,
+    IEntityPersistenceService<T> {
 
        private UUID entityUuid;
 
@@ -56,6 +59,10 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> implements IEd
 
        private static Class serviceClass;
 
+       public AbstractBulkEditorInput() {
+           super(true);
+       }
+
        /**
         * <p>NewInstance</p>
         *
@@ -248,7 +255,7 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> implements IEd
 
        /** {@inheritDoc} */
        @Override
-    public boolean create(T entity) {
+    public T create(T entity) {
                return save(entity);
        }
 
@@ -305,9 +312,35 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> implements IEd
        /**
         * @return
         */
-       public List<?> getModel() {
+       public List<T> getModel() {
                return model;
        }
 
+       protected boolean replaceInModel(T entity) {
+           int index = model.indexOf(entity);
+           if(index >= 0) {
+               model.set(index, entity);
+               return true;
+           } else {
+               return false;
+           }
+       }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public   List<T> getRootEntities() {
+        return getModel();
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }
index 4c2dccc55e38157da4cff496d941179ebc5c4152..c4c7854749c2c204e9b9d83d8cfec3b16ae8a917 100644 (file)
@@ -48,11 +48,13 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
                return ID;
        }
 
+
        @Override
     public String getName() {
                return BulkEditorInputType.AGENT.label;
        }
 
+
        @Override
     public String getToolTipText() {
                return getName();
@@ -71,6 +73,7 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
                return true;
        }
 
+
        /** {@inheritDoc} */
        @Override
        public boolean isConvertingEnabled() {
@@ -117,7 +120,6 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
 
 
        public boolean delete(AgentBase entity) throws ReferencedObjectUndeletableException  {
-
                        return CdmStore.getService(IAgentService.class).delete(entity) != null;
 
        }
@@ -137,14 +139,20 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
                return sortProviders;
        }
 
+
        @Override
        protected IEntityCreator<TeamOrPersonBase> createEntityCreator() {
                return new AgentCreator();
        }
 
        @Override
-       public boolean save(TeamOrPersonBase entity) {
-               return CdmStore.getService(IAgentService.class).saveOrUpdate(entity) != null;
+       public TeamOrPersonBase save(TeamOrPersonBase entity) {
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return (TeamOrPersonBase) CdmStore.getService(IAgentService.class).merge(entity);
+           } else {
+               CdmStore.getService(IAgentService.class).saveOrUpdate(entity) ;
+               return entity;
+           }
        }
 
        @Override
@@ -154,4 +162,13 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
                return false;
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
+
 }
index 98724faa802a6a0942d057e5507524cf43dc5873..1ec68333958a42b6fe3c518f45d7e3b0ffe25a85 100644 (file)
@@ -1,18 +1,16 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
-import java.util.Arrays;
 import java.util.List;
-import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.IGroupService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
@@ -30,9 +28,9 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
 
        public static final String ID = "bulkeditor.input.group";
-       
+
        private static GroupEditorInput instance;
-       
+
        /**
         * @return the instance
         */
@@ -42,7 +40,7 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
                }
                return instance;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IEditorInput#getName()
         */
@@ -63,8 +61,13 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
         * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#save(java.lang.Object)
         */
        @Override
-       public boolean save(Group entity) {
-               return CdmStore.getService(IGroupService.class).saveOrUpdate(entity) != null;
+       public Group save(Group entity) {
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return CdmStore.getService(IGroupService.class).merge(entity) ;
+           } else {
+               CdmStore.getService(IGroupService.class).saveOrUpdate(entity);
+               return entity;
+           }
        }
 
        /* (non-Javadoc)
@@ -86,10 +89,10 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
 
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#loadEntity(java.util.UUID)
-        
+
        @Override
        protected Group loadEntity(UUID entityUuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{});
                return CdmStore.getService(IGroupService.class).load(entityUuid, propertyPaths);
        }
 */
@@ -100,7 +103,7 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
        protected IEntityCreator<Group> createEntityCreator() {
                return new GroupCreator();
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getText(eu.etaxonomy.cdm.model.common.ICdmBase)
         */
@@ -109,6 +112,14 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
                return entity.getName();
        }
 
-       
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
+
 
 }
index c9298f93bd147e80e77643c98f5c56409395dedc..2763b2f634f71e56540df838364ad4a38ea31460 100644 (file)
@@ -1,22 +1,19 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
-import java.util.Arrays;
 import java.util.List;
-import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.INameService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
-import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
@@ -34,14 +31,14 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
 
        /**
-        * 
+        *
         */
        private static final long serialVersionUID = -3085029575759626823L;
        private static NameEditorInput instance;
 
        /** Constant <code>ID="bulkeditor.input.name"</code> */
        public static final String ID = "bulkeditor.input.name";
-       
+
        /**
         * <p>Getter for the field <code>instance</code>.</p>
         *
@@ -53,7 +50,7 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
                }
                return instance;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IEditorInput#getName()
         */
@@ -62,7 +59,8 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getName() {
+       @Override
+    public String getName() {
                return BulkEditorInputType.NAME.label;
        }
 
@@ -74,7 +72,8 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getToolTipText() {
+       @Override
+    public String getToolTipText() {
                return getName();
        }
 
@@ -102,22 +101,29 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
                return CdmStore.getSearchManager().findNames(configurator);
        }
 
-       /** {@inheritDoc} 
+       /** {@inheritDoc}
        @Override
        public TaxonNameBase loadEntity(UUID uuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{});
                return CdmStore.getService(INameService.class).load(uuid, propertyPaths);
        }
 */
-       /** {@inheritDoc} 
+       /** {@inheritDoc}
         **/
-       public boolean delete(TaxonNameBase entity)  {
+       @Override
+    public boolean delete(TaxonNameBase entity)  {
                return CdmStore.getService(INameService.class).delete(entity) != null;
        }
 
        /** {@inheritDoc} */
-       public boolean save(TaxonNameBase entity) {
-               return CdmStore.getService(INameService.class).saveOrUpdate(entity) != null;
+       @Override
+    public TaxonNameBase save(TaxonNameBase entity) {
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return CdmStore.getService(INameService.class).merge(entity) ;
+           } else {
+               CdmStore.getService(INameService.class).saveOrUpdate(entity);
+               return entity;
+           }
        }
 
        /* (non-Javadoc)
@@ -134,12 +140,12 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
        @Override
        public List<IBulkEditorSortProvider<TaxonNameBase>> getSortProviders() {
                List<IBulkEditorSortProvider<TaxonNameBase>> sortProviders = super.getSortProviders();
-               
+
                sortProviders.add(0, new IdentifiableEntitySortProvider<TaxonNameBase>());
-               
+
                return sortProviders;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getTypeText(java.lang.Object)
         */
@@ -150,7 +156,7 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
                }
                return super.getTypeText(entity);
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getText(eu.etaxonomy.cdm.model.common.ICdmBase)
         */
@@ -159,5 +165,13 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
                return (entity).getFullTitleCache();
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
 
 }
index a317feca144f1e561b25e3eaadc674c90650745d..893232a917d8eae331cee17b86db4ce23c00599f 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -30,7 +30,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRelationship> {
 
        /**
-        * 
+        *
         */
        private static final long serialVersionUID = -7453923697752787687L;
 
@@ -50,7 +50,7 @@ public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRel
                }
                return instance;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IEditorInput#getName()
         */
@@ -74,9 +74,9 @@ public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRel
         */
        /** {@inheritDoc} */
        @Override
-       public boolean save(NameRelationship entity) {
+       public NameRelationship save(NameRelationship entity) {
                // TODO Auto-generated method stub
-               return false;
+               return null;
        }
 
        /* (non-Javadoc)
@@ -105,7 +105,7 @@ public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRel
        /** {@inheritDoc} */
        @Override
        protected NameRelationship loadEntity(UUID entityUuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{});
                return null; // CdmStore.getNameService().load(entityUuid, propertyPaths);
        }
 
@@ -117,7 +117,7 @@ public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRel
                MessagingUtils.notImplementedMessage(getClass());
                return null;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getTypeText(java.lang.Object)
         */
@@ -126,8 +126,16 @@ public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRel
                if(entity instanceof NameRelationship){
                        return ((NameRelationship) entity).getType().getTitleCache();
                }
-               
+
                return super.getTypeText(entity);
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
 }
index 8e954f8bd163e28d137a6295c6aee14b8cbc802c..1e66ad04702b96ff4d0664ef703bddefdd71a489 100644 (file)
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
-import java.util.Arrays;
 import java.util.List;
-import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
 import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
+import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
 import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.OccurrenceCreator;
@@ -69,7 +68,7 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#loadEntity(java.util.UUID)
         */
-       /** {@inheritDoc} 
+       /** {@inheritDoc}
        @Override
        protected SpecimenOrObservationBase loadEntity(UUID entityUuid) {
                List<String> propertyPaths = Arrays.asList(new String[]{});
@@ -125,7 +124,7 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#delete(java.lang.Object)
         */
-       /** {@inheritDoc} 
+       /** {@inheritDoc}
         * @throws ReferencedObjectUndeletableException */
        @Override
     public boolean delete(SpecimenOrObservationBase entity) throws ReferencedObjectUndeletableException {
@@ -137,8 +136,13 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
         */
        /** {@inheritDoc} */
        @Override
-    public boolean save(SpecimenOrObservationBase entity) {
-               return CdmStore.getService(IOccurrenceService.class).save(entity) != null;
+    public SpecimenOrObservationBase<IIdentifiableEntityCacheStrategy> save(SpecimenOrObservationBase entity) {
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return CdmStore.getService(IOccurrenceService.class).merge(entity) ;
+           } else {
+               CdmStore.getService(IOccurrenceService.class).save(entity);
+               return entity;
+           }
        }
 
 
@@ -161,4 +165,12 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
 
                return sortProviders;
        }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
 }
index d32a648cd0bf522d3a32dcc2e22ec9fe34612537..ea8598b67b1742711062f184bf8c071be87bbecd 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -36,13 +36,13 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
 
        /**
-        * 
+        *
         */
        private static final long serialVersionUID = 3806243517765126749L;
 
        /** Constant <code>ID="bulkeditor.input.reference"</code> */
        public static final String ID = "bulkeditor.input.reference";
-       
+
        private static ReferenceEditorInput instance;
 
        /**
@@ -53,7 +53,7 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
        public static String getID() {
                return ID;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IEditorInput#getName()
         */
@@ -62,7 +62,8 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getName() {
+       @Override
+    public String getName() {
                return BulkEditorInputType.REFERENCE.label;
        }
 
@@ -74,7 +75,8 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getToolTipText() {
+       @Override
+    public String getToolTipText() {
                return getName();
        }
 
@@ -98,7 +100,7 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
        public boolean isMergingEnabled() {
                return true;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInput#isMarkerTypeEditingEnabled(eu.etaxonomy.cdm.model.common.MarkerType)
         */
@@ -111,31 +113,38 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
                return super.isMarkerTypeEditingEnabled(markerType);
        }
 
-       
+
        /** {@inheritDoc} */
        @Override
        public List listEntities(IIdentifiableEntityServiceConfigurator configurator) {
                return CdmStore.getSearchManager().findReferences(configurator);
        }
-       
+
        // Entity persistence
-       
+
        /** {@inheritDoc} */
        @Override
        public Reference loadEntity(UUID entityUuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{"*", "inReference.*", "authorTeam.*"}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{"*", "inReference.*", "authorTeam.*"});
                return CdmStore.getService(IReferenceService.class).load(entityUuid, propertyPaths);
        }
 
-       /** {@inheritDoc} 
+       /** {@inheritDoc}
         * @throws ReferencedObjectUndeletableException */
-       public boolean delete(Reference entity) throws ReferencedObjectUndeletableException {
+       @Override
+    public boolean delete(Reference entity) throws ReferencedObjectUndeletableException {
                return CdmStore.getService(IReferenceService.class).delete(entity) != null;
        }
 
        /** {@inheritDoc} */
-       public boolean save(Reference entity) {
-               return CdmStore.getService(IReferenceService.class).saveOrUpdate(entity) != null;
+       @Override
+    public Reference save(Reference entity) {
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return CdmStore.getService(IReferenceService.class).merge(entity);
+           } else {
+               CdmStore.getService(IReferenceService.class).saveOrUpdate(entity);
+               return entity;
+           }
        }
 
        /* (non-Javadoc)
@@ -145,20 +154,20 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
        protected IEntityCreator<Reference> createEntityCreator() {
                return new ReferenceCreator();
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getSortProviders()
         */
        @Override
        public List<IBulkEditorSortProvider<Reference>> getSortProviders() {
                List<IBulkEditorSortProvider<Reference>> sortProviders = super.getSortProviders();
-               
+
                sortProviders.add(0, new IdentifiableEntitySortProvider<Reference>());
                sortProviders.add(1, new ReferenceSortProvider());
-               
+
                return sortProviders;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getTypeText(java.lang.Object)
         */
@@ -170,4 +179,12 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
                return super.getTypeText(entity);
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
 }
index 3367a5e09279f936f52c687d8c049e656a818f65..1ce4878383e72f4dd9cd266a448669bc6fa51eac 100644 (file)
@@ -5,20 +5,17 @@ import java.util.Arrays;
 import java.util.List;\r
 import java.util.UUID;\r
 \r
-import eu.etaxonomy.cdm.api.service.INameService;\r
 import eu.etaxonomy.cdm.api.service.ITaxonService;\r
 import eu.etaxonomy.cdm.api.service.config.FindTaxaAndNamesConfiguratorImpl;\r
 import eu.etaxonomy.cdm.api.service.config.IFindTaxaAndNamesConfigurator;\r
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;\r
 import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;\r
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;\r
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.taxon.Synonym;\r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
 import eu.etaxonomy.cdm.persistence.query.MatchMode;\r
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;\r
-import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.NameCreator;\r
 import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.TaxonCreator;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
 \r
@@ -27,9 +24,9 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
        private static TaxonEditorInput instance;\r
        /** Constant <code>ID="bulkeditor.input.taxon"</code> */\r
        public static final String ID = "bulkeditor.input.taxon";\r
-       \r
-       \r
-       \r
+\r
+\r
+\r
        /**\r
         * <p>Getter for the field <code>instance</code>.</p>\r
         *\r
@@ -39,11 +36,11 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
                if (instance == null) {\r
                        instance = new TaxonEditorInput();\r
                }\r
-       \r
+\r
                return instance;\r
        }\r
-       \r
-       \r
+\r
+\r
        @Override\r
        public String getName() {\r
                return BulkEditorInputType.TAXON.label;\r
@@ -54,7 +51,7 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
                return getName();\r
        }\r
 \r
-       \r
+\r
        /**\r
         * <p>getID</p>\r
         *\r
@@ -63,7 +60,7 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
        public static Object getID() {\r
                return ID;\r
        }\r
-       \r
+\r
        /* (non-Javadoc)\r
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInput#isMergingEnabled()\r
         */\r
@@ -73,11 +70,16 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
                return false;\r
        }\r
        @Override\r
-       public boolean save(TaxonBase entity) {\r
-               return CdmStore.getService(ITaxonService.class).saveOrUpdate(entity) != null;\r
+       public TaxonBase save(TaxonBase entity) {\r
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {\r
+               return CdmStore.getService(ITaxonService.class).merge(entity);\r
+           } else {\r
+               CdmStore.getService(ITaxonService.class).saveOrUpdate(entity);\r
+               return entity;\r
+           }\r
        }\r
 \r
-       \r
+\r
 \r
        /** {@inheritDoc} */\r
        @Override\r
@@ -88,7 +90,7 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
                List<TaxonBase> taxa =  CdmStore.getSearchManager().findTaxa(configurator);\r
                List<TaxonBase> taxaCopy = new ArrayList<TaxonBase>();\r
                for (TaxonBase taxon:taxa){\r
-                       \r
+\r
                        if (taxon instanceof Taxon){\r
                                taxaCopy.add(HibernateProxyHelper.deproxy(taxon, Taxon.class));\r
                        }else{\r
@@ -101,15 +103,16 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
 \r
        @Override\r
        protected TaxonBase loadEntity(UUID entityUuid) {\r
-               List<String> propertyPaths = Arrays.asList(new String[]{}); \r
+               List<String> propertyPaths = Arrays.asList(new String[]{});\r
                return CdmStore.getService(ITaxonService.class).load(entityUuid, propertyPaths);\r
        }\r
 \r
-       \r
 \r
-       /** {@inheritDoc} \r
+\r
+       /** {@inheritDoc}\r
         * @throws ReferencedObjectUndeletableException */\r
-       public boolean delete(TaxonBase entity) {\r
+       @Override\r
+    public boolean delete(TaxonBase entity) {\r
                return CdmStore.getService(ITaxonService.class).delete(entity) != null;\r
        }\r
        @Override\r
@@ -117,4 +120,13 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
                return new TaxonCreator();\r
        }\r
 \r
+\r
+    /* (non-Javadoc)\r
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()\r
+     */\r
+    @Override\r
+    public void merge() {\r
+\r
+    }\r
+\r
 }\r
index c80733b1e807b558638e0ae860322e959e22f87b..e9469eca101555416640a607d1cbfdbeb6d9e92d 100644 (file)
@@ -1,18 +1,16 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
-import java.util.Arrays;
 import java.util.List;
-import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
@@ -30,9 +28,9 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class UserEditorInput extends AbstractBulkEditorInput<User> {
 
        public static final String ID = "bulkeditor.input.user";
-       
+
        private static UserEditorInput instance;
-       
+
        /**
         * @return the instance
         */
@@ -42,7 +40,7 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
                }
                return instance;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IEditorInput#getName()
         */
@@ -63,8 +61,14 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
         * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#save(java.lang.Object)
         */
        @Override
-       public boolean save(User entity) {
-               return CdmStore.getService(IUserService.class).saveOrUpdate(entity) != null;
+       public User save(User entity) {
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return CdmStore.getService(IUserService.class).merge(entity);
+           } else {
+               CdmStore.getService(IUserService.class).saveOrUpdate(entity);
+               return entity;
+           }
+
        }
 
        /* (non-Javadoc)
@@ -84,13 +88,13 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
                return CdmStore.getSearchManager().findUsers(configurator);
        }
 
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#loadEntity(java.util.UUID)
-       
+
        @Override
        protected User loadEntity(UUID entityUuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{});
                return CdmStore.getService(IUserService.class).load(entityUuid, propertyPaths);
        }
  */
@@ -101,7 +105,7 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
        protected IEntityCreator<User> createEntityCreator() {
                return new UserCreator();
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getText(eu.etaxonomy.cdm.model.common.ICdmBase)
         */
@@ -110,5 +114,13 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
                return String.format("%s, %s", entity.getUsername(), entity.getPerson());
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
 
 }
index aba437843535c3a7afac76042df26592e35a13e9..91b7734797b5af7b5ded0242db68422bb69aab9a 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -43,7 +43,11 @@ public class UserCreator  implements IEntityCreator<User>{
        public User createEntity(Object key, String text) {
                try{
                        User user = User.NewInstance(text, text);
-                       CdmStore.getService(IUserService.class).createUser(user);
+                        if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                            user = CdmStore.getService(IUserService.class).merge(user);
+                        } else {
+                            CdmStore.getService(IUserService.class).createUser(user);
+                        }
                        return user;
                } catch (AccessDeniedException e){
                        MessagingUtils.messageDialog("Access denied", getClass(), e.getMessage(), e);
index 604f3874a6d788c0f879e2e7f6f6cf5d77648c06..91acc404f197013e8602b6d8a4745de53f65aa68 100644 (file)
@@ -67,7 +67,7 @@ import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
  * @created 08.07.2009
  * @version 1.0
  */
-public class ReferencingObjectsView extends AbstractCdmViewPart{
+public class ReferencingObjectsView extends AbstractCdmViewPart {
        private static final Logger logger = Logger
                        .getLogger(ReferencingObjectsView.class);
 
@@ -352,5 +352,4 @@ public class ReferencingObjectsView extends AbstractCdmViewPart{
 
        }
 
-
 }
index 5f958ce4af119eaecd27cb317134ea5e5d20692f..442ca897d01f9b0ee46e4592d027d3065fb10144 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.8.0-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.8.0-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.8.0-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.8.0-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.8.0-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.8.0-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.8.0-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.8.0-SNAPSHOT.jar" sourcepath="lib/cdmlib-services-3.8.0-SNAPSHOT-sources.jar"/>\r
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
-       <classpathentry kind="src" path="src/main/java"/>\r
-       <classpathentry kind="src" path="src/main/resources"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aspectjrt-1.7.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.7.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/avro-1.6.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-anim-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-awt-util-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-bridge-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-css-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-dom-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-ext-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-extension-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-gvt-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-js-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-parser-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-script-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-svg-dom-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-svggen-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-transcoder-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-util-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-xml-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/c3p0-0.9.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-2.2.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.aopalliance-1.0.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.apache.commons.logging-1.1.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.8.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-codec-20041127.091804.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-dbcp-1.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-io-2.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-lang-2.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.5.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/concurrent-1.3.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dbunit-2.4.9.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-core-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-logging-api-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-module-apt-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-module-xhtml-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-sink-api-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/easymock-3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/easymockclassextension-2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ehcache-core-2.6.9.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/fop-1.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/guava-r05.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/h2-1.3.170.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hamcrest-core-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-c3p0-4.1.10.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-cglib-repack-2.1_3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-4.0.1.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-core-4.1.10.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-ehcache-4.1.10.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-entitymanager-4.1.10.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-4.1.10.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-jpa-2.0-api-1.0.1.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-4.2.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-analyzers-4.2.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-engine-4.2.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-orm-4.2.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-4.3.1.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hsqldb-1.8.0.10.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/httpclient-4.2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/httpcore-4.2.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/icu4j-2.6.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/itextpdf-5.4.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.8.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jackson-mapper-asl-1.8.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jakarta-regexp-1.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/javassist-3.17.1-GA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.2.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-impl-2.2-EA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-xjc-2.2-EA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb1-impl-2.2-EA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jboss-logging-3.1.3.GA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jdbc4-2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jdom-1.1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/joda-time-2.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/json-lib-2.4-jdk15.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jtds-1.3.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/junit-4.11.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/junit-benchmarks-0.5.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lsid-client-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lsid-server-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-core-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-facet-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-grouping-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-highlighter-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-kuromoji-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-memory-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-misc-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-phonetic-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-queries-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-smartcn-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-spatial-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-spellchecker-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-stempel-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/mchange-commons-java-0.2.3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.24.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/objenesis-1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/odfdom-java-0.8.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ognl-2.6.9.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/opencsv-2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.equinox.common-3.6.0.v20110523.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.osgi.core-1.0.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aop-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aspects-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.beans-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.context-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.core-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.expression-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.jdbc-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.orm-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.oxm-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.test-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.transaction-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web.servlet-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/osgi-3.6.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/p6spy-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/paranamer-2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/plexus-classworlds-1.2-alpha-9.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/plexus-container-default-1.0-alpha-30.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/plexus-utils-2.0.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/servlet-api-2.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.7.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/snappy-java-1.0.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/solr-analysis-extras-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/solr-core-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/solr-solrj-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-aop-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-beans-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-context-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-context-support-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-core-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-expression-3.2.2.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-modules-cache-0.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-config-3.1.3.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-core-3.1.3.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/stax-1.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/stax-api-1.0.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-core-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-database-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-dbmaintainer-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-dbunit-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-easymock-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-inject-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-mock-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-orm-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-spring-3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/usertype.jodatime-2.0.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/usertype.spi-2.0.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/validation-api-1.0.0.GA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xalan-2.6.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.11.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-apis-1.0.b2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-resolver-1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlgraphics-commons-1.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlParserAPIs-2.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlpull-1.1.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlunit-1.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xom-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.4c.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xstream-1.4.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-9.0.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/h2mig_pagestore_addon.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-remoting-3.1.3.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jena-core-2.11.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jena-iri-1.0.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/poi-3.10-FINAL.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-3.10-FINAL.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.3.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.10-FINAL.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.3.5.jar"/>\r
-       <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="src" path="src/main/resources"/>
+       <classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aspectjrt-1.7.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.7.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/avro-1.6.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-anim-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-awt-util-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-bridge-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-css-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-dom-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-ext-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-extension-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-gvt-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-js-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-parser-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-script-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-svg-dom-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-svggen-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-transcoder-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-util-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-xml-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/c3p0-0.9.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-2.2.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.aopalliance-1.0.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.apache.commons.logging-1.1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.8.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-codec-20041127.091804.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-dbcp-1.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-io-2.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-lang-2.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.5.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/concurrent-1.3.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dbunit-2.4.9.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-core-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-logging-api-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-module-apt-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-module-xhtml-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-sink-api-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/easymock-3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/easymockclassextension-2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ehcache-core-2.6.9.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/fop-1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/guava-r05.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/h2-1.3.170.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hamcrest-core-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-c3p0-4.1.10.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-cglib-repack-2.1_3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-4.0.1.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-core-4.1.10.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-ehcache-4.1.10.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-entitymanager-4.1.10.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-4.1.10.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-jpa-2.0-api-1.0.1.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-4.2.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-analyzers-4.2.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-engine-4.2.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-orm-4.2.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-4.3.1.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hsqldb-1.8.0.10.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/httpclient-4.2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/httpcore-4.2.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/icu4j-2.6.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/itextpdf-5.4.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.8.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jackson-mapper-asl-1.8.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jakarta-regexp-1.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/javassist-3.17.1-GA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.2.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-impl-2.2-EA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-xjc-2.2-EA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb1-impl-2.2-EA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jboss-logging-3.1.3.GA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jdbc4-2.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jdom-1.1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/joda-time-2.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/json-lib-2.4-jdk15.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jtds-1.3.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/junit-4.11.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/junit-benchmarks-0.5.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lsid-client-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lsid-server-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-core-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-facet-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-grouping-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-highlighter-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-kuromoji-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-memory-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-misc-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-phonetic-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-queries-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-smartcn-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-spatial-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-spellchecker-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-stempel-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/mchange-commons-java-0.2.3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.24.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/objenesis-1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/odfdom-java-0.8.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ognl-2.6.9.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/opencsv-2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.equinox.common-3.6.0.v20110523.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.osgi.core-1.0.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aop-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aspects-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.beans-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.context-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.core-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.expression-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.jdbc-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.orm-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.oxm-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.test-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.transaction-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web.servlet-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/osgi-3.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/p6spy-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/paranamer-2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/plexus-classworlds-1.2-alpha-9.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/plexus-container-default-1.0-alpha-30.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/plexus-utils-2.0.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/servlet-api-2.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.7.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/snappy-java-1.0.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/solr-analysis-extras-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/solr-core-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/solr-solrj-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-aop-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-beans-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-context-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-context-support-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-core-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-expression-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-modules-cache-0.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-config-3.1.3.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-core-3.1.3.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/stax-1.2.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/stax-api-1.0.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/usertype.jodatime-2.0.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/usertype.spi-2.0.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/validation-api-1.0.0.GA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xalan-2.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.11.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-apis-1.0.b2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-resolver-1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlgraphics-commons-1.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlParserAPIs-2.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlpull-1.1.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlunit-1.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xom-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.4c.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xstream-1.4.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-9.0.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/h2mig_pagestore_addon.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-remoting-3.1.3.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jena-core-2.11.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jena-iri-1.0.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/poi-3.10-FINAL.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-3.10-FINAL.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.3.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.10-FINAL.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.3.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/apache-log4j-extras-1.2.17.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.12.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.12.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.12.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.12.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.12.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.12.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.12.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.12.0-SNAPSHOT.jar"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
+
index c5e82d74585d15d6ea821b5f23cd65624190f244..41b529a2179c63c4a7fdeb5afd85cd68ed2e5720 100644 (file)
@@ -1 +1,5 @@
-bin
\ No newline at end of file
+bin
+/target/
+/target/
+/target/
+/target/
index 158f930cf0e6a1da7eaeb1825e176772a6c48af1..5e1f96d912c26b4aa6fa930a4b60aa5f713e493a 100644 (file)
@@ -2,15 +2,16 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: CDM Library Dependencies Plugin
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.cdmlib;singleton:=true
-Bundle-Version: 3.8.0.qualifier
+Bundle-Version: 3.12.0.qualifier
 Eclipse-BundleShape: dir
 Export-Package: com.google.api,
  com.google.api.detect,
  com.google.api.translate,
+ eu.etaxonomy.cdm,
  eu.etaxonomy.cdm.api.application,
+ eu.etaxonomy.cdm.api.cache,
  eu.etaxonomy.cdm.api.conversation,
  eu.etaxonomy.cdm.api.facade,
- eu.etaxonomy.cdm.api.lazyloading,
  eu.etaxonomy.cdm.api.service,
  eu.etaxonomy.cdm.api.service.config,
  eu.etaxonomy.cdm.api.service.description,
@@ -76,6 +77,7 @@ Export-Package: com.google.api,
  eu.etaxonomy.cdm.io.sdd.ikeyplus,
  eu.etaxonomy.cdm.io.sdd.in,
  eu.etaxonomy.cdm.io.sdd.out,
+ eu.etaxonomy.cdm.io.service,
  eu.etaxonomy.cdm.io.specimen,
  eu.etaxonomy.cdm.io.specimen.abcd206.in,
  eu.etaxonomy.cdm.io.specimen.excel.in,
@@ -113,7 +115,6 @@ Export-Package: com.google.api,
  eu.etaxonomy.cdm.persistence.dao.hibernate.occurrence,
  eu.etaxonomy.cdm.persistence.dao.hibernate.reference,
  eu.etaxonomy.cdm.persistence.dao.hibernate.taxon,
- eu.etaxonomy.cdm.persistence.dao.hibernate.validation,
  eu.etaxonomy.cdm.persistence.dao.hibernate.view,
  eu.etaxonomy.cdm.persistence.dao.media,
  eu.etaxonomy.cdm.persistence.dao.name,
@@ -136,7 +137,6 @@ Export-Package: com.google.api,
  eu.etaxonomy.cdm.print.out.pdf,
  eu.etaxonomy.cdm.print.out.taxpub,
  eu.etaxonomy.cdm.print.out.xml,
- eu.etaxonomy.cdm.remote,
  eu.etaxonomy.cdm.remote.config,
  eu.etaxonomy.cdm.remote.controller,
  eu.etaxonomy.cdm.remote.controller.dto,
@@ -189,16 +189,34 @@ Export-Package: com.google.api,
  eu.etaxonomy.cdm.validation.annotation,
  eu.etaxonomy.cdm.validation.constraint,
  eu.etaxonomy.remote.dto.rdf,
+ eu.etaxonomy.taxeditor.remoting,
+ eu.etaxonomy.taxeditor.remoting.cache,
+ eu.etaxonomy.taxeditor.remoting.server,
+ eu.etaxonomy.taxeditor.remoting.source,
+ eu.etaxonomy.taxeditor.service,
+ eu.etaxonomy.taxeditor.session,
+ eu.etaxonomy.taxeditor.session.mock,
+ javassist.util.proxy,
  javax.persistence,
  junit.framework;uses:="org.junit.runner.manipulation,org.junit.runner,org.junit.runner.notification",
+ net.sf.ehcache,
+ net.sf.ehcache.config,
+ net.sf.ehcache.statistics,
+ net.sf.ehcache.store,
  net.sf.json;uses:="net.sf.json.processors,net.sf.json.util,org.apache.commons.lang.exception",
+ org.aopalliance.aop,
  org.apache.commons.collections;uses:="org.apache.commons.collections.keyvalue,new org.apache.commons.collections",
+ org.apache.commons.collections.buffer,
+ org.apache.commons.dbcp,
  org.apache.commons.io;uses:="org.apache.commons.io.filefilter",
  org.apache.commons.lang;uses:="org.apache.commons.lang.exception",
  org.apache.commons.lang.exception,
+ org.apache.commons.lang.text,
+ org.apache.commons.logging,
  org.apache.fop.apps,
  org.apache.http,
  org.apache.http.client,
+ org.apache.http.util,
  org.apache.log4j;uses:="org.apache.log4j.helpers,org.apache.log4j.or,org.apache.log4j.spi",
  org.apache.log4j.chainsaw;
   uses:="org.apache.log4j,
@@ -265,13 +283,28 @@ Export-Package: com.google.api,
  org.hibernate,
  org.hibernate.annotations.common.reflection,
  org.hibernate.cache.internal,
+ org.hibernate.cfg,
  org.hibernate.classic,
  org.hibernate.collection.internal,
+ org.hibernate.collection.spi,
  org.hibernate.criterion,
+ org.hibernate.engine.internal,
+ org.hibernate.engine.spi,
+ org.hibernate.engine.transaction.spi,
  org.hibernate.envers.query.criteria,
+ org.hibernate.internal,
+ org.hibernate.internal.util,
+ org.hibernate.internal.util.collections,
+ org.hibernate.mapping,
+ org.hibernate.persister.collection,
+ org.hibernate.persister.entity,
+ org.hibernate.pretty,
+ org.hibernate.property,
  org.hibernate.proxy,
+ org.hibernate.proxy.pojo.javassist,
  org.hibernate.search,
  org.hibernate.search.spatial.impl,
+ org.hibernate.type,
  org.jadira.usertype.dateandtime.joda,
  org.jadira.usertype.dateandtime.shared.spi,
  org.jboss.logging,
@@ -311,6 +344,10 @@ Export-Package: com.google.api,
  org.odftoolkit.odfdom.dom.element,
  org.odftoolkit.odfdom.dom.element.style,
  org.odftoolkit.odfdom.dom.style,
+ org.slf4j,
+ org.springframework.aop,
+ org.springframework.aop.framework,
+ org.springframework.beans,
  org.springframework.beans.factory,
  org.springframework.beans.factory.annotation;
   uses:="org.apache.commons.logging,
@@ -321,6 +358,9 @@ Export-Package: com.google.api,
    org.springframework.beans.factory.wiring,
    org.springframework.core.type,
    org.springframework.beans.factory",
+ org.springframework.beans.factory.config,
+ org.springframework.beans.factory.support,
+ org.springframework.beans.factory.xml,
  org.springframework.cache.ehcache,
  org.springframework.context;
   uses:="org.springframework.core.io,
@@ -328,14 +368,19 @@ Export-Package: com.google.api,
    org.springframework.core.io.support,
    org.springframework.beans.factory.config,
    org.springframework.beans.factory",
+ org.springframework.context.config,
  org.springframework.context.event;
   uses:="org.springframework.core,
    org.aopalliance.intercept,
    org.springframework.context,
    org.springframework.beans.factory",
+ org.springframework.context.support,
  org.springframework.core;uses:="org.springframework.util",
+ org.springframework.core.env,
  org.springframework.core.io;uses:="org.jboss.virtual",
+ org.springframework.core.io.support,
  org.springframework.core.type.classreading,
+ org.springframework.jdbc.datasource,
  org.springframework.orm.hibernate3;
   uses:="org.apache.commons.logging,
    org.aopalliance.intercept,
@@ -362,9 +407,15 @@ Export-Package: com.google.api,
    org.springframework.dao,
    org.springframework.transaction.support",
  org.springframework.orm.hibernate4,
+ org.springframework.remoting,
+ org.springframework.remoting.httpinvoker,
+ org.springframework.remoting.support,
  org.springframework.security.access,
  org.springframework.security.authentication,
+ org.springframework.security.authentication.dao,
+ org.springframework.security.authentication.encoding,
  org.springframework.security.authentication.event,
+ org.springframework.security.config,
  org.springframework.security.core,
  org.springframework.security.core.context,
  org.springframework.security.core.userdetails,
@@ -401,6 +452,7 @@ Export-Package: com.google.api,
    org.springframework.transaction,
    org.apache.commons.logging,
    org.springframework.beans.factory",
+ org.springframework.util,
  org.springframework.web.servlet;
   uses:="org.springframework.web.multipart,
    org.apache.commons.logging,
@@ -417,7 +469,9 @@ Export-Package: com.google.api,
 Bundle-Vendor: EDIT
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.eclipse.osgi,
- org.eclipse.equinox.common
+ org.eclipse.equinox.common,
+ org.apache.commons.httpclient;bundle-version="3.1.0",
+ org.eclipse.core.runtime
 Bundle-ClassPath: .,
  lib/activation-1.1.1.jar,
  lib/antlr-2.7.7.jar,
@@ -574,15 +628,6 @@ Bundle-ClassPath: .,
  lib/spring-security-core-3.1.3.RELEASE.jar,
  lib/stax-1.2.0.jar,
  lib/stax-api-1.0.1.jar,
- lib/unitils-core-3.3.jar,
- lib/unitils-database-3.3.jar,
- lib/unitils-dbmaintainer-3.3.jar,
- lib/unitils-dbunit-3.3.jar,
- lib/unitils-easymock-3.3.jar,
- lib/unitils-inject-3.3.jar,
- lib/unitils-mock-3.3.jar,
- lib/unitils-orm-3.3.jar,
- lib/unitils-spring-3.3.jar,
  lib/usertype.jodatime-2.0.1.jar,
  lib/usertype.spi-2.0.1.jar,
  lib/validation-api-1.0.0.GA.jar,
@@ -612,12 +657,13 @@ Bundle-ClassPath: .,
  lib/xmlbeans-2.3.0.jar,
  lib/poi-ooxml-schemas-3.10-FINAL.jar,
  lib/swagger-annotations-1.3.5.jar,
- lib/cdmlib-commons-3.8.0-SNAPSHOT.jar,
- lib/cdmlib-ext-3.8.0-SNAPSHOT.jar,
- lib/cdmlib-io-3.8.0-SNAPSHOT.jar,
- lib/cdmlib-model-3.8.0-SNAPSHOT.jar,
- lib/cdmlib-persistence-3.8.0-SNAPSHOT.jar,
- lib/cdmlib-print-3.8.0-SNAPSHOT.jar,
- lib/cdmlib-remote-3.8.0-SNAPSHOT.jar,
- lib/cdmlib-services-3.8.0-SNAPSHOT.jar
+ lib/apache-log4j-extras-1.2.17.jar,
+ lib/cdmlib-commons-3.12.0-SNAPSHOT.jar,
+ lib/cdmlib-ext-3.12.0-SNAPSHOT.jar,
+ lib/cdmlib-io-3.12.0-SNAPSHOT.jar,
+ lib/cdmlib-model-3.12.0-SNAPSHOT.jar,
+ lib/cdmlib-persistence-3.12.0-SNAPSHOT.jar,
+ lib/cdmlib-print-3.12.0-SNAPSHOT.jar,
+ lib/cdmlib-remote-3.12.0-SNAPSHOT.jar,
+ lib/cdmlib-services-3.12.0-SNAPSHOT.jar
 Import-Package: eu.etaxonomy.cdm.api.application
index 3ce2b145dd7c8b8dc21f692f8634b554f9f4e799..9d733147ce77174b2b63a0c6255a777a67525d18 100644 (file)
@@ -155,15 +155,6 @@ bin.includes = META-INF/,\
                lib/spring-security-core-3.1.3.RELEASE.jar,\\r
                lib/stax-1.2.0.jar,\\r
                lib/stax-api-1.0.1.jar,\\r
-               lib/unitils-core-3.3.jar,\\r
-               lib/unitils-database-3.3.jar,\\r
-               lib/unitils-dbmaintainer-3.3.jar,\\r
-               lib/unitils-dbunit-3.3.jar,\\r
-               lib/unitils-easymock-3.3.jar,\\r
-               lib/unitils-inject-3.3.jar,\\r
-               lib/unitils-mock-3.3.jar,\\r
-               lib/unitils-orm-3.3.jar,\\r
-               lib/unitils-spring-3.3.jar,\\r
                lib/usertype.jodatime-2.0.1.jar,\\r
                lib/usertype.spi-2.0.1.jar,\\r
                lib/validation-api-1.0.0.GA.jar,\\r
@@ -194,19 +185,20 @@ bin.includes = META-INF/,\
                lib/poi-ooxml-schemas-3.10-FINAL.jar,\\r
                lib/xmlbeans-2.3.0.jar,\\r
                lib/swagger-annotations-1.3.5.jar,\\r
-               lib/cdmlib-commons-3.8.0-SNAPSHOT.jar,\\r
-               lib/cdmlib-ext-3.8.0-SNAPSHOT.jar,\\r
-               lib/cdmlib-io-3.8.0-SNAPSHOT.jar,\\r
-               lib/cdmlib-model-3.8.0-SNAPSHOT.jar,\\r
-               lib/cdmlib-persistence-3.8.0-SNAPSHOT.jar,\\r
-               lib/cdmlib-print-3.8.0-SNAPSHOT.jar,\\r
-               lib/cdmlib-remote-3.8.0-SNAPSHOT.jar,\\r
-               lib/cdmlib-services-3.8.0-SNAPSHOT.jar\r
+               lib/cdmlib-commons-3.12.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-ext-3.12.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-io-3.12.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-model-3.12.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-persistence-3.12.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-print-3.12.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-remote-3.12.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-services-3.12.0-SNAPSHOT.jar,\\r
+               lib/apache-log4j-extras-1.2.17.jar,\\r
+               resources/cdm.map.ser\r
 \r
 jars.compile.order = .\r
 output.. = bin/\r
 source.. = src/main/java/,\\r
-           src/main/resources/,\\r
-           src/test/java/\r
+           src/main/resources/\r
 src.includes = src/\r
 \r
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar
new file mode 100644 (file)
index 0000000..b08d8d5
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1-sources.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1-sources.jar
deleted file mode 100644 (file)
index 21ffee7..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1-sources.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1-sources.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1-sources.jar
deleted file mode 100644 (file)
index 9625da0..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1-sources.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.3.jar
deleted file mode 100644 (file)
index a3a7a7b..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.4.2.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.4.2.jar
new file mode 100644 (file)
index 0000000..ab4c22e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.3.jar
deleted file mode 100644 (file)
index f9a1647..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.4.2.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.4.2.jar
new file mode 100644 (file)
index 0000000..dfcb6ae
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.3.jar
deleted file mode 100644 (file)
index bb20970..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.4.2.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.4.2.jar
new file mode 100644 (file)
index 0000000..01f8994
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.3.jar
deleted file mode 100644 (file)
index eefa626..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.4.2.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.4.2.jar
new file mode 100644 (file)
index 0000000..778274e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-easymock-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-easymock-3.3.jar
deleted file mode 100644 (file)
index c603f0b..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-easymock-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-inject-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-inject-3.3.jar
deleted file mode 100644 (file)
index 8bf141e..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-inject-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-mock-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-mock-3.3.jar
deleted file mode 100644 (file)
index f201831..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-mock-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-orm-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-orm-3.3.jar
deleted file mode 100644 (file)
index d8d4e89..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-orm-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.3.jar
deleted file mode 100644 (file)
index 53074f0..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.4.2.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.4.2.jar
new file mode 100644 (file)
index 0000000..f30810b
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.4.2.jar differ
index 3369711696df66cf3a600b5f6f14640429d4cf89..ada7df3236a93bb715a424a5653c95c9b2738471 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>eu.etaxonomy</groupId>
-    <artifactId>taxeditor-parent</artifactId>
-    <version>3.8.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>eu.etaxonomy.taxeditor.cdmlib</artifactId>
-  <packaging>eclipse-plugin</packaging>
-  <name>CDM Library Dependencies Plugin</name>
-  <description>CDM Library and dependencies as a plugin</description>
-  <build>
-    <plugins>      
-      <plugin>
-       <groupId>org.apache.maven.plugins</groupId>
-       <artifactId>maven-dependency-plugin</artifactId>
-       <version>2.4</version>
-       <executions>
-         <execution>
-           <id>copy-dependencies</id>
-           <phase>validate</phase>
-           <goals>
-             <goal>copy-dependencies</goal>
-           </goals>
-           <configuration>
-             <includeArtifactIds>cdmlib-commons,cdmlib-model,cdmlib-persistence,cdmlib-remote,cdmlib-print,cdmlib-services,cdmlib-ext,cdmlib-io</includeArtifactIds>
-             <outputDirectory>lib</outputDirectory>
-             <overWriteReleases>true</overWriteReleases>
-             <overWriteSnapshots>true</overWriteSnapshots>
-             <excludeTransitive>true</excludeTransitive>             
-           </configuration>
-         </execution>
-         <execution>
-           <id>copy-dependencies-sources</id>
-           <phase>validate</phase>
-           <goals>
-             <goal>copy-dependencies</goal>
-           </goals>
-           <configuration>
-             <classifier>sources</classifier>
-             <includeArtifactIds>cdmlib-commons,cdmlib-model,cdmlib-persistence,cdmlib-remote,cdmlib-print,cdmlib-services,cdmlib-ext,cdmlib-io</includeArtifactIds>
-             <outputDirectory>lib</outputDirectory>
-             <overWriteReleases>true</overWriteReleases>
-             <overWriteSnapshots>true</overWriteSnapshots>
-             <excludeTransitive>true</excludeTransitive>
-             <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
-           </configuration>
-         </execution>
-       </executions>
-      </plugin>
-      <plugin>
-       <groupId>org.apache.maven.plugins</groupId>
-       <artifactId>maven-antrun-plugin</artifactId>
-       <version>1.7</version>
-       <executions>
-         <execution>
-           <id>remove-existing-jars</id>
-           <phase>clean</phase>
-           <goals>
-             <goal>run</goal>
-           </goals>
-           <configuration>
-             <target>
-               <echo>Remove all cdmlib jars</echo>
-               <delete>
-                 <fileset dir="./lib" includes="cdmlib-*" />
-               </delete>
-             </target> 
-           </configuration>
-         </execution>
-         <execution>
-           <id>update-snapshot-jar-names</id>
-           <phase>validate</phase>
-           <goals>
-             <goal>run</goal>
-           </goals>
-           <configuration>           
-             <target>
-               <echo>Update cdmlib jars to SNAPSHOT when build with timestamp</echo>
-               <move todir="./lib">
-                 <fileset dir="./lib" />
-                 <mapper type="regexp" from="(^cdmlib\-.*\-[0-9]\.[0-9]\.[0-9]\-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
-               </move>                           
-               <move todir="./lib">
-                 <fileset dir="./lib" />
-                 <mapper type="regexp" from="(^cdmlib\-.*\-[0-9]\.[0-9]\.[0-9]\-)[0-9.-]+(\-sources\.jar)" to="\1SNAPSHOT\2" />
-               </move>                           
-             </target> 
-           </configuration>
-         </execution>
-       </executions>
-      </plugin>
-    </plugins>
-  </build>
-  <dependencies>
-    <dependency>
-      <groupId>identificationKeyAPI</groupId>
-      <artifactId>identificationKeyAPI</artifactId>
-      <version>1.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-commons</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-model</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-persistence</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-remote</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-print</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-services</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-io</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-ext</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-       <dependency>
-      <groupId>org.aspectj</groupId>
-      <artifactId>aspectjrt</artifactId>
-         <version>1.7.1</version>
-       </dependency>
-         <dependency>
-         <groupId>org.aspectj</groupId>
-         <artifactId>aspectjweaver</artifactId>
-         <version>1.7.1</version>
-        </dependency>
-        
-    <!--  for ikey-plus 
-        TODO this should not be needed but the utils class contained  in this jar 
-        seems to be loaded as bean by spring
-    -->
-  </dependencies>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">\r
+  <parent>\r
+    <groupId>eu.etaxonomy</groupId>\r
+    <artifactId>taxeditor-parent</artifactId>\r
+    <version>3.12.0-SNAPSHOT</version>\r
+  </parent>\r
+  <modelVersion>4.0.0</modelVersion>\r
+  <artifactId>eu.etaxonomy.taxeditor.cdmlib</artifactId>\r
+  <packaging>eclipse-plugin</packaging>\r
+  <name>CDM Library Dependencies Plugin</name>\r
+  <description>CDM Library and dependencies as a plugin</description>\r
+\r
+  <build>\r
+    <pluginManagement>\r
+      <plugins>\r
+        <plugin>\r
+          <groupId>org.apache.maven.plugins</groupId>\r
+          <artifactId>maven-surefire-plugin</artifactId>\r
+          <version>2.7</version>\r
+        </plugin>\r
+      </plugins>\r
+    </pluginManagement>\r
+    <plugins>\r
+      <plugin>\r
+        <groupId>org.apache.maven.plugins</groupId>\r
+        <artifactId>maven-dependency-plugin</artifactId>\r
+        <version>2.4</version>\r
+        <executions>\r
+          <execution>\r
+            <id>copy-dependencies</id>\r
+            <phase>validate</phase>\r
+            <goals>\r
+              <goal>copy-dependencies</goal>\r
+            </goals>\r
+            <configuration>\r
+              <excludeArtifactIds>\r
+                cdmlib-remote-webapp\r
+              </excludeArtifactIds>\r
+              <includeArtifactIds>\r
+                cdmlib-services,cdmlib-commons,cdmlib-persistence,cdmlib-ext,cdmlib-model,cdmlib-io,cdmlib-print,cdmlib-remote\r
+              </includeArtifactIds>\r
+              <outputDirectory>${basedir}/lib</outputDirectory>\r
+              <overWriteReleases>true</overWriteReleases>\r
+              <overWriteSnapshots>true</overWriteSnapshots>\r
+              <excludeTransitive>true</excludeTransitive>\r
+            </configuration>\r
+          </execution>\r
+          <execution>\r
+            <id>copy-dependency-war</id>\r
+            <phase>validate</phase>\r
+            <goals>\r
+              <goal>copy-dependencies</goal>\r
+            </goals>\r
+            <configuration>\r
+              <includeArtifactIds>\r
+                cdmlib-remote-webapp\r
+              </includeArtifactIds>\r
+              <outputDirectory>\r
+                ${basedir}/src/main/resources/etc/jetty\r
+              </outputDirectory>\r
+              <overWriteReleases>true</overWriteReleases>\r
+              <overWriteSnapshots>true</overWriteSnapshots>\r
+              <excludeTransitive>true</excludeTransitive>\r
+            </configuration>\r
+          </execution>\r
+        </executions>\r
+      </plugin>\r
+      <plugin>\r
+        <groupId>org.apache.maven.plugins</groupId>\r
+        <artifactId>maven-antrun-plugin</artifactId>\r
+        <version>1.7</version>\r
+        <executions>\r
+          <execution>\r
+            <id>update-snapshot-jar-names</id>\r
+            <phase>validate</phase>\r
+            <goals>\r
+              <goal>run</goal>\r
+            </goals>\r
+            <configuration>\r
+              <target>\r
+                <echo>Anonymizing war</echo>\r
+                <move todir="./src/main/resources/etc/jetty">\r
+                  <fileset dir="./src/main/resources/etc/jetty" />\r
+                  <mapper type="regexp"\r
+                    from="(^cdmlib\-remote\-webapp).*(\.war)" to="\1\2" />\r
+                </move>\r
+                <echo>Update cdmlib jars to SNAPSHOT when build with\r
+                  timestamp\r
+                </echo>\r
+                <move todir="./lib">\r
+                  <fileset dir="./lib" />\r
+                  <mapper type="regexp"\r
+                    from="(^cdmlib\-.*\-\d+\.\d+\.\d+\-)[\d.-]+(\.jar)"\r
+                    to="\1SNAPSHOT\2" />\r
+                </move>\r
+                <move todir="./lib">\r
+                  <fileset dir="./lib" />\r
+                  <mapper type="regexp"\r
+                    from="(^cdmlib\-.*\-\d+\.\d+\.\d+\-)[\d.-]+(\-sources\.jar)"\r
+                    to="\1SNAPSHOT\2" />\r
+                </move>\r
+              </target>\r
+            </configuration>\r
+          </execution>\r
+          <execution>\r
+            <id>remove-existing-jars</id>\r
+            <phase>clean</phase>\r
+            <goals>\r
+              <goal>run</goal>\r
+            </goals>\r
+            <configuration>\r
+              <target>\r
+                <echo>Remove all cdmlib jars</echo>\r
+                <delete>\r
+                  <fileset dir="./lib" includes="cdmlib-*" />\r
+                </delete>\r
+              </target>\r
+            </configuration>\r
+          </execution>\r
+        </executions>\r
+      </plugin>\r
+    </plugins>\r
+  </build>\r
+  <profiles>\r
+    <profile>\r
+      <id>copyAllJars</id>\r
+      <build>\r
+        <plugins>\r
+          <plugin>\r
+            <groupId>org.apache.maven.plugins</groupId>\r
+            <artifactId>maven-dependency-plugin</artifactId>\r
+            <version>2.4</version>\r
+            <executions>\r
+              <execution>\r
+                <id>copy-all-dependencies</id>\r
+                <phase>validate</phase>\r
+                <goals>\r
+                  <goal>copy-dependencies</goal>\r
+                </goals>\r
+                <configuration>\r
+                  <excludeArtifactIds>\r
+                    cdmlib-remote-webapp\r
+                  </excludeArtifactIds>\r
+                  <outputDirectory>${basedir}/lib</outputDirectory>\r
+                  <overWriteReleases>true</overWriteReleases>\r
+                  <overWriteSnapshots>true</overWriteSnapshots>\r
+                  <excludeTransitive>true</excludeTransitive>\r
+                </configuration>\r
+              </execution>\r
+            </executions>\r
+          </plugin>\r
+        </plugins>\r
+      </build>\r
+    </profile>\r
+  </profiles>\r
+  <repositories>\r
+    <repository>\r
+      <id>SpringSource Enterprise Bundle Repository - External Bundle\r
+        Milestones\r
+      </id>\r
+      <url>http://repository.springsource.com/maven/bundles/milestone\r
+      </url>\r
+    </repository>\r
+    <repository>\r
+      <id>SpringSource Enterprise Bundle Repository - SpringSource\r
+        Bundle\r
+        Releases\r
+      </id>\r
+      <url>http://repository.springsource.com/maven/bundles/release\r
+      </url>\r
+    </repository>\r
+    <repository>\r
+      <id>SpringSource Enterprise Bundle Repository - External Bundle\r
+        Releases\r
+      </id>\r
+      <url>http://repository.springsource.com/maven/bundles/external\r
+      </url>\r
+    </repository>\r
+  </repositories>\r
+  <dependencies>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-remote-webapp</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+      <type>war</type>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-commons</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-model</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-persistence</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-remote</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-print</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-services</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-io</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-ext</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-server</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-util</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-xml</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-servlet</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-webapp</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-security</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-http</artifactId> -->\r
+    <!-- <version>${jetty.version}</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-io</artifactId> -->\r
+    <!-- <version>${jetty.version}</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>javax.servlet</groupId> -->\r
+    <!-- <artifactId>javax.servlet-api</artifactId> -->\r
+    <!-- <version>3.1.0</version> -->\r
+    <!-- </dependency> -->\r
+\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>javax.servlet</groupId> -->\r
+    <!-- <artifactId>jsp-api</artifactId> -->\r
+    <!-- <version>2.0</version> -->\r
+    <!-- </dependency> -->\r
+\r
+    <dependency>\r
+      <groupId>net.sf.ehcache</groupId>\r
+      <artifactId>ehcache-core</artifactId>\r
+      <version>2.4.3</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate</groupId>\r
+      <artifactId>hibernate-core</artifactId>\r
+      <version>4.1.10.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate.common</groupId>\r
+      <artifactId>hibernate-commons-annotations</artifactId>\r
+      <version>4.0.1.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate</groupId>\r
+      <artifactId>hibernate-search-engine</artifactId>\r
+      <version>4.2.0.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate.javax.persistence</groupId>\r
+      <artifactId>hibernate-jpa-2.0-api</artifactId>\r
+      <version>1.0.1.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate</groupId>\r
+      <artifactId>hibernate-envers</artifactId>\r
+      <version>4.1.10.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate</groupId>\r
+      <artifactId>hibernate-entitymanager</artifactId>\r
+      <version>4.1.10.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>dom4j</groupId>\r
+      <artifactId>dom4j</artifactId>\r
+      <version>1.6</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.jadira.usertype</groupId>\r
+      <artifactId>usertype.jodatime</artifactId>\r
+      <version>2.0.1</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.jadira.usertype</groupId>\r
+      <artifactId>usertype.spi</artifactId>\r
+      <version>2.0.1</version>\r
+    </dependency>\r
+\r
+    <dependency>\r
+      <groupId>junit</groupId>\r
+      <artifactId>junit</artifactId>\r
+      <version>4.11</version>\r
+      <scope>test</scope>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>log4j</groupId>\r
+      <artifactId>log4j</artifactId>\r
+      <version>1.2.17</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.jdom</groupId>\r
+      <artifactId>jdom</artifactId>\r
+      <version>1.1.3</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.context</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.context.support</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.aspects</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.test</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.beans</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.transaction</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.web</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.core</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.aop</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.expression</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.orm</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.jdbc</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework.security</groupId>\r
+      <artifactId>spring-security-core</artifactId>\r
+      <version>3.1.3.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework.security</groupId>\r
+      <artifactId>spring-security-config</artifactId>\r
+      <version>3.1.3.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework.security</groupId>\r
+      <artifactId>spring-security-remoting</artifactId>\r
+      <version>3.1.3.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.jboss.logging</groupId>\r
+      <artifactId>jboss-logging</artifactId>\r
+      <version>3.1.3.GA</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hamcrest</groupId>\r
+      <artifactId>hamcrest-core</artifactId>\r
+      <version>1.3</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>com.mchange</groupId>\r
+      <artifactId>c3p0</artifactId>\r
+      <version>0.9.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.jboss.spec.javax.transaction</groupId>\r
+      <artifactId>jboss-transaction-api_1.1_spec</artifactId>\r
+      <version>1.0.0.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.aspectj</groupId>\r
+      <artifactId>aspectjrt</artifactId>\r
+      <version>1.7.1</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>commons-logging</groupId>\r
+      <artifactId>commons-logging</artifactId>\r
+      <version>1.1.1</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>commons-lang</groupId>\r
+      <artifactId>commons-lang</artifactId>\r
+      <version>2.6</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>aopalliance</groupId>\r
+      <artifactId>aopalliance</artifactId>\r
+      <version>1.0</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>joda-time</groupId>\r
+      <artifactId>joda-time</artifactId>\r
+      <version>2.1</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>com.ibm.lsid</groupId>\r
+      <artifactId>lsid-client</artifactId>\r
+      <version>1.1.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>com.ibm.lsid</groupId>\r
+      <artifactId>lsid-server</artifactId>\r
+      <version>1.1.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.apache.lucene</groupId>\r
+      <artifactId>lucene-core</artifactId>\r
+      <version>3.6.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.slf4j</groupId>\r
+      <artifactId>slf4j-api</artifactId>\r
+      <version>1.7.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.javassist</groupId>\r
+      <artifactId>javassist</artifactId>\r
+      <version>3.17.1-GA</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>au.com.bytecode</groupId>\r
+      <artifactId>opencsv</artifactId>\r
+      <version>2.4</version>\r
+    </dependency>\r
+\r
+    <!-- For Unit Tests Start -->\r
+\r
+    <dependency>\r
+      <groupId>org.unitils</groupId>\r
+      <artifactId>unitils-core</artifactId>\r
+      <version>3.4.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.unitils</groupId>\r
+      <artifactId>unitils-spring</artifactId>\r
+      <version>3.4.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.unitils</groupId>\r
+      <artifactId>unitils-database</artifactId>\r
+      <version>3.4.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>commons-dbcp</groupId>\r
+      <artifactId>commons-dbcp</artifactId>\r
+      <version>1.4</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>commons-pool</groupId>\r
+      <artifactId>commons-pool</artifactId>\r
+      <version>1.5.4</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.unitils</groupId>\r
+      <artifactId>unitils-dbmaintainer</artifactId>\r
+      <version>3.4.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>com.h2database</groupId>\r
+      <artifactId>h2</artifactId>\r
+      <version>1.4.181</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.unitils</groupId>\r
+      <artifactId>unitils-dbunit</artifactId>\r
+      <version>3.4.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.dbunit</groupId>\r
+      <artifactId>dbunit</artifactId>\r
+      <version>2.4.9</version>\r
+    </dependency>\r
+    <!-- For Unit Tests End -->\r
+\r
+    <!-- For Hibernate Mapping Start -->\r
+    <dependency>\r
+      <groupId>wsdl4j</groupId>\r
+      <artifactId>wsdl4j</artifactId>\r
+      <version>1.6.3</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>javax.validation</groupId>\r
+      <artifactId>validation-api</artifactId>\r
+      <version>1.1.0.Final</version>\r
+    </dependency>\r
+    <!-- For Hibernate Mapping End -->\r
+\r
+  </dependencies>\r
+</project>\r
+
diff --git a/eu.etaxonomy.taxeditor.cdmlib/resources/cdm.map.ser b/eu.etaxonomy.taxeditor.cdmlib/resources/cdm.map.ser
new file mode 100644 (file)
index 0000000..931f12e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/resources/cdm.map.ser differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationException.java
new file mode 100644 (file)
index 0000000..c17e167
--- /dev/null
@@ -0,0 +1,23 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.cdm.api.application;
+
+/**
+ * @author cmathew
+ * @date 18 Jun 2015
+ *
+ */
+public class CdmApplicationException extends Exception {
+
+    public CdmApplicationException(Exception ex) {
+        super(ex);
+    }
+
+}
index 90cfc09909bd84ff974481bfed98d01ecaa83cfe..0de5bc0bdaea31551b0646a1f352a1e4b1e2e16a 100644 (file)
@@ -1,28 +1,91 @@
 /**\r
-* Copyright (C) 2014 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
+ * Copyright (C) 2014 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.cdm.api.application;\r
 \r
-import javax.sql.DataSource;\r
-\r
-import org.hibernate.SessionFactory;\r
+import java.util.ArrayList;\r
+import java.util.Arrays;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
 \r
 import org.apache.log4j.Logger;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
+import org.springframework.beans.BeansException;\r
+import org.springframework.context.ApplicationContext;\r
+import org.springframework.context.ApplicationContextAware;\r
+import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean;\r
+import org.springframework.security.access.AccessDecisionVoter;\r
+import org.springframework.security.authentication.AuthenticationProvider;\r
+import org.springframework.security.authentication.ProviderManager;\r
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;\r
+import org.springframework.security.authentication.dao.DaoAuthenticationProvider;\r
+import org.springframework.security.authentication.dao.ReflectionSaltSource;\r
+import org.springframework.security.authentication.encoding.Md5PasswordEncoder;\r
+import org.springframework.security.core.Authentication;\r
+import org.springframework.security.core.context.SecurityContext;\r
+import org.springframework.security.core.context.SecurityContextHolder;\r
 import org.springframework.stereotype.Component;\r
 import org.springframework.transaction.PlatformTransactionManager;\r
 import org.springframework.transaction.TransactionStatus;\r
 \r
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
 import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;\r
+import eu.etaxonomy.cdm.api.service.IAgentService;\r
+import eu.etaxonomy.cdm.api.service.IAnnotationService;\r
+import eu.etaxonomy.cdm.api.service.IClassificationService;\r
+import eu.etaxonomy.cdm.api.service.ICollectionService;\r
+import eu.etaxonomy.cdm.api.service.ICommonService;\r
 import eu.etaxonomy.cdm.api.service.IDatabaseService;\r
+import eu.etaxonomy.cdm.api.service.IDescriptionService;\r
+import eu.etaxonomy.cdm.api.service.IEntityConstraintViolationService;\r
+import eu.etaxonomy.cdm.api.service.IEntityValidationService;\r
+import eu.etaxonomy.cdm.api.service.IFeatureNodeService;\r
+import eu.etaxonomy.cdm.api.service.IFeatureTreeService;\r
+import eu.etaxonomy.cdm.api.service.IGrantedAuthorityService;\r
+import eu.etaxonomy.cdm.api.service.IGroupService;\r
+import eu.etaxonomy.cdm.api.service.IIdentificationKeyService;\r
+import eu.etaxonomy.cdm.api.service.ILocationService;\r
+import eu.etaxonomy.cdm.api.service.IMediaService;\r
+import eu.etaxonomy.cdm.api.service.INameService;\r
+import eu.etaxonomy.cdm.api.service.IOccurrenceService;\r
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;\r
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;\r
+import eu.etaxonomy.cdm.api.service.IReferenceService;\r
+import eu.etaxonomy.cdm.api.service.IService;\r
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;\r
+import eu.etaxonomy.cdm.api.service.ITaxonService;\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.api.service.ITestService;\r
+import eu.etaxonomy.cdm.api.service.IUserService;\r
+import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
+import eu.etaxonomy.cdm.api.service.IWorkingSetService;\r
+import eu.etaxonomy.cdm.api.service.molecular.IAmplificationService;\r
+import eu.etaxonomy.cdm.api.service.molecular.IPrimerService;\r
+import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;\r
 import eu.etaxonomy.cdm.ext.geo.IEditGeoService;\r
+import eu.etaxonomy.cdm.io.service.IIOService;\r
+import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.cdm.persistence.hibernate.permission.CdmPermissionEvaluator;\r
+import eu.etaxonomy.cdm.persistence.hibernate.permission.ICdmPermissionEvaluator;\r
+import eu.etaxonomy.cdm.persistence.hibernate.permission.UnanimousBasedUnrevokable;\r
+import eu.etaxonomy.cdm.persistence.hibernate.permission.voter.DescriptionBaseVoter;\r
+import eu.etaxonomy.cdm.persistence.hibernate.permission.voter.DescriptionElementVoter;\r
+import eu.etaxonomy.cdm.persistence.hibernate.permission.voter.GrantAlwaysVoter;\r
+import eu.etaxonomy.cdm.persistence.hibernate.permission.voter.TaxonBaseVoter;\r
+import eu.etaxonomy.cdm.persistence.hibernate.permission.voter.TaxonNodeVoter;\r
+import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;\r
+import eu.etaxonomy.taxeditor.service.CachedCommonServiceImpl;\r
+import eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor;\r
+import eu.etaxonomy.taxeditor.service.ICachedCommonService;\r
+import eu.etaxonomy.taxeditor.service.TermServiceRequestExecutor;\r
+import eu.etaxonomy.taxeditor.session.CdmEntitySessionManager;\r
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;\r
 \r
 \r
 /**\r
@@ -31,85 +94,345 @@ import eu.etaxonomy.cdm.ext.geo.IEditGeoService;
  *\r
  */\r
 @Component\r
-public class CdmApplicationRemoteConfiguration extends CdmApplicationDefaultConfiguration {\r
-       \r
-       @SuppressWarnings("unused")\r
-       private static final Logger logger = Logger.getLogger(CdmApplicationRemoteConfiguration.class);\r
-\r
-       @Autowired\r
-       IEditGeoService editGeoService;\r
-       \r
-       public CdmApplicationRemoteConfiguration() {\r
-       }\r
-       \r
+public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfiguration, ApplicationContextAware  {\r
+\r
+    @SuppressWarnings("unused")\r
+    private static final Logger logger = Logger.getLogger(CdmApplicationRemoteConfiguration.class);\r
+\r
+    protected ApplicationContext applicationContext;\r
+\r
+    private ICdmRemoteSource remoteSource;\r
+\r
+    private Map serviceMap = new HashMap<Class<IService>, IService>();\r
+\r
+    private ICdmEntitySessionManager cdmEntitySessionManager;\r
+\r
+    private CdmPermissionEvaluator cdmPermissionEvaluator;\r
+\r
+    private ProviderManager authenticationManager;\r
+\r
+    private ICachedCommonService cachedCommonService;\r
+\r
+    public CdmApplicationRemoteConfiguration() {}\r
+\r
+    public CdmApplicationRemoteConfiguration(ICdmRemoteSource remoteSource) {\r
+        this.remoteSource = remoteSource;\r
+    }\r
+\r
+    public void setRemoteSource(ICdmRemoteSource remoteSource) {\r
+        this.remoteSource = remoteSource;\r
+    }\r
+\r
+    private Object getService(Class<?> clazz, String serviceSuffix, CdmServiceRequestExecutor executor) {\r
+        if(serviceMap.containsKey(clazz)) {\r
+            return serviceMap.get(clazz);\r
+        }\r
+        String baseUrl;\r
+        if(remoteSource.getContextPath() == null || remoteSource.getContextPath().equals("")) {\r
+            baseUrl = "http://" + remoteSource.getServer() + ":" + String.valueOf(remoteSource.getPort());\r
+        } else {\r
+            baseUrl = "http://" + remoteSource.getServer()  + ":" + String.valueOf(remoteSource.getPort()) + "/" + remoteSource.getContextPath();\r
+        }\r
+        HttpInvokerProxyFactoryBean proxy = new HttpInvokerProxyFactoryBean();\r
+        proxy.setServiceInterface(clazz);\r
+        proxy.setServiceUrl(baseUrl + serviceSuffix);\r
+        if(executor != null) {\r
+            executor.setReadTimeout(0);\r
+            proxy.setHttpInvokerRequestExecutor(executor);\r
+        }\r
+        proxy.afterPropertiesSet();\r
+        Object service = proxy.getObject();\r
+        serviceMap.put(clazz,  service);\r
+        return service;\r
+    }\r
+\r
+    // ****************************** APPLICATION CONTEXT *************************************************/\r
+\r
+    @Override\r
+    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException{\r
+        this.applicationContext = applicationContext;\r
+    }\r
+\r
     /* (non-Javadoc)\r
      * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#getTransactionManager()\r
      */\r
     @Override\r
     public PlatformTransactionManager getTransactionManager() throws UnsupportedOperationException {\r
-               throw new UnsupportedOperationException("getTransactionManager is not implemented for CdmApplicationRemoteConfiguration");\r
-       }\r
+        throw new UnsupportedOperationException("getTransactionManager is not implemented for CdmApplicationRemoteConfiguration");\r
+    }\r
 \r
 \r
-    /* (non-Javadoc)\r
-     * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#startTransaction()\r
+\r
+    /**\r
+     * @return\r
      */\r
+    public IEditGeoService getEditGeoService() {\r
+        return (IEditGeoService) getService(IEditGeoService.class, "/remoting/editgeo.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    /**\r
+     * @return\r
+     */\r
+    public ICachedCommonService getCachedCommonService(){\r
+        if(cachedCommonService == null) {\r
+            cachedCommonService = new CachedCommonServiceImpl();\r
+        }\r
+        return cachedCommonService;\r
+    }\r
+\r
+\r
+    public ICdmEntitySessionManager getCdmEntitySessionManager() {\r
+        if(cdmEntitySessionManager == null) {\r
+            cdmEntitySessionManager = new CdmEntitySessionManager();\r
+        }\r
+        return cdmEntitySessionManager;\r
+    }\r
+\r
+\r
+\r
+\r
+\r
+\r
+ // ****************************** GETTER *************************************************/\r
+\r
     @Override\r
-    public TransactionStatus startTransaction() throws UnsupportedOperationException {\r
-               throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
-       }\r
+    public final Object getBean(String name){\r
+        throw new UnsupportedOperationException("getBean is not implemented for CdmApplicationRemoteConfiguration");\r
+    }\r
 \r
+    @Override\r
+    public IAgentService getAgentService(){\r
+        return (IAgentService) getService(IAgentService.class, "/remoting/agent.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IAnnotationService getAnnotationService(){\r
+        return (IAnnotationService) getService(IAnnotationService.class, "/remoting/annotation.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IDatabaseService getDatabaseService(){\r
+        return (IDatabaseService) getService(IDatabaseService.class, "/remoting/database.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public INameService getNameService(){\r
+        return (INameService) getService(INameService.class, "/remoting/name.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IReferenceService getReferenceService(){\r
+        return (IReferenceService) getService(IReferenceService.class, "/remoting/reference.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public ITaxonService getTaxonService(){\r
+        return (ITaxonService) getService(ITaxonService.class, "/remoting/taxon.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IClassificationService getClassificationService(){\r
+        return (IClassificationService) getService(IClassificationService.class, "/remoting/classification.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public ITaxonNodeService getTaxonNodeService(){\r
+        return (ITaxonNodeService) getService(ITaxonNodeService.class, "/remoting/taxonnode.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IDescriptionService getDescriptionService(){\r
+        return (IDescriptionService) getService(IDescriptionService.class, "/remoting/description.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IOccurrenceService getOccurrenceService(){\r
+        return (IOccurrenceService) getService(IOccurrenceService.class, "/remoting/occurrence.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IPrimerService getPrimerService(){\r
+        return (IPrimerService) getService(IPrimerService.class, "/remoting/primer.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IAmplificationService getAmplificationService(){\r
+        return (IAmplificationService) getService(IAmplificationService.class, "/remoting/amplification.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public ISequenceService getSequenceService(){\r
+        return (ISequenceService) getService(ISequenceService.class, "/remoting/sequence.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IMediaService getMediaService(){\r
+        return (IMediaService) getService(IMediaService.class, "/remoting/media.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public ITermService getTermService(){\r
+        return (ITermService) getService(ITermService.class, "/remoting/term.service", new TermServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public ICommonService getCommonService(){\r
+        return (ICommonService) getService(ICommonService.class, "/remoting/common.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public ILocationService getLocationService(){\r
+        return (ILocationService) getService(ILocationService.class, "/remoting/location.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IUserService getUserService(){\r
+        return (IUserService) getService(IUserService.class, "/remoting-public/user.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IGrantedAuthorityService getGrantedAuthorityService(){\r
+        return (IGrantedAuthorityService) getService(IGrantedAuthorityService.class, "/remoting/grantedauthority.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IService<CdmBase> getMainService(){\r
+        return null;\r
+    }\r
+\r
+\r
+    @Override\r
+    public ProviderManager getAuthenticationManager(){\r
+        if(authenticationManager != null) {\r
+            return authenticationManager;\r
+        }\r
+        Md5PasswordEncoder passwordEncoder = new Md5PasswordEncoder();\r
+        ReflectionSaltSource saltSource = new ReflectionSaltSource();\r
+        saltSource.setUserPropertyToUse("getUsername");\r
+\r
+        DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();\r
+        daoAuthenticationProvider.setUserDetailsService(getUserService());\r
+        daoAuthenticationProvider.setSaltSource(saltSource);\r
+        daoAuthenticationProvider.setPasswordEncoder(passwordEncoder);\r
+\r
+        authenticationManager = new ProviderManager(Arrays.asList((AuthenticationProvider)daoAuthenticationProvider));\r
+        return authenticationManager;\r
+    }\r
+\r
+\r
+    @Override\r
+    public ConversationHolder NewConversation() {\r
+        return new ConversationHolderMock();\r
+    }\r
+\r
+    @Override\r
+    public ICollectionService getCollectionService(){\r
+        return (ICollectionService) getService(ICollectionService.class, "/remoting/collection.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IFeatureTreeService getFeatureTreeService(){\r
+        return (IFeatureTreeService) getService(IFeatureTreeService.class, "/remoting/featuretree.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IFeatureNodeService getFeatureNodeService(){\r
+        return (IFeatureNodeService) getService(IFeatureNodeService.class, "/remoting/featurenode.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IVocabularyService getVocabularyService(){\r
+        return (IVocabularyService) getService(IVocabularyService.class, "/remoting/vocabulary.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IIdentificationKeyService getIdentificationKeyService(){\r
+        return (IIdentificationKeyService) getService(IIdentificationKeyService.class, "/remoting/identificationkey.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IPolytomousKeyService getPolytomousKeyService(){\r
+        return (IPolytomousKeyService) getService(IPolytomousKeyService.class, "/remoting/polytomouskey.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+\r
+    @Override\r
+    public IPolytomousKeyNodeService getPolytomousKeyNodeService(){\r
+        return (IPolytomousKeyNodeService) getService(IPolytomousKeyNodeService.class, "/remoting/polytomouskeynode.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IWorkingSetService getWorkingSetService(){\r
+        return (IWorkingSetService) getService(IWorkingSetService.class, "/remoting/workingset.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public IGroupService getGroupService(){\r
+        return (IGroupService) getService(IGroupService.class, "/remoting/group.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+\r
+    @Override\r
+    public IEntityValidationService getEntityValidationService(){\r
+        return (IEntityValidationService) getService(IEntityValidationService.class, "/remoting/entityvalidation.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+\r
+    @Override\r
+    public IEntityConstraintViolationService getEntityConstraintViolationService(){\r
+        return (IEntityConstraintViolationService) getService(IEntityConstraintViolationService.class, "/remoting/entityconstraintviolation.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    @Override\r
+    public ICdmPermissionEvaluator getPermissionEvaluator(){\r
+\r
+        if(cdmPermissionEvaluator != null) {\r
+            return cdmPermissionEvaluator;\r
+        }\r
+        List<AccessDecisionVoter> decisionVoters = new ArrayList<AccessDecisionVoter>();\r
+        decisionVoters.add(new GrantAlwaysVoter());\r
+        decisionVoters.add(new TaxonNodeVoter());\r
+        decisionVoters.add(new TaxonBaseVoter());\r
+        decisionVoters.add(new DescriptionBaseVoter());\r
+        decisionVoters.add(new DescriptionElementVoter());\r
+        UnanimousBasedUnrevokable accessDecisionManager = new UnanimousBasedUnrevokable(decisionVoters);\r
+\r
+        cdmPermissionEvaluator = new CdmPermissionEvaluator();\r
+        cdmPermissionEvaluator.setAccessDecisionManager(accessDecisionManager);\r
+\r
+        return cdmPermissionEvaluator;\r
+    }\r
+\r
+\r
+    @Override\r
+    public TransactionStatus startTransaction() throws UnsupportedOperationException {\r
+        throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
+    }\r
 \r
-    /* (non-Javadoc)\r
-     * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#startTransaction()\r
-     */\r
     @Override\r
     public TransactionStatus startTransaction(Boolean readOnly) throws UnsupportedOperationException {\r
-               throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
-       }\r
+        throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
+    }\r
 \r
 \r
-    /* (non-Javadoc)\r
-     * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#commitTransaction(org.springframework.transaction.TransactionStatus)\r
-     */\r
     @Override\r
     public void commitTransaction(TransactionStatus txStatus) throws UnsupportedOperationException {\r
-               throw new UnsupportedOperationException("commitTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
-       }\r
-                       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#NewConversation()\r
-        */\r
-       @Override\r
-       public ConversationHolder NewConversation() {           \r
-               return new ConversationHolderMock();\r
-       }\r
-       \r
-       /**\r
-        * @return\r
-        */\r
-       public IEditGeoService getEditGeoService() {\r
-               return this.editGeoService;\r
-       }\r
-       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setDataSource(javax.sql.DataSource)\r
-        */\r
-       @Override\r
-       public void setDataSource(DataSource dataSource) {                      \r
-    }\r
-       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setTransactionManager(org.springframework.transaction.PlatformTransactionManager)\r
-        */\r
-       @Override\r
-       public void setTransactionManager(PlatformTransactionManager transactionManager) {        \r
-    }\r
-       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setSessionFactory(org.hibernate.SessionFactory)\r
-        */\r
-       @Override\r
-    public void setSessionFactory(SessionFactory sessionFactory) {     \r
+        throw new UnsupportedOperationException("commitTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
+    }\r
+\r
+    @Override\r
+    public void authenticate(String username, String password){\r
+        UsernamePasswordAuthenticationToken tokenForUser = new UsernamePasswordAuthenticationToken(username, password);\r
+        Authentication authentication = this.getAuthenticationManager().authenticate(tokenForUser);\r
+        SecurityContext context = SecurityContextHolder.getContext();\r
+        context.setAuthentication(authentication);\r
+    }\r
+\r
+    public IIOService getIOService() {\r
+        return (IIOService) getService(IIOService.class, "/remoting/io.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
+    public ITestService getTestService() {\r
+        return (ITestService) getService(ITestService.class, "/remoting/test.service", new CdmServiceRequestExecutor());\r
     }\r
 }\r
index 5473ac141981dafc244e0b157a25e9ab7282a0b5..07890e6f1fa94fa3d1244a73b3171da46ed0ed9a 100644 (file)
@@ -1,54 +1,56 @@
 /**
-* Copyright (C) 2014 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.
-*/
+ * Copyright (C) 2014 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.cdm.api.application;
 
 import java.util.List;
-import java.util.Properties;
 
 import org.apache.log4j.Logger;
 import org.hibernate.collection.internal.AbstractPersistentCollection;
 import org.hibernate.proxy.AbstractLazyInitializer;
-import org.springframework.beans.MutablePropertyValues;
-import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.context.ApplicationListener;
-import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
 
+import eu.etaxonomy.cdm.api.service.ITestService;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
 import eu.etaxonomy.cdm.common.monitor.NullProgressMonitor;
-import eu.etaxonomy.cdm.common.monitor.SubProgressMonitor;
-import eu.etaxonomy.cdm.remote.ICdmRemoteSource;
+import eu.etaxonomy.cdm.io.service.IIOService;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmRemoteCacheManager;
+import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
+import eu.etaxonomy.taxeditor.service.ICachedCommonService;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
 
 /**
  * CDM Application Controller class for remoting clients
- * 
+ *
  * FIXME:Remoting extending {@link CdmApplicationController} is a temporary workaround.
  * The {@link CdmApplicationController} should be split into a CdmApplicationControllerBase
  * class with {@link CdmApplicationController} and this class as subclasses
  *
  */
 public class CdmApplicationRemoteController  extends CdmApplicationController {
-       
+
     private static final Logger logger = Logger.getLogger(CdmApplicationRemoteController.class);
 
-    public static final Resource DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE = 
-               new ClassPathResource("/eu/etaxonomy/cdm/remotingApplicationContext.xml");
+
+    public static final Resource DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE =
+            new ClassPathResource("/eu/etaxonomy/cdm/remotingApplicationContext.xml");
     private final Resource applicationContextResource;
     private final IProgressMonitor progressMonitor;
-    
+    private ICdmRemoteSource remoteSource;
+
+
     /**
      * Creates new instance of CdmApplicationRemoteController
-     * 
+     *
      * @param applicationContextResource
      * @param remoteSource
      * @param omitTermLoading
@@ -56,21 +58,20 @@ public class CdmApplicationRemoteController  extends CdmApplicationController {
      * @param listeners
      * @return
      */
-    public static CdmApplicationRemoteController NewInstance(Resource applicationContextResource, 
-                       ICdmRemoteSource remoteSource,                          
-                       boolean omitTermLoading, 
-                       IProgressMonitor progressMonitor, 
-                       List<ApplicationListener> listeners) {
-       return new CdmApplicationRemoteController(applicationContextResource, 
-                       remoteSource, 
-                       omitTermLoading, 
-                       progressMonitor, 
-                               listeners);
-       
-    }
+//    public static CdmApplicationRemoteController NewInstance(Resource applicationContextResource,
+//            ICdmRemoteSource remoteSource,
+//            IProgressMonitor progressMonitor,
+//            List<ApplicationListener> listeners) {
+//        return new CdmApplicationRemoteController(applicationContextResource,
+//                remoteSource,
+//                false,
+//                progressMonitor,
+//                listeners);
+//
+//    }
     /**
      * Creates new instance of CdmApplicationRemoteController
-     * 
+     *
      * @param applicationContextResource
      * @param remoteSource
      * @param omitTermLoading
@@ -78,116 +79,111 @@ public class CdmApplicationRemoteController  extends CdmApplicationController {
      * @param listeners
      * @return
      */
-    public static CdmApplicationRemoteController NewInstance(ICdmRemoteSource remoteSource,                            
-                       boolean omitTermLoading, 
-                       IProgressMonitor progressMonitor, 
-                       List<ApplicationListener> listeners) {
-       
-       return new CdmApplicationRemoteController(DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE, 
-                       remoteSource, 
-                       omitTermLoading, 
-                       progressMonitor, 
-                               listeners);
-       
+    public static CdmApplicationRemoteController NewInstance(ICdmRemoteSource remoteSource,
+            IProgressMonitor progressMonitor,
+            List<ApplicationListener> listeners) {
+
+        return new CdmApplicationRemoteController(DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE,
+                remoteSource,
+                false,
+                progressMonitor,
+                listeners);
+
+    }
+
+    public static CdmApplicationRemoteController NewInstance(ICdmRemoteSource remoteSource,
+            boolean validateXml,
+            IProgressMonitor progressMonitor,
+            List<ApplicationListener> listeners) {
+
+        return new CdmApplicationRemoteController(DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE,
+                remoteSource,
+                validateXml,
+                progressMonitor,
+                listeners);
+
     }
-    
-       /**
-        * Constructs CdmApplicationRemoteController
-        * 
-        * @param applicationContextResource
-        * @param remoteSource
-        * @param omitTermLoading
-        * @param progressMonitor
-        * @param listeners
-        */
-       private CdmApplicationRemoteController(Resource applicationContextResource, 
-                               ICdmRemoteSource remoteSource,                          
-                               boolean omitTermLoading, 
-                               IProgressMonitor progressMonitor, 
-                               List<ApplicationListener> listeners){
-               logger.info("Start CdmApplicationRemoteController with remote source: " + remoteSource.getName());
-        this.applicationContextResource = 
-                       applicationContextResource != null ? applicationContextResource : DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE;
+
+    /**
+     * Constructs CdmApplicationRemoteController
+     *
+     * @param applicationContextResource
+     * @param remoteSource
+     * @param omitTermLoading
+     * @param progressMonitor
+     * @param listeners
+     */
+    private CdmApplicationRemoteController(Resource applicationContextResource,
+            ICdmRemoteSource remoteSource,
+            boolean validateXml,
+            IProgressMonitor progressMonitor,
+            List<ApplicationListener> listeners){
+        logger.info("Start CdmApplicationRemoteController with remote source: " + remoteSource.getName());
+        this.applicationContextResource =
+                applicationContextResource != null ? applicationContextResource : DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE;
         this.progressMonitor = progressMonitor != null ? progressMonitor : new NullProgressMonitor();
+        this.remoteSource = remoteSource;
+        setNewRemoteSource(remoteSource, validateXml, listeners);
+
+    }
+
+
 
-        setNewRemoteSource(remoteSource, omitTermLoading, listeners);
-               
-       }
-       
 
-    
-    
     /**
      * Creates and starts a new spring application context
-     * 
+     *
      * @param remoteSource object for connecting to an http-invoker server
      * @param omitTermLoading
      * @param listeners
      * @return
      */
-    protected boolean setNewRemoteSource(ICdmRemoteSource remoteSource, 
-               boolean omitTermLoading, 
-               List<ApplicationListener> listeners){
+    public boolean setNewRemoteSource(ICdmRemoteSource remoteSource,
+            boolean validateXml,
+            List<ApplicationListener> listeners){
 
         logger.info("Connecting to '" + remoteSource.getName() + "'");
 
-        MonitoredGenericApplicationContext applicationContext =  new MonitoredGenericApplicationContext();
-        int refreshTasks = 45;
-        int nTasks = 5 + refreshTasks;
+        int nTasks = 2;
 
         progressMonitor.beginTask("Connecting to '" + remoteSource.getName() + "'", nTasks);
 
-        progressMonitor.subTask("Registering remote source.");
-        PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer();
-        Properties properties = new Properties();
-        properties.setProperty("remoteServer", remoteSource.getServer());
-        properties.setProperty("remotePort", String.valueOf(remoteSource.getPort()));
-        properties.setProperty("remoteContext", remoteSource.getContextPath());
-        pspc.setProperties(properties);
-        applicationContext.addBeanFactoryPostProcessor(pspc);
-        progressMonitor.worked(1);
-
-        XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(applicationContext);
-        //xmlReader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_NONE);
-        progressMonitor.subTask("Registering resources.");
-        xmlReader.loadBeanDefinitions(applicationContextResource);
+        progressMonitor.subTask("Initialising CDM Model Cache ...");
+        CdmRemoteCacheManager.getInstance();
         progressMonitor.worked(1);
-
-        //omitTerms
-        if (omitTermLoading == true){
-            String initializerName = "persistentTermInitializer";
-            BeanDefinition beanDef = applicationContext.getBeanDefinition(initializerName);
-            MutablePropertyValues values = beanDef.getPropertyValues();
-            values.addPropertyValue("omit", omitTermLoading);
-        }
-
-        if (listeners != null){
-            for(ApplicationListener listener : listeners){
-                applicationContext.addApplicationListener(listener);
-            }
-        }
-
-
-        applicationContext.refresh(new SubProgressMonitor(progressMonitor, refreshTasks));
-        applicationContext.start();
-
-        progressMonitor.subTask("Cleaning up.");
-        setApplicationContext(applicationContext);
+        progressMonitor.subTask("Starting application context ...");
+        init();
         progressMonitor.worked(1);
-
         progressMonitor.done();
         return true;
     }
-    
+
+
+
     /* (non-Javadoc)
      * @see eu.etaxonomy.cdm.api.application.CdmApplicationController#init()
      */
     @Override
-    protected void init(){    
-        configuration = (ICdmApplicationConfiguration)applicationContext.getBean("cdmApplicationRemoteConfiguration");
-               AbstractLazyInitializer.setConfiguration(this);
-               AbstractPersistentCollection.setConfiguration(this);
+    protected void init(){
+        configuration = new CdmApplicationRemoteConfiguration(remoteSource);
+        ((CdmApplicationRemoteConfiguration)configuration).setApplicationContext(applicationContext);
+        AbstractLazyInitializer.setConfiguration((CdmApplicationRemoteConfiguration)configuration);
+        AbstractPersistentCollection.setConfiguration((CdmApplicationRemoteConfiguration)configuration);
+    }
 
+    public ICdmEntitySessionManager getCdmEntitySessionManager() {
+        return ((CdmApplicationRemoteConfiguration)configuration).getCdmEntitySessionManager();
     }
 
+    public IIOService getIOService(){
+        return ((CdmApplicationRemoteConfiguration)configuration).getIOService();
+    }
+
+    public ITestService getTestService(){
+        return ((CdmApplicationRemoteConfiguration)configuration).getTestService();
+    }
+
+    public ICachedCommonService getCachedCommonService(){
+        return ((CdmApplicationRemoteConfiguration)configuration).getCachedCommonService();
+    }
 }
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationState.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationState.java
new file mode 100644 (file)
index 0000000..2c90c55
--- /dev/null
@@ -0,0 +1,208 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.cdm.api.application;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+
+import org.springframework.security.core.context.SecurityContext;
+
+import eu.etaxonomy.cdm.api.cache.CdmServiceCacher;
+import eu.etaxonomy.cdm.api.service.ICommonService;
+import eu.etaxonomy.cdm.api.service.IService;
+import eu.etaxonomy.cdm.api.service.ITestService;
+import eu.etaxonomy.cdm.io.service.IIOService;
+import eu.etaxonomy.taxeditor.service.ICachedCommonService;
+
+/**
+ * @author cmathew
+ * @date 17 Jun 2015
+ *
+ */
+public class CdmApplicationState {
+
+    private static CdmApplicationState cdmApplicationState;
+
+    private ICdmApplicationConfiguration appConfig;
+
+    private ICdmDataChangeService dataChangeService;
+
+    private SecurityContext securityContext;
+
+    private static CdmServiceCacher cdmServiceCacher;
+
+
+    public static CdmApplicationState getInstance() {
+        if(cdmApplicationState == null) {
+            cdmApplicationState = new CdmApplicationState();
+        }
+
+        return cdmApplicationState;
+    }
+
+    public void setAppConfig(ICdmApplicationConfiguration appConfig) {
+        this.appConfig = appConfig;
+    }
+
+    public ICdmApplicationConfiguration getAppConfig() {
+        return appConfig;
+    }
+
+    public static void setCurrentAppConfig(ICdmApplicationConfiguration appConfig) {
+        getInstance().setAppConfig(appConfig);
+    }
+
+    public static ICdmApplicationConfiguration getCurrentAppConfig() {
+        return getInstance().getAppConfig();
+    }
+
+    /**
+     * @return the dataChangeService
+     */
+    public ICdmDataChangeService getDataChangeService() {
+        return dataChangeService;
+    }
+
+    /**
+     * @param dataChangeService the dataChangeService to set
+     */
+    public void setDataChangeService(ICdmDataChangeService dataChangeService) {
+        this.dataChangeService = dataChangeService;
+    }
+
+    public static ICdmDataChangeService getCurrentDataChangeService() {
+        return getInstance().getDataChangeService();
+    }
+
+    public static void setCurrentDataChangeService(ICdmDataChangeService dataChangeService) {
+        getInstance().setDataChangeService(dataChangeService);
+    }
+
+
+
+    /**
+     * @return the securityContext
+     */
+    public SecurityContext getSecurityContext() {
+        return securityContext;
+    }
+
+    /**
+     * @param securityContext the securityContext to set
+     */
+    public void setSecurityContext(SecurityContext securityContext) {
+        this.securityContext = securityContext;
+    }
+
+    /**
+     * @return the securityContext
+     */
+    public static SecurityContext getCurrentSecurityContext() {
+        return getInstance().getSecurityContext();
+    }
+
+    /**
+     * @param securityContext the securityContext to set
+     */
+    public static void setCurrentSecurityContext(SecurityContext securityContext) {
+        getInstance().setSecurityContext(securityContext);
+    }
+
+    public static void dispose() {
+        getInstance().setCurrentDataChangeService(null);
+        getInstance().setAppConfig(null);
+        getInstance().setSecurityContext(null);
+        cdmApplicationState = null;
+        cdmServiceCacher = null;
+    }
+
+
+    /**
+     * Generic method that will scan the getters of {@link ICdmApplicationConfiguration} for the given service
+     * interface. If a matching getter is found the according service implementation is returned by
+     * invoking the getter otherwise the method returns <code>null</code>.
+     *
+     * @param <T>
+     * @param serviceClass
+     * @return the configured implementation of <code>serviceClass</code> or <code>null</code>
+     * @throws CdmApplicationException
+     */
+    public static <T extends IService> T getService(Class<T> serviceClass) throws CdmApplicationException {
+        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+
+        Method[] methods = ICdmApplicationConfiguration.class.getDeclaredMethods();
+
+        T service = null;
+
+        for (Method method : methods) {
+            Type type = method.getGenericReturnType();
+
+            if (type.equals(serviceClass)) {
+                try {
+                    service = (T) method.invoke(configuration, null);
+                    break;
+                } catch (IllegalArgumentException iae) {
+                    throw new CdmApplicationException(iae);
+                } catch (IllegalAccessException iae) {
+                    throw new CdmApplicationException(iae);
+                } catch (InvocationTargetException ite) {
+                    throw new CdmApplicationException(ite);
+                }
+            }
+        }
+
+        return service;
+    }
+
+
+    /**
+     * @see #getService(Class)
+     * As ICommonService is not extending IService we need a specific request here
+     */
+    public static ICommonService getCommonService() {
+        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+
+        return configuration.getCommonService();
+
+    }
+
+    public static IIOService getIOService() {
+        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+
+        return ((CdmApplicationRemoteController)configuration).getIOService();
+
+    }
+
+
+    public static ITestService getTestService() {
+        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+
+        return ((CdmApplicationRemoteController)configuration).getTestService();
+
+    }
+
+    public static ICachedCommonService getCachedCommonService() {
+        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+
+        return ((CdmApplicationRemoteController)configuration).getCachedCommonService();
+
+    }
+
+    public static CdmServiceCacher getCdmServiceCacher() {
+        return cdmServiceCacher;
+    }
+
+    public static void setCdmServiceCacher(CdmServiceCacher cacher) {
+        cdmServiceCacher = cacher;
+    }
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmChangeEvent.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmChangeEvent.java
new file mode 100644 (file)
index 0000000..4dddf33
--- /dev/null
@@ -0,0 +1,96 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.cdm.api.application;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+/**
+ * @author cmathew
+ * @date 7 Apr 2015
+ *
+ */
+public class CdmChangeEvent {
+
+    public enum Action {
+        Create,
+        Update,
+        Delete
+    }
+
+    private final Action action;
+    private final Set<CdmBase> changedObjects;
+    private final Class sourceType;
+    private Class entityType;
+    private Object source;
+
+    public CdmChangeEvent(Action action, Set<CdmBase> changedObjects, Class sourceType) {
+        this.action = action;
+        this.changedObjects = changedObjects;
+        this.sourceType = sourceType;
+    }
+
+    public CdmChangeEvent(Action action, CdmBase changedObject, Class sourceType) {
+        this.action = action;
+        changedObjects = new HashSet<CdmBase>();
+        changedObjects.add(changedObject);
+        this.sourceType = sourceType;
+    }
+
+    public CdmChangeEvent(Action action, Set<CdmBase> changedObjects, Class sourceType, Class entityType) {
+        this(action, changedObjects, sourceType);
+        this.entityType = entityType;
+    }
+
+    public CdmChangeEvent(Action action, Set<CdmBase> changedObjects, Object source) {
+        this(action, changedObjects, source.getClass());
+        this.source = source;
+    }
+
+    /**
+     * @return the action
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * @return the changedObjects
+     */
+    public Set<? extends CdmBase> getChangedObjects() {
+        return changedObjects;
+    }
+
+    /**
+     * @return the sourceType
+     */
+    public Class getSourceType() {
+        return sourceType;
+    }
+
+
+    /**
+     * @return the source
+     */
+    public Object getSource() {
+        return source;
+    }
+
+    public Class getEntityType() {
+        return entityType;
+    }
+
+    public boolean hasChanges() {
+        return changedObjects != null && !changedObjects.isEmpty();
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmDataChangeService.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmDataChangeService.java
new file mode 100644 (file)
index 0000000..f569102
--- /dev/null
@@ -0,0 +1,94 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.cdm.api.application;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author cmathew
+ * @date 18 Jun 2015
+ *
+ */
+public class CdmDataChangeService implements ICdmDataChangeService {
+
+    protected final Set<ICdmChangeListener> listeners;
+
+    private final List<CdmChangeEvent> currentEvents;
+
+    public CdmDataChangeService() {
+        listeners = new HashSet<ICdmChangeListener>();
+        currentEvents = new ArrayList<CdmChangeEvent>();
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#register(eu.etaxonomy.cdm.api.application.ICdmChangeListener)
+     */
+    @Override
+    public void register(ICdmChangeListener listener) {
+        listeners.add(listener);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.application.ICdmDataChangeService#unregister(eu.etaxonomy.cdm.api.application.ICdmChangeListener)
+     */
+    @Override
+    public void unregister(ICdmChangeListener listener) {
+        listeners.remove(listener);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#addEvent(eu.etaxonomy.cdm.api.application.CdmChangeEvent)
+     */
+    @Override
+    public void addEvent(CdmChangeEvent event) {
+        currentEvents.add(event);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#fireCurrentChangeEvents(boolean)
+     */
+    @Override
+    public void fireCurrentChangeEvents(boolean async) {
+        try {
+            for(CdmChangeEvent event : currentEvents) {
+                fireChangeEvent(event,async);
+            }
+        } finally {
+            currentEvents.clear();
+        }
+    }
+
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#fireChangeEvent(eu.etaxonomy.cdm.api.application.CdmChangeEvent, boolean)
+     */
+    @Override
+    public void fireChangeEvent(final CdmChangeEvent event, boolean async) {
+
+        for(final ICdmChangeListener listener : listeners) {
+            listener.onChange(event);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#clear()
+     */
+    @Override
+    public void clear() {
+        listeners.clear();
+        currentEvents.clear();
+    }
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmChangeListener.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmChangeListener.java
new file mode 100644 (file)
index 0000000..4ae1834
--- /dev/null
@@ -0,0 +1,21 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.cdm.api.application;
+
+/**
+ * @author cmathew
+ * @date 7 Apr 2015
+ *
+ */
+public interface ICdmChangeListener {
+
+    public void onChange(CdmChangeEvent event);
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmDataChangeService.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmDataChangeService.java
new file mode 100644 (file)
index 0000000..84bb324
--- /dev/null
@@ -0,0 +1,32 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.cdm.api.application;
+
+
+/**
+ * @author cmathew
+ * @date 18 Jun 2015
+ *
+ */
+public interface ICdmDataChangeService {
+
+    public abstract void register(ICdmChangeListener listener);
+
+    public abstract void unregister(ICdmChangeListener listener);
+
+    public abstract void addEvent(CdmChangeEvent event);
+
+    public abstract void fireCurrentChangeEvents(boolean async);
+
+    public abstract void fireChangeEvent(CdmChangeEvent event, boolean async);
+
+    public abstract void clear();
+
+}
\ No newline at end of file
index 4de156c496dadc30b98aa873290f29f8d6b2613e..288b20eb1310bbca841295655c6be1ea98bd233c 100644 (file)
@@ -2,11 +2,22 @@ package eu.etaxonomy.cdm.api.cache;
 
 import java.util.UUID;
 
-import org.springframework.beans.factory.annotation.Autowired;
+import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.config.SizeOfPolicyConfiguration;
+
 import org.springframework.stereotype.Component;
 
-import eu.etaxonomy.cdm.api.service.ITermService;
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.taxeditor.remoting.cache.CacheLoader;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmEntityCacheKey;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher;
+import eu.etaxonomy.taxeditor.service.TermServiceRequestExecutor;
+import eu.etaxonomy.taxeditor.session.CdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver;
 
 /**
  * Class which uses CDM services to cache cdm entities
@@ -20,41 +31,120 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
  * @param <T>
  */
 @Component
-public class CdmServiceCacher<T extends CdmBase> extends CdmCacher {
+public class CdmServiceCacher extends CdmCacher  implements ICdmEntitySessionManagerObserver {
 
-       @Autowired
-       ITermService termService;
 
-       @Override
-       protected T findByUuid(UUID uuid) {
-               return (T)termService.findWithoutFlush(uuid);
-       }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.cache.CdmCacher#setup()
-     */
+    private ICdmEntitySessionManager cdmEntitySessionManager;
+
+    private CdmTransientEntityCacher cdmTransientEntityCacher;
+
+    private CacheLoader cacheLoader;
+
     @Override
     protected void setup() {
-        // TODO Auto-generated method stub
+        DefinedTermBase.setCacher(this);
+        CdmTransientEntityCacher.setDefaultCacher(this);
+        TermServiceRequestExecutor.setDefaultCacher(this);
 
+        cacheLoader = new CacheLoader(this);
+    }
+
+
+    @Override
+    protected CacheConfiguration getDefaultCacheConfiguration() {
+        // For a better understanding on how to size caches, refer to
+        // http://ehcache.org/documentation/configuration/cache-size
+
+        SizeOfPolicyConfiguration sizeOfConfig = new SizeOfPolicyConfiguration();
+        sizeOfConfig.setMaxDepth(100);
+        sizeOfConfig.setMaxDepthExceededBehavior("abort");
+
+        return new CacheConfiguration(DEFAULT_CACHE_NAME, 0)
+        .eternal(true)
+        .statistics(true)
+        .sizeOfPolicy(sizeOfConfig)
+        .overflowToOffHeap(false);
+
+    }
+
+    @Override
+    protected CdmBase findByUuid(UUID uuid) {
+        CdmBase term = CdmApplicationState.getCurrentAppConfig().getTermService().findWithoutFlush(uuid);
+        return load(term);
     }
 
     /* (non-Javadoc)
      * @see eu.etaxonomy.cdm.model.ICdmCacher#isCachable(eu.etaxonomy.cdm.model.common.CdmBase)
      */
     @Override
-    public boolean isCachable(CdmBase arg0) {
-        // TODO Auto-generated method stub
+    public boolean isCachable(CdmBase cdmEntity) {
+        if(cdmEntity != null && cdmEntity instanceof DefinedTermBase) {
+            return true;
+        }
         return false;
     }
 
+
+    public void setCdmEntitySessionManager(ICdmEntitySessionManager cdmEntitySessionManager) {
+        this.cdmEntitySessionManager = cdmEntitySessionManager;
+        if(cdmEntitySessionManager != null) {
+            cdmEntitySessionManager.addSessionObserver(this);
+        }
+    }
+
+
+    public CdmTransientEntityCacher getCurrentCacher() {
+        ICdmEntitySession cdmEntitySession = cdmEntitySessionManager.getActiveSession();
+        if(cdmEntitySession != null && cdmEntitySession instanceof CdmEntitySession) {
+            return ((CdmEntitySession) cdmEntitySession).getCacher();
+        }
+        return null;
+    }
+
+    @Override
+    public CdmBase getFromCache(CdmBase cdmBase) {
+        CdmBase cachedCdmEntity = null;
+        // first we check in the active session cache if the
+        // entity has been loaded there
+        // FIXME:Remoting do we really need the cdmTransientEntityCacher
+        // here. Is it not guarenteed that all every entity which 'isCachable'
+        // by this cacher is cached only in this cacher ?
+        if(!isCachable(cdmBase) && cdmTransientEntityCacher != null) {
+            CdmEntityCacheKey key = CdmTransientEntityCacher.generateKey(cdmBase);
+            cachedCdmEntity = cdmTransientEntityCacher.getFromCache(key);
+
+        }
+        if(cachedCdmEntity == null) {
+            cachedCdmEntity = super.getFromCache(cdmBase);
+        }
+        return cachedCdmEntity;
+    }
+
+
     /* (non-Javadoc)
      * @see eu.etaxonomy.cdm.api.cache.CdmCacher#load(eu.etaxonomy.cdm.model.common.CdmBase)
      */
     @Override
-    public CdmBase load(CdmBase arg0) {
-        // TODO Auto-generated method stub
-        return null;
+    public CdmBase load(CdmBase cdmEntity) {
+        CdmBase cachedCdmEntity = getFromCache(cdmEntity.getUuid());
+
+        if(isCachable(cdmEntity) && cachedCdmEntity == null) {
+            cachedCdmEntity =  cacheLoader.load(cdmEntity, false, true);
+        }
+        return cachedCdmEntity;
     }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver#changed()
+     */
+    @Override
+    public void changed() {
+        ICdmEntitySession cdmEntitySession = cdmEntitySessionManager.getActiveSession();
+        if(cdmEntitySession != null && cdmEntitySession instanceof CdmEntitySession) {
+            this.cdmTransientEntityCacher = ((CdmEntitySession) cdmEntitySession).getCacher();
+        } else {
+            this.cdmTransientEntityCacher = null;
+        }
+    }
 }
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmEagerLoadingException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmEagerLoadingException.java
new file mode 100644 (file)
index 0000000..08cc011
--- /dev/null
@@ -0,0 +1,13 @@
+package eu.etaxonomy.taxeditor.remoting;
+
+public class CdmEagerLoadingException extends RuntimeException {
+       
+       public CdmEagerLoadingException(Throwable t) {
+               super(t);
+       }
+       
+       public CdmEagerLoadingException(String message) {
+               super(message);
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmRemotingException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmRemotingException.java
new file mode 100644 (file)
index 0000000..13fcb4f
--- /dev/null
@@ -0,0 +1,18 @@
+package eu.etaxonomy.taxeditor.remoting;
+
+public class CdmRemotingException extends RuntimeException {
+
+       /**
+        *
+        */
+       private static final long serialVersionUID = -560332689478356360L;
+
+       public CdmRemotingException(String message) {
+               super(message);
+       }
+
+       public CdmRemotingException(Exception exception) {
+           super(exception);
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CacheLoader.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CacheLoader.java
new file mode 100644 (file)
index 0000000..526e990
--- /dev/null
@@ -0,0 +1,395 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.remoting.cache;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.Element;
+
+import org.apache.log4j.Logger;
+import org.springframework.util.ReflectionUtils;
+
+import eu.etaxonomy.cdm.api.service.pager.Pager;
+import eu.etaxonomy.cdm.model.ICdmCacher;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+/**
+ * @author cmathew
+ * @date 19 Feb 2015
+ *
+ */
+public class CacheLoader {
+    private static final Logger logger = Logger.getLogger(CacheLoader.class);
+
+    private static boolean isRecursiveEnabled = true;
+
+    protected final ICdmCacher cdmCacher;
+
+    private final Cache cdmlibModelCache;
+
+
+
+    public CacheLoader(ICdmCacher cdmCacher) {
+        this.cdmCacher = cdmCacher;
+        this.cdmlibModelCache = CdmRemoteCacheManager.getInstance().getCdmModelGetMethodsCache();
+
+    }
+
+
+    public CdmModelFieldPropertyFromClass getFromCdmlibModelCache(String className) {
+        Element e = cdmlibModelCache.get(className);
+        if (e == null) {
+            return null;
+        } else {
+            return (CdmModelFieldPropertyFromClass) e.getObjectValue();
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public <T extends Object> T load(T obj, boolean recursive, boolean update) {
+        if(obj == null) {
+            return null;
+        }
+        if(obj instanceof CdmBase) {
+            return (T) load((CdmBase)obj, recursive, update);
+        } else if (obj instanceof Map) {
+            return (T) load((Map<T,T>)obj, recursive, update);
+        } else if (obj instanceof Collection) {
+            return (T) load((Collection<T>)obj, recursive, update);
+        } else if(obj instanceof Pager) {
+             load(((Pager)obj).getRecords(), recursive, update);
+             return obj;
+        }
+
+        return obj;
+    }
+
+    @SuppressWarnings("unchecked")
+    private <T extends Object> T loadRecursive(T obj, List<Object> alreadyVisitedEntities, boolean update) {
+        if(obj == null) {
+            return null;
+        }
+        if(obj instanceof CdmBase) {
+            return (T) loadRecursive((CdmBase)obj, alreadyVisitedEntities, update);
+        } else if (obj instanceof Map) {
+            return (T) load((Map<T,T>)obj, alreadyVisitedEntities, update);
+        } else if (obj instanceof Collection) {
+            return (T) load((Collection<T>)obj, alreadyVisitedEntities, update);
+        }
+
+
+        logger.info("No caching yet for type " + obj.getClass().getName());
+
+        return obj;
+    }
+
+    public <T extends Object> Map<T,T> load(Map<T,T> map, boolean recursive, boolean update){
+
+
+        if(isRecursiveEnabled && recursive) {
+            logger.info("---- starting recursive load for cdm entity map");
+            List<Object> alreadyVisitedEntities = new ArrayList<Object>();
+            Map<T,T> cachedMap = load(map, alreadyVisitedEntities, update);
+            alreadyVisitedEntities.clear();
+            logger.info("---- ending recursive load for cdm entity map \n");
+            return cachedMap;
+        } else {
+            return load(map, null, update);
+        }
+    }
+
+
+    private <T extends Object> Map<T,T> load(Map<T,T> map, List<Object> alreadyVisitedEntities, boolean update){
+        //map = (Map<T,T>)deproxy(map);
+
+        if(map == null || map.isEmpty()) {
+            return map;
+        }
+
+        int originalMapSize = map.size();
+        Object[] result = new Object[ map.size() * 2 ];
+        Iterator<Map.Entry<T,T>> iter = map.entrySet().iterator();
+        int i=0;
+        // to avoid ConcurrentModificationException
+        alreadyVisitedEntities.add(map);
+        while ( iter.hasNext() ) {
+            Map.Entry<T,T> e = iter.next();
+            result[i++] = e.getKey();
+            result[i++] = e.getValue();
+        }
+
+        for(i=0; i<result.length;i++) {
+            if(alreadyVisitedEntities == null) {
+                result[i] = load(result[i], false, update);
+            } else {
+                result[i] = loadRecursive(result[i], alreadyVisitedEntities, update);
+            }
+        }
+        map.clear();
+        for(i = 0; i < originalMapSize; i+=2 ) {
+            map.put(
+                    (T)result[i],
+                    (T)result[i+1]
+                    );
+        }
+        return map;
+    }
+
+    public <T extends Object> Collection<T> load(Collection<T> collection, boolean recursive, boolean update){
+
+        Collection<T> loadedCollection;
+        if(isRecursiveEnabled && recursive) {
+            logger.info("---- starting recursive load for cdm entity collection");
+            List<Object> alreadyVisitedEntities = new ArrayList<Object>();
+            Collection<T> cachedCollection = load(collection, alreadyVisitedEntities, update);
+            alreadyVisitedEntities.clear();
+            logger.info("---- ending recursive load for cdm entity collection \n");
+            loadedCollection = cachedCollection;
+        } else {
+            loadedCollection = load(collection, null, update);
+        }
+        return loadedCollection;
+    }
+
+    @SuppressWarnings("unchecked")
+    private <T extends Object> Collection<T> load(Collection<T> collection, List<Object> alreadyVisitedEntities, boolean update) {
+
+
+
+        if(collection == null || collection.isEmpty()) {
+            return collection;
+        }
+        int length = collection.size();
+        Object[] result = new Object[length];
+        Iterator<T> collectionItr = collection.iterator();
+        int count = 0;
+        // to avoid ConcurrentModificationException
+        alreadyVisitedEntities.add(collection);
+        while(collectionItr.hasNext()) {
+            Object obj = collectionItr.next();
+            if(alreadyVisitedEntities == null) {
+                result[count] = load(obj, false, update);
+            } else {
+                result[count] = loadRecursive(obj, alreadyVisitedEntities, update);
+            }
+
+            count++;
+        }
+
+        collection.clear();
+
+        for ( int i = 0; i < length; i++ ) {
+            collection.add((T)result[i]);
+        }
+
+        return collection;
+    }
+
+
+    /**
+     * Puts the (Key,Value) pair of ({@link java.util.UUID}, {@link eu.etaxonomy.cdm.model.common.CdmBase}),
+     * in the cache corresponding to the given cache id
+     *
+     * @param cacheId
+     * @param uuid
+     * @param cdmEntity
+     */
+    public CdmBase load(CdmBase cdmEntity, boolean recursive, boolean update) {
+        if(cdmEntity == null) {
+            return null;
+        }
+
+        // start by looking up the cdm entity in the cache
+        CdmBase cachedCdmEntity = cdmCacher.getFromCache(cdmEntity);
+
+        if(cachedCdmEntity != null) {
+            // if cdm entity was found in cache then
+            logger.info(" - object of type " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId() + " already exists");
+            // .. return if the cached and input objects are identical, else (this is a newly loaded object so) continue
+            if(cachedCdmEntity == cdmEntity) {
+                return cachedCdmEntity;
+            }
+        }
+
+        CdmBase loadedCdmBase;
+        if(isRecursiveEnabled && recursive) {
+            logger.info("---- starting recursive load for cdm entity " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId());
+            List<Object> alreadyVisitedEntities = new ArrayList<Object>();
+            CdmBase cb =  loadRecursive(cdmEntity, alreadyVisitedEntities, update);
+            alreadyVisitedEntities.clear();
+            logger.info("---- ending recursive load for cdm entity " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId() + "\n");
+            loadedCdmBase =  cb;
+        } else {
+            loadedCdmBase = load(cdmEntity);
+        }
+        return loadedCdmBase;
+
+    }
+
+
+    protected CdmBase load(CdmBase cdmEntity) {
+        logger.info("loading object of type " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId());
+        cdmCacher.put((CdmBase)ProxyUtils.deproxy(cdmEntity));
+        return cdmCacher.getFromCache(cdmEntity);
+    }
+
+
+    private CdmBase loadRecursive(CdmBase cdmEntity,  List<Object> alreadyVisitedEntities, boolean update) {
+
+        CdmBase cachedCdmEntity = load(cdmEntity);
+
+
+        // we want to recursive through the cdmEntity (and not the cachedCdmEntity)
+        // since there could be new or deleted objects in the cdmEntity sub-graph
+
+        // start by getting the fields from the cdm entity
+        String className = cdmEntity.getClass().getName();
+        CdmModelFieldPropertyFromClass cmgmfc = getFromCdmlibModelCache(className);
+        if(cmgmfc != null) {
+            alreadyVisitedEntities.add(cdmEntity);
+            List<String> fields = cmgmfc.getFields();
+            for(String field : fields) {
+                // retrieve the actual object corresponding to the field.
+                // this object will be either a CdmBase or a Collection / Map
+                // with CdmBase as the generic type
+
+                CdmBase cdmEntityInSubGraph = getCdmBaseTypeFieldValue(cdmEntity, cachedCdmEntity, field, alreadyVisitedEntities, update);
+                if(cdmEntityInSubGraph != null) {
+                    //checkForIdenticalCdmEntity(alreadyVisitedEntities, cdmEntityInSubGraph);
+                    if(!checkForIdenticalCdmEntity(alreadyVisitedEntities, cdmEntityInSubGraph)) {
+                        logger.info("recursive loading object of type " + cdmEntityInSubGraph.getClass().getName() + " with id " + cdmEntityInSubGraph.getId());
+                        loadRecursive(cdmEntityInSubGraph, alreadyVisitedEntities, update);
+                    } else {
+                        logger.info("object of type " + cdmEntityInSubGraph.getClass().getName() + " with id " + cdmEntityInSubGraph.getId() + " already visited");
+                    }
+                }
+            }
+        } else {
+            throw new CdmClientCacheException("CdmEntity with class " + cdmEntity.getClass().getName() + " is not found in the cdmlib model cache. " +
+                    "The cache may be corrupted or not in sync with the latest model version" );
+        }
+
+        return cachedCdmEntity;
+    }
+
+
+    private CdmBase getCdmBaseTypeFieldValue(CdmBase cdmEntity,
+            CdmBase cachedCdmEntity,
+            String fieldName,
+            List<Object> alreadyVisitedEntities,
+            boolean update) {
+
+        // this method attempts to make sure that for any two objects found in
+        // the object graph, if they are equal then they should also be the same,
+        // which is crucial for the merge to work
+        if(cachedCdmEntity == null) {
+            throw new CdmClientCacheException("When trying to set field value, the cached cdm entity cannot be null");
+        }
+
+        Class<?> clazz = cdmEntity.getClass();
+        try {
+            // this call will search in the provided class as well as
+            // the super classes until it finds the field
+            Field field = ReflectionUtils.findField(clazz, fieldName);
+
+            if(field == null) {
+                throw new CdmClientCacheException("Field '" + fieldName
+                        + "' not found when searching in class '" + clazz.getName() + "' and its supercalsses");
+            }
+            field.setAccessible(true);
+            Object o = field.get(cdmEntity);
+            // resetting the value in cdm entity to the deproxied object
+            o = ProxyUtils.deproxy(o);
+            field.set(cdmEntity, o);
+            Object cachedo = field.get(cachedCdmEntity);
+            CdmBase cdmEntityInSubGraph = null;
+
+            if(update || ProxyUtils.isProxy(cachedo)) {
+                // if we are in update mode we have to make the field of the cached entity
+                // up-to-date by setting it to the value of the cdm entity being loaded
+                //
+                // if the cdm entity is a proxy then we always update to make sure that
+                // newly created entities are always up-to-date
+                //
+                // NOTE : the field is overridden in the case of the exception
+                // found below
+                field.set(cachedCdmEntity, o);
+
+            }
+
+            if(o != null && !ProxyUtils.isProxy(o)) {
+                if(CdmBase.class.isAssignableFrom(o.getClass())) {
+                    logger.info("found initialised cdm entity '" + fieldName + "' in object of type " + clazz.getName() + " with id " + cdmEntity.getId());
+
+                    cdmEntityInSubGraph  = (CdmBase)o;
+                    CdmBase cachedCdmEntityInSubGraph = cdmCacher.getFromCache(cdmEntityInSubGraph);
+
+                    if(cachedCdmEntityInSubGraph != null) {
+                        if(cachedCdmEntityInSubGraph != cdmEntityInSubGraph) {
+                            // exception : is the case where
+                            // the field has been already initialised, cached and
+                            // is not the same as the one in the cache, in which case we set the value
+                            // of the field to the one found in the cache
+                            logger.info("setting cached + real value to '" + fieldName + "' in object of type " + clazz.getName() + " with id " + cdmEntity.getId());
+                            field.set(cachedCdmEntity, cachedCdmEntityInSubGraph);
+                            field.set(cdmEntity, cachedCdmEntityInSubGraph);
+                        } else {
+                            // since the field value object in cdmEntity
+                            // is the same as the field value object in cachedCdmEntity
+                            // we are sure that the its subgraph is also correctly loaded,
+                            // so we can exit the recursion
+                            return null;
+                        }
+                    }
+                } else if(o instanceof Map && !checkForIdenticalCdmEntity(alreadyVisitedEntities, o)) {
+                    loadRecursive((Map)o, alreadyVisitedEntities, update);
+                } else if(o instanceof Collection && !checkForIdenticalCdmEntity(alreadyVisitedEntities, o)) {
+                    loadRecursive((Collection)o, alreadyVisitedEntities, update);
+                }
+            }
+            // we return the original cdm entity in the sub graph because we
+            // want to continue to recurse on the input cdm entity graph
+            // and not the one in the cache
+            return cdmEntityInSubGraph;
+        } catch (SecurityException e) {
+            throw new CdmClientCacheException(e);
+        } catch (IllegalArgumentException e) {
+            throw new CdmClientCacheException(e);
+        } catch (IllegalAccessException e) {
+            throw new CdmClientCacheException(e);
+        }
+    }
+
+    private boolean checkForIdenticalCdmEntity(List<Object> objList, Object objToCompare) {
+        if(objToCompare != null) {
+            for(Object obj : objList) {
+                if(obj == objToCompare) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+
+    public static boolean isRecursiveEnabled() {
+        return isRecursiveEnabled;
+    }
+
+    public static void  setRecursiveEnabled(boolean ire) {
+        isRecursiveEnabled = ire;
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmClientCacheException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmClientCacheException.java
new file mode 100644 (file)
index 0000000..e00649f
--- /dev/null
@@ -0,0 +1,12 @@
+package eu.etaxonomy.taxeditor.remoting.cache;
+
+public class CdmClientCacheException extends RuntimeException {
+       
+       public CdmClientCacheException(String message) {
+               super(message);
+       }
+
+       public CdmClientCacheException(Exception e) {
+               super(e);
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmEntityCacheKey.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmEntityCacheKey.java
new file mode 100644 (file)
index 0000000..74e543c
--- /dev/null
@@ -0,0 +1,56 @@
+package eu.etaxonomy.taxeditor.remoting.cache;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+public class CdmEntityCacheKey {
+
+       private Class<? extends CdmBase> persistenceClass;
+       private int persistenceId;
+       
+       public CdmEntityCacheKey(CdmBase cdmBase) {
+               this.persistenceClass = cdmBase.getClass();
+               this.persistenceId = cdmBase.getId();
+       }
+       
+       public CdmEntityCacheKey(Class<? extends CdmBase> clazz, int id) {
+               this.persistenceClass = clazz;
+               this.persistenceId = id;
+       }
+       
+
+       
+       public Class<? extends CdmBase> getPersistenceClass() {
+               return persistenceClass;
+       }
+       
+       public int getPersistenceId() {
+               return persistenceId;
+       }
+       @Override
+       public boolean equals(Object obj) {
+               if(obj == null || !(obj instanceof CdmEntityCacheKey)) {
+                       return false;
+               }
+               
+               if(this == obj) {
+                       return true;
+               }
+               CdmEntityCacheKey that = (CdmEntityCacheKey) obj;
+               if(this.persistenceClass.equals(that.persistenceClass) && this.persistenceId == that.persistenceId) {
+                       return true;
+               }
+               
+               return false;
+       }
+       
+       @Override
+       public int hashCode() {
+               return (this.persistenceClass.getName() + String.valueOf(this.persistenceId)).hashCode();
+       }
+       
+       @Override
+       public String toString() {
+               return this.persistenceClass.getName() + String.valueOf(this.persistenceId);
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelCacher.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelCacher.java
new file mode 100644 (file)
index 0000000..cf53ea5
--- /dev/null
@@ -0,0 +1,137 @@
+package eu.etaxonomy.taxeditor.remoting.cache;
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.lang.reflect.Field;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.Element;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.mapping.PersistentClass;
+import org.hibernate.mapping.Property;
+import org.hibernate.property.Getter;
+import org.osgi.framework.Bundle;
+
+
+public class CdmModelCacher {
+
+
+
+
+    public static String HB_CONFIG_FILE_PATH= "/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml";
+
+    public static final String CDM_MAP_SER_FILE_PATH = "resources/cdm.map.ser";
+
+
+
+
+    public void cacheGetterFields(Cache cache) throws IOException, ClassNotFoundException, URISyntaxException {
+        Map<String, CdmModelFieldPropertyFromClass> modelClassMap = loadModelClassMap();
+
+        cache.removeAll();
+
+        for(Map.Entry<String, CdmModelFieldPropertyFromClass> entry : modelClassMap.entrySet()) {
+            cache.put(new Element(entry.getKey(), entry.getValue()));
+        }
+    }
+
+    public Map<String, CdmModelFieldPropertyFromClass> loadModelClassMap() throws URISyntaxException, IOException, ClassNotFoundException  {
+
+        Bundle bundle = Platform.getBundle("eu.etaxonomy.taxeditor.cdmlib");
+
+        URL modelMapFileBundleURL = bundle.getEntry(CDM_MAP_SER_FILE_PATH);
+        URL modelMapFileURL = FileLocator.resolve(modelMapFileBundleURL);
+        String modelMapFilePath = modelMapFileURL.getFile();
+
+        FileInputStream fin = new FileInputStream(modelMapFilePath);
+        ObjectInputStream ois = new ObjectInputStream(fin);
+        Map<String, CdmModelFieldPropertyFromClass> modelClassMap = (Map<String, CdmModelFieldPropertyFromClass>) ois.readObject();
+        ois.close();
+        return modelClassMap;
+    }
+
+
+    public Map<String, CdmModelFieldPropertyFromClass> generateModelClassMap() {
+
+        Configuration configuration = buildConfiguration(HB_CONFIG_FILE_PATH);
+        Iterator<PersistentClass> classMappingIterator =   configuration.getClassMappings();
+
+        Map<String, CdmModelFieldPropertyFromClass> modelClassMap = new HashMap<String, CdmModelFieldPropertyFromClass>();
+
+        while(classMappingIterator.hasNext()) {
+            PersistentClass persistentClass = classMappingIterator.next();
+            Class mappedClass = persistentClass.getMappedClass();
+            String mappedClassName = mappedClass.getName();
+
+            CdmModelFieldPropertyFromClass cmgmfc = new CdmModelFieldPropertyFromClass(mappedClassName);
+            System.out.println("Adding class : " + mappedClassName + " to cache");
+            addGetters(persistentClass, cmgmfc);
+            modelClassMap.put(mappedClassName, cmgmfc);
+        }
+        return modelClassMap;
+    }
+
+
+    public static Configuration buildConfiguration(String hibernateConfigFilePath) {
+        Configuration configuration = new Configuration().configure(hibernateConfigFilePath);
+        configuration.buildMappings();
+        return configuration;
+    }
+
+    private void addGetters(PersistentClass persistentClass, CdmModelFieldPropertyFromClass cmgmfc) {
+        if (persistentClass != null) {
+            Iterator propertyIt = persistentClass.getPropertyIterator();
+
+            while(propertyIt.hasNext())
+            {
+                Property property = (Property)propertyIt.next();
+                Getter getter = property.getGetter(persistentClass.getMappedClass());
+                if(getter != null && getter.getMember() != null) {
+                    Field field = (Field)getter.getMember();
+
+                    //logger.info(" - contains field '" + field.getName() + "' of type '" + field.getType().getName() + "'");
+                    cmgmfc.addGetMethods(field.getName());
+                }
+            }
+            addGetters(persistentClass.getSuperclass(), cmgmfc);
+        }
+    }
+
+
+
+    public static void main(String argv[]) {
+
+        // To re-create the serialised cdm map run,
+        // mvn exec:java -Dexec.mainClass="eu.etaxonomy.taxeditor.remoting.cache.CdmModelCacher"
+        // in the eu.etaxonomy.taxeditor.cdmlib project root dir
+        String CDM_MAP_SER_DIR = "resources/";
+
+        CdmModelCacher cdmModelCacher = new CdmModelCacher();
+        Map<String, CdmModelFieldPropertyFromClass> modelClassMap = cdmModelCacher.generateModelClassMap();
+        try{
+
+            FileOutputStream fout = new FileOutputStream(CDM_MAP_SER_DIR + "cdm.map.ser");
+            ObjectOutputStream oos = new ObjectOutputStream(fout);
+            oos.writeObject(modelClassMap);
+            oos.close();
+            System.out.println("CDM Map serialized");
+
+        }catch(Exception ex){
+            ex.printStackTrace();
+        }
+
+    }
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelFieldPropertyFromClass.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelFieldPropertyFromClass.java
new file mode 100644 (file)
index 0000000..e90ec6d
--- /dev/null
@@ -0,0 +1,51 @@
+package eu.etaxonomy.taxeditor.remoting.cache;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class CdmModelFieldPropertyFromClass implements Serializable {
+
+       private static final long serialVersionUID = 5726395976531887526L;
+       private String className;
+       private String parentClassName;
+       
+       private List<String> fields = new ArrayList<String>();
+       
+       
+       public CdmModelFieldPropertyFromClass(String className) {
+               this.setClassName(className);
+       }
+       
+       public String getParentClassName() {
+               return parentClassName;
+       }
+
+       public void setParentClassName(String parentClassName) {
+               this.parentClassName = parentClassName;
+       }
+
+       public List<String> getFields() {
+               return fields;
+       }
+
+       public void setFields(List<String> fields) {
+               this.fields = fields;
+       }
+       
+       public void addGetMethods(String getMethod) {
+               this.fields.add(getMethod);
+       }
+
+       public String getClassName() {
+               return className;
+       }
+
+       public void setClassName(String className) {
+               this.className = className;
+       }
+       
+
+       
+       
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmRemoteCacheManager.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmRemoteCacheManager.java
new file mode 100644 (file)
index 0000000..a2c4d1c
--- /dev/null
@@ -0,0 +1,94 @@
+package eu.etaxonomy.taxeditor.remoting.cache;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.CacheException;
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.config.SizeOfPolicyConfiguration;
+
+import org.apache.log4j.Logger;
+
+
+public class CdmRemoteCacheManager {
+
+    private static final Logger logger = Logger.getLogger(CdmRemoteCacheManager.class);
+
+
+    private Cache cdmlibModelCache;
+
+    private static CdmRemoteCacheManager cdmRemoteCacheManager = null;
+
+    public static final String CDM_MODEL_CACHE_NAME = "cdmModelGetMethodsCache";
+
+    private static Thread initThread;
+
+    private static boolean cacheInitialised = false;
+
+    public enum CdmCacheManagerType {
+        CDMLIB_MODEL,
+        DEFAULT
+    }
+
+    public static CdmRemoteCacheManager getInstance(){
+
+        if(cdmRemoteCacheManager == null) {
+            cdmRemoteCacheManager = new CdmRemoteCacheManager();
+        }
+        return cdmRemoteCacheManager;
+    }
+    private CdmRemoteCacheManager() {
+
+
+        try {
+            // NOTE:Programmatically creating the cache manager may solve the problem of
+            //      recreating data written to disk on startup
+            //      see https://stackoverflow.com/questions/1729605/ehcache-persist-to-disk-issues
+            //String cacheFilePath = CDMLIB_CACHE_MANAGER_CONFIG_RESOURCE.getFile().getAbsolutePath();
+            //InputStream in = this.getClass().getClassLoader().getResourceAsStream("cdmlib-ehcache.xml");
+
+            SizeOfPolicyConfiguration sizeOfConfig = new SizeOfPolicyConfiguration();
+            sizeOfConfig.setMaxDepth(1000);
+            sizeOfConfig.setMaxDepthExceededBehavior("abort");
+
+            CacheConfiguration modelcc = new CacheConfiguration(CDM_MODEL_CACHE_NAME, 0)
+            .eternal(true)
+            .statistics(true)
+            .sizeOfPolicy(sizeOfConfig)
+            .overflowToOffHeap(false);
+
+            cdmlibModelCache = new Cache(modelcc);
+
+            CacheManager.create().addCache(cdmlibModelCache);
+            CdmModelCacher cmdmc = new CdmModelCacher();
+            cmdmc.cacheGetterFields(cdmlibModelCache);
+
+        } catch (CacheException e) {
+            throw new CdmClientCacheException(e);
+        } catch (ClassNotFoundException e) {
+            throw new CdmClientCacheException(e);
+        } catch (IOException e) {
+            throw new CdmClientCacheException(e);
+        } catch (URISyntaxException e) {
+            throw new CdmClientCacheException(e);
+        }
+
+    }
+
+
+    public Cache getCdmModelGetMethodsCache(){
+        return cdmlibModelCache;
+    }
+
+    public static void removeEntityCaches() {
+        CacheManager cm = CacheManager.create();
+        String[] cacheNames = CacheManager.create().getCacheNames();
+        for(String cacheName : cacheNames) {
+            if(!cacheName.equals(CDM_MODEL_CACHE_NAME)) {
+                cm.removeCache(cacheName);
+            }
+        }
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmTransientEntityCacher.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmTransientEntityCacher.java
new file mode 100644 (file)
index 0000000..d92bdad
--- /dev/null
@@ -0,0 +1,318 @@
+// $Id$
+/**
+ * Copyright (C) 2014 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.remoting.cache;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.Element;
+import net.sf.ehcache.Status;
+import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.config.SizeOfPolicyConfiguration;
+import net.sf.ehcache.statistics.LiveCacheStatistics;
+
+import org.apache.log4j.Logger;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.cache.CdmServiceCacher;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.api.service.dto.CdmEntityIdentifier;
+import eu.etaxonomy.cdm.model.ICdmCacher;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
+
+/**
+ *
+ * This cache guarantees that
+ *  - all objects put will be ancestors of CdmBase
+ *  - all CdmBase objects in the cache will be already de-proxied
+ *  - after any CdmBase object is put in the cache,
+ *  all non-null / non-proxy CdmBase objects in the sub-graph
+ *  will also be present in the cache.
+ *
+ * @author cmathew
+ * @date 14 Oct 2014
+ *
+ */
+
+public class CdmTransientEntityCacher implements ICdmCacher {
+
+    private static final Logger logger = Logger.getLogger(CdmTransientEntityCacher.class);
+
+
+    private final ICdmEntitySessionManager cdmEntitySessionManager;
+
+    private static CdmServiceCacher cdmServiceCacher;
+
+    private final String cacheId;
+
+    private final Cache cache;
+
+    private final CacheLoader cacheLoader;
+
+
+
+    public CdmTransientEntityCacher(String cacheId, ICdmEntitySessionManager cdmEntitySessionManager) {
+        this.cacheId = cacheId;
+
+        cache = new Cache(getEntityCacheConfiguration(cacheId));
+
+        CacheManager.create().addCache(cache);
+
+        this.cdmEntitySessionManager = cdmEntitySessionManager;
+
+        cacheLoader = new CacheLoader(this);
+    }
+
+    public CdmTransientEntityCacher(Object sessionOwner, ICdmEntitySessionManager cdmEntitySessionManager) {
+        this(generateCacheId(sessionOwner), cdmEntitySessionManager);
+    }
+
+    public static String generateCacheId(Object sessionOwner) {
+        return sessionOwner.getClass().getName() +  String.valueOf(sessionOwner.hashCode());
+    }
+
+    /**
+     * Returns the default cache configuration.
+     *
+     * @return
+     */
+    private CacheConfiguration getEntityCacheConfiguration(String cacheId) {
+        SizeOfPolicyConfiguration sizeOfConfig = new SizeOfPolicyConfiguration();
+        sizeOfConfig.setMaxDepth(10000);
+        sizeOfConfig.setMaxDepthExceededBehavior("abort");
+
+        return new CacheConfiguration(cacheId, 0)
+        .eternal(true)
+        .statistics(true)
+        .sizeOfPolicy(sizeOfConfig)
+        .overflowToOffHeap(false);
+
+    }
+
+    public static void setDefaultCacher(CdmServiceCacher css) {
+        cdmServiceCacher = css;
+    }
+
+    public LiveCacheStatistics getCacheStatistics() {
+        if(cache.getStatus() == Status.STATUS_ALIVE) {
+            return cache.getLiveCacheStatistics();
+        }
+        return null;
+
+    }
+
+    /**
+     * Returns the cache corresponding to the cache id
+     *
+     * @param cacheId
+     * @return
+     */
+    private Cache getCache() {
+        return  CacheManager.create().getCache(cacheId);
+    }
+
+    public <T extends Object> T load(T obj, boolean update) {
+        return cacheLoader.load(obj, true, update);
+    }
+
+    public <T extends Object> Map<T,T> load(Map<T,T> map, boolean update){
+        return cacheLoader.load(map, true, update);
+    }
+
+    public <T extends Object> Collection<T> load(Collection<T> collection, boolean update){
+        return cacheLoader.load(collection, true, update);
+    }
+
+    public CdmBase load(CdmBase cdmEntity, boolean update) {
+        return cacheLoader.load(cdmEntity, true, update);
+    }
+
+
+    private CdmBase load(CdmEntityIdentifier cei, boolean update) {
+        return CdmApplicationState.getCommonService().findWithUpdate(cei.getCdmClass(), cei.getId());
+    }
+
+
+    public UpdateResult load(UpdateResult result, boolean update) {
+        // probably a good time to broadcast to other sessions
+
+        Set<CdmBase> updatedObjects = result.getUpdatedObjects();
+        Set<CdmBase> reloadedObjects = new HashSet<CdmBase>();
+        Set<CdmEntityIdentifier> updatedCdmIds = result.getUpdatedCdmIds();
+        boolean updatedCdmIdsIsEmpty = updatedCdmIds.isEmpty();
+
+        // if the cdm identifier set contains identifiers of objects already
+        // present in the updated objects set reomve them
+        for(CdmBase updatedObject : updatedObjects) {
+            if(updatedObject != null && exists(new CdmEntityCacheKey(updatedObject.getClass(), updatedObject.getId()))) {
+                CdmEntityIdentifier cdmEntityIdentifier = new CdmEntityIdentifier(updatedObject.getId(), updatedObject.getClass());
+                if(!updatedCdmIdsIsEmpty && updatedCdmIds.contains(cdmEntityIdentifier)) {
+                    updatedCdmIds.remove(cdmEntityIdentifier);
+                }
+                reloadedObjects.add(cacheLoader.load(updatedObject, true, update));
+            }
+        }
+
+        // remote load cdm identifiers of objects which already exist
+        // in the cache
+
+        for(CdmEntityIdentifier cei : updatedCdmIds) {
+            if(exists(new CdmEntityCacheKey(cei.getCdmClass(), cei.getId()))) {
+                reloadedObjects.add(load(cei, update));
+            }
+
+        }
+        updatedObjects.clear();
+        result.addUpdatedObjects(reloadedObjects);
+        return result;
+    }
+
+    public CdmModelFieldPropertyFromClass getFromCdmlibModelCache(String className) {
+        return cacheLoader.getFromCdmlibModelCache(className);
+    }
+
+
+
+
+    @Override
+    public void put(CdmBase cdmEntity) {
+
+        CdmBase cachedCdmEntity = cdmServiceCacher.load(cdmEntity);
+        if(cachedCdmEntity != null) {
+            logger.info("Cdm Entity with id : " + cdmEntity.getId() + " already exists in permanent cache. Ignoring put.");
+            return;
+        }
+        CdmEntityCacheKey id = new CdmEntityCacheKey(cdmEntity);
+
+        cachedCdmEntity = getFromCache(id);
+        if(cachedCdmEntity == null) {
+            getCache().put(new Element(id, cdmEntity));
+            cdmEntity.initListener();
+            logger.info(" - object of type " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId() + " put in cache");
+            return;
+        }
+        logger.info(" - object of type " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId() + " already exists");
+    }
+
+
+    private Element getCacheElement(CdmEntityCacheKey key) {
+        return getCache().get(key);
+    }
+
+
+    public CdmBase getFromCache(CdmEntityCacheKey id) {
+        Element e = getCacheElement(id);
+
+        if (e == null) {
+            return null;
+        } else {
+            return (CdmBase) e.getObjectValue();
+        }
+    }
+
+    public CdmBase getFromCache(Class<? extends CdmBase> clazz, int id) {
+        CdmEntityCacheKey cacheId = generateKey(clazz,id);
+        return getFromCache(cacheId);
+    }
+
+    @Override
+    public CdmBase getFromCache(CdmBase cdmBase) {
+
+        CdmEntityCacheKey cacheId = generateKey((CdmBase)ProxyUtils.deproxy(cdmBase));
+        // first try this cache
+        CdmBase  cachedCdmEntity = getFromCache(cacheId);
+
+        if(cachedCdmEntity == null) {
+            // ... then try the permanent cache
+            cachedCdmEntity = cdmServiceCacher.getFromCache(cdmBase.getUuid());
+        }
+
+        return cachedCdmEntity;
+    }
+
+    public CdmBase getFromCache(CdmBase cdmBase, Class<? extends CdmBase> clazz) {
+
+        cdmBase = CdmBase.deproxy(cdmBase, clazz);
+        return getFromCache(cdmBase);
+    }
+
+    public List<CdmBase> getAllEntities() {
+        List<CdmBase> entities = new ArrayList<CdmBase>();
+        Map<String, CdmBase> elementsMap = getCache().getAllWithLoader(getCache().getKeys(), null);
+        for (Map.Entry<String, CdmBase> entry : elementsMap.entrySet()) {
+            entities.add(entry.getValue());
+        }
+        return entities;
+    }
+
+    public boolean exists(CdmEntityCacheKey key) {
+        return (getCacheElement(key) != null);
+    }
+
+    public boolean existsAndIsNotNull(CdmEntityCacheKey id) {
+        return getFromCache(id) != null;
+    }
+
+    public void clear() {
+        cache.removeAll();
+    }
+
+    public void dispose() {
+        CacheManager.create().removeCache(cache.getName());
+        cache.dispose();
+
+    }
+
+
+    public static CdmEntityCacheKey generateKey(Class<? extends CdmBase> clazz, int id) {
+        return new CdmEntityCacheKey(clazz, id);
+    }
+
+
+    public static CdmEntityCacheKey generateKey(CdmBase cdmBase) {
+        Class<? extends CdmBase> entityClass = cdmBase.getClass();
+        int id = cdmBase.getId();
+        return new CdmEntityCacheKey(entityClass, id);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.model.ICdmCacher#load(eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public CdmBase load(CdmBase cdmEntity) {
+        return load(cdmEntity, true);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.model.ICdmCacher#isCachable(eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public boolean isCachable(CdmBase cdmEntity) {
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.model.ICdmCacher#exists(eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public boolean exists(CdmBase cdmBase) {
+        return exists(generateKey(cdmBase));
+    }
+
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/EntityCacherDebugResult.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/EntityCacherDebugResult.java
new file mode 100644 (file)
index 0000000..7319529
--- /dev/null
@@ -0,0 +1,539 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.remoting.cache;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.Element;
+
+import org.apache.log4j.Logger;
+import org.hibernate.collection.spi.PersistentCollection;
+import org.hibernate.proxy.HibernateProxy;
+import org.hibernate.proxy.LazyInitializer;
+import org.springframework.util.ReflectionUtils;
+
+import eu.etaxonomy.cdm.api.cache.CdmCacher;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+/**
+ * @author cmathew
+ * @date 9 Feb 2015
+ *
+ */
+public class EntityCacherDebugResult {
+
+    private static final Logger logger = Logger.getLogger(EntityCacherDebugResult.class);
+
+    private Map<CdmEntityInfo, CdmEntityInfo> duplicateCdmEntityMap;
+
+    private List<CdmEntityInfo> notInCacheList;
+
+    private CdmTransientEntityCacher cacher;
+
+    private List<CdmEntityInfo> rootElements;
+
+    StringBuilder debugOutput = new StringBuilder();
+
+    public EntityCacherDebugResult() {
+    }
+
+
+    public <T extends CdmBase> EntityCacherDebugResult(CdmTransientEntityCacher cacher, Collection<T> rootEntities) {
+        this.cacher = cacher;
+        init();
+
+        if(rootEntities != null && !rootEntities.isEmpty()) {
+            for(CdmBase rootEntity : rootEntities) {
+                debug(rootEntity, true);
+                String out = toString(duplicateCdmEntityMap, notInCacheList, rootEntity);
+                System.out.println(out);
+                debugOutput.append(out);
+                clear();
+            }
+
+        }
+    }
+
+    private void init() {
+        duplicateCdmEntityMap = new HashMap<CdmEntityInfo, CdmEntityInfo>();
+        notInCacheList = new ArrayList<CdmEntityInfo>();
+        rootElements = new ArrayList<CdmEntityInfo>();
+    }
+
+    private void clear() {
+        duplicateCdmEntityMap.clear();
+        notInCacheList.clear();
+    }
+
+    public void addDuplicateEntity(CdmEntityInfo cei, CdmEntityInfo cachedCei) {
+        duplicateCdmEntityMap.put(cei, cachedCei);
+    }
+
+    public void addEntityNotInCache(CdmEntityInfo cei) {
+        notInCacheList.add(cei);
+    }
+
+    public List<CdmEntityInfo> getRootElements() {
+        return rootElements;
+    }
+
+    private void print(Map<CdmEntityInfo, CdmEntityInfo> duplicateCdmEntityMap,
+            List<CdmEntityInfo> notInCacheList,
+            CdmBase rootEntity) {
+        System.out.println(toString(duplicateCdmEntityMap, notInCacheList, rootEntity));
+    }
+
+
+    @Override
+    public String toString() {
+        return debugOutput.toString();
+    }
+
+    private String toString(Map<CdmEntityInfo, CdmEntityInfo> duplicateCdmEntityMap,
+            List<CdmEntityInfo> notInCacheList,
+            CdmBase rootEntity) {
+
+
+        StringBuilder sb = new StringBuilder();
+        sb.append(System.getProperty("line.separator"));
+        sb.append("<<< Root Entity " + rootEntity.getUserFriendlyTypeName() + " with id " + rootEntity.getId() + " >>>");
+        sb.append(System.getProperty("line.separator"));
+        if(duplicateCdmEntityMap.isEmpty()) {
+            sb.append("No Duplicate CDM Entities.");
+        } else {
+            sb.append("Duplicate CDM Entities,");
+
+            for (Map.Entry<CdmEntityInfo, CdmEntityInfo> entry : duplicateCdmEntityMap.entrySet())
+            {
+                sb.append(System.getProperty("line.separator"));
+                CdmEntityInfo cei = entry.getKey();
+                CdmBase cb = (CdmBase) cei.getObject();
+
+                sb.append(" - " + cei.getField().getName() + ":" + cb.getUserFriendlyTypeName() + "/" + cb.getId());
+                if(cei.getParent() != null) {
+                    Object cbParent = cei.getParent().getObject();
+                    sb.append("     in entity " + cbParent.getClass().getCanonicalName());
+                    if(cbParent instanceof CdmBase) {
+
+                        sb.append(" with id : " + ((CdmBase)cbParent).getId());
+                    }
+                }
+                sb.append(System.getProperty("line.separator"));
+                sb.append("  -- entity belongs to cache(s) : " + getCachesContainingEntity(cb));
+                sb.append(System.getProperty("line.separator"));
+
+
+                CdmEntityInfo dupCei = entry.getValue();
+                CdmBase dupCb = (CdmBase) dupCei.getObject();
+
+                String dupCeiFieldName = "";
+                if(dupCei.getField() != null) {
+                    dupCeiFieldName = dupCei.getField().getName();
+                }
+                sb.append(" - " + dupCeiFieldName + ":" + dupCb.getUserFriendlyTypeName() + "/" + dupCb.getId());
+                if(dupCei.getParent() != null) {
+                    Object dupCbParent = dupCei.getParent().getObject();
+                    sb.append("      in entity " + dupCbParent.getClass().getCanonicalName());
+                    if(dupCbParent instanceof CdmBase) {
+                        sb.append(" with id : " + ((CdmBase)dupCbParent).getId());
+                    }
+                }
+                sb.append(System.getProperty("line.separator"));
+                sb.append("  -- entity belongs to cache(s) : " + getCachesContainingEntity(dupCb));
+                sb.append(System.getProperty("line.separator"));
+                sb.append("-----------");
+            }
+        }
+
+        sb.append(System.getProperty("line.separator"));
+        sb.append(System.getProperty("line.separator"));
+
+        if(notInCacheList.isEmpty()) {
+            sb.append("No Entities found which are not in Cache.");
+        } else {
+            sb.append("Not In Cache Entities,");
+
+            for(CdmEntityInfo cei : notInCacheList) {
+                CdmBase cb = (CdmBase) cei.getObject();
+                Object cbParent = cei.getParent().getObject();
+
+                sb.append(System.getProperty("line.separator"));
+
+                String fieldName = "";
+                if(cei.getField() != null) {
+                    fieldName = cei.getField().getName();
+                }
+                sb.append(" - "  + fieldName + ":" + cb.getUserFriendlyTypeName() + "/" + cb.getId());
+
+                if(cbParent instanceof CdmBase) {
+                    sb.append(" of entity " + ((CdmBase)cbParent).getUserFriendlyTypeName());
+                } else {
+                    sb.append(" of entity " + cbParent.getClass().getName());
+                }
+            }
+        }
+        sb.append(System.getProperty("line.separator"));
+        return sb.toString();
+    }
+
+    private String getCachesContainingEntity(CdmBase cdmEntity) {
+        Cache defaultCache = CacheManager.create().getCache(CdmCacher.DEFAULT_CACHE_NAME);
+        String caches = "";
+        Element dce = defaultCache.get(cdmEntity.getUuid());
+        if(dce != null && dce.getObjectValue() == cdmEntity) {
+            caches = "{DC}";
+        }
+
+        Object cte = cacher.getFromCache(CdmTransientEntityCacher.generateKey(cdmEntity));
+        if(cte != null && cte == cdmEntity) {
+            caches += "{TC}";
+        }
+        return caches;
+    }
+
+
+    private void debug(CdmBase cdmEntity, boolean recursive) {
+        if(cdmEntity == null) {
+            return;
+        }
+        logger.info("---- starting recursive debug for cdm entity " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId());
+        List<CdmEntityInfo> alreadyVisitedEntities = new ArrayList<CdmEntityInfo>();
+        CdmEntityInfo cei = new CdmEntityInfo(ProxyUtils.deproxy(cdmEntity));
+        debugRecursive(cdmEntity, alreadyVisitedEntities, cei);
+        rootElements.add(cei);
+        alreadyVisitedEntities.clear();
+        logger.info("---- ending recursive debug for cdm entity " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId() + "\n");
+    }
+
+    private <T extends Object> void debugRecursive(T obj,
+            List<CdmEntityInfo> alreadyVisitedEntities,
+            CdmEntityInfo cei) {
+        if(obj == null) {
+            return;
+        }
+        if(obj instanceof CdmBase) {
+            debugRecursive((CdmBase)obj, alreadyVisitedEntities, cei);
+        } else if (obj instanceof Map) {
+            debug((Map<T,T>)obj, alreadyVisitedEntities, cei);
+        } else if (obj instanceof Collection) {
+            debug((Collection<T>)obj, alreadyVisitedEntities, cei);
+        }
+
+        logger.info("No caching yet for type " + obj.getClass().getName());
+
+
+    }
+
+    private <T extends Object> void debug(Map<T,T> map,
+            List<CdmEntityInfo> alreadyVisitedEntities,
+            CdmEntityInfo cei) {
+        if(map == null || map.isEmpty()) {
+            return;
+        }
+
+        int originalMapSize = map.size();
+
+        Iterator<Map.Entry<T,T>> iter = map.entrySet().iterator();
+        int i=0;
+        while ( iter.hasNext() ) {
+            Map.Entry<T,T> e = iter.next();
+            CdmEntityInfo childCei = new CdmEntityInfo(e);
+            cei.addChild(childCei);
+
+            CdmEntityInfo keyCei = new CdmEntityInfo(ProxyUtils.deproxy(e.getKey()));
+            childCei.addChild(keyCei);
+            CdmEntityInfo valueCei = new CdmEntityInfo(ProxyUtils.deproxy(e.getValue()));
+            childCei.addChild(valueCei);
+
+            debugRecursive(e.getKey(), alreadyVisitedEntities, keyCei);
+            debugRecursive(e.getValue(), alreadyVisitedEntities, valueCei);
+        }
+    }
+
+    private <T extends Object> void debug(Collection<T> collection,
+            List<CdmEntityInfo> alreadyVisitedEntities,
+            CdmEntityInfo cei) {
+        int length = collection.size();
+        Object[] result = new Object[length];
+        Iterator<T> collectionItr = collection.iterator();
+
+        while(collectionItr.hasNext()) {
+            Object obj = collectionItr.next();
+            CdmEntityInfo childCei = new CdmEntityInfo(ProxyUtils.deproxy(obj));
+            cei.addChild(childCei);
+            debugRecursive(obj, alreadyVisitedEntities, childCei);
+
+        }
+
+    }
+
+    private void debugRecursive(CdmBase cdmEntity,
+            List<CdmEntityInfo> alreadyVisitedEntities,
+            CdmEntityInfo cei) {
+
+        CdmBase cachedCdmEntityInSubGraph = null;
+
+        if(cei.getObject() instanceof CdmBase) {
+           CdmBase cb =  (CdmBase)cei.getObject();
+           cachedCdmEntityInSubGraph = cacher.getFromCache(cb);
+           if(cachedCdmEntityInSubGraph != cb) {
+               // found a cdm entity which is not in cache - need to record this
+               //logger.info("  - found entity not in cache " + fieldName + "' in object of type " + clazz.getName() + " with id " + cdmEntity.getId());
+               addEntityNotInCache(cei);
+           }
+        }
+
+
+        // we want to recursive through the cdmEntity (and not the cachedCdmEntity)
+        // since there could be new or deleted objects in the cdmEntity sub-graph
+
+        // start by getting the fields from the cdm entity
+        String className = cdmEntity.getClass().getName();
+        CdmModelFieldPropertyFromClass cmgmfc = cacher.getFromCdmlibModelCache(className);
+        if(cmgmfc != null) {
+            alreadyVisitedEntities.add(cei);
+            List<String> fields = cmgmfc.getFields();
+            for(String field : fields) {
+                // retrieve the actual object corresponding to the field.
+                // this object will be either a CdmBase or a Collection / Map
+                // with CdmBase as the generic type
+                String f = field;
+                CdmEntityInfo childCei = getDebugCdmBaseTypeFieldValue(cdmEntity, field, alreadyVisitedEntities, cei);
+                if(!childCei.isProxy()) {
+                    Object object = childCei.getObject();
+                    if(object != null && object instanceof CdmBase) {
+                        CdmBase cdmEntityInSubGraph = (CdmBase)object;
+                        if(!containsIdenticalCdmEntity(alreadyVisitedEntities, cdmEntityInSubGraph)) {
+                            logger.info("recursive debugging object of type " + cdmEntityInSubGraph.getClass().getName() + " with id " + cdmEntityInSubGraph.getId());
+                            debugRecursive(cdmEntityInSubGraph, alreadyVisitedEntities, childCei);
+                        } else {
+                            logger.info("object of type " + cdmEntityInSubGraph.getClass().getName() + " with id " + cdmEntityInSubGraph.getId() + " already visited");
+                        }
+                    }
+                }
+            }
+        } else {
+            throw new CdmClientCacheException("CdmEntity with class " + cdmEntity.getClass().getName() + " is not found in the cdmlib model cache. " +
+                    "The cache may be corrupted or not in sync with the latest model version" );
+        }
+
+    }
+
+
+    private CdmEntityInfo getDebugCdmBaseTypeFieldValue(CdmBase cdmEntity,
+            String fieldName,
+            List<CdmEntityInfo> alreadyVisitedEntities,
+            CdmEntityInfo cei) {
+
+        CdmEntityInfo childCei = null;
+        Class<?> clazz = cdmEntity.getClass();
+        try {
+            // this call will search in the provided class as well as
+            // the super classes until it finds the field
+            Field field = ReflectionUtils.findField(clazz, fieldName);
+
+            if(field == null) {
+                throw new CdmClientCacheException("Field '" + fieldName
+                        + "' not found when searching in class '" + clazz.getName() + "' and its supercalsses");
+            }
+            field.setAccessible(true);
+            Object o = field.get(cdmEntity);
+            o = ProxyUtils.deproxy(o);
+            CdmBase cdmEntityInSubGraph = null;
+
+            boolean isHibernateProxy = false;
+            boolean isPersistentCollection = false;
+
+            childCei = new CdmEntityInfo(o);
+            cei.addChild(childCei);
+            childCei.setField(field);
+
+            if(o != null) {
+                boolean isProxy = ProxyUtils.isProxy(o);
+
+                childCei.setProxy(isProxy);
+                if(!isProxy) {
+                    childCei.setObject(o);
+                    if(CdmBase.class.isAssignableFrom(o.getClass())) {
+                        logger.info("found initialised cdm entity '" + fieldName + "' in object of type " + clazz.getName() + " with id " + cdmEntity.getId());
+                        cdmEntityInSubGraph  = (CdmBase)o;
+
+                        //logger.info("  - found duplicate entity at " + fieldName + "' in object of type " + clazz.getName() + " with id " + cdmEntity.getId());
+                        CdmEntityInfo dupCei = getDuplicate(alreadyVisitedEntities, cdmEntityInSubGraph);
+                        if(dupCei != null) {
+                            addDuplicateEntity(childCei, dupCei);
+                        }
+
+                    } else if(o instanceof Map) {
+                        debugRecursive((Map)o, alreadyVisitedEntities, childCei);
+                    } else if(o instanceof Collection) {
+                        debugRecursive((Collection)o, alreadyVisitedEntities, childCei);
+                    }
+
+                }
+            }
+            // we return the original cdm entity in the sub graph because we
+            // want to continue to recurse on the input cdm entity graph
+            // and not the one in the cache
+
+            return childCei;
+        } catch (SecurityException e) {
+            throw new CdmClientCacheException(e);
+        } catch (IllegalArgumentException e) {
+            throw new CdmClientCacheException(e);
+        } catch (IllegalAccessException e) {
+            throw new CdmClientCacheException(e);
+        }
+    }
+
+
+    private CdmEntityInfo getDuplicate(List<CdmEntityInfo> alreadyVisitedEntities, Object objectToCompare) {
+        if(objectToCompare != null ) {
+            for(CdmEntityInfo cei: alreadyVisitedEntities) {
+                if(objectToCompare.equals(cei.getObject()) && objectToCompare != cei.getObject()) {
+                    return cei;
+                }
+            }
+        }
+        return null;
+    }
+
+    private boolean containsIdenticalCdmEntity(List<CdmEntityInfo> ceiSet, Object objectToCompare) {
+        boolean foundIdentical = false;
+        if(objectToCompare != null) {
+            for(CdmEntityInfo cei : ceiSet) {
+                if(cei.getObject() == objectToCompare) {
+                    foundIdentical = true;
+                } else if(objectToCompare.equals(cei.getObject())) {
+                    return false;
+                }
+            }
+        }
+        return foundIdentical;
+    }
+
+    public class CdmEntityInfo {
+
+        private Object object;
+        private CdmEntityInfo parent;
+        private List<CdmEntityInfo> children;
+        private Field field;
+        private String label;
+        private boolean isProxy;
+
+        public CdmEntityInfo(Object object) {
+            this.object = object;
+            isProxy = false;
+            children = new ArrayList<CdmEntityInfo>();
+        }
+
+        public CdmEntityInfo getParent() {
+            return parent;
+        }
+
+        public void setParent(CdmEntityInfo parent) {
+            this.parent = parent;
+        }
+
+        public List<CdmEntityInfo> getChildren() {
+            return children;
+        }
+
+        public void setChildren(List<CdmEntityInfo> children) {
+            this.children = children;
+        }
+
+        public void addChild(CdmEntityInfo cei) {
+            this.children.add(cei);
+            cei.setParent(this);
+        }
+
+        public Field getField() {
+            return field;
+        }
+
+        public void setField(Field field) {
+            this.field = field;
+        }
+
+
+        public String getLabel() {
+            String label;
+            String fieldName = "";
+            if(field != null) {
+                fieldName = field.getName();
+            }
+
+            if(object != null) {
+                String className = object.getClass().getName();
+                if(object instanceof HibernateProxy) {
+                    LazyInitializer hli = ((HibernateProxy)object).getHibernateLazyInitializer();
+                    if(hli.isUninitialized()) {
+                        className = "HibernateProxy";
+                    } else {
+                        className = "InitialisedHibernateProxy";
+                    }
+                    label = "[" + className + "] " + fieldName;
+                } else if(object instanceof PersistentCollection) {
+                    PersistentCollection pc = ((PersistentCollection)object);
+                    if(!pc.wasInitialized()) {
+                        className = "PersistentCollection";
+                    } else {
+                        className = "InitialisedPersistentCollection";
+                    }
+                    label = "[" + className + "] " + fieldName;
+                } else if(object instanceof Collection) {
+                    label = "[" + className + "] " + fieldName + " : " + String.valueOf(((Collection)object).size());
+                } else if(object instanceof Map) {
+                    label = "[" + className + "] " + fieldName + " : " + String.valueOf(((Map)object).size());
+                } else if(object instanceof CdmBase) {
+                    label = getCachesContainingEntity((CdmBase)object) +  "[" + className + ",id" + ((CdmBase)object).getId() + "] " + fieldName + " : " + object.toString();
+                } else {
+                    label = "[" + className + "] " + fieldName + " : " + object.toString();
+                }
+            } else {
+                label = "[NULL] " + fieldName;
+            }
+            return label;
+        }
+
+        public void setLabel(String label) {
+            this.label = label;
+        }
+
+        public Object getObject() {
+            return object;
+        }
+
+        public void setObject(Object object) {
+            this.object = object;
+        }
+
+        public boolean isProxy() {
+            return isProxy;
+        }
+
+        public void setProxy(boolean isProxy) {
+            this.isProxy = isProxy;
+        }
+
+
+
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/ProxyUtils.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/ProxyUtils.java
new file mode 100644 (file)
index 0000000..ceca3e9
--- /dev/null
@@ -0,0 +1,221 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.remoting.cache;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import org.hibernate.collection.internal.PersistentBag;
+import org.hibernate.collection.internal.PersistentList;
+import org.hibernate.collection.internal.PersistentMap;
+import org.hibernate.collection.internal.PersistentSet;
+import org.hibernate.collection.internal.PersistentSortedMap;
+import org.hibernate.collection.internal.PersistentSortedSet;
+import org.hibernate.collection.spi.PersistentCollection;
+import org.hibernate.proxy.HibernateProxy;
+import org.hibernate.proxy.LazyInitializer;
+import org.springframework.util.ReflectionUtils;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.PersistentMultiLanguageText;
+import eu.etaxonomy.taxeditor.remoting.CdmRemotingException;
+
+/**
+ * @author cmathew
+ * @date 17 Feb 2015
+ *
+ */
+public class ProxyUtils {
+
+
+
+    public static enum CollectionType {
+        SET,
+        LIST,
+        MAP;
+
+        @Override
+        public String toString() {
+            return this.name().toLowerCase();
+        }
+    }
+
+    public static Object getCollectionType(Object obj) {
+        if(obj != null) {
+            if(obj instanceof List) {
+                return CollectionType.LIST;
+            }
+            if(obj instanceof Set) {
+                return CollectionType.SET;
+            }
+            if(obj instanceof Map) {
+                return CollectionType.MAP;
+            }
+            throw new CdmRemotingException("Cannot get Collection Type for " + obj.getClass().getName());
+        }
+        return null;
+    }
+
+    public static Object getObject(PersistentCollection pc) {
+        if(pc != null) {
+            if(pc instanceof PersistentSet) {
+                return new HashSet((Set)pc);
+            }
+            if(pc instanceof PersistentSortedSet) {
+                return new TreeSet((Set)pc);
+            }
+            if(pc instanceof PersistentList || pc instanceof PersistentBag) {
+                return new ArrayList((List)pc);
+            }
+            if(pc instanceof PersistentMap || pc instanceof PersistentMultiLanguageText) {
+                return new HashMap((Map)pc);
+            }
+            if(pc instanceof PersistentSortedMap) {
+                return new TreeMap((Map)pc);
+            }
+            throw new CdmRemotingException("Cannot get Collection field for type " + pc.getClass().getName());
+        }
+        return null;
+    }
+
+    public static CollectionField getCollectionField(PersistentCollection pc) {
+        if(pc != null) {
+            if(pc instanceof PersistentSet) {
+                return new CollectionField(new HashSet((Set)pc), CollectionType.SET);
+            }
+            if(pc instanceof PersistentSortedSet) {
+                return new CollectionField(new TreeSet((Set)pc), CollectionType.SET);
+            }
+            if(pc instanceof PersistentList) {
+                return new CollectionField(new ArrayList((List)pc), CollectionType.LIST);
+            }
+            if(pc instanceof PersistentMap || pc instanceof PersistentMultiLanguageText) {
+                return new CollectionField(new HashMap((Map)pc), CollectionType.MAP);
+            }
+            if(pc instanceof PersistentSortedMap) {
+                return new CollectionField(new TreeMap((Map)pc), CollectionType.MAP);
+            }
+            throw new CdmRemotingException("Cannot get Collection field for type " + pc.getClass().getName());
+        }
+        return null;
+    }
+
+    public static class CollectionField {
+        private final Object col;
+        private final CollectionType type;
+        public CollectionField(Object col, CollectionType type) {
+            this.col = col;
+            this.type = type;
+        }
+
+        public Object getCollection() {
+            return this.col;
+        }
+
+        public CollectionType getType() {
+            return this.type;
+        }
+    }
+
+
+    public static Object deproxy(Object o) {
+        if(o != null && o instanceof HibernateProxy) {
+            LazyInitializer hli = ((HibernateProxy)o).getHibernateLazyInitializer();
+            if(!hli.isUninitialized()) {
+                return hli.getImplementation();
+
+            }
+        }
+
+        if(o != null && o instanceof PersistentCollection) {
+            PersistentCollection pc = ((PersistentCollection)o);
+            if(pc.wasInitialized()) {
+                return  ProxyUtils.getObject(pc);
+
+            }
+        }
+        return o;
+    }
+
+    public static boolean isProxy(Object o) {
+        if(o != null && o instanceof HibernateProxy) {
+            LazyInitializer hli = ((HibernateProxy)o).getHibernateLazyInitializer();
+            if(hli.isUninitialized()) {
+                return true;
+            }
+        }
+
+        if(o != null && o instanceof PersistentCollection) {
+            PersistentCollection pc = ((PersistentCollection)o);
+            if(!pc.wasInitialized()) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    public static Object remoteLoadPersistentCollectionIfProxy(Object o, UUID ownerUuid, String fieldName) throws ClassNotFoundException {
+        if(o != null && o instanceof HibernateProxy) {
+            LazyInitializer hli = ((HibernateProxy)o).getHibernateLazyInitializer();
+            if(hli.isUninitialized()) {
+                return CdmApplicationState.getCachedCommonService().find((Class<CdmBase>)Class.forName(hli.getEntityName()),
+                        ((Integer)hli.getIdentifier()).intValue());
+            }
+        }
+
+        if(o != null && o instanceof PersistentCollection) {
+            PersistentCollection pc = ((PersistentCollection)o);
+            if(!pc.wasInitialized()) {
+                return CdmApplicationState.getCachedCommonService().initializeCollection(ownerUuid, fieldName);
+            }
+        }
+
+        return o;
+    }
+
+
+
+
+    public static void setRoleValueInOwner(Object owner, String role, Object value) {
+        if(role == null || role.isEmpty()) {
+            throw new CdmRemotingException("Role cannot be null or an empty string");
+        }
+
+        String fieldName = role.substring(role.lastIndexOf(".") + 1);
+
+        Field field = ReflectionUtils.findField(owner.getClass(), fieldName);
+
+        if(field == null) {
+            throw new CdmRemotingException("Field '" + fieldName
+                    + "' not found when searching in class '" + owner.getClass() + "' and its supercalsses");
+        }
+
+        field.setAccessible(true);
+
+        try {
+            field.set(owner, value);
+        } catch (IllegalArgumentException e) {
+            throw new CdmRemotingException(e);
+        } catch (IllegalAccessException e) {
+            throw new CdmRemotingException(e);
+        }
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/server/CDMServerException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/server/CDMServerException.java
new file mode 100644 (file)
index 0000000..33cd998
--- /dev/null
@@ -0,0 +1,31 @@
+// $Id$
+/**
+* Copyright (C) 2014 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.remoting.server;
+
+/**
+ * @author cmathew
+ * @date 23 Sep 2014
+ *
+ */
+public class CDMServerException extends Exception {
+
+    public CDMServerException(String message) {
+        super(message);
+    }
+
+    public CDMServerException(Exception e) {
+        super(e);
+    }
+
+    public CDMServerException(String message,Exception e) {
+        super(message,e);
+    }
+
+}
similarity index 89%
rename from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmPersistentRemoteSource.java
rename to eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmPersistentRemoteSource.java
index a6cd14cd2e1d2d16e6787d30e5f3d2617752dd2b..d8edcbf5f679afe52f0b571c8c0bb744a78b4559 100644 (file)
@@ -1,13 +1,13 @@
 /**
 * Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.cdm.remote;
+package eu.etaxonomy.taxeditor.remoting.source;
 
 import static eu.etaxonomy.cdm.common.XmlHelp.getBeansRoot;
 import static eu.etaxonomy.cdm.common.XmlHelp.insertXmlBean;
@@ -27,15 +27,8 @@ import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.common.XmlHelp;
 import eu.etaxonomy.cdm.config.CdmPersistentSourceUtils;
 import eu.etaxonomy.cdm.config.CdmPersistentXMLSource;
-import eu.etaxonomy.cdm.config.CdmSourceException;
-import eu.etaxonomy.cdm.config.ICdmPersistentSource;
 import eu.etaxonomy.cdm.config.CdmPersistentXMLSource.CdmSourceProperties;
-import eu.etaxonomy.cdm.database.CdmDataSource;
-import eu.etaxonomy.cdm.database.CdmPersistentDataSource;
-import eu.etaxonomy.cdm.database.DataSourceNotFoundException;
-import eu.etaxonomy.cdm.database.DatabaseTypeEnum;
-import eu.etaxonomy.cdm.database.ICdmDataSource;
-import eu.etaxonomy.cdm.database.types.IDatabaseType;
+import eu.etaxonomy.cdm.config.ICdmPersistentSource;
 import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
 
 /**
@@ -44,22 +37,22 @@ import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
  */
 public class CdmPersistentRemoteSource extends CdmRemoteSourceBase implements ICdmPersistentSource{
        private static final Logger logger = Logger.getLogger(CdmPersistentRemoteSource.class);
-       
+
        public static final String REMOTESOURCE_BEAN_POSTFIX = "RemoteSource";
        private String beanName;
        private Properties cdmSourceProperties;
        private List<Attribute> cdmSourceAttributes;
-       
+
        /**
         * Creates a new instance of CdmPersistentRemoteSource
-        * 
+        *
         * @param name
         * @param server
         * @param port
         * @param contextPath
         * @param nomenclaturalCode
         * @return
-        * @throws CdmRemoteSourceException 
+        * @throws CdmRemoteSourceException
         */
        public static CdmPersistentRemoteSource NewInstance(String remoteSource) throws CdmRemoteSourceException {
                if(exists(remoteSource)) {
@@ -67,49 +60,49 @@ public class CdmPersistentRemoteSource extends CdmRemoteSourceBase implements IC
                } else {
                        throw new CdmRemoteSourceException("Remote source '" + remoteSource + "' does not exist in sources setting file");
                }
-               
+
        }
-       
+
        /**S
         * Creates a new CdmPersistentRemoteSource
-        * 
+        *
         * @param name
         * @param server
         * @param port
         * @param contextPath
         * @param nomenclaturalCode
-        * @throws CdmRemoteSourceException 
+        * @throws CdmRemoteSourceException
         */
-       private CdmPersistentRemoteSource(String remoteSource) throws CdmRemoteSourceException { 
-               
+       private CdmPersistentRemoteSource(String remoteSource) throws CdmRemoteSourceException {
+
                CdmPersistentXMLSource cdmPersistentXMLSource = CdmPersistentXMLSource.NewInstance(remoteSource, REMOTESOURCE_BEAN_POSTFIX);
                if(cdmPersistentXMLSource.getElement() != null) {
                        beanName = cdmPersistentXMLSource.getBeanName();
-                       // properties from the persistent xml file 
+                       // properties from the persistent xml file
                        cdmSourceProperties = cdmPersistentXMLSource.getCdmSourceProperties();
                        cdmSourceAttributes = cdmPersistentXMLSource.getCdmSourceAttributes();
                        checkProperties(cdmSourceProperties);
                } else {
                        throw new CdmRemoteSourceException("Remote source '" + remoteSource + "' does not exist in settings file");
-               }               
+               }
                initDatabaseConnection();
        }
-       
+
        private static void checkProperties(Properties cdmSourceProperties) throws CdmRemoteSourceException {
                if(!cdmSourceProperties.containsKey(CdmSourceProperties.SERVER.toString())) {
-                       throw new CdmRemoteSourceException("Could not initialise remote source. Required property '" + CdmSourceProperties.SERVER.toString() + "' is missing");                 
+                       throw new CdmRemoteSourceException("Could not initialise remote source. Required property '" + CdmSourceProperties.SERVER.toString() + "' is missing");
                }
                String port = (String)cdmSourceProperties.get(CdmSourceProperties.PORT.toString());
                if(port == null || port.isEmpty()) {
-                       throw new CdmRemoteSourceException("Could not initialise remote source. Required property '" + CdmSourceProperties.SERVER.toString() + "' is missing");                 
-               }       
+                       throw new CdmRemoteSourceException("Could not initialise remote source. Required property '" + CdmSourceProperties.SERVER.toString() + "' is missing");
+               }
                if(!cdmSourceProperties.containsKey(CdmSourceProperties.CONTEXTPATH.toString())) {
-                       throw new CdmRemoteSourceException("Could not initialise remote source. Required property '" + CdmSourceProperties.SERVER.toString() + "' is missing");                 
-               }       
+                       throw new CdmRemoteSourceException("Could not initialise remote source. Required property '" + CdmSourceProperties.SERVER.toString() + "' is missing");
+               }
                // default NomenclaturalCode is always ICNAFP
-               if(!cdmSourceProperties.containsKey(CdmSourceProperties.NOMENCLATURAL_CODE.toString())) {                               
+               if(!cdmSourceProperties.containsKey(CdmSourceProperties.NOMENCLATURAL_CODE.toString())) {
                        cdmSourceProperties.put(CdmSourceProperties.NOMENCLATURAL_CODE.toString(), NomenclaturalCode.ICNAFP.name());
-               }                       
+               }
        }
 
        /* (non-Javadoc)
@@ -119,12 +112,12 @@ public class CdmPersistentRemoteSource extends CdmRemoteSourceBase implements IC
        public String getBeanName() {
                return beanName;
        }
-       
+
        @Override
        public String getServer() {
                return cdmSourceProperties.getProperty(CdmSourceProperties.SERVER.toString());
        }
-       
+
        @Override
        public int getPort() {
                String port = CdmUtils.Nz(cdmSourceProperties.getProperty(CdmSourceProperties.PORT.toString()));
@@ -135,17 +128,17 @@ public class CdmPersistentRemoteSource extends CdmRemoteSourceBase implements IC
                        return Integer.valueOf(port);
                }
        }
-       
+
        @Override
        public String getContextPath() {
                return cdmSourceProperties.getProperty(CdmSourceProperties.CONTEXTPATH.toString());
        }
-       
+
        @Override
        public NomenclaturalCode getNomenclaturalCode() {
                return NomenclaturalCode.fromString(cdmSourceProperties.getProperty(CdmSourceProperties.NOMENCLATURAL_CODE.toString()));
        }
-       
+
        public static CdmPersistentRemoteSource save(String strRemoteSourceName, ICdmRemoteSource remoteSource) throws CdmRemoteSourceException {
                Properties cdmSourceProperties = new Properties();
                cdmSourceProperties.put(CdmSourceProperties.SERVER.toString(), remoteSource.getServer());
@@ -155,7 +148,7 @@ public class CdmPersistentRemoteSource extends CdmRemoteSourceBase implements IC
                checkProperties(cdmSourceProperties);
                return save(strRemoteSourceName, cdmSourceProperties);
        }
-       
+
        private static CdmPersistentRemoteSource save(String strRemoteSourceName,Properties cdmSourceProperties) throws CdmRemoteSourceException {
 
                //root
@@ -180,19 +173,19 @@ public class CdmPersistentRemoteSource extends CdmRemoteSourceBase implements IC
                }
 
                //save
-               saveToXml(root.getDocument(), 
-                               CdmPersistentSourceUtils.getResourceDirectory(), 
-                               CdmPersistentXMLSource.CDMSOURCE_FILE_NAME, 
+               saveToXml(root.getDocument(),
+                               CdmPersistentSourceUtils.getResourceDirectory(),
+                               CdmPersistentXMLSource.CDMSOURCE_FILE_NAME,
                                XmlHelp.prettyFormat );
 
                return NewInstance(strRemoteSourceName) ;
 
        }
-       
+
        /**
         * @param strDataSourceName
         * @param dataSource
-        * @param code 
+        * @param code
         * @return
         *                      the updated dataSource, null if not succesful
         */
@@ -201,7 +194,7 @@ public class CdmPersistentRemoteSource extends CdmRemoteSourceBase implements IC
                CdmPersistentSourceUtils.delete(CdmPersistentSourceUtils.getBeanName(strRemoteSourceName,REMOTESOURCE_BEAN_POSTFIX));
                return save(strRemoteSourceName, remoteSource);
        }
-       
+
        /**
         * Tests existing of the datsource in the according config  file.
         * @return true if a datasource with the given name exists in the according datasource config file.
@@ -210,22 +203,22 @@ public class CdmPersistentRemoteSource extends CdmRemoteSourceBase implements IC
                Element bean = CdmPersistentSourceUtils.getCdmSourceBeanXml(strRemoteSourceName, REMOTESOURCE_BEAN_POSTFIX);
                return (bean != null);
        }
-       
+
        /**
         * Returns a list of all datasources stored in the datasource config file
         * @return all existing data sources
-        * @throws CdmRemoteSourceException 
+        * @throws CdmRemoteSourceException
         */
        @SuppressWarnings("unchecked")
        static public List<CdmPersistentRemoteSource> getAllRemoteSources() throws CdmRemoteSourceException{
                List<CdmPersistentRemoteSource> remoteSources = new ArrayList<CdmPersistentRemoteSource>();
-               
+
                Element root = getBeansRoot(CdmPersistentSourceUtils.getCdmSourceInputStream());
                if (root == null){
                        return null;
                }else{
                List<Element> lsChildren  = root.getChildren("bean", root.getNamespace());
-               
+
                for (Element elBean : lsChildren){
                        String strId = elBean.getAttributeValue("id");
                        if (strId != null && strId.endsWith(REMOTESOURCE_BEAN_POSTFIX)){
@@ -236,7 +229,7 @@ public class CdmPersistentRemoteSource extends CdmRemoteSourceBase implements IC
                }
                return remoteSources;
        }
-       
+
        @Override
        public String toString(){
                if (getName() != null){
similarity index 96%
rename from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSource.java
rename to eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSource.java
index 9dbb34b3abf2d0cad71d8a22736c473603d8e9e2..473cdca0f4d50494ecaf501320df57c353492de8 100644 (file)
@@ -6,7 +6,7 @@
 * 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.cdm.remote;
+package eu.etaxonomy.taxeditor.remoting.source;
 
 import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
 
similarity index 77%
rename from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceBase.java
rename to eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSourceBase.java
index d24baa6ee8717126a7696dcb04f4c10a7f1ad271..1e1556f6dab7262b8e8cf8a5456b015283a1ba5a 100644 (file)
@@ -1,26 +1,25 @@
 /**
 * Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
-package eu.etaxonomy.cdm.remote;
+package eu.etaxonomy.taxeditor.remoting.source;
 
 import java.util.Map;
 
 import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean;
 
-import eu.etaxonomy.cdm.api.service.IDatabaseService;
+import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.config.CdmSource;
 import eu.etaxonomy.cdm.config.CdmSourceException;
-import eu.etaxonomy.cdm.database.DatabaseTypeEnum;
 import eu.etaxonomy.cdm.model.metadata.CdmMetaData.MetaDataPropertyName;
 import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
 
 /**
- * Base class representing a CDM remote source. 
+ * Base class representing a CDM remote source.
  * This class handles all the configuration relating to the remoting aspect of
  * a CDM source.
  *
@@ -34,12 +33,12 @@ public class CdmRemoteSourceBase extends CdmSource implements ICdmRemoteSource {
        protected static final NomenclaturalCode DEFAULT_NOMENCLATURAL_CODE = NomenclaturalCode.ICNAFP;
        private String contextPath;
        private String baseUrl;
-       
-       private IDatabaseService databaseService;
-       
+
+       private IUserService userService;
+
        /**
         * Constructs a CdmRemoteSourceBase object with default values.
-        * 
+        *
         */
        protected CdmRemoteSourceBase() {
                setName(DEFAULT_NAME);
@@ -48,42 +47,43 @@ public class CdmRemoteSourceBase extends CdmSource implements ICdmRemoteSource {
                setContextPath(DEFAULT_CONTEXT_PATH);
                setNomenclaturalCode(DEFAULT_NOMENCLATURAL_CODE);
        }
-       
+
        /**
         * Constructs a CdmRemoteSourceBase
-        * 
+        *
         * @param name
         * @param server
         * @param port
         * @param contextPath
         * @param nomenclaturalCode
         */
-       protected CdmRemoteSourceBase(String name, String server, int port, String contextPath, NomenclaturalCode nomenclaturalCode) {
+       public CdmRemoteSourceBase(String name, String server, int port, String contextPath, NomenclaturalCode nomenclaturalCode) {
                setName(name);
                setServer(server);
                setPort(port);
                setContextPath(contextPath);
-               setNomenclaturalCode(nomenclaturalCode);                        
+               setNomenclaturalCode(nomenclaturalCode);
                initDatabaseConnection();
        }
-       
+
        protected void initDatabaseConnection() {
                if(getContextPath() == null || getContextPath().equals("")) {
                        setBaseUrl("http://" + getServer() + ":" + String.valueOf(getPort()));
                } else {
                        setBaseUrl("http://" + getServer()  + ":" + String.valueOf(getPort()) + "/" + getContextPath());
-               }       
+               }
                // the database service needs to be initialised (before the spring
-               // application context initialsation) since it is required to 
+               // application context initialsation) since it is required to
                // to make queries related to the source database
            HttpInvokerProxyFactoryBean proxy = new HttpInvokerProxyFactoryBean();
-           proxy.setServiceInterface(IDatabaseService.class);
-           proxy.setServiceUrl(baseUrl + "/remoting/database.service");
+           proxy.setServiceInterface(IUserService.class);
+           // FIXME:Remoting need to fix this hardcoded url and make it configurable somehow
+           proxy.setServiceUrl(baseUrl + "/remoting-public/user.service");
            proxy.afterPropertiesSet();
-           databaseService = (IDatabaseService) proxy.getObject();
+           userService = (IUserService) proxy.getObject();
 
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.cdm.remote.ICdmRemoteSource#getBaseUrl()
         */
@@ -93,11 +93,11 @@ public class CdmRemoteSourceBase extends CdmSource implements ICdmRemoteSource {
        }
 
        /**
-        * Sets the base url for the http-invoker services as listed in 
+        * Sets the base url for the http-invoker services as listed in
         * httpInvokerServicesClients.xml.
-        * e.g. for 'http://127.0.0.1:8080/col/remoting/common.service', the 
+        * e.g. for 'http://127.0.0.1:8080/col/remoting/common.service', the
         * base url would be 'http://127.0.0.1:8080/col'
-        * 
+        *
         * @param baseUrl
         */
        public void setBaseUrl(String baseUrl) {
@@ -114,9 +114,9 @@ public class CdmRemoteSourceBase extends CdmSource implements ICdmRemoteSource {
 
        /**
         * Sets the context path.
-        * e.g. for 'http://127.0.0.1:8080/col/remoting/common.service', the 
+        * e.g. for 'http://127.0.0.1:8080/col/remoting/common.service', the
         * context path would be 'col'
-        * 
+        *
         * @param contextPath
         */
        public void setContextPath(String contextPath) {
@@ -128,7 +128,7 @@ public class CdmRemoteSourceBase extends CdmSource implements ICdmRemoteSource {
         */
        @Override
        public String getDbSchemaVersion() throws CdmSourceException {
-               return databaseService.getDbSchemaVersion();
+               return userService.getDbSchemaVersion();
 
        }
 
@@ -137,7 +137,7 @@ public class CdmRemoteSourceBase extends CdmSource implements ICdmRemoteSource {
         */
        @Override
        public boolean isDbEmpty() throws CdmSourceException {
-               return databaseService.isDbEmpty();
+               return userService.isDbEmpty();
 
        }
 
@@ -146,12 +146,12 @@ public class CdmRemoteSourceBase extends CdmSource implements ICdmRemoteSource {
         */
        @Override
        public boolean checkConnection() throws CdmSourceException {
-               // assuming that database service works implies 
+               // assuming that database service works implies
                // the connection is up
-               // if no exception is thrown then we assume that the 
+               // if no exception is thrown then we assume that the
                // connection is up
                // FIXME:Remoting is this really correct?
-               databaseService.getDbSchemaVersion();
+               userService.getDbSchemaVersion();
 
                return true;
        }
@@ -161,13 +161,13 @@ public class CdmRemoteSourceBase extends CdmSource implements ICdmRemoteSource {
         */
        @Override
        public String getConnectionMessage() {
-               return "Conncting to Remote CDM Server " + getName();
+               return "Connecting to Remote CDM Instance " + getName() + ":" + getPort() + "/" + getContextPath();
        }
 
-               
+
        @Override
        public Map<MetaDataPropertyName, String> getMetaDataMap() throws CdmSourceException {
-               return databaseService.getCdmMetadataMap();
+               return userService.getCdmMetadataMap();
        }
 
 
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java
new file mode 100644 (file)
index 0000000..d6fce9b
--- /dev/null
@@ -0,0 +1,317 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.remoting.source;
+
+import java.io.IOException;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.ResponseHandler;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.util.EntityUtils;
+import org.apache.log4j.Logger;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import eu.etaxonomy.cdm.config.CdmSourceException;
+import eu.etaxonomy.cdm.database.CdmPersistentDataSource;
+import eu.etaxonomy.cdm.database.ICdmDataSource;
+import eu.etaxonomy.taxeditor.remoting.server.CDMServerException;
+
+/**
+ * @author cmathew
+ * @date 20 Jan 2015
+ *
+ */
+public class CdmServerInfo {
+    public static final Logger logger = Logger.getLogger(CdmServerInfo.class);
+
+    private final static String CDMSERVER_PREFIX = "cdmserver";
+    private final static String NAME_PRODUCTION = "edit-production";
+    private final static String SERVER_PRODUCTION = "dev.e-taxonomy.eu";
+
+    private final static String NAME_INTEGRATION = "edit-integration";
+    private final static String SERVER_INTEGRATION = "int.e-taxonomy.eu";
+
+    private final static String NAME_DEMO_1 = "edit-WS I";
+    private final static String SERVER_DEMO_1 = "160.45.63.230";
+
+    private final static String NAME_DEMO_2 = "edit-WS II";
+    private final static String SERVER_DEMO_2 = "160.45.63.231";
+
+    private final static String NAME_TEST = "edit-test";
+    private final static String SERVER_TEST = "test.e-taxonomy.eu";
+
+    public final static String SERVER_LOCALHOST = "localhost";
+    private final static String NAME_LOCALHOST = "localhost";
+    public final static String NAME_LOCALHOST_MGD = "localhost mgd.";
+
+    private final static String NAME_LOCALHOST_DEV = "localhost-dev";
+    private final static String NAME_INSTANCE_LOCALHOST_DEV = "local-dev";
+    private final static String SERVER_LOCALHOST_DEV = "localhost";
+    private final static int PORT_LOCALHOST_DEV = 8080;
+    private final static String BASEPATH_LOCALHOST_DEV = "";
+
+    private final String name;
+    private final String server;
+    private final int port;
+    private final List<CdmInstanceInfo> instances;
+
+    private static List<CdmServerInfo> cdmServerInfoList;
+
+    public CdmServerInfo(String name, String server, int port) {
+        this.name = name;
+        this.server = server;
+        this.port = port;
+        instances = new ArrayList<CdmInstanceInfo>();
+    }
+
+
+    public CdmInstanceInfo addInstance(String name, String basePath) {
+        CdmInstanceInfo cii = new CdmInstanceInfo(name, basePath);
+        instances.add(cii);
+        return cii;
+
+    }
+
+    public boolean isLocalhost() {
+        return name.startsWith(SERVER_LOCALHOST);
+    }
+
+    public boolean isLocalhostMgd() {
+        return NAME_LOCALHOST_MGD.equals(name);
+    }
+
+    public void refreshInstances() throws CDMServerException {
+        instances.clear();
+        if(isLocalhostMgd()) {
+            addInstancesFromDataSourcesConfig();
+        } else {
+            addInstancesViaHttp();
+        }
+        Collections.sort(instances, new Comparator<CdmInstanceInfo>() {
+            @Override
+            public int compare(CdmInstanceInfo cii1, CdmInstanceInfo cii2)
+            {
+                return cii1.getName().toString().compareTo(cii2.getName().toString());
+            }
+        });
+    }
+
+    public void addInstancesViaHttp() throws CDMServerException {
+        String url = "http://" + server + ":" + String.valueOf(port) + "/" + CDMSERVER_PREFIX + "/instances.jsp";
+
+        HttpClient client = new DefaultHttpClient();
+        HttpGet httpGet = new HttpGet(url);
+
+        logger.info("Executing request " + httpGet.getRequestLine());
+
+        // Create a custom response handler
+        ResponseHandler<String> responseHandler = new ResponseHandler<String>() {
+
+            @Override
+            public String handleResponse(
+                    final HttpResponse response) throws ClientProtocolException, IOException {
+                int status = response.getStatusLine().getStatusCode();
+                if (status >= 200 && status < 300) {
+                    HttpEntity entity = response.getEntity();
+                    return entity != null ? EntityUtils.toString(entity) : null;
+                } else {
+                    throw new ClientProtocolException("Unexpected response status: " + status);
+                }
+            }
+
+        };
+        String responseBody = null;
+        try {
+            responseBody = client.execute(httpGet, responseHandler);
+        } catch (ClientProtocolException e) {
+            throw new CDMServerException(e);
+        } catch (IOException e) {
+            throw new CDMServerException(e);
+        }
+
+
+        if(responseBody != null) {
+            try {
+                JSONArray array = new JSONArray(responseBody);
+                for(int i=0;i<array.length();i++) {
+                    JSONObject instance = (JSONObject)array.get(i);
+                    if(instance != null) {
+                        JSONObject conf = (JSONObject)instance.get("configuration");
+                        if(conf != null) {
+                            String instanceName = conf.getString("instanceName");
+                            // we need to remove the first (char) forward slash from
+                            // the base path
+                            String basePath = conf.getString("basePath").substring(1);
+                            addInstance(instanceName, basePath);
+                            logger.info("Added instance with name : " + instanceName + ", basePath : " + basePath);
+                        }
+                    }
+                }
+            } catch (JSONException e) {
+                throw new CDMServerException(e);
+            }
+        }
+    }
+
+    public void addInstancesFromDataSourcesConfig() {
+
+        for(ICdmDataSource dataSource : CdmPersistentDataSource.getAllDataSources()){
+            logger.warn("Adding local instance " + dataSource.getName());
+            addInstance(dataSource.getName(), dataSource.getName());
+        }
+
+    }
+
+    public String toString(String instanceName, int port) {
+        return server + ":" + String.valueOf(port) + "/" + instanceName;
+    }
+
+    public CdmInstanceInfo getInstanceFromName(String instanceName) {
+        if(instanceName == null) {
+            return null;
+        }
+
+        for(CdmInstanceInfo instance : instances) {
+            if(instance.getName() != null && instance.getName().equals(instanceName)) {
+                return instance;
+            }
+        }
+        return null;
+    }
+
+    public CdmRemoteSource getCdmRemoteSource(CdmInstanceInfo instance, int port) {
+        if(instance != null) {
+            return CdmRemoteSource.NewInstance(name,
+                    server,
+                    port,
+                    instance.getBasePath(),
+                    null);
+        }
+        return null;
+    }
+
+    public boolean pingServer(){
+        try {
+            Socket s = new Socket(server, port);
+            logger.info("[CDM-Server] Available @ " + server + ":" + port );
+            return true;
+        } catch (IOException ioe) {
+
+        }
+        return false;
+    }
+
+    public boolean pingInstance(CdmInstanceInfo instance, int port) throws CDMServerException  {
+
+        ICdmRemoteSource crs = getCdmRemoteSource(instance, port);
+        try {
+            if(crs != null && crs.checkConnection()) {
+                logger.info("[CDM-Server] Running @ " + server + ":" + port + " for instance " + instance);
+                return true;
+            }
+        } catch (CdmSourceException e) {
+            throw new CDMServerException(e);
+        }
+
+        return false;
+    }
+
+    public static List<CdmServerInfo> getCdmServers() {
+        if(cdmServerInfoList == null) {
+            cdmServerInfoList = new ArrayList<CdmServerInfo>();
+            //cdmServerInfoList.add(new CdmServerInfo(NAME_PRODUCTION, SERVER_PRODUCTION, 80));
+            //cdmServerInfoList.add(new CdmServerInfo(NAME_INTEGRATION, SERVER_INTEGRATION, 80));
+            cdmServerInfoList.add(new CdmServerInfo(NAME_DEMO_1, SERVER_DEMO_1, 80));
+            cdmServerInfoList.add(new CdmServerInfo(NAME_DEMO_2, SERVER_DEMO_2, 80));
+            cdmServerInfoList.add(new CdmServerInfo(NAME_TEST, SERVER_TEST, 80));
+            cdmServerInfoList.add(new CdmServerInfo(NAME_LOCALHOST, SERVER_LOCALHOST, 8080));
+            cdmServerInfoList.add(new CdmServerInfo(NAME_LOCALHOST_MGD, SERVER_LOCALHOST,8080));
+        }
+        return cdmServerInfoList;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getServer() {
+        return server;
+    }
+
+
+    public int getPort() {
+        return port;
+    }
+
+
+    public List<CdmInstanceInfo> getInstances() throws CDMServerException {
+        if(instances.isEmpty()) {
+            refreshInstances();
+        }
+        return instances;
+    }
+
+    public static CdmRemoteSource getDevServerRemoteSource() {
+        String value = System.getProperty("cdm.server.dev.port");
+        boolean available = false;
+        CdmInstanceInfo devInstance = null;
+        if(value != null && !value.isEmpty()) {
+            int devPort = Integer.valueOf(value);
+            CdmServerInfo devCii = new CdmServerInfo(NAME_LOCALHOST_DEV, SERVER_LOCALHOST_DEV, devPort);
+            try {
+                devInstance = devCii.addInstance(NAME_INSTANCE_LOCALHOST_DEV, BASEPATH_LOCALHOST_DEV);
+                available = devCii.pingInstance(devInstance, devPort);
+                if(available) {
+                    return devCii.getCdmRemoteSource(devInstance, devPort);
+                }
+            } catch (Exception e) {
+
+            }
+        }
+        return null;
+    }
+
+    public class CdmInstanceInfo {
+        private final String name;
+
+        /**
+         * The full path of the instance including the the prefix (if any).
+         * E.g. for an EDIT instance this would be something like "cdmserver/remoting"
+         * For a managed local server this would simply be "remoting"
+         */
+        private final String basePath;
+
+
+        public CdmInstanceInfo(String name, String basePath) {
+            this.name = name;
+            this.basePath = basePath;
+        }
+
+
+        public String getName() {
+            return name;
+        }
+
+        public String getBasePath() {
+            return basePath;
+        }
+    }
+}
similarity index 94%
rename from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/ICdmRemoteSource.java
rename to eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/ICdmRemoteSource.java
index f278c74689aa3cbe8a0ee2de252e7940d62de8db..39e8886e43b31e6c881b8016a1baeba76d6f4519 100644 (file)
@@ -6,7 +6,7 @@
 * 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.cdm.remote;
+package eu.etaxonomy.taxeditor.remoting.source;
 
 import eu.etaxonomy.cdm.config.ICdmSource;
 
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CachedCommonServiceImpl.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CachedCommonServiceImpl.java
new file mode 100644 (file)
index 0000000..72f6294
--- /dev/null
@@ -0,0 +1,125 @@
+// $Id$
+/**
+* Copyright (C) 2014 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.service;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.springframework.stereotype.Component;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+
+/**
+ * @author cmathew
+ * @date 14 Oct 2014
+ *
+ */
+@Component
+public class CachedCommonServiceImpl implements ICachedCommonService {
+
+
+    private static boolean cacheEnabled = true;
+
+    public static boolean isCacheEnabled() {
+        return cacheEnabled;
+    }
+
+    public static void setCacheEnabled(boolean cacheEnabled) {
+        CachedCommonServiceImpl.cacheEnabled = cacheEnabled;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#find(java.lang.Class, int)
+     */
+    @Override
+    public CdmBase find(Class<? extends CdmBase> clazz, int id) {
+        CdmBase cdmEntity = CdmApplicationState.getCurrentAppConfig().getCommonService().find(clazz, id, getPropertyPaths(clazz));
+        if(cdmEntity == null) {
+            throw new NullPointerException("CDM Entity of type " + clazz.getName() + " with id " + id  + " is null.");
+        }
+        return cdmEntity;
+
+    }
+
+
+    private List<String> getPropertyPaths(Object obj) {
+        List<String> propertyPaths = null;
+        ICdmEntitySession cdmEntitySession =
+                ((CdmApplicationRemoteController)CdmApplicationState.getCurrentAppConfig()).getCdmEntitySessionManager().getActiveSession();
+        if(cdmEntitySession != null) {
+            propertyPaths = cdmEntitySession.getPropertyPaths(obj);
+        }
+        return propertyPaths;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.service.ICachedCommonService#initializeCollection(java.util.UUID, java.lang.String)
+     */
+    @Override
+    public Object initializeCollection(UUID ownerUuid, String fieldName) {
+        return  CdmApplicationState.getCurrentAppConfig().getCommonService().initializeCollection(ownerUuid, fieldName, getPropertyPaths(fieldName));
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#isEmpty(org.hibernate.collection.spi.PersistentCollection)
+     */
+    @Override
+    public boolean isEmpty(UUID ownerUuid, String fieldName) {
+            return  CdmApplicationState.getCurrentAppConfig().getCommonService().isEmpty(ownerUuid, fieldName);
+
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#size(org.hibernate.collection.spi.PersistentCollection)
+     */
+    @Override
+    public int size(UUID ownerUuid, String fieldName) {
+        return  CdmApplicationState.getCurrentAppConfig().getCommonService().size(ownerUuid, fieldName);
+    }
+
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#contains(org.hibernate.collection.spi.PersistentCollection, java.lang.Object)
+     */
+    @Override
+    public boolean contains(UUID ownerUuid, String fieldName, Object element) {
+        return  CdmApplicationState.getCurrentAppConfig().getCommonService().contains(ownerUuid, fieldName, element);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#containsKey(org.hibernate.collection.spi.PersistentCollection, java.lang.Object)
+     */
+    @Override
+    public boolean containsKey(UUID ownerUuid, String fieldName, Object key) {
+        return  CdmApplicationState.getCurrentAppConfig().getCommonService().containsKey(ownerUuid, fieldName, key);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#containsValue(org.hibernate.collection.spi.PersistentCollection, java.lang.Object)
+     */
+    @Override
+    public boolean containsValue(UUID ownerUuid, String fieldName, Object element) {
+        return  CdmApplicationState.getCurrentAppConfig().getCommonService().containsValue(ownerUuid, fieldName, element);
+    }
+
+
+
+
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmAuthenticatedHttpInvokerRequestExecutor.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmAuthenticatedHttpInvokerRequestExecutor.java
new file mode 100644 (file)
index 0000000..692a3ba
--- /dev/null
@@ -0,0 +1,46 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.service;
+
+import java.io.IOException;
+
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor;
+import org.springframework.remoting.httpinvoker.HttpInvokerClientConfiguration;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContext;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+
+/**
+ * @author cmathew
+ * @date 27 Jan 2015
+ *
+ */
+public class CdmAuthenticatedHttpInvokerRequestExecutor extends CommonsHttpInvokerRequestExecutor {
+
+    @Override
+    protected PostMethod createPostMethod(HttpInvokerClientConfiguration config) throws IOException {
+        PostMethod postMethod = super.createPostMethod(config);
+
+        SecurityContext securityContext = CdmApplicationState.getCurrentSecurityContext();
+        if(securityContext != null) {
+            Authentication auth = securityContext.getAuthentication();
+            if ((auth != null) && (auth.getName() != null) &&
+                    (auth.getCredentials() != null)) {
+                String base64 = auth.getName() + ":" + auth.getCredentials().toString();
+                postMethod.setRequestHeader("Authorization", "Basic " +
+                        new String(Base64.encodeBase64(base64.getBytes())));
+            }
+        }
+        return postMethod;
+    }
+}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceInterceptorException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceInterceptorException.java
new file mode 100644 (file)
index 0000000..292eda2
--- /dev/null
@@ -0,0 +1,13 @@
+package eu.etaxonomy.taxeditor.service;
+
+public class CdmServiceInterceptorException extends RuntimeException {
+       
+       public CdmServiceInterceptorException(String message) {
+               super(message);
+       }
+       
+       public CdmServiceInterceptorException(Exception ex) {
+               super(ex);
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceRequestExecutor.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceRequestExecutor.java
new file mode 100644 (file)
index 0000000..8084eac
--- /dev/null
@@ -0,0 +1,80 @@
+package eu.etaxonomy.taxeditor.service;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.log4j.Logger;
+import org.springframework.remoting.httpinvoker.HttpInvokerClientConfiguration;
+import org.springframework.remoting.support.RemoteInvocation;
+import org.springframework.remoting.support.RemoteInvocationResult;
+import org.springframework.stereotype.Component;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
+
+@Component
+public class CdmServiceRequestExecutor extends CdmAuthenticatedHttpInvokerRequestExecutor {
+
+    private static final Logger logger = Logger.getLogger(CdmServiceRequestExecutor.class);
+
+    private ICdmEntitySessionManager cdmEntitySessionManager ;
+
+       private RemoteInvocation currentRemoteInvocation;
+
+
+
+       @Override
+       protected void writeRemoteInvocation(RemoteInvocation invocation, OutputStream os) throws IOException {
+           if(cdmEntitySessionManager == null) {
+               cdmEntitySessionManager =
+                       ((CdmApplicationRemoteController)CdmApplicationState.getCurrentAppConfig()).getCdmEntitySessionManager();
+           }
+               currentRemoteInvocation = invocation;
+               super.writeRemoteInvocation(invocation, os);
+       }
+
+       @Override
+       protected RemoteInvocationResult doExecuteRequest(HttpInvokerClientConfiguration config,
+                       java.io.ByteArrayOutputStream baos)
+                                       throws java.io.IOException,
+                                       java.lang.ClassNotFoundException {
+               RemoteInvocationResult rir = fromCache(currentRemoteInvocation);
+
+               // if rir is not null at this point we assume that the
+               // the object has already been loaded in the cache and
+               // does not need to be reloaded
+
+               if(rir == null) {
+                   logger.info("Remote invoking : " + currentRemoteInvocation.getMethodName() + "@" + config.getServiceUrl());
+                       rir = super.doExecuteRequest(config, baos);
+                       if(rir.getValue() != null && !rir.hasException()) {
+                if("merge".equals(currentRemoteInvocation.getMethodName()) ||
+                        "save".equals(currentRemoteInvocation.getMethodName()) ||
+                        "findWithUpdate".equals(currentRemoteInvocation.getMethodName())) {
+                    rir = new RemoteInvocationResult(cdmEntitySessionManager.load(rir.getValue(), true));
+                } else if(rir.getValue() instanceof UpdateResult){
+                    UpdateResult result = (UpdateResult)rir.getValue();
+                    if(result.isOk()){
+                        cdmEntitySessionManager.load(result, true);
+                    }
+                } else {
+                    rir = new RemoteInvocationResult(cdmEntitySessionManager.load(rir.getValue(), false));
+                }
+                       }
+                       cache(currentRemoteInvocation, rir);
+               }
+               currentRemoteInvocation = null;
+
+               return rir;
+       }
+
+       public void cache(RemoteInvocation ri, RemoteInvocationResult rir) {
+
+       }
+
+       public RemoteInvocationResult fromCache(RemoteInvocation ri) {
+           return null;
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/ICachedCommonService.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/ICachedCommonService.java
new file mode 100644 (file)
index 0000000..98c94d8
--- /dev/null
@@ -0,0 +1,88 @@
+// $Id$
+/**
+ * Copyright (C) 2014 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.service;
+
+import java.util.UUID;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+/**
+ * @author cmathew
+ * @date 14 Oct 2014
+ *
+ */
+public interface ICachedCommonService {
+
+    public CdmBase find(Class<? extends CdmBase> clazz, int id);
+
+
+    /**
+     * Initializes a collection or map.
+     *
+     * @param ownerUuid uuid of owner cdm entity
+     * @param fieldName field name of collection or map
+     * @return initialised collection or map
+     */
+    public Object initializeCollection(UUID ownerUuid, String fieldName);
+
+    /**
+     * Checks if a collection or map is empty.
+     *
+     * @param ownerUuid uuid of owner cdm entity
+     * @param fieldName field name of collection or map
+     * @return true if the collection of map is empty, else false
+     */
+    public boolean isEmpty(UUID ownerUuid, String fieldName);
+
+    /**
+     * Returns the size of requested collection or map.
+     *
+     * @param ownerUuid uuid of owner cdm entity
+     * @param fieldName field name of collection or map
+     * @return the size of the persistent collection
+     */
+    public int size(UUID ownerUuid, String fieldName);
+
+    /**
+     * Checks whether an object is contained within a persistent collection.
+     *
+     * @param ownerUuid uuid of owner cdm entity
+     * @param fieldName field name of collection or map
+     * @param element the element to check for
+     * @return true if the element exists in the collection, false o/w
+     */
+    public boolean contains(UUID ownerUuid, String fieldName, Object element);
+
+    /**
+     * Checks whether an index object exists within a persistent collection
+     * (usually a map)
+     *
+     * @param ownerUuid uuid of owner cdm entity
+     * @param fieldName field name of map
+     * @param key the index object to look for.
+     * @return true if the index object exists in the collection, false o/w
+     */
+    public boolean containsKey(UUID ownerUuid, String fieldName, Object key);
+
+    /**
+     * checks whether an value object exists within a persistent collection
+     * (usually a map)
+     *
+     * @param ownerUuid uuid of owner cdm entity
+     * @param fieldName field name of map
+     * @param key the value object to look for.
+     * @return true if the value object exists in the collection, false o/w
+     */
+    public boolean containsValue(UUID ownerUuid, String fieldName, Object element);
+
+
+
+
+}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/TermServiceRequestExecutor.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/TermServiceRequestExecutor.java
new file mode 100644 (file)
index 0000000..5991563
--- /dev/null
@@ -0,0 +1,60 @@
+package eu.etaxonomy.taxeditor.service;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+import org.springframework.remoting.support.RemoteInvocation;
+import org.springframework.remoting.support.RemoteInvocationResult;
+
+import eu.etaxonomy.cdm.api.cache.CdmServiceCacher;
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.cdm.model.common.TermType;
+
+
+public class TermServiceRequestExecutor extends CdmServiceRequestExecutor {
+    private static final Logger logger = Logger.getLogger(TermServiceRequestExecutor.class);
+
+       private static Map<TermType, RemoteInvocationResult>  termTypeMap = new
+                       HashMap<TermType, RemoteInvocationResult>();
+
+       private static CdmServiceCacher cdmServiceCacher;
+
+       public static void setDefaultCacher(CdmServiceCacher css) {
+        cdmServiceCacher = css;
+    }
+
+       @Override
+       public void cache(RemoteInvocation ri, RemoteInvocationResult rir) {
+           if(cdmServiceCacher != null) {
+               if(ri.getMethodName().equals("listByTermType")) {
+                   if(ri.getArguments()[1] == null) {
+                       Set<DefinedTermBase> terms = new HashSet<DefinedTermBase>();
+                       if(rir.getValue() != null) {
+                           terms.addAll((List<DefinedTermBase>)rir.getValue());
+
+                           for(DefinedTermBase<?> term : terms) {
+                               cdmServiceCacher.load(term);
+                           }
+                           termTypeMap.put((TermType)ri.getArguments()[0], rir);
+                       }
+
+                   }
+               }
+           } else {
+               logger.info("Default CdmServiceCacher is null. Cannot cache terms");
+           }
+       }
+
+
+       @Override
+       public  RemoteInvocationResult fromCache(RemoteInvocation ri) {
+               return termTypeMap.get(ri.getArguments()[0]);
+       }
+
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmClientSessionException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmClientSessionException.java
new file mode 100644 (file)
index 0000000..4af9273
--- /dev/null
@@ -0,0 +1,8 @@
+package eu.etaxonomy.taxeditor.session;
+
+public class CdmClientSessionException extends RuntimeException {
+
+       public CdmClientSessionException(String message) {
+               super(message);
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySession.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySession.java
new file mode 100644 (file)
index 0000000..a8cc4ec
--- /dev/null
@@ -0,0 +1,302 @@
+// $Id$
+/**
+ * Copyright (C) 2014 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.session;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import net.sf.ehcache.statistics.LiveCacheStatistics;
+
+import org.apache.log4j.Logger;
+
+import eu.etaxonomy.cdm.api.service.IService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher;
+import eu.etaxonomy.taxeditor.remoting.cache.EntityCacherDebugResult;
+
+
+/**
+ *
+ * NOTE : It would be nice to have this class performing merge / delete operations
+ * using services, but this is only possible if we can 'intelligently'
+ * get from a model class to the correspoding service class
+ * @author cmathew
+ * @date 20 Oct 2014
+ *
+ */
+
+public class CdmEntitySession implements ICdmEntitySession  {
+
+    private static final Logger logger = Logger.getLogger(CdmEntitySession.class);
+
+    private final CdmEntitySessionManager cdmEntitySessionManager;
+
+    private final ICdmEntitySessionEnabled sessionOwner;
+
+    private CdmTransientEntityCacher cdmTransientEntityCacher;
+
+    private List<ICdmEntitySessionEnabled> changeObservers;
+
+
+    public CdmEntitySession(ICdmEntitySessionEnabled sessionOwner, CdmEntitySessionManager cdmEntitySessionManager) {
+        this.sessionOwner = sessionOwner;
+        this.cdmEntitySessionManager = cdmEntitySessionManager;
+        init(sessionOwner, cdmEntitySessionManager);
+    }
+
+    private void init(ICdmEntitySessionEnabled sessionOwner, CdmEntitySessionManager cdmEntitySessionManager) {
+        this.cdmTransientEntityCacher = new CdmTransientEntityCacher(sessionOwner, cdmEntitySessionManager);
+        this.changeObservers = new ArrayList<ICdmEntitySessionEnabled>();
+        cdmEntitySessionManager.addToOwnerSessionMap(sessionOwner, this);
+    }
+
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(java.lang.Object, boolean)
+     */
+    @Override
+    public  <O extends Object> O load(O obj, boolean update) {
+        return cdmTransientEntityCacher.load(obj, update);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(eu.etaxonomy.cdm.model.common.CdmBase, boolean)
+     */
+    @Override
+    public  <T extends CdmBase> T load(T cdmBase, boolean update) {
+        return (T)cdmTransientEntityCacher.load(cdmBase, update);
+    }
+
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(eu.etaxonomy.cdm.api.service.UpdateResult, boolean)
+     */
+    @Override
+    public UpdateResult load(UpdateResult updateResult, boolean update) {
+        return cdmTransientEntityCacher.load(updateResult, update);
+    }
+
+    @Override
+    public <T extends CdmBase> void  update() {
+        Collection<T> rootEntities = getRootEntities();
+        if(rootEntities != null) {
+            for(T rootEntity : rootEntities) {
+                load(rootEntity, true);
+            }
+        }
+    }
+
+//    @Override
+//    public <T extends ICdmBase> void update(T cdmBase, Set<CdmBase> affectedObjects) {
+//        addEvent(cdmBase, affectedObjects, EventType.UPDATE);
+//    }
+//
+//    @Override
+//    public <T extends ICdmBase> void update(T cdmBase, CdmBase affectedObject) {
+//        Set<CdmBase> set = new HashSet<CdmBase>();
+//        set.add(affectedObject);
+//        addEvent(cdmBase, set, EventType.UPDATE);
+//    }
+//
+//
+//    @Override
+//    public <T extends ICdmBase> void delete(T cdmBase, Set<CdmBase> affectedObjects) {
+//        addEvent(cdmBase, affectedObjects, EventType.DELETE);
+//    }
+//
+//    @Override
+//    public <T extends ICdmBase> void delete(Set<T> cdmBases, Set<CdmBase> affectedObjects) {
+//        addEvent(cdmBases, affectedObjects, EventType.DELETE);
+//    }
+
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#debug(eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public <T extends CdmBase> EntityCacherDebugResult debug(T cdmBase) {
+        return debug(Arrays.asList(cdmBase));
+    }
+
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#debug(java.util.List)
+     */
+    @Override
+    public <T extends CdmBase> EntityCacherDebugResult debug(Collection<T> cdmBases) {
+        EntityCacherDebugResult entityCacherDebugResult =
+                new EntityCacherDebugResult(cdmTransientEntityCacher, cdmBases);
+        return entityCacherDebugResult;
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#debug()
+     */
+    @Override
+    public <T extends CdmBase> EntityCacherDebugResult debug() {
+        return debug(getRootEntities());
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(java.util.Collection)
+     */
+    @Override
+    public  <T extends CdmBase> Collection<T> load(Collection<T> cdmBaseList, boolean update) {
+        return cdmTransientEntityCacher.load(cdmBaseList, update);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#setEntitiesAsLatest()
+     */
+    @Override
+    public void setEntitiesAsLatest() {
+        //FIXME:Remoting need to think more about whether we really need this
+        //             List<CdmBase> entities = cdmTransientEntityCacher.getAllEntities();
+        //             for(CdmBase entity : entities) {
+        //                     cdmEntitySessionManager.setEntityAsLatest(entity);
+        //             }
+    }
+
+
+    @Override
+    public void bind() {
+        logger.info("Binding session with owner " + sessionOwner.toString());
+        if(!cdmEntitySessionManager.contains(sessionOwner)) {
+            init(sessionOwner, cdmEntitySessionManager);
+        }
+        cdmEntitySessionManager.bind(sessionOwner);
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#dispose()
+     */
+    @Override
+    public void dispose() {
+
+        cdmTransientEntityCacher.dispose();
+        changeObservers.clear();
+        cdmEntitySessionManager.remove(sessionOwner);
+
+    }
+
+
+//    /* (non-Javadoc)
+//     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#commit()
+//     */
+//    @Override
+//    public void addEvent(ICdmBase cdmBase, Set<CdmBase> affectedObjects, EventType eventType) {
+//        affectedObjects = (Set<CdmBase>) load(affectedObjects, true);
+//        CdmDataChangeEvent cdce = CdmDataChangeEvent.NewInstance((CdmBase)cdmBase, affectedObjects, eventType);
+//        CdmPostDataChangeObservableListener.getDefault().notifyObservers(cdce);
+//    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(java.util.UUID, java.lang.Class)
+     */
+    @Override
+    public  <T extends CdmBase>  T remoteLoad(IService<T> service, UUID uuid) {
+        T cdmBase = service.load(uuid);
+        return load(cdmBase, false);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(eu.etaxonomy.cdm.api.service.IService, java.util.UUID, java.util.List)
+     */
+    @Override
+    public <T extends CdmBase>  T remoteLoad(IService<T> service, UUID uuid, List<String> propertyPaths) {
+        T cdmBase = service.load(uuid, propertyPaths);
+        return load(cdmBase, false);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#save(eu.etaxonomy.cdm.api.service.IService, eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public <T extends CdmBase> UUID remoteSave(IService<T> service, T cdmBase) {
+        UUID uuid = service.save(cdmBase).getUuid();
+        load(cdmBase,false);
+        return uuid;
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#update(eu.etaxonomy.cdm.api.service.IService, eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public <T extends CdmBase> T remoteUpdate(IService<T> service, T cdmBase) {
+        T mergedCdmBase = service.merge(cdmBase);
+        return mergedCdmBase;
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#isActive()
+     */
+    @Override
+    public boolean isActive() {
+        return cdmEntitySessionManager.getActiveSession() == this;
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getOwner()
+     */
+    @Override
+    public ICdmEntitySessionEnabled getOwner() {
+        return sessionOwner;
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getNoOfObjectsInCache()
+     */
+    @Override
+    public LiveCacheStatistics getCacheStatistics() {
+        return cdmTransientEntityCacher.getCacheStatistics();
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getRootEntities()
+     */
+    @Override
+    public <T extends CdmBase> Collection<T> getRootEntities() {
+        return sessionOwner.getRootEntities();
+    }
+
+    public CdmTransientEntityCacher getCacher() {
+        return cdmTransientEntityCacher;
+    }
+
+    @Override
+    public List<String> getPropertyPaths(Object obj) {
+        Map<Object, List<String>> propertyPathsMap = sessionOwner.getPropertyPathsMap();
+        if(propertyPathsMap == null || propertyPathsMap.isEmpty()) {
+            return null;
+        }
+        return propertyPathsMap.get(obj);
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManager.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManager.java
new file mode 100644 (file)
index 0000000..5344a48
--- /dev/null
@@ -0,0 +1,246 @@
+// $Id$
+/**
+ * Copyright (C) 2014 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.session;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+/**
+ * @author cmathew
+ * @date 16 Oct 2014
+ *
+ */
+@Component
+public class CdmEntitySessionManager implements ICdmEntitySessionManager {
+    private static final Logger logger = Logger.getLogger(CdmEntitySessionManager.class);
+
+    private final Map<ICdmEntitySessionEnabled, ICdmEntitySession> ownerSessionMap =
+            new HashMap<ICdmEntitySessionEnabled, ICdmEntitySession>();
+
+    private final List<ICdmEntitySessionManagerObserver> sessionObservers = new ArrayList<ICdmEntitySessionManagerObserver>();
+
+    private ICdmEntitySession activeSession;
+
+    private  NullSession nullSession;
+
+    @Override
+    public ICdmEntitySession getNullSession() {
+        return nullSession;
+    }
+
+    @Override
+    public ICdmEntitySession newSession(ICdmEntitySessionEnabled sessionOwner, boolean setAsActive) {
+        ICdmEntitySession session = ownerSessionMap.get(sessionOwner);
+        if(session == null) {
+            session = new CdmEntitySession(sessionOwner, this);
+            addToOwnerSessionMap(sessionOwner, session);
+        }
+
+        if(setAsActive) {
+            setActiveSession(session);
+        }
+
+        return session;
+    }
+
+    @Override
+    public ICdmEntitySession bindNullSession(ICdmEntitySessionEnabled sessionOwner) {
+
+        if(nullSession == null) {
+            nullSession = new NullSession(sessionOwner, this);
+        } else {
+            nullSession.setOwner(sessionOwner);
+        }
+
+        setActiveSession(nullSession);
+
+        return nullSession;
+    }
+
+    @Override
+    public ICdmEntitySession getActiveSession() {
+        return activeSession;
+    }
+
+    private void setActiveSession(ICdmEntitySession activeSession) {
+        this.activeSession = activeSession;
+        notifyObservers();
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#getSessions()
+     */
+    @Override
+    public Collection<ICdmEntitySession> getSessions() {
+        return ownerSessionMap.values();
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#bind(eu.etaxonomy.taxeditor.session.ISessionEventListener)
+     */
+    @Override
+    public void bind(ICdmEntitySessionEnabled sessionOwner) {
+        if(sessionOwner == null) {
+            setActiveSession(null);
+            return;
+        }
+        ICdmEntitySession session  = ownerSessionMap.get(sessionOwner);
+        if(session == null) {
+            throw new CdmClientSessionException("Trying to bind session which does not exist");
+        }
+
+        setActiveSession(session);
+
+    }
+
+    @Override
+    public boolean contains(ICdmEntitySessionEnabled sessionOwner) {
+        return ownerSessionMap.containsKey(sessionOwner);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#load(T)
+     */
+    @Override
+    public <T extends Object> T load(T obj, boolean update) {
+        if(activeSession == null) {
+            return obj;
+        } else {
+            return activeSession.load(obj, update);
+        }
+    }
+
+
+    @Override
+    public <T extends CdmBase> void update() {
+        if(activeSession != null) {
+            activeSession.update();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#load(T)
+     */
+    @Override
+    public <T extends CdmBase> T load(T cdmBase, boolean update) {
+        if(activeSession == null) {
+            return cdmBase;
+        }
+        return activeSession.load(cdmBase, update);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#load(eu.etaxonomy.cdm.api.service.UpdateResult, boolean)
+     */
+    @Override
+    public UpdateResult load(UpdateResult updateResult, boolean update) {
+        if(activeSession == null) {
+            return updateResult;
+        }
+        return activeSession.load(updateResult, update);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#load(java.util.Collection)
+     */
+    @Override
+    public <T extends CdmBase> Collection<T> load(Collection<T> cdmBaseList, boolean update) {
+        if(activeSession == null) {
+            return cdmBaseList;
+        }
+        return activeSession.load(cdmBaseList, update);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#dispose(eu.etaxonomy.taxeditor.session.ISessionEventListener)
+     */
+    void remove(ICdmEntitySessionEnabled owner) {
+        ICdmEntitySession session = ownerSessionMap.get(owner);
+        if(session == null) {
+            logger.info("No Session connected to owner, nothing to do");
+            return;
+        }
+        if(session == activeSession) {
+            setActiveSession(null);
+        }
+        ownerSessionMap.remove(owner);
+
+    }
+
+    @Override
+    public void dispose(ICdmEntitySessionEnabled owner) {
+        ICdmEntitySession session = ownerSessionMap.get(owner);
+        if(session != null) {
+            session.dispose();
+        }
+        notifyObservers();
+    }
+
+    @Override
+    public void disposeAll() {
+        Set<ICdmEntitySessionEnabled> owners =
+                new HashSet<ICdmEntitySessionEnabled>(ownerSessionMap.keySet());
+        for(ICdmEntitySessionEnabled owner : owners) {
+            ICdmEntitySession session = ownerSessionMap.get(owner);
+            if(session != null) {
+                session.dispose();
+            }
+        }
+        notifyObservers();
+    }
+
+    void addToOwnerSessionMap(ICdmEntitySessionEnabled owner, ICdmEntitySession session) {
+        ownerSessionMap.put(owner, session);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#addSessionListener()
+     */
+    @Override
+    public void addSessionObserver(ICdmEntitySessionManagerObserver sessionObserver) {
+        sessionObservers.add(sessionObserver);
+    }
+
+    public void notifyObservers() {
+        for(ICdmEntitySessionManagerObserver sessionObserver : sessionObservers) {
+            sessionObserver.changed();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#isRemoting()
+     */
+    @Override
+    public boolean isRemoting() {
+        // FIXME:Remoting stupid method to check whether we are in remoting
+        return true;
+    }
+
+
+
+}
+
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySession.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySession.java
new file mode 100644 (file)
index 0000000..c43e88d
--- /dev/null
@@ -0,0 +1,91 @@
+package eu.etaxonomy.taxeditor.session;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.UUID;
+
+import net.sf.ehcache.statistics.LiveCacheStatistics;
+import eu.etaxonomy.cdm.api.service.IService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.remoting.cache.EntityCacherDebugResult;
+
+public interface ICdmEntitySession {
+
+    public ICdmEntitySessionEnabled getOwner();
+
+    public LiveCacheStatistics getCacheStatistics();
+
+       public  <O extends Object> O load(O obj, boolean update);
+
+       public  <T extends CdmBase> T load(T cdmBase, boolean update);
+
+       public  UpdateResult load(UpdateResult updateResult, boolean update);
+
+       public <T extends CdmBase> EntityCacherDebugResult debug(T cdmBase);
+
+       public <T extends CdmBase> EntityCacherDebugResult debug(Collection<T> cdmBase);
+
+       public <T extends CdmBase> EntityCacherDebugResult debug();
+
+       public <T extends CdmBase> Collection<T> load(Collection<T> cdmBaseList, boolean update);
+
+       public  void setEntitiesAsLatest();
+
+       public <T extends CdmBase> Collection<T> getRootEntities();
+
+       public  void dispose();
+
+    public void bind();
+
+//    public void addEvent(ICdmBase cdmBase, Set<CdmBase> affectedObjects, EventType eventType);
+
+    public  <T extends CdmBase> T remoteLoad(IService<T> service, UUID uuid);
+
+    public  <T extends CdmBase> T remoteLoad(IService<T> service, UUID uuid, List<String> propertyPaths);
+
+    public <T extends CdmBase> UUID remoteSave(IService<T> service, T cdmBase);
+
+    public <T extends CdmBase> T remoteUpdate(IService<T> service, T cdmBase);
+
+
+//    /**
+//     * @param cdmBase
+//     * @param affectedObjects
+//     */
+//    public <T extends ICdmBase> void update(T cdmBase, Set<CdmBase> affectedObjects);
+//
+//    /**
+//     * @param cdmBase
+//     * @param affectedObjects
+//     */
+//    public <T extends ICdmBase> void delete(T cdmBase, Set<CdmBase> affectedObjects);
+//
+//    /**
+//     * @param cdmBase
+//     * @param affectedObjects
+//     */
+//    public <T extends ICdmBase> void delete(Set<T> cdmBases, Set<CdmBase> affectedObjects);
+
+
+    public boolean isActive();
+
+//    /**
+//     * @param cdmBase
+//     * @param affectedObject
+//     */
+//    public <T extends ICdmBase> void update(T cdmBase, CdmBase affectedObject);
+
+    /**
+     *
+     */
+    public <T extends CdmBase> void update();
+
+
+    /**
+     * @param obj
+     * @return
+     */
+    public List<String> getPropertyPaths(Object obj);
+
+}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionEnabled.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionEnabled.java
new file mode 100644 (file)
index 0000000..be2e46c
--- /dev/null
@@ -0,0 +1,17 @@
+package eu.etaxonomy.taxeditor.session;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+public interface ICdmEntitySessionEnabled {
+
+    public ICdmEntitySession getCdmEntitySession();
+
+    public <T extends CdmBase> Collection<T> getRootEntities();
+
+    public Map<Object, List<String>> getPropertyPathsMap();
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManager.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManager.java
new file mode 100644 (file)
index 0000000..27e23a0
--- /dev/null
@@ -0,0 +1,75 @@
+package eu.etaxonomy.taxeditor.session;
+
+import java.util.Collection;
+
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+public interface ICdmEntitySessionManager {
+
+    public abstract ICdmEntitySession newSession(ICdmEntitySessionEnabled sessionOwner, boolean setAsActive);
+
+    /**
+     * @param sessionOwner
+     * @return
+     */
+    public ICdmEntitySession bindNullSession(ICdmEntitySessionEnabled sessionOwner);
+
+
+       public abstract void bind(ICdmEntitySessionEnabled sessionOwner);
+
+
+       public abstract <T extends Object> T load(T obj, boolean update);
+
+
+       public abstract <T extends CdmBase> T load(T cdmBase, boolean update);
+
+
+       public abstract UpdateResult load(UpdateResult updateResult, boolean update);
+
+
+       public abstract <T extends CdmBase> Collection<T> load(Collection<T> cdmBaseList, boolean update);
+
+
+    /**
+     * @return
+     */
+    public ICdmEntitySession getActiveSession();
+
+    public Collection<ICdmEntitySession> getSessions();
+
+    public void addSessionObserver(ICdmEntitySessionManagerObserver sessionObserver);
+
+
+
+
+    public boolean isRemoting();
+
+    /**
+     * @param owner
+     */
+    public void dispose(ICdmEntitySessionEnabled owner);
+
+    /**
+     *
+     */
+    public void disposeAll();
+
+
+    /**
+     *
+     */
+    public <T extends CdmBase> void update();
+
+    /**
+     * @param sessionOwner
+     * @return
+     */
+    public boolean contains(ICdmEntitySessionEnabled sessionOwner);
+
+    /**
+     * @return
+     */
+    public ICdmEntitySession getNullSession();
+
+}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManagerObserver.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManagerObserver.java
new file mode 100644 (file)
index 0000000..d2e3252
--- /dev/null
@@ -0,0 +1,21 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.session;
+
+/**
+ * @author cmathew
+ * @date 16 Feb 2015
+ *
+ */
+public interface ICdmEntitySessionManagerObserver {
+
+    public void changed();
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/NullSession.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/NullSession.java
new file mode 100644 (file)
index 0000000..eed1b49
--- /dev/null
@@ -0,0 +1,212 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.session;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import net.sf.ehcache.statistics.LiveCacheStatistics;
+import eu.etaxonomy.cdm.api.service.IService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.remoting.cache.EntityCacherDebugResult;
+
+/**
+ * @author cmathew
+ * @date 30 Jul 2015
+ *
+ */
+public class NullSession implements ICdmEntitySession {
+
+    private ICdmEntitySessionEnabled sessionOwner;
+    private final CdmEntitySessionManager cdmEntitySessionManager;
+
+    public NullSession(ICdmEntitySessionEnabled sessionOwner, CdmEntitySessionManager cdmEntitySessionManager) {
+        this.sessionOwner = sessionOwner;
+        this.cdmEntitySessionManager = cdmEntitySessionManager;
+    }
+
+    public void setOwner(ICdmEntitySessionEnabled sessionOwner) {
+        this.sessionOwner = sessionOwner;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getOwner()
+     */
+    @Override
+    public ICdmEntitySessionEnabled getOwner() {
+        return sessionOwner;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getCacheStatistics()
+     */
+    @Override
+    public LiveCacheStatistics getCacheStatistics() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(java.lang.Object, boolean)
+     */
+    @Override
+    public <O> O load(O obj, boolean update) {
+        return obj;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(eu.etaxonomy.cdm.model.common.CdmBase, boolean)
+     */
+    @Override
+    public <T extends CdmBase> T load(T cdmBase, boolean update) {
+        return cdmBase;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(eu.etaxonomy.cdm.api.service.UpdateResult, boolean)
+     */
+    @Override
+    public UpdateResult load(UpdateResult updateResult, boolean update) {
+        return updateResult;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#debug(eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public <T extends CdmBase> EntityCacherDebugResult debug(T cdmBase) {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#debug(java.util.Collection)
+     */
+    @Override
+    public <T extends CdmBase> EntityCacherDebugResult debug(Collection<T> cdmBase) {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#debug()
+     */
+    @Override
+    public <T extends CdmBase> EntityCacherDebugResult debug() {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(java.util.Collection, boolean)
+     */
+    @Override
+    public <T extends CdmBase> Collection<T> load(Collection<T> cdmBaseList, boolean update) {
+        return cdmBaseList;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#setEntitiesAsLatest()
+     */
+    @Override
+    public void setEntitiesAsLatest() {
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getRootEntities()
+     */
+    @Override
+    public <T extends CdmBase> Collection<T> getRootEntities() {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#dispose()
+     */
+    @Override
+    public void dispose() {
+        cdmEntitySessionManager.remove(sessionOwner);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#bind()
+     */
+    @Override
+    public void bind() {
+        cdmEntitySessionManager.bindNullSession(sessionOwner);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#remoteLoad(eu.etaxonomy.cdm.api.service.IService, java.util.UUID)
+     */
+    @Override
+    public <T extends CdmBase> T remoteLoad(IService<T> service, UUID uuid) {
+        T cdmBase = service.load(uuid);
+        return load(cdmBase, false);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#remoteLoad(eu.etaxonomy.cdm.api.service.IService, java.util.UUID, java.util.List)
+     */
+    @Override
+    public <T extends CdmBase> T remoteLoad(IService<T> service, UUID uuid, List<String> propertyPaths) {
+        T cdmBase = service.load(uuid, propertyPaths);
+        return load(cdmBase, false);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#remoteSave(eu.etaxonomy.cdm.api.service.IService, eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public <T extends CdmBase> UUID remoteSave(IService<T> service, T cdmBase) {
+        UUID uuid = service.save(cdmBase).getUuid();
+        load(cdmBase,false);
+        return uuid;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#remoteUpdate(eu.etaxonomy.cdm.api.service.IService, eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public <T extends CdmBase> T remoteUpdate(IService<T> service, T cdmBase) {
+        T mergedCdmBase = service.merge(cdmBase);
+        return mergedCdmBase;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#isActive()
+     */
+    @Override
+    public boolean isActive() {
+        return cdmEntitySessionManager.getActiveSession() == this;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#update()
+     */
+    @Override
+    public <T extends CdmBase> void update() {
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getPropertyPaths(java.lang.Object)
+     */
+    @Override
+    public List<String> getPropertyPaths(Object obj) {
+        Map<Object, List<String>> propertyPathsMap = sessionOwner.getPropertyPathsMap();
+        if(propertyPathsMap == null || propertyPathsMap.isEmpty()) {
+            return null;
+        }
+        return propertyPathsMap.get(obj);
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySession.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySession.java
new file mode 100644 (file)
index 0000000..5db78a9
--- /dev/null
@@ -0,0 +1,202 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.session.mock;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.UUID;
+
+import net.sf.ehcache.statistics.LiveCacheStatistics;
+import eu.etaxonomy.cdm.api.service.IService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.remoting.cache.EntityCacherDebugResult;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
+
+/**
+ * @author cmathew
+ * @date 29 Jan 2015
+ *
+ */
+public class MockCdmEntitySession implements ICdmEntitySession  {
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(java.lang.Object)
+     */
+    @Override
+    public <O extends Object> O load(O obj, boolean update) {
+        return obj;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public  <T extends CdmBase> T load(T cdmBase, boolean update) {
+        return cdmBase;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(java.util.Collection)
+     */
+    @Override
+    public  <T extends CdmBase> Collection<T> load(Collection<T> cdmBaseList, boolean update) {
+        return cdmBaseList;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#setEntitiesAsLatest()
+     */
+    @Override
+    public void setEntitiesAsLatest() {
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#dispose()
+     */
+    @Override
+    public void dispose() {
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#bind()
+     */
+    @Override
+    public void bind() {
+        // TODO Auto-generated method stub
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#debug(eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public  <T extends CdmBase> EntityCacherDebugResult debug(T cdmBase) {
+
+        return new EntityCacherDebugResult();
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(java.util.UUID, eu.etaxonomy.cdm.api.service.IService)
+     */
+    @Override
+    public <T extends CdmBase> T remoteLoad(IService<T> service, UUID uuid) {
+        return service.load(uuid);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(eu.etaxonomy.cdm.api.service.IService, java.util.UUID, java.util.List)
+     */
+    @Override
+    public <T extends CdmBase> T remoteLoad(IService<T> service, UUID uuid, List<String> propertyPaths) {
+        return service.load(uuid, propertyPaths);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#save(eu.etaxonomy.cdm.api.service.IService, eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public <T extends CdmBase> UUID remoteSave(IService<T> service, T cdmBase) {
+        return service.save(cdmBase).getUuid();
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#update(eu.etaxonomy.cdm.api.service.IService, eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    @Override
+    public <T extends CdmBase> T remoteUpdate(IService<T> service, T cdmBase) {
+        return cdmBase;
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getOwner()
+     */
+    @Override
+    public ICdmEntitySessionEnabled getOwner() {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getCacheStatistics()
+     */
+    @Override
+    public LiveCacheStatistics getCacheStatistics() {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#isActive()
+     */
+    @Override
+    public boolean isActive() {
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getRootEntities()
+     */
+    @Override
+    public <T extends CdmBase> List<T> getRootEntities() {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#debug(java.util.List)
+     */
+    @Override
+    public <T extends CdmBase> EntityCacherDebugResult debug(Collection<T> cdmBase) {
+
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#debug()
+     */
+    @Override
+    public <T extends CdmBase> EntityCacherDebugResult debug() {
+
+        return null;
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#update()
+     */
+    @Override
+    public <T extends CdmBase> void update() {
+        // TODO Auto-generated method stub
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(eu.etaxonomy.cdm.api.service.UpdateResult, boolean)
+     */
+    @Override
+    public UpdateResult load(UpdateResult updateResult, boolean update) {
+        return updateResult;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getPropertyPath(java.lang.Class)
+     */
+    @Override
+    public List<String> getPropertyPaths(Object obj) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySessionManager.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySessionManager.java
new file mode 100644 (file)
index 0000000..081cffb
--- /dev/null
@@ -0,0 +1,139 @@
+package eu.etaxonomy.taxeditor.session.mock;
+
+import java.util.Collection;
+
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver;
+
+
+public class MockCdmEntitySessionManager implements ICdmEntitySessionManager {
+
+
+       @Override
+       public void bind(ICdmEntitySessionEnabled sessionOwner) {
+       }
+
+       @Override
+       public <T> T load(T obj, boolean update) {
+               return obj;
+       }
+
+       @Override
+       public <T extends CdmBase> T load(T obj, boolean update) {
+               return obj;
+       }
+
+
+       @Override
+       public <T extends CdmBase> Collection<T> load(Collection<T> cdmBaseList, boolean update) {
+               return cdmBaseList;
+       }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#newSession(eu.etaxonomy.taxeditor.session.ISessionEventListener, boolean)
+     */
+    @Override
+    public ICdmEntitySession newSession(ICdmEntitySessionEnabled sessionOwner, boolean setAsActive) {
+        return new MockCdmEntitySession();
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#getActiveSession()
+     */
+    @Override
+    public ICdmEntitySession getActiveSession() {
+        return new MockCdmEntitySession();
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#getSessions()
+     */
+    @Override
+    public Collection<ICdmEntitySession> getSessions() {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#addSessionObserver(eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver)
+     */
+    @Override
+    public void addSessionObserver(ICdmEntitySessionManagerObserver sessionObserver) {
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#isRemoting()
+     */
+    @Override
+    public boolean isRemoting() {
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#dispose(eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled)
+     */
+    @Override
+    public void dispose(ICdmEntitySessionEnabled owner) {
+
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#disposeAll()
+     */
+    @Override
+    public void disposeAll() {
+
+
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#update()
+     */
+    @Override
+    public <T extends CdmBase> void update() {
+        // TODO Auto-generated method stub
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#load(eu.etaxonomy.cdm.api.service.UpdateResult, boolean)
+     */
+    @Override
+    public UpdateResult load(UpdateResult updateResult, boolean update) {
+        return updateResult;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#contains(eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled)
+     */
+    @Override
+    public boolean contains(ICdmEntitySessionEnabled sessionOwner) {
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#bindNullSession(eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled)
+     */
+    @Override
+    public ICdmEntitySession bindNullSession(ICdmEntitySessionEnabled sessionOwner) {
+        return new MockCdmEntitySession();
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#getNullSession()
+     */
+    @Override
+    public ICdmEntitySession getNullSession() {
+        return new MockCdmEntitySession();
+    }
+
+
+
+}
index 1bc42c44fbef5dc66862dd34bcc8e7793e529717..f2debccfeaae80793d8ff61b1984d24efa5c8c38 100644 (file)
 package org.hibernate.collection.internal;
 
 import java.io.Serializable;
+import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
 
 import javax.naming.NamingException;
 
@@ -63,10 +59,11 @@ import org.hibernate.pretty.MessageHelper;
 import org.hibernate.type.Type;
 import org.jboss.logging.Logger;
 
-import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
-import eu.etaxonomy.cdm.api.service.ICommonService;
-import eu.etaxonomy.cdm.model.common.PersistentMultiLanguageText;
+import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.remoting.CdmEagerLoadingException;
+import eu.etaxonomy.taxeditor.remoting.cache.ProxyUtils;
+import eu.etaxonomy.taxeditor.service.ICachedCommonService;
 
 /**
  * Base class implementing {@link org.hibernate.collection.spi.PersistentCollection}
@@ -596,26 +593,25 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
         * @throws LazyInitializationException if we cannot initialize
         */
        protected final void initialize(final boolean writing) {
-               // In remoting we are sure that session is null
-               // both when using property paths and switching off conversations
-               if(session == null && remoting) {
-                       remoteInitialize();
-               }
-
-               if ( initialized ) {
-                       return;
-               }
-
-
-               withTemporarySessionIfNeeded(
-                               new LazyInitializationWork<Object>() {
-                                       @Override
-                                       public Object doWork() {
-                                               session.initializeCollection( AbstractPersistentCollection.this, writing );
-                                               return null;
-                                       }
-                               }
-               );
+           if ( initialized ) {
+               return;
+           }
+
+           // In remoting we are sure that session is null
+           // both when using property paths and switching off conversations
+           if(session == null && remoting) {
+               remoteInitialize();
+           } else {
+               withTemporarySessionIfNeeded(
+                       new LazyInitializationWork<Object>() {
+                           @Override
+                           public Object doWork() {
+                               session.initializeCollection( AbstractPersistentCollection.this, writing );
+                               return null;
+                           }
+                       }
+                       );
+           }
        }
 
        private void throwLazyInitializationExceptionIfNotConnected() {
@@ -1284,17 +1280,12 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
        // readElementExistence(final Object element)
        // readElementByIndex(final Object index)
 
-       private static ICdmApplicationConfiguration configuration;
+       private static CdmApplicationRemoteConfiguration configuration;
        private static boolean remoting = false;
 
-       public static void setConfiguration(ICdmApplicationConfiguration conf) {
+       public static void setConfiguration(CdmApplicationRemoteConfiguration conf) {
+           remoting = true;
                configuration = conf;
-
-               if(conf instanceof CdmApplicationRemoteController) {
-                       remoting = true;
-               } else {
-                       remoting = false;
-               }
        }
 
 
@@ -1305,99 +1296,46 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
                        try {
                                String role = getRole();
                                String fieldName = role.substring(role.lastIndexOf(".") + 1);
-                               log.info("--> Remote Lazy Initializing " + getRole() + " , key : " + getKey() + " , field : " + fieldName);
+                               log.info("--> Remote Lazy Initializing Collection " + getRole() + " , owner : " + getOwner().getClass() + "/" + getKey() + " , field : " + fieldName);
                                Object owner = getOwner();
-
+                               CdmBase cdmBase;
+                               if(owner instanceof CdmBase) {
+                                   cdmBase = (CdmBase)owner;
+                               } else {
+                                   throw new HibernateException("Owner of persistent collection is not a cdm entity");
+                               }
                                if(configuration == null) {
                                        throw new HibernateException("CdmApplicationRemoteConfiguration not initialized (null)");
                                }
-                               ICommonService commonService = configuration.getCommonService();
-                               if(commonService == null) {
+                               ICachedCommonService cachedCommonService = configuration.getCachedCommonService();
+                               if(cachedCommonService == null) {
                                        throw new HibernateException("commonService not initialized (null)");
                                }
 
-//                             PersistentCollection col = commonService.initializeCollection(this);
-//                             afterInitialize();
-//
-//                             Class<?> clazz = getClass();
-//                             if (clazz != null) {
-//                                     CollectionField cf = getCollectionField(col);
-//                                     Field field = clazz.getDeclaredField(cf.getFieldName());
-//                                     field.setAccessible(true);
-//                                     field.set(this, cf.getCollection());
-//                             }
-                       } catch (Exception ex) {
-                               log.warn(ex.getMessage());
-                       }
-                       log.warn("This code is invalid");
-               }
-       }
-
-
-       private CollectionField getCollectionField(PersistentCollection pc) {
-               if(pc != null) {
-                       if(pc instanceof PersistentSet) {
-                               return new CollectionField(new HashSet((Set)pc), "set");
-                       }
-                       if(pc instanceof PersistentSortedSet) {
-                               return new CollectionField(new TreeSet((Set)pc), "set");
-                       }
-                       if(pc instanceof PersistentList) {
-                               return new CollectionField(new ArrayList((List)pc), "list");
-                       }
-                       if(pc instanceof PersistentMap || pc instanceof PersistentMultiLanguageText) {
-                               return new CollectionField(new HashMap((Map)pc), "map");
-                       }
-                       if(pc instanceof PersistentSortedMap) {
-                               return new CollectionField(new TreeMap((Map)pc), "map");
-                       }
-               }
-               return null;
-       }
+                               //Object obj = ProxyUtils.deproxy(cachedCommonService.initializeCollection(this));
+                               Object obj = ProxyUtils.deproxy(cachedCommonService.initializeCollection(cdmBase.getUuid(), fieldName));
+                               if(ProxyUtils.isProxy(obj)) {
+                                   throw new HibernateException("Persistent Collection initialized but is still a proxy");
+                               }
+                               afterInitialize();
+
+                               Class<?> clazz = getClass();
+                               if (clazz != null) {
+                                       //CollectionField cf = cachedCommonService.getCollectionField(col);
+                                       //cachedCommonService.updatePersistentCollection(cf);
+                                   Object collectionType = ProxyUtils.getCollectionType(obj);
+                                       Field field = clazz.getDeclaredField(collectionType.toString());
+                                       field.setAccessible(true);
+                                       field.set(this, obj);
+                                       ProxyUtils.setRoleValueInOwner(owner, role, obj);
 
-       private String getCollectionFieldName(PersistentCollection pc) {
-               if(pc != null) {
-                       if(pc instanceof PersistentSet || pc instanceof PersistentSortedSet) {
-                               return "set";
-                       }
-                       if(pc instanceof PersistentList) {
-                               return "list";
-                       }
-                       if(pc instanceof PersistentMap || pc instanceof PersistentMultiLanguageText) {
-                               return "map";
+                               }
+                       } catch (Exception ex) {
+                               throw new CdmEagerLoadingException(ex);
                        }
                }
-               return null;
-       }
-
-       private class CollectionField {
-               private final Object col;
-               private final String fieldName;
-               public CollectionField(Object col, String fieldName) {
-                       this.col = col;
-                       this.fieldName = fieldName;
-               }
-
-               public Object getCollection() {
-                       return this.col;
-               }
-
-               public String getFieldName() {
-                       return this.fieldName;
-               }
-       }
-
-       public static boolean isInitialized(List list) {
-               return ((AbstractPersistentCollection)list).initialized;
        }
 
-       public static boolean isInitialized(Map map) {
-               return ((AbstractPersistentCollection)map).initialized;
-       }
-
-       public static boolean isInitialized(Set set) {
-               return ((AbstractPersistentCollection)set).initialized;
-       }
 
 
 }
index 4d2db1551f9dc872e5a57a94573326f1870cb469..591594804851422ea9f6ed3ebc1fb14fd54020f0 100644 (file)
@@ -24,7 +24,6 @@
 package org.hibernate.proxy;
 
 import java.io.Serializable;
-import java.util.Set;
 
 import javax.naming.NamingException;
 
@@ -33,21 +32,17 @@ import org.hibernate.LazyInitializationException;
 import org.hibernate.Session;
 import org.hibernate.SessionException;
 import org.hibernate.TransientObjectException;
-import org.hibernate.collection.internal.AbstractPersistentCollection;
 import org.hibernate.engine.spi.EntityKey;
 import org.hibernate.engine.spi.SessionFactoryImplementor;
 import org.hibernate.engine.spi.SessionImplementor;
 import org.hibernate.internal.SessionFactoryRegistry;
 import org.hibernate.persister.entity.EntityPersister;
 import org.jboss.logging.Logger;
-import org.springframework.beans.factory.annotation.Autowire;
-import org.springframework.beans.factory.annotation.Configurable;
-import org.springframework.stereotype.Component;
 
-import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
-import eu.etaxonomy.cdm.api.service.ICommonService;
+import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration;
 import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.remoting.cache.ProxyUtils;
+import eu.etaxonomy.taxeditor.service.ICachedCommonService;
 
 /**
  * Convenience base class for lazy initialization handlers.  Centralizes the basic plumbing of doing lazy
@@ -56,8 +51,6 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
  *
  * @author Gavin King
  */
-@Component
-@Configurable(dependencyCheck = true,autowire = Autowire.BY_TYPE)
 public abstract class AbstractLazyInitializer implements LazyInitializer {
        private static final Logger log = Logger.getLogger( AbstractLazyInitializer.class );
 
@@ -207,14 +200,14 @@ public abstract class AbstractLazyInitializer implements LazyInitializer {
                                SessionFactoryImplementor sf = (SessionFactoryImplementor)
                                                SessionFactoryRegistry.INSTANCE.getSessionFactory( sessionFactoryUuid );
                                SessionImplementor session = (SessionImplementor) sf.openSession();
-                               
+
                                // TODO: On the next major release, add an
                                // 'isJTA' or 'getTransactionFactory' method to Session.
                                boolean isJTA = session.getTransactionCoordinator()
                                                .getTransactionContext().getTransactionEnvironment()
                                                .getTransactionFactory()
                                                .compatibleWithJtaSynchronization();
-                               
+
                                if ( !isJTA ) {
                                        // Explicitly handle the transactions only if we're not in
                                        // a JTA environment.  A lazy loading temporary session can
@@ -422,48 +415,46 @@ public abstract class AbstractLazyInitializer implements LazyInitializer {
        public void setUnwrap(boolean unwrap) {
                this.unwrap = unwrap;
        }
-       
+
        /** Below is section of code which makes remote service calls */
-       
-       private static ICdmApplicationConfiguration configuration;
+
+       private static CdmApplicationRemoteConfiguration configuration;
        private static boolean remoting = false;
-       
-       public static void setConfiguration(ICdmApplicationConfiguration conf) {
-               configuration = conf;
-               
-               if(conf instanceof CdmApplicationRemoteController) {
-                       remoting = true;
-               } else {
-                       remoting = false;
-               }
+
+       public static void setConfiguration(CdmApplicationRemoteConfiguration conf) {
+           remoting = true;
+           configuration = conf;
        }
-       
-       
-       private void remoteInitialize() {               
-               
-               if(!initialized) {                              
+
+
+       private void remoteInitialize() {
+
+               if(!initialized) {
                        int classid = ((Integer)getIdentifier()).intValue();
-                       log.debug("--> Remote Lazy Initializing" + getEntityName() + " with id " + classid);
+                       log.info("--> Remote Lazy Initializing Object " + getEntityName() + " with id " + classid);
                        Class clazz;
                        try {
-                               clazz = (Class<? extends CdmBase>) Class.forName(getEntityName());
+                               clazz = Class.forName(getEntityName());
                        } catch (ClassNotFoundException e) {
                                throw new HibernateException("Class for " + getEntityName() + " not found", e);
                        }
                        if(configuration == null) {
                                throw new HibernateException("CdmApplicationRemoteConfiguration not initialized (null)");
                        }
-                       ICommonService commonService = configuration.getCommonService();
-                       if(commonService == null) {
+                       ICachedCommonService cachedCommonService = configuration.getCachedCommonService();
+                       if(cachedCommonService == null) {
                                throw new HibernateException("commonService not initialized (null)");
                        }
-                       
-                       CdmBase cdmBase = CdmBase.deproxy(commonService.find(clazz,classid),clazz);
+
+                       CdmBase cdmBase = cachedCommonService.find(clazz,classid);
+            if(ProxyUtils.isProxy(cdmBase)) {
+                throw new HibernateException("CdmBase Object initialized but is still a proxy");
+            }
                        setImplementation(cdmBase);
-                       
+
                }
        }
-       
+
        public static boolean isInitialized(AbstractLazyInitializer obj) {
                return obj.initialized;
        }
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/.svnignore b/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/.svnignore
new file mode 100644 (file)
index 0000000..a09ae97
--- /dev/null
@@ -0,0 +1 @@
+cdmlib-remote-webapp.war
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/jetty-runner-9.2.3.v20140905.jar b/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/jetty-runner-9.2.3.v20140905.jar
new file mode 100644 (file)
index 0000000..91c88d6
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/jetty-runner-9.2.3.v20140905.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/start-9.2.3.v20140905.jar b/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/start-9.2.3.v20140905.jar
new file mode 100644 (file)
index 0000000..ef2faaf
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/start-9.2.3.v20140905.jar differ
index e3c0f9fd8ef75e7c6a175a3d9c1a5fd0d74c6dba..833ee86cd6c40cbdd0d94175894fa0c8818bfb60 100644 (file)
 <?xml version="1.0" encoding="UTF-8"?>\r
 <beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xmlns:context="http://www.springframework.org/schema/context"\r
-       xmlns:tx="http://www.springframework.org/schema/tx"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
-    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd\r
-    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">\r
-\r
-       \r
-   <bean id="agentService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/agent.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IAgentService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="annotationService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/annotation.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IAnnotationService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="auditeventService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/auditevent.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IAuditEventService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="classificationService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/classification.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IClassificationService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="collectionService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/collection.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.ICollectionService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="commonService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/common.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.ICommonService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="descriptionService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/description.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IDescriptionService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-       \r
-   <bean id="editGeoService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/editgeo.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.ext.geo.IEditGeoService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="featureNodeService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/featurenode.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IFeatureNodeService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="featureTreeService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/featuretree.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IFeatureTreeService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="groupService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/group.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IGroupService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="identificationKeyService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/identificationkey.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IIdentificationKeyService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="locationService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/location.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.ILocationService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="markerService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/marker.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IMarkerService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="mediaService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/media.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IMediaService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="nameService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/name.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.INameService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="occurrenceService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/occurrence.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IOccurrenceService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="polytomousKeyNodeService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/polytomouskeynode.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="polytomousKeyService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/polytomouskey.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IPolytomousKeyService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="referenceService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/reference.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IReferenceService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-       \r
-<!-- \r
-   <bean id="serviceService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/service.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IService</value>\r
-               </property>\r
-       </bean>\r
- -->\r
\r
-   <bean id="taxonNodeService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/taxonnode.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.ITaxonNodeService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="taxonService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/taxon.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.ITaxonService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="termService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/term.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.ITermService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="userService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/user.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IUserService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="vocabularyService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/vocabulary.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IVocabularyService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-   <bean id="workingSetService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/workingset.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IWorkingSetService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-       \r
-   <bean id="grantedAuthorityService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/grantedauthority.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IGrantedAuthorityService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-       \r
-   <bean id="databaseService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/database.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.IDatabaseService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-       \r
-   <bean id="lsidAuthorityService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/lsidauthoruty.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.lsid.LSIDAuthorityService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-       \r
-   <bean id="lsidMetadataService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/lsidmetadata.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.lsid.LSIDMetadataService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-       \r
-   <bean id="lsiDataService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/lsiddata.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.lsid.LSIDDataService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-\r
-       <bean id="providerManager"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/authenticationManager.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>org.springframework.security.authentication.AuthenticationManager</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-       \r
-       <bean id="primerService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/primer.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.molecular.IPrimerService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-       \r
-       <bean id="amplificationService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/amplification.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.molecular.IAmplificationService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
-       \r
-       <bean id="sequenceService"\r
-               class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
-               <property name="serviceUrl">\r
-                       <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/sequence.service</value>\r
-               </property>\r
-               <property name="serviceInterface">\r
-                       <value>eu.etaxonomy.cdm.api.service.molecular.ISequenceService</value>\r
-               </property>\r
-               <property name="httpInvokerRequestExecutor">\r
-                       <bean class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />\r
-               </property>\r
-       </bean>\r
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"\r
+  xmlns:tx="http://www.springframework.org/schema/tx"\r
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd\r
+    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd\r
+    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">\r
+\r
+\r
+  <bean id="agentService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/agent.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IAgentService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="annotationService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/annotation.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IAnnotationService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="auditeventService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/auditevent.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IAuditEventService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="classificationService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/classification.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IClassificationService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="collectionService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/collection.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.ICollectionService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="commonService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/common.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.ICommonService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="descriptionService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/description.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IDescriptionService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="editGeoService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/editgeo.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.ext.geo.IEditGeoService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="featureNodeService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/featurenode.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IFeatureNodeService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="featureTreeService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/featuretree.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IFeatureTreeService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="groupService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/group.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IGroupService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="identificationKeyService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/identificationkey.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IIdentificationKeyService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="locationService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/location.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.ILocationService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="markerService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/marker.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IMarkerService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="mediaService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/media.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IMediaService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="nameService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/name.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.INameService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="occurrenceService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/occurrence.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IOccurrenceService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="polytomousKeyNodeService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/polytomouskeynode.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="polytomousKeyService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/polytomouskey.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IPolytomousKeyService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="referenceService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/reference.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IReferenceService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="taxonNodeService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/taxonnode.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.ITaxonNodeService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="taxonService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/taxon.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.ITaxonService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="termService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/term.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.ITermService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.TermServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="userService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting-public/user.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IUserService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean\r
+        class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="vocabularyService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/vocabulary.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IVocabularyService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="workingSetService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/workingset.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IWorkingSetService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="grantedAuthorityService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/grantedauthority.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IGrantedAuthorityService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="databaseService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/database.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IDatabaseService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="lsidAuthorityService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/lsidauthoruty.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.lsid.LSIDAuthorityService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="lsidMetadataService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/lsidmetadata.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.lsid.LSIDMetadataService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="lsiDataService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/lsiddata.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.lsid.LSIDDataService</value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+\r
+\r
+  <bean id="primerService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/primer.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.molecular.IPrimerService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="amplificationService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/amplification.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.molecular.IAmplificationService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="sequenceService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/sequence.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.molecular.ISequenceService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="entityValidationService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/entityvalidation.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IEntityValidationService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="entityConstraintViolationService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/entityconstraintviolation.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.IEntityConstraintViolationService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+  \r
+  <bean id="ioService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/io.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.io.service.IIOService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmAuthenticatedHttpInvokerRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="testService" lazy-init="true"\r
+    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">\r
+    <property name="serviceUrl">\r
+      <value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/test.service\r
+      </value>\r
+    </property>\r
+    <property name="serviceInterface">\r
+      <value>eu.etaxonomy.cdm.api.service.ITestService\r
+      </value>\r
+    </property>\r
+    <property name="httpInvokerRequestExecutor">\r
+      <bean class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor">\r
+        <property name="readTimeout" value="0" />\r
+      </bean>\r
+    </property>\r
+\r
+  </bean>\r
 \r
 \r
 \r
index 524d83c4ddd1ff18324aa3de9035021bdb620b29..f09d0c992267aad02f7cee2b7af1d28d7d9cb05e 100644 (file)
@@ -1,31 +1,37 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
+  xmlns:tx="http://www.springframework.org/schema/tx"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
     http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">
-       
-       
-    <!-- Default application context and term initializer -->
-  <import resource="classpath:/eu/etaxonomy/cdm/defaultApplicationContext.xml"/>
+
+  
+  <!-- Default application context and term initializer -->
+  <import resource="classpath:/eu/etaxonomy/cdm/defaultApplicationContext.xml" />
   <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">
     <property name="omit" value="false" />
   </bean>
-    
-  <import resource="classpath:/eu/etaxonomy/cdm/remote.xml"/>
-  <import resource="classpath:eu/etaxonomy/cdm/remote/json/jsonConfigurations.xml"/>
-  
-  <context:component-scan base-package="eu/etaxonomy/cdm/ext"/>
-  
+
+  <context:component-scan base-package="eu/etaxonomy/taxeditor/session" />
+  <import resource="classpath:/eu/etaxonomy/cdm/remote.xml" />
+  <import resource="classpath:eu/etaxonomy/cdm/remote/json/jsonConfigurations.xml" />
+
+  <context:component-scan base-package="eu/etaxonomy/cdm/ext" />
+
   <context:component-scan base-package="eu/etaxonomy/cdm/remote">
-    <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.remote\.config\.DataSourceConfigurer" />
-    <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.remote\.config\.LoggingConfigurer" />
-    <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.remote\.view\.PatternViewResolver" />
-    <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.remote\.vaadin\..*" />
-    <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.remote\.controller\..*Portal.*" /> 
+    <context:exclude-filter type="regex"
+      expression="eu\.etaxonomy\.cdm\.remote\.config\.DataSourceConfigurer" />
+    <context:exclude-filter type="regex"
+      expression="eu\.etaxonomy\.cdm\.remote\.config\.LoggingConfigurer" />
+    <context:exclude-filter type="regex"
+      expression="eu\.etaxonomy\.cdm\.remote\.view\.PatternViewResolver" />
+    <context:exclude-filter type="regex"
+      expression="eu\.etaxonomy\.cdm\.remote\.vaadin\..*" />
+    <context:exclude-filter type="regex"
+      expression="eu\.etaxonomy\.cdm\.remote\.controller\..*Portal.*" />
   </context:component-scan>
-  
+
+  <context:component-scan base-package="eu/etaxonomy/taxeditor/remoting/session/mock" />
 
 </beans>
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml b/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml
new file mode 100644 (file)
index 0000000..e48ff8a
--- /dev/null
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE hibernate-configuration PUBLIC\r
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"\r
+ "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">\r
+\r
+<hibernate-configuration>\r
+    <session-factory>\r
+\r
+      <property name="connection.release_mode">after_transaction</property>\r
+\r
+      <!-- Connection Pooling -->\r
+<!--       <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property> -->\r
+      <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl</property>\r
+           <!--\r
+          Configuring the C3P0ConnectionProvider\r
+          ========================================\r
+          see http://www.mchange.com/projects/c3p0/index.html#hibernate-specific\r
+          and also org.springframework.orm.hibernate3.AbstractSessionFactoryBean.setDataSource(DataSource dataSource)\r
+\r
+          IMPORTANT:\r
+          Because of the constraint (1) the org.hibernate.connection.C3P0ConnectionProvider are not be used\r
+          for the Cdm Library because it requires the dataSource bean in some cases.\r
+\r
+          (1)\r
+          Do NOT specify the dataSource in the sessionFactory for example in the\r
+          org.springframework.orm.hibernate3.LocalSessionFactoryBean\r
+          !!!==> If *dataSource* is set, this will override corresponding settings in Hibernate properties.!!!\r
+                         If this is set, the Hibernate settings should not define a connection provider to\r
+                     avoid meaningless double configuration.\r
+          (2)\r
+          Hibernate uses the hibernate.c3p0.max_size property to determine if c3p0\r
+          is beeing used.  Therefore the max_size property MUST be set. - maybe not need in hibernate 3.4 +\r
+\r
+          (3) If you are using Hibernate's C3P0ConnectionProvider you must set the following properties\r
+          in your hibernate configuration, using hibernate-specific configuration keys.\r
+          All other properties must be defined as usual in a c3p0.properties file.\r
+          This is confusing, and will hopefully be simplified some time in the future, but for now...\r
+          \r
+          DOCUMENTATION UPDATE (2015-05-22):\r
+          Hibernate's C3P0ConnectionProvider renames 7 c3p0 configuration properties, which, \r
+          if set in your hibernate configuration, will override any configuration you may have set \r
+          in a c3p0.properties file.\r
+          TODO: are points (2) and (3) still valid? I don't think so! (AK)\r
+\r
+            hibernate.c3p0.acquire_increment\r
+                       hibernate.c3p0.idle_test_period\r
+                       hibernate.c3p0.timeout\r
+                       hibernate.c3p0.max_size\r
+                       hibernate.c3p0.max_statements\r
+                       hibernate.c3p0.min_size\r
+                       hibernate.c3p0.validate\r
+      -->\r
+      <mapping package="eu.etaxonomy.cdm.model.common"/>\r
+      <!-- Annotation Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.agent.Address"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.agent.AgentBase"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.agent.Contact"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.agent.Institution"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.agent.InstitutionalMembership"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.agent.Person"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.agent.Team"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.agent.TeamOrPersonBase"/>\r
+      <!-- Common Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.common.Annotation"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.AnnotationType"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.Credit"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.DefinedTerm"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.DefinedTermBase"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.Extension"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.ExtensionType"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.IdentifiableSource"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.Identifier"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.IntextReference"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.Group"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.Language"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.LanguageString"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.LSID"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.LSIDAuthority"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.Marker"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.MarkerType"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTerm"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermBase"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermVocabulary"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.OriginalSourceBase"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.RelationshipTermBase"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.Representation"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.TermVocabulary"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.common.User"/>\r
+      <!-- Description Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.description.CategoricalData"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.CommonTaxonName"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionBase"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementBase"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementSource"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.Distribution"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.Feature"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.FeatureNode"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.FeatureTree"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.KeyStatement"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.MediaKey"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.IndividualsAssociation"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.MeasurementUnit"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.MultiAccessKey"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKey"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKeyNode"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.QuantitativeData"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.SpecimenDescription"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.State"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.StateData"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasure"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.TaxonDescription"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.TaxonInteraction"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.TaxonNameDescription"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.TextData"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.TextFormat"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.description.WorkingSet"/>\r
+      <!-- Location Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.location.NamedArea"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaLevel"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaType"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.location.ReferenceSystem"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.location.Point"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.location.Country"/>\r
+      <!-- Media Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.media.AudioFile"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.media.ImageFile"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.media.Media"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentation"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentationPart"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.media.MovieFile"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.media.Rights"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.media.RightsType"/>\r
+      <!-- Meta Data Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.metadata.CdmMetaData"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.metadata.CdmPreference"/>\r
+      <!-- Molecular Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.molecular.PhylogeneticTree"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.molecular.DnaQuality"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.molecular.DnaSample"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.molecular.Amplification"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.molecular.AmplificationResult"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.molecular.Primer"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.molecular.Sequence"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.molecular.SequenceString"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.molecular.SingleRead"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.molecular.SingleReadAlignment"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.molecular.Cloning"/>\r
+      <!-- Name Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.name.BacterialName"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.BotanicalName"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.CultivarPlantName"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.HomotypicalGroup"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationship"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationshipType"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.NameRelationship"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.NameRelationshipType"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignation"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalCode"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatus"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatusType"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.NonViralName"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.Rank"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.TaxonNameBase"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.TypeDesignationBase"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.ViralName"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.name.ZoologicalName"/>\r
+      <!-- Occurrence Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.Collection"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEvent"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEventType"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivedUnit"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.MaterialOrMethodEvent"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.MediaSpecimen"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.DeterminationEvent"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.FieldUnit"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.GatheringEvent"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.PreservationMethod"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase"/>\r
+      <!-- Reference Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.reference.Reference"/>\r
+\r
+      <!-- Taxon Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.taxon.Synonym"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.taxon.SynonymRelationship"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.taxon.Taxon"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonBase"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNode"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.taxon.Classification"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType"/>\r
+      \r
+      <!-- Validation Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.validation.EntityValidation"/>\r
+      <mapping class="eu.etaxonomy.cdm.model.validation.EntityConstraintViolation"/>\r
+      \r
+      <!-- View Package -->\r
+      <mapping class="eu.etaxonomy.cdm.model.view.AuditEvent"/>\r
+      \r
+      <!-- for filling caches -->\r
+      <!-- since hibernate 4 listeners are not handled via hibernate.cfg.xml anymore -->\r
+      <!--  http://stackoverflow.com/questions/8616146/eventlisteners-using-hibernate-4-0-with-spring-3-1-0-release\r
+            https://community.jboss.org/wiki/HibernateCoreMigrationGuide40 -->\r
+\r
+    </session-factory>\r
+</hibernate-configuration>
\ No newline at end of file
index e67e9b4534c51d886c6815d8e473d40bdebce036..604b197fbf54a92f9dd9fe280cbd241fd55c9ddf 100644 (file)
@@ -1,40 +1,81 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xmlns:context="http://www.springframework.org/schema/context"\r
-       xmlns:tx="http://www.springframework.org/schema/tx"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
-    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
-    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">\r
-       \r
-       \r
-    <!--  <bean id="remoteTermInitializer" class="eu.etaxonomy.cdm.remote.service.RemoteTermInitializer"/>-->\r
-        \r
-       <context:annotation-config/>\r
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"\r
+  xmlns:tx="http://www.springframework.org/schema/tx"\r
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
+    http://www.springframework.org/schema/context  http://www.springframework.org/schema/context/spring-context-3.1.xsd">\r
+\r
+  <import resource="classpath:/eu/etaxonomy/cdm/httpInvokerServiceClients.xml" />\r
+\r
+  <bean id="cdmEntitySessionManager"  \r
+    class="eu.etaxonomy.taxeditor.session.CdmEntitySessionManager" />\r
+\r
+  <bean id="cdmApplicationRemoteConfiguration" \r
+    class="eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration" />\r
+\r
+  \r
+  <bean id="cdmServiceRequestExecutor" \r
+    class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor" />\r
+    \r
+  <bean id="cachedCommonService" \r
+    class="eu.etaxonomy.taxeditor.service.CachedCommonServiceImpl" />\r
+    \r
+  \r
+  <bean id="defaultExport"\r
+    class="eu.etaxonomy.cdm.io.common.CdmApplicationAwareDefaultExport" />\r
     \r
-    <import resource="classpath:/eu/etaxonomy/cdm/httpInvokerServiceClients.xml"/>\r
+  <bean id="jaxbExport"\r
+    class="eu.etaxonomy.cdm.io.jaxb.JaxbExport" />\r
     \r
-    <bean id="cdmApplicationRemoteConfiguration" class="eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration"/>    \r
+  <bean id="accessDecisionManager" \r
+    class="eu.etaxonomy.cdm.persistence.hibernate.permission.UnanimousBasedUnrevokable" >\r
     \r
-       <import resource="classpath:/eu/etaxonomy/cdm/remoting_services_security.xml"/>         \r
-       \r
-       <bean id="cdmTermCacher" class="eu.etaxonomy.cdm.api.cache.CdmTermCacher"/>\r
-       \r
-       \r
-       <!-- EditGeoService was moved to ext. Therefore it will not be found by the default component scan.
-       We added it here because the Editor needs it. However, this is only a temporary solution.
-       In the future we want to pass in an application context with the editor. -->\r
-\r
-\r
-       <!-- <bean id="conversationHolder" class="eu.etaxonomy.cdm.api.conversation.ConversationHolder" scope="prototype"/> -->\r
-\r
-       <!-- TODO move to io -->\r
-<!-- \r
-       <context:component-scan base-package="eu/etaxonomy/cdm/io">\r
-               <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.berlinModel.*" />\r
-       </context:component-scan>\r
- -->\r
-       <!-- enable the configuration of transactional behavior based on annotations -->\r
-       <!-- <tx:annotation-driven transaction-manager="transactionManager"/> -->\r
+    <property name="decisionVoters">\r
+      <list>\r
+        <bean\r
+          class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.GrantAlwaysVoter" />\r
+        <bean\r
+          class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.TaxonNodeVoter" />\r
+        <bean\r
+          class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.TaxonBaseVoter" />\r
+        <bean\r
+          class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.DescriptionBaseVoter" />\r
+        <bean\r
+          class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.DescriptionElementVoter" />\r
+      </list>\r
+    </property>\r
+  </bean>\r
+\r
+  <!-- CdmPermissionEvaluator.hasPermissions() evaluates the CdmPermissions \r
+    like TAXONNODE.UPDATE{20c8f083-5870-4cbd-bf56-c5b2b98ab6a7} -->\r
+  <bean id="cdmPermissionEvaluator" \r
+    class="eu.etaxonomy.cdm.persistence.hibernate.permission.CdmPermissionEvaluator">\r
+    <property name="accessDecisionManager" ref="accessDecisionManager" />\r
+  </bean>\r
+\r
+  <bean id="authenticationManager"\r
+    class="org.springframework.security.authentication.ProviderManager">\r
+    <property name="providers">\r
+      <list>\r
+        <ref local="daoAuthenticationProvider" />\r
+      </list>\r
+    </property>\r
+  </bean>\r
+\r
+  <bean id="daoAuthenticationProvider" \r
+    class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">\r
+    <property name="userDetailsService" ref="userService" />\r
+    <property name="saltSource" ref="saltSource" />\r
+    <property name="passwordEncoder" ref="passwordEncoder" />\r
+  </bean>\r
+\r
+  <bean id="passwordEncoder" \r
+    class="org.springframework.security.authentication.encoding.Md5PasswordEncoder" />\r
+\r
+  <bean id="saltSource" \r
+    class="org.springframework.security.authentication.dao.ReflectionSaltSource">\r
+    <property name="userPropertyToUse" value="getUsername" />\r
+  </bean>\r
 \r
 </beans>\r
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_persistence_security.xml b/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_persistence_security.xml
deleted file mode 100644 (file)
index d70bca5..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"\r
-  xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"\r
-  xsi:schemaLocation="http://www.springframework.org/schema/beans\r
-    http://www.springframework.org/schema/beans/spring-beans-3.2.xsd\r
-    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd\r
-    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd\r
-    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd\r
-    ">\r
-\r
-\r
-    <!--\r
-      ============================== SECURITY ==============================\r
-    -->\r
-    <bean id="accessDecisionManager" class="eu.etaxonomy.cdm.persistence.hibernate.permission.UnanimousBasedUnrevokable">\r
-        <property name="decisionVoters">\r
-            <list>\r
-                <bean class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.GrantAlwaysVoter" />\r
-                <bean class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.TaxonNodeVoter" />\r
-                <bean class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.TaxonBaseVoter" />\r
-                <bean class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.DescriptionBaseVoter" />\r
-                <bean class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.DescriptionElementVoter" />\r
-            </list>\r
-        </property>\r
-    </bean>\r
-\r
-    <!--\r
-        CdmPermissionEvaluator.hasPermissions() evaluates the CdmPermissions like TAXONNODE.UPDATE{20c8f083-5870-4cbd-bf56-c5b2b98ab6a7}\r
-    -->\r
-    <bean id="cdmPermissionEvaluator" class="eu.etaxonomy.cdm.persistence.hibernate.permission.CdmPermissionEvaluator">\r
-        <property name="accessDecisionManager" ref="accessDecisionManager" />\r
-    </bean>\r
-\r
-    <!-- The CdmSecurityHibernateInterceptor checks onSave() and on flushDirty() if the currently authenticated principal or token  has\r
-    sufficient permissions on the entity to be persisted -->\r
-    <bean id="securityHibernateInterceptor" class="eu.etaxonomy.cdm.persistence.hibernate.CdmSecurityHibernateInterceptor">\r
-        <property name="permissionEvaluator" ref="cdmPermissionEvaluator" />\r
-    </bean>\r
-\r
-</beans>\r
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_services_security.xml b/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_services_security.xml
deleted file mode 100644 (file)
index 6a09db4..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-  xmlns:context="http://www.springframework.org/schema/context"\r
-  xmlns:security="http://www.springframework.org/schema/security"\r
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd\r
-    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd\r
-    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd\r
-    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd"\r
-    >\r
-\r
-    <import resource="classpath:/eu/etaxonomy/cdm/remoting_persistence_security.xml"/>\r
-    <!--\r
-        ======================================================================\r
-          security specific configuration\r
-        ======================================================================\r
-     -->\r
-    <security:global-method-security pre-post-annotations="enabled" run-as-manager-ref="runAsManager" >\r
-        <security:expression-handler ref="expressionHandler" />\r
-    </security:global-method-security>\r
-\r
-    <!--\r
-        To use "hasPermission()" in the Spring EL method annotations like @PreAuthorize we explicitly configure the permissionEvaluator\r
-        the cdmPermissionEvaluator is already defined in the persistence security context\r
-    -->\r
-    <bean id="expressionHandler" class="org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler">\r
-        <property name="permissionEvaluator" ref="cdmPermissionEvaluator" />\r
-    </bean>\r
-\r
-    <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">\r
-        <property name="providers">\r
-            <list>\r
-                <ref local="daoAuthenticationProvider"/>\r
-            </list>\r
-        </property>\r
-    </bean>\r
-\r
-    <bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">\r
-        <property name="userDetailsService" ref="userService"/>\r
-        <property name="saltSource" ref="saltSource"/>\r
-        <property name="passwordEncoder" ref="passwordEncoder"/>\r
-    </bean>\r
-\r
-    <bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/>\r
-\r
-    <bean id="saltSource" class="org.springframework.security.authentication.dao.ReflectionSaltSource">\r
-        <property name="userPropertyToUse" value="getUsername"/>\r
-    </bean>\r
-\r
-    <!--\r
-        Run-As Authentication Replacement for system operations\r
-        as e.g. performed by the eu.etaxonomy.cdm.api.application.FirstDataInserter\r
-\r
-        the key must match FirstDataInserter.RUN_AS_KEY\r
-     -->\r
-    <bean id="runAsManager"\r
-        class="org.springframework.security.access.intercept.RunAsManagerImpl">\r
-      <property name="key" value="TtlCx3pgKC4l"/>\r
-    </bean>\r
-\r
-\r
-</beans>\r
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/log4j.xml b/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/log4j.xml
new file mode 100644 (file)
index 0000000..2c8a9f8
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
+  debug="false">
+  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+    <param name="Target" value="System.out" />
+    <layout class="org.apache.log4j.PatternLayout">
+      <param name="ConversionPattern" value="%d %p [%c] - %m%n" />
+    </layout>
+    <filter class="org.apache.log4j.filter.ExpressionFilter">
+      <param name="expression"
+        value="msg like  '.*has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.*'" />
+      <param name="acceptOnMatch" value="false" />
+    </filter>
+    <filter class="org.apache.log4j.filter.ExpressionFilter">
+      <param name="expression"
+        value="msg like  '.*object references was reached while attempting to calculate the size of the object graph.*'" />
+      <param name="acceptOnMatch" value="false" />
+    </filter>
+  </appender>
+  <root>
+    <priority value="WARN" />
+    <appender-ref ref="CONSOLE" />
+  </root>
+<!--   <logger name="org.hibernate.proxy.AbstractLazyInitializer"> -->
+<!--     <level value="info" /> -->
+<!--   </logger> -->
+<!--   <logger -->
+<!--     name="org.hibernate.collection.internal.AbstractPersistentCollection"> -->
+<!--     <level value="info" /> -->
+<!--   </logger> -->
+<!--   <logger -->
+<!--     name="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor"> -->
+<!--     <level value="info" /> -->
+<!--   </logger> -->
+</log4j:configuration>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/test/resources/eu/etaxonomy/cdm/datasources/cdm.datasources.xml b/eu.etaxonomy.taxeditor.cdmlib/src/test/resources/eu/etaxonomy/cdm/datasources/cdm.datasources.xml
deleted file mode 100644 (file)
index f306cad..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans 
-    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-    http://www.springframework.org/schema/context
-    http://www.springframework.org/schema/context/spring-context-2.5.xsd">
-
-       <bean id="defaultRemoteSource">
-        <property name="server" value="127.0.0.1"/>
-        <property name="port" value="8080"/>
-        <property name="contextPath" value=""/>
-    </bean>        
-    
-    <bean id="incompleteRemoteSource">
-        <property name="server" value="127.0.0.1"/>
-        <property name="contextPath" value=""/>
-    </bean>      
-       
-</beans>
\ No newline at end of file
index d4471b24e77cb6f4e5a656b8fcce88e8d1df0757..666680ec6119fe0d78b969e1a4697ea34ff29def 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Editor Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.editor;singleton:=true
-Bundle-Version: 3.8.0.qualifier
+Bundle-Version: 3.12.0.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin
 Bundle-Vendor: %Bundle-Vendor.0
 Bundle-Localization: OSGI-INF/l10n/plugin
@@ -12,6 +12,7 @@ Export-Package: eu.etaxonomy.taxeditor.editor,
  eu.etaxonomy.taxeditor.editor.key.polytomous,
  eu.etaxonomy.taxeditor.editor.name,
  eu.etaxonomy.taxeditor.editor.name.handler,
+ eu.etaxonomy.taxeditor.editor.name.operation,
  eu.etaxonomy.taxeditor.editor.view.concept,
  eu.etaxonomy.taxeditor.editor.view.dataimport,
  eu.etaxonomy.taxeditor.editor.view.descriptive,
index 2fc5cfc613cc618b86a98e2f8f750bdaba7af358..8ffce480e6c1eefaa8a79c6d83b615e1805dcf17 100644 (file)
@@ -1,8 +1,8 @@
 CreateDerivateContextMenu_ADD=Hinzufügen...
-CreateDerivateContextMenu_DNA_SAMPLE=DNA Sample
+CreateDerivateContextMenu_DNA_SAMPLE=DNA Probe
 CreateDerivateContextMenu_MEDIA=Media...
-CreateDerivateContextMenu_MEDIA_EXISTING=Media Specimen mit vorhandender Mediadatei
-CreateDerivateContextMenu_MEDIA_SPECIMEN=Media Specimen
+CreateDerivateContextMenu_MEDIA_EXISTING=Medienbeleg mit vorhandender Mediendatei
+CreateDerivateContextMenu_MEDIA_SPECIMEN=Medienbeleg
 CreateDerivateContextMenu_NO_CHILD_DERIVATE=Keine Kind-Derivate
 CreateDerivateContextMenu_SEQUENCE=Konsensussequenz
 CreateDerivateContextMenu_SINGLE_READ=Single Read
index 51792637faccc249bf51af76837e830741d53322..24738e1dfaf717fa166e7801e0a6fd638a42219c 100644 (file)
@@ -5,5 +5,4 @@ bin.includes = META-INF/,\
                plugin.xml,\
                icons/,\
                p2.inf,\
-               OSGI-INF/l10n/plugin.properties,\
-               OSGI-INF/l10n/plugin_de.properties
+               OSGI-INF/
index 66def47309837982fcbfaea4fa1efb79fc917fc0..8891d1df9c00356d342ff679568c50f86afc3fce 100644 (file)
                commandId="eu.etaxonomy.taxeditor.editor.command.new.name"
                label="%command.label.46"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
          <command
                commandId="eu.etaxonomy.taxeditor.editor.command.new.reference"
                label="%command.label.47"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
          <command
                commandId="eu.etaxonomy.taxeditor.editor.command.new.team"
                label="%command.label.1"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
          <command
                commandId="eu.etaxonomy.taxeditor.editor.command.new.person"
                label="%command.label.2"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
          <separator
                name="eu.etaxonomy.navigation.menu.new.separator2"
                commandId="eu.etaxonomy.taxeditor.editor.command.new.specimen"
                label="%command.label.3"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
          <separator
                name="eu.etaxonomy.navigation.menu.new.separator3"
             class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.ToggleShowOnlyIndividualAssociationsHandler"
             commandId="eu.etaxonomy.taxeditor.editor.handler.showOnlyIndividualAssociations">
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.RemotingCreateChildPolytomousKeyNodeHandler"
+            commandId="eu.etaxonomy.taxeditor.key.polytomous.command.new.child">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.RemotingCreateSiblingPolytomousKeyNodeHandler"
+            commandId="eu.etaxonomy.taxeditor.key.polytomous.command.new.sibling">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
    </extension>
    <extension
          name="%extension.name"
             id="eu.etaxonomy.taxeditor.editor.view.descriptive.command.moveDescriptionElements"
             name="%command.name.12">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.handler.OpenDerivateViewHandler"
+            id="eu.etaxonomy.taxeditor.editor.openSpecimenEditor"
+            name="Open Specimen Editor">
+         <commandParameter
+               id="eu.etaxonomy.taxeditor.specimenUuidParameter"
+               name="Specimen UUID parameter"
+               optional="true"
+               typeId="eu.etaxonomy.taxeditor.specimenUuidParameterType">
+         </commandParameter>
+      </command>
         
    </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <commandParameterType
+            converter="eu.etaxonomy.taxeditor.handler.UuidParameterConverter"
+            id="eu.etaxonomy.taxeditor.specimenUuidParameterType"
+            type="java.util.UUID">
+      </commandParameterType>
+   </extension>
    <extension
          point="org.eclipse.core.expressions.definitions">
       <definition
             </test>
          </with>
       </definition>
+      <definition
+            id="isRemoting">
+         <test
+               property="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester.isRemoting">
+         </test>
+      </definition>
       <definition
             id="isSequence">
          <with
          </description>
       </wizard>
    </extension>
-    <extension
+   <extension
           point="eu.etaxonomy.taxeditor.store.cdmViewer">
        <cdmViewer
              class="eu.etaxonomy.taxeditor.editor.EditorCdmViewer">
index eaeafdfc83c09f7347350c379d6867acd2425869..72602b1e38baa4c9a921f570305316f448194785 100644 (file)
@@ -1,9 +1,10 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   
   <parent>
        <groupId>eu.etaxonomy</groupId>
        <artifactId>taxeditor-parent</artifactId>
-    <version>3.8.0-SNAPSHOT</version>
+    <version>3.12.0-SNAPSHOT</version>
   </parent>
   
   <modelVersion>4.0.0</modelVersion>
@@ -11,7 +12,7 @@
   <packaging>eclipse-plugin</packaging>
   
   <name>Editor Bundle</name>
-  <description />
+  <description></description>
   <url>http://dev.e-taxonomy.eu/trac/wiki/TaxonomicEditorEditorBundle</url>
   
 </project>
index e87142c40ea62fbe582d74221d87aa1d5b932a1a..73072f5531601d18f7c7c4d8b82813764cd1b45e 100644 (file)
@@ -24,14 +24,17 @@ import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.common.ITreeNode;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.group.authority.CdmAuthorityEditor;
 import eu.etaxonomy.taxeditor.editor.group.authority.CdmAuthorityEditorInput;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
@@ -386,6 +389,12 @@ public class EditorUtil extends AbstractUtility {
                open(input);
        }
 
+//     public static void openPolytomousKeyEditor(UUID polytomousKeyUuid, String name)
+//             throws Exception {
+//         PolytomousKeyEditorInput input = new PolytomousKeyEditorInput(polytomousKeyUuid, name);
+//         open(input);
+//     }
+
        public static void openCdmAuthorities(UUID groupUuid)
                        throws Exception {
                CdmAuthorityEditorInput input = CdmAuthorityEditorInput.NewInstance(groupUuid);
@@ -416,20 +425,6 @@ public class EditorUtil extends AbstractUtility {
            }
        }
 
-       /**
-        * Iterates recursively over all originals having the given specimen as a derivate.
-        * If a {@link FieldUnit} is found it is returned
-        * @param specimen the start element for which the originals are iterated recursively
-        * @return the FieldUnit if found, <code>null</code> otherwise
-        */
-    public static FieldUnit getFieldUnit(SpecimenOrObservationBase<?> specimen){
-        SpecimenOrObservationBase<?> topMostDerivate = getTopMostDerivate(specimen);
-        if(topMostDerivate instanceof FieldUnit) {
-            return (FieldUnit) topMostDerivate;
-        }
-        return null;
-    }
-
     /**
      * If the current selection is a single {@link TreeNode} it will be returned.
      * @param selection the selection to check
@@ -455,4 +450,28 @@ public class EditorUtil extends AbstractUtility {
             openTaxonBase(((TaxonBase<?>) object).getUuid());
         }
     }
+
+    public static boolean closeObsoleteEditor(TaxonNode taxonNode, IWorkbenchPage activePage){
+        boolean result = true;
+        for (IEditorReference ref : activePage.getEditorReferences()) {
+            try {
+                String treeIndex = ((ITreeNode)taxonNode).treeIndex();
+
+
+                IEditorInput input = ref.getEditorInput();
+                if (input instanceof TaxonEditorInput) {
+                    TaxonNode node = ((TaxonEditorInput) input).getTaxonNode();
+                    //if node is a child of taxonNode then close the editor
+                    if( ((ITreeNode) node).treeIndex().startsWith(treeIndex)){
+                    //if (taxonNode.equals(node)) {
+                        result &= activePage.closeEditor(ref.getEditor(false), true);
+
+                    }
+                }
+            } catch (PartInitException e) {
+                continue;
+            }
+        }
+        return result;
+    }
 }
index 74e264dc5ec66cf1fb4a4b8ac7ed7e2c1dcb6cc8..e58a897b2426f9d5d69d82de6188620a37fa4ccf 100644 (file)
@@ -54,72 +54,79 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  * @version 1.0
  */
 public class MultiPageTaxonEditor extends FormEditor implements
-        IPartContentHasFactualData, IConversationEnabled, IPostOperationEnabled,
-               IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
-
-       /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.taxon"{trunked}</code> */
-       public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon";
-
-       private boolean dirty;
-
-       private ConversationHolder conversation;
-       private IDataChangeBehavior dataChangeBehavior;
-       private IUndoContext undoContext;
-
-       private TaxonEditorInput input;
-
-       /**
-        * <p>
-        * Constructor for MultiPageTaxonEditor.
-        * </p>
-        */
-       public MultiPageTaxonEditor() {
-               super();
-               undoContext = new UndoContext();
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void dispose() {
-               conversation.unregisterForDataStoreChanges(this);
-               conversation.close();
-               super.dispose();
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       protected void addPages() {
-               input = (TaxonEditorInput) getEditorInput();
-               conversation = input.getConversationHolder();
-               conversation.registerForDataStoreChanges(this);
-
-               try {
-                       addPage(Page.NAME.getIndex(), new TaxonNameEditor(this),
-                                       getEditorInput());
-                       // setPageText(Page.NAME.getIndex(), Page.NAME.getTitle());
-
-                       // TODO lazy create
-                       // addPage(Page.DESCRIPTIVE.getIndex(), new
-                       // TaxonDescriptionTreeEditor(this), getEditorInput());
-                       // setPageText(Page.DESCRIPTIVE.getIndex(),
-                       // Page.DESCRIPTIVE.getTitle());
-
-                       // EditorUtil.showPropertySheet();
-
-               } catch (PartInitException e) {
-                       MessagingUtils.error(getClass(), e);
-               }
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void doSave(IProgressMonitor monitor) {
-               monitor.beginTask("Saving Editor", 4);
-               try {
-                       if (!conversation.isBound()) {
-                               conversation.bind();
-                       }
-                       monitor.worked(1);
+IPartContentHasFactualData, IConversationEnabled, IPostOperationEnabled,
+IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
+
+    /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.taxon"{trunked}</code> */
+    public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon";
+
+    private boolean dirty;
+
+    private ConversationHolder conversation;
+    private IDataChangeBehavior dataChangeBehavior;
+    private IUndoContext undoContext;
+
+    private TaxonEditorInput input;
+
+    /**
+     * <p>
+     * Constructor for MultiPageTaxonEditor.
+     * </p>
+     */
+    public MultiPageTaxonEditor() {
+        super();
+        undoContext = new UndoContext();
+
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void dispose() {
+        input.dispose();
+        conversation.unregisterForDataStoreChanges(this);
+        conversation.close();
+        super.dispose();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
+     */
+    /** {@inheritDoc} */
+    @Override
+    protected void addPages() {
+        input = (TaxonEditorInput) getEditorInput();
+        conversation = input.getConversationHolder();
+        conversation.registerForDataStoreChanges(this);
+
+        try {
+            addPage(Page.NAME.getIndex(), new TaxonNameEditor(this),
+                    getEditorInput());
+            // setPageText(Page.NAME.getIndex(), Page.NAME.getTitle());
+
+            // TODO lazy create
+            // addPage(Page.DESCRIPTIVE.getIndex(), new
+            // TaxonDescriptionTreeEditor(this), getEditorInput());
+            // setPageText(Page.DESCRIPTIVE.getIndex(),
+            // Page.DESCRIPTIVE.getTitle());
+
+            // EditorUtil.showPropertySheet();
+
+        } catch (PartInitException e) {
+            MessagingUtils.error(getClass(), e);
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void doSave(IProgressMonitor monitor) {
+        monitor.beginTask("Saving Editor", 4);
+        try {
+            if (!conversation.isBound()) {
+                conversation.bind();
+            }
+            monitor.worked(1);
 
             for (IEditorPart editorPage : getPages()) {
                 if (editorPage instanceof TaxonNameEditor) {
@@ -135,9 +142,11 @@ public class MultiPageTaxonEditor extends FormEditor implements
                 monitor.worked(1);
             }
 
-                       // commit the conversation and start a new transaction immediately
-                       conversation.commit(true);
-                       monitor.worked(1);
+            // commit the conversation and start a new transaction immediately
+
+            input.merge();
+            conversation.commit(true);
+            monitor.worked(1);
 
             this.setDirty(false);
             monitor.worked(1);
@@ -148,119 +157,143 @@ public class MultiPageTaxonEditor extends FormEditor implements
         } finally {
             monitor.done();
         }
-       }
-
-       private void disableEditor(boolean isOnError) {
-               for (IMultiPageTaxonEditorPage editorPage : getPages()) {
-                       if(isOnError){
-                               editorPage.setOnError();
-                       }else {
-                               editorPage.setDisabled();
-                       }
-               }
-               conversation.unregisterForDataStoreChanges(this);
-               conversation.close();
-               setDirty(false);
-       }
-
-       private void setDirty(boolean dirty) {
-               this.dirty = dirty;
-               firePropertyChange(PROP_DIRTY);
-       }
-
-       @Override
+    }
+
+    private void disableEditor(boolean isOnError) {
+        for (IMultiPageTaxonEditorPage editorPage : getPages()) {
+            if(isOnError){
+                editorPage.setOnError();
+            }else {
+                editorPage.setDisabled();
+            }
+        }
+
+        conversation.unregisterForDataStoreChanges(this);
+        conversation.close();
+        setDirty(false);
+    }
+
+    private void setDirty(boolean dirty) {
+        this.dirty = dirty;
+        firePropertyChange(PROP_DIRTY);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.eclipse.ui.part.MultiPageEditorPart#isDirty()
+     */
+    /**
+     * <p>
+     * isDirty
+     * </p>
+     *
+     * @return a boolean.
+     */
+    @Override
     public boolean isDirty() {
-               return dirty;
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void editorDirtyStateChanged() {
-               dirty = true;
-               super.editorDirtyStateChanged();
-       }
-
-       /**
-        * {@inheritDoc}
-        *
-        * Checks whether nested editors are calling
-        * <code>firePropertyChange(PROP_DIRTY)</code> to signal an edit has taken
-        * place before passing property change along to
-        * <code>super.handlePropertyChange(int propertyId)</code>.
-        */
-       @Override
+        return dirty;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.eclipse.ui.forms.editor.FormEditor#editorDirtyStateChanged()
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void editorDirtyStateChanged() {
+        dirty = true;
+        super.editorDirtyStateChanged();
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * Checks whether nested editors are calling
+     * <code>firePropertyChange(PROP_DIRTY)</code> to signal an edit has taken
+     * place before passing property change along to
+     * <code>super.handlePropertyChange(int propertyId)</code>.
+     */
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.eclipse.ui.part.MultiPageEditorPart#handlePropertyChange(int)
+     */
+    @Override
     protected void handlePropertyChange(int propertyId) {
-               if (propertyId == PROP_DIRTY) {
-                       setDirty(true);
-               }
-               super.handlePropertyChange(propertyId);
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void doSaveAs() {
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public boolean isSaveAsAllowed() {
-               return false;
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void init(IEditorSite site, IEditorInput input)
-                       throws PartInitException {
-
-               if (!(input instanceof TaxonEditorInput)) {
+        if (propertyId == PROP_DIRTY) {
+            setDirty(true);
+        }
+        super.handlePropertyChange(propertyId);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void doSaveAs() {
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean isSaveAsAllowed() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void init(IEditorSite site, IEditorInput input)
+            throws PartInitException {
+
+        if (!(input instanceof TaxonEditorInput)) {
             throw new PartInitException(
-                                       "Invalid Input: Must be TaxonEditorInput");
+                    "Invalid Input: Must be TaxonEditorInput");
+        }
+
+        this.input = (TaxonEditorInput) input;
+
+
+        // try {
+        // // Listen for name changes,
+        // // change tab for this taxon editor accordingly
+        // getTaxon().addPropertyChangeListener("name",
+        // new PropertyChangeListener() {
+        // public void propertyChange(PropertyChangeEvent e) {
+        // setPartName();
+        // }
+        // });
+        // } catch (NullPointerException e) {
+        // EditorUtil.warn(getClass(),
+        // "Caught an NPE while initing an editor. This is most " +
+        // "likely due to the unsuccesful attempt to restore the former " +
+        // "state of the application. We ignore this because the workbench " +
+        // "will simply be reset.");
+        // }
+        setPartName();
+
+        super.init(site, input);
+    }
+
+    /**
+     * Calls <code>MultiPageEditorPart.setPartName(String partName)</code> with
+     * text appropriate to the state of the taxon: any taxon that has been saved
+     * will by necessity have a name to display; a new taxon should display
+     * "New taxon" in the editor tab.
+     */
+    protected void setPartName() {
+
+        String partName = null;
+        TaxonNameBase<?, ?> name = getTaxon().getName();
+
+        if (name != null) {
+            partName = name.getTitleCache();
+        }
+
+        if (partName == null || partName.equals("")) {
+            partName = ("New taxon");
         }
 
-               this.input = (TaxonEditorInput) input;
-
-               // try {
-               // // Listen for name changes,
-               // // change tab for this taxon editor accordingly
-               // getTaxon().addPropertyChangeListener("name",
-               // new PropertyChangeListener() {
-               // public void propertyChange(PropertyChangeEvent e) {
-               // setPartName();
-               // }
-               // });
-               // } catch (NullPointerException e) {
-               // EditorUtil.warn(getClass(),
-               // "Caught an NPE while initing an editor. This is most " +
-               // "likely due to the unsuccesful attempt to restore the former " +
-               // "state of the application. We ignore this because the workbench " +
-               // "will simply be reset.");
-               // }
-               setPartName();
-
-               super.init(site, input);
-       }
-
-       /**
-        * Calls <code>MultiPageEditorPart.setPartName(String partName)</code> with
-        * text appropriate to the state of the taxon: any taxon that has been saved
-        * will by necessity have a name to display; a new taxon should display
-        * "New taxon" in the editor tab.
-        */
-       protected void setPartName() {
-
-               String partName = null;
-               TaxonNameBase<?, ?> name = getTaxon().getName();
-
-               if (name != null) {
-                       partName = name.getTitleCache();
-               }
-
-               if (partName == null || partName.equals("")) {
-                       partName = ("New taxon");
-               }
-
-               setPartName(partName);
-       }
+        setPartName(partName);
+    }
 
     /**
      * {@inheritDoc}
@@ -285,48 +318,100 @@ public class MultiPageTaxonEditor extends FormEditor implements
         setPartName();
     }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider#forceDirty()
+     */
     @Override
     public void forceDirty() {
         changed(null);
     }
 
-       /**
-        * The accepted taxon that is the input for this editor
-        *
-        * @return the accepted taxon
-        */
-       public Taxon getTaxon() {
-               return input.getTaxon();
-       }
+    /**
+     * The accepted taxon that is the input for this editor
+     *
+     * @return the accepted taxon
+     */
+    public Taxon getTaxon() {
+        return input.getTaxon();
+    }
 
-       @Override
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder
+     * ()
+     */
+    /**
+     * <p>
+     * getConversationHolder
+     * </p>
+     *
+     * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
+     *         object.
+     */
+    @Override
     public ConversationHolder getConversationHolder() {
-               return conversation;
-       }
-
-       public void setConversationHolder(ConversationHolder conversation) {
-               this.conversation = conversation;
-       }
-
-       public IUndoContext getUndoContext() {
-               return undoContext;
-       }
-
-       public void setUndoContext(IUndoContext undoContext) {
-               this.undoContext = undoContext;
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void setFocus() {
-               // logger.warn("Setting focus to editor");
-               // bind the conversation
-               getConversationHolder().bind();
-               // pass focus to the active editor page
-               getActiveEditor().setFocus();
-       }
-
-       /** {@inheritDoc} */
+        return conversation;
+    }
+
+    /**
+     * <p>
+     * setConversationHolder
+     * </p>
+     *
+     * @param conversation
+     *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
+     *            object.
+     */
+    public void setConversationHolder(ConversationHolder conversation) {
+        this.conversation = conversation;
+    }
+
+    /**
+     * <p>
+     * Getter for the field <code>undoContext</code>.
+     * </p>
+     *
+     * @return a {@link org.eclipse.core.commands.operations.IUndoContext}
+     *         object.
+     */
+    public IUndoContext getUndoContext() {
+        return undoContext;
+    }
+
+    /**
+     * <p>
+     * Setter for the field <code>undoContext</code>.
+     * </p>
+     *
+     * @param undoContext
+     *            a {@link org.eclipse.core.commands.operations.IUndoContext}
+     *            object.
+     */
+    public void setUndoContext(IUndoContext undoContext) {
+        this.undoContext = undoContext;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void setFocus() {
+        // logger.warn("Setting focus to editor");
+        // bind the conversation
+        getConversationHolder().bind();
+        input.bind();
+        // pass focus to the active editor page
+        getActiveEditor().setFocus();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * eu.etaxonomy.cdm.persistence.hibernate.ICdmPostCrudObserver#update(eu
+     * .etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)
+     */
+    /** {@inheritDoc} */
     @Override
     public void update(CdmDataChangeMap events) {
         if (dataChangeBehavior == null) {
@@ -336,6 +421,13 @@ public class MultiPageTaxonEditor extends FormEditor implements
         DataChangeBridge.handleDataChange(events, dataChangeBehavior);
     }
 
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * eu.etaxonomy.taxeditor.store.operations.IPostOperationEnabled#postOperation
+     * ()
+     */
     /** {@inheritDoc} */
     @Override
     public boolean postOperation(CdmBase objectAffectedByOperation) {
@@ -353,68 +445,75 @@ public class MultiPageTaxonEditor extends FormEditor implements
         return false;
     }
 
-       /**
-        * Returns an <code>IEditorPart</code> implementation by type
-        *
-        * @param page
-        *            the page type
-        * @return a {@link eu.etaxonomy.taxeditor.editor.IMultiPageTaxonEditorPage}
-        *         object.
-        */
-       public IMultiPageTaxonEditorPage getPage(Page page) {
-               for (IEditorPart editor : this.getPages()) {
-                       if (editor.getClass().equals(page.getClazz())) {
-                               return (IMultiPageTaxonEditorPage) editor;
-                       }
-               }
-               return null;
-       }
-
-       /**
-        * Return a list of <code>AbstractTaxonEditor</code>s registered with this
-        * <code>MultiPageTaxonEditor</code>.
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<IMultiPageTaxonEditorPage> getPages() {
-               ArrayList<IMultiPageTaxonEditorPage> editors = new ArrayList<IMultiPageTaxonEditorPage>();
-               for (int i = 0; i < this.getPageCount(); i++) {
-
-                       editors.add((IMultiPageTaxonEditorPage) this.getEditor(i));
-               }
-               return editors;
-       }
-
-       /**
-        * Refreshes a certain page of the MultipageTaxonEditor
-        *
-        * @param page
-        *            a {@link eu.etaxonomy.taxeditor.editor.Page} object.
-        * @return a boolean.
-        */
-       public boolean redraw(Page page) {
-               return redraw(page, true);
-       }
-
-       /**
-        * Refreshes a certain page of the MultipageTaxonEditor and sets focus to
-        * that page
-        *
-        * @param page
-        *            a {@link eu.etaxonomy.taxeditor.editor.Page} object.
-        * @param focus
-        *            a boolean.
-        * @return a boolean.
-        */
-       public boolean redraw(Page page, boolean focus) {
-               IMultiPageTaxonEditorPage editorPage = getPage(page);
-               return editorPage != null && editorPage.redraw(focus);
-       }
-
-       @Override
+    /**
+     * Returns an <code>IEditorPart</code> implementation by type
+     *
+     * @param page
+     *            the page type
+     * @return a {@link eu.etaxonomy.taxeditor.editor.IMultiPageTaxonEditorPage}
+     *         object.
+     */
+    public IMultiPageTaxonEditorPage getPage(Page page) {
+        for (IEditorPart editor : this.getPages()) {
+            if (editor.getClass().equals(page.getClazz())) {
+                return (IMultiPageTaxonEditorPage) editor;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Return a list of <code>AbstractTaxonEditor</code>s registered with this
+     * <code>MultiPageTaxonEditor</code>.
+     *
+     * @return a {@link java.util.List} object.
+     */
+    public List<IMultiPageTaxonEditorPage> getPages() {
+        ArrayList<IMultiPageTaxonEditorPage> editors = new ArrayList<IMultiPageTaxonEditorPage>();
+        for (int i = 0; i < this.getPageCount(); i++) {
+
+            editors.add((IMultiPageTaxonEditorPage) this.getEditor(i));
+        }
+        return editors;
+    }
+
+    /**
+     * Refreshes a certain page of the MultipageTaxonEditor
+     *
+     * @param page
+     *            a {@link eu.etaxonomy.taxeditor.editor.Page} object.
+     * @return a boolean.
+     */
+    public boolean redraw(Page page) {
+        return redraw(page, true);
+    }
+
+    /**
+     * Refreshes a certain page of the MultipageTaxonEditor and sets focus to
+     * that page
+     *
+     * @param page
+     *            a {@link eu.etaxonomy.taxeditor.editor.Page} object.
+     * @param focus
+     *            a boolean.
+     * @return a boolean.
+     */
+    public boolean redraw(Page page, boolean focus) {
+        IMultiPageTaxonEditorPage editorPage = getPage(page);
+        return editorPage != null && editorPage.redraw(focus);
+    }
+
+    /**
+     * <p>
+     * onComplete
+     * </p>
+     *
+     * @return a boolean.
+     */
+    @Override
     public boolean onComplete() {
-               return false;
-       }
+        return false;
+    }
 
     /**
      * Reloads the data for this
@@ -444,22 +543,26 @@ public class MultiPageTaxonEditor extends FormEditor implements
         }
     }
 
-       @Override
-       public String toString() {
-               return String.format("%s[%s]", this.getClass().getSimpleName(), getEditorInput());
-       }
-
-       @Override
-       public boolean permissionsSatisfied() {
-               IEditorPart activeEditor = getActiveEditor();
-               if(activeEditor != null && ISecuredEditor.class.isAssignableFrom(activeEditor.getClass())){
-                       return ((ISecuredEditor)activeEditor).permissionsSatisfied();
-               }
-               return true;
-       }
-
-       @Override
-       public boolean canAttachMedia() {
-           return true;
-       }
+    @Override
+    public String toString() {
+        return String.format("%s[%s]", this.getClass().getSimpleName(), getEditorInput());
+    }
+
+    @Override
+    public boolean permissionsSatisfied() {
+        IEditorPart activeEditor = getActiveEditor();
+        if(activeEditor != null && ISecuredEditor.class.isAssignableFrom(activeEditor.getClass())){
+            return ((ISecuredEditor)activeEditor).permissionsSatisfied();
+        }
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.model.IPartContentHasMedia#canAttachMedia()
+     */
+    @Override
+    public boolean canAttachMedia() {
+        return true;
+    }
+
 }
index d0a7b205caa42da4894b53c89c0fb1db7ec9b52c..7fbb22736445c6afed82ae5c2abb5d11b432da8b 100644 (file)
@@ -1,15 +1,19 @@
 /**
-* 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.
-*/
+ * 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.editor;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
@@ -46,345 +50,369 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created 19.03.2009
  * @version 1.0
  */
-public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPersistableElement {
+public class TaxonEditorInput  extends CdmEntitySessionInput implements IEditorInput, IConversationEnabled, IPersistableElement {
 
-       private final ConversationHolder conversation;
+    private final ConversationHolder conversation;
 
-       private final TaxonNode taxonNode;
+    private TaxonNode taxonNode;
 
-       private TaxonEditorInputDataChangeBehaviour dataChangeBehavior;
+    private TaxonEditorInputDataChangeBehaviour dataChangeBehavior;
 
-       private TaxonBase initiallySelectedTaxonBase;
+    private TaxonBase initiallySelectedTaxonBase;
 
-       private TaxonEditorInput(TaxonNode taxonNode, ConversationHolder conversation){
-               this.conversation = conversation;
-               this.taxonNode = taxonNode;
-       }
+    private enum CdmType {
+        TAXON_NODE,
+        TAXON_BASE,
+        PARENT_TAXON_NODE
+    }
 
+    private TaxonEditorInput(UUID uuid, CdmType type) {
+        super(true);
+        this.conversation = CdmStore.createConversation();
+        switch(type) {
+        case PARENT_TAXON_NODE:
+            initForParentTaxonNode(uuid);
+            break;
+        case TAXON_BASE:
+            initForTaxonBase(uuid);
+            break;
+        case TAXON_NODE:
+            initForTaxonNode(uuid);
+            break;
+        }
+    }
 
+    private void init(TaxonNode taxonNode) {
+        this.taxonNode = taxonNode;
+    }
 
-       /**
-        * <p>NewInstance</p>
-        *
-        * @param taxonNodeUuid a {@link java.util.UUID} object.
-        * @return a {@link eu.etaxonomy.taxeditor.editor.TaxonEditorInput} object.
-        * @throws java.lang.Exception if any.
-        */
-       public static TaxonEditorInput NewInstance(UUID taxonNodeUuid) throws Exception{
-               try{
-                       ConversationHolder conversation = CdmStore.createConversation();
-                       return NewInstance(taxonNodeUuid, conversation);
-               }catch(Exception e){
-                       throw e;
-               }
-       }
 
     /**
+     * <p>NewInstance</p>
      *
-     * @param taxonNodeUuid
-     * @param conversation
-     * @return
+     * @param taxonNodeUuid a {@link java.util.UUID} object.
+     * @return a {@link eu.etaxonomy.taxeditor.editor.TaxonEditorInput} object.
+     * @throws java.lang.Exception if any.
      */
-    private static TaxonEditorInput NewInstance(UUID taxonNodeUuid, ConversationHolder conversation){
+    private void initForTaxonNode(UUID taxonNodeUuid) {
 
 
-       TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid, null);
+        TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid, getTaxonNodePropertyPaths());
 
-               if(taxonNode == null){
-                       MessagingUtils.warningDialog("Not yet implemented", TaxonEditorInput.class, "Selected element is not of type TaxonNode but [null].");
-                       return null;
-               }
+        if(taxonNode == null){
+            MessagingUtils.warningDialog("Not yet implemented", TaxonEditorInput.class, "Selected element is not type TaxonBase.");
+        }
+        init(taxonNode);
+
+    }
 
-       return new TaxonEditorInput(taxonNode, conversation);
+    private void initForTaxonBase(UUID taxonBaseUuid) {
+        TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).load(taxonBaseUuid, getTaxonBasePropertyPaths());
+        if (taxonBase != null){
+            if(taxonBase.isInstanceOf(Taxon.class)){
+                Taxon taxon = CdmBase.deproxy(taxonBase, Taxon.class);
+
+                if (taxon.getTaxonNodes().size() == 0 && taxon.isMisapplication()){
+                    // TODO get accepted taxon
+                    MessagingUtils.info("trying to open Mispplied Name ");
+
+                    Set<Taxon> acceptedTaxa = new HashSet<Taxon>();
+                    Set<TaxonRelationship> relations = taxon.getRelationsFromThisTaxon();
+                    for(TaxonRelationship relation : relations){
+                        if(relation.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())){
+                            acceptedTaxa.add(relation.getToTaxon());
+                        }
+                    }
+                    setInputForMultipleTaxa(conversation, acceptedTaxa);
+
+                }else{
+                    setInputForMultipleNodes(conversation, taxon.getTaxonNodes());
+                }
+            }else if(taxonBase instanceof Synonym){
+                Synonym synonym = (Synonym) taxonBase;
+
+                Set<Taxon> taxa = synonym.getAcceptedTaxa();
+                setInputForMultipleTaxa(conversation, taxa);
+            }
+        }
     }
 
+
     /**
-     * <p>NewInstanceFromTaxonBase</p>
+     * <p>NewEmptyInstance</p>
      *
-     * @param taxonBaseUuid a {@link java.util.UUID} object.
+     * @param parentNodeUuid a {@link java.util.UUID} object.
      * @return a {@link eu.etaxonomy.taxeditor.editor.TaxonEditorInput} object.
      */
-    public static TaxonEditorInput NewInstanceFromTaxonBase(UUID taxonBaseUuid){
-       ConversationHolder conversation = CdmStore.createConversation();
-
-       TaxonEditorInput input = null;
-
-       TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).find(taxonBaseUuid);
-       if (taxonBase != null){
-               if(taxonBase.isInstanceOf(Taxon.class)){
-                       Taxon taxon = CdmBase.deproxy(taxonBase, Taxon.class);
-
-                       if (taxon.getTaxonNodes().size() == 0 && taxon.isMisapplication()){
-                               // TODO get accepted taxon
-                               MessagingUtils.info("trying to open misapplied Name ");
-
-                               Set<Taxon> acceptedTaxa = new HashSet<Taxon>();
-                               Set<TaxonRelationship> relations = taxon.getRelationsFromThisTaxon();
-                               for(TaxonRelationship relation : relations){
-                                       if(relation.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())){
-                                               acceptedTaxa.add(relation.getToTaxon());
-                                       }
-                               }
-                               input =  getInputForMultipleTaxa(conversation, acceptedTaxa);
-
-                       }else{
-                               input = getInputForMultipleNodes(conversation, taxon.getTaxonNodes());
-                       }
-               }else if(taxonBase instanceof Synonym){
-                       Synonym synonym = (Synonym) taxonBase;
-
-                       Set<Taxon> taxa = synonym.getAcceptedTaxa();
-                       input = getInputForMultipleTaxa(conversation, taxa);
-               }
-               if (input != null){
-                       input.setInitiallySelectedTaxonBase(taxonBase);
-               }
-       }
-
-
-       return input;
+    private void initForParentTaxonNode(UUID parentNodeUuid){
+
+
+        TaxonNameBase<?, ?> name = PreferencesUtil.getPreferredNomenclaturalCode().getNewTaxonNameInstance(null);
+        ITaxonTreeNode parentNode = CdmStore.getService(IClassificationService.class).getTreeNodeByUuid(parentNodeUuid);
+
+        Taxon newTaxon = Taxon.NewInstance(name, parentNode.getReference());
+        TaxonNode newTaxonNode = parentNode.addChildTaxon(newTaxon, parentNode.getReference(), parentNode.getMicroReference());
+
+        // add the new taxon to the editors persistence context
+        UUID newTaxonNodeUuid = CdmStore.getService(ITaxonNodeService.class).save(newTaxonNode).getUuid();
+
+        initForTaxonNode(newTaxonNodeUuid);
     }
 
-       private static TaxonEditorInput getInputForMultipleNodes(ConversationHolder conversation, Set<TaxonNode> taxonNodes){
-       if(taxonNodes.size() == 1){
-               TaxonNode taxonNode = taxonNodes.iterator().next();
-               return NewInstance(taxonNode.getUuid(), conversation);
-       }else if(taxonNodes.size() > 1){
-                       TaxonNode taxonNode = ChooseFromMultipleTaxonNodesDialog.choose(taxonNodes);
-                       if(taxonNode != null){
-                               return NewInstance(taxonNode.getUuid(), conversation);
-                       }
-               }else if(taxonNodes.size() == 0){
-                       // this is an undesired state
-                       MessagingUtils.warningDialog("Incorrect state", TaxonEditorInput.class, "The accepted taxon is not part of any classification. This should not have happened.");
-               }
-       return null;
+
+
+
+    private void setInputForMultipleNodes(ConversationHolder conversation, Set<TaxonNode> taxonNodes){
+        if(taxonNodes.size() == 1){
+            TaxonNode taxonNode = taxonNodes.iterator().next();
+            init(taxonNode);
+        }else if(taxonNodes.size() > 1){
+            TaxonNode taxonNode = ChooseFromMultipleTaxonNodesDialog.choose(taxonNodes);
+            if(taxonNode != null){
+                init(taxonNode);
+            }
+        }else if(taxonNodes.size() == 0){
+            // this is an undesired state
+            MessagingUtils.warningDialog("Incorrect state", TaxonEditorInput.class, "The accepted taxon is not part of any classification. This should not have happened.");
+        }
     }
 
-    private static TaxonEditorInput getInputForMultipleTaxa(ConversationHolder conversation, Set<Taxon> taxa){
-       if(taxa.size() == 1){
-               Taxon taxon = taxa.iterator().next();
-               Set<TaxonNode> nodes = taxon.getTaxonNodes();
-               return getInputForMultipleNodes(conversation, nodes);
-       }else if(taxa.size() > 1){
-               Set<TaxonNode> taxonNodes = new HashSet<TaxonNode>();
-                       for ( Taxon taxon : taxa ){
-                               taxonNodes.addAll(taxon.getTaxonNodes());
-                       }
-                       return getInputForMultipleNodes(conversation, taxonNodes);
-               }else if(taxa.size() == 0){
-                       // this is an undesired state
-                       MessagingUtils.warningDialog("Incorrect state", TaxonEditorInput.class, "Trying to open accepted taxon for a synonym or misapplication but" +
-                                       " no accepted taxa are present. This should not have happened.");
-               }
-       return null;
+    private void setInputForMultipleTaxa(ConversationHolder conversation, Set<Taxon> taxa){
+        if(taxa.size() == 1){
+            Taxon taxon = taxa.iterator().next();
+            Set<TaxonNode> nodes = taxon.getTaxonNodes();
+            setInputForMultipleNodes(conversation, nodes);
+        }else if(taxa.size() > 1){
+            Set<TaxonNode> taxonNodes = new HashSet<TaxonNode>();
+            for ( Taxon taxon : taxa ){
+                taxonNodes.addAll(taxon.getTaxonNodes());
+            }
+            setInputForMultipleNodes(conversation, taxonNodes);
+        }else if(taxa.size() == 0){
+            // this is an undesired state
+            MessagingUtils.warningDialog("Incorrect state", TaxonEditorInput.class, "Trying to open accepted taxon for a synonym or misapplication but" +
+                    " no accepted taxa are present. This should not have happened.");
+        }
     }
 
     /**
-     * <p>NewEmptyInstance</p>
+     * <p>NewInstance</p>
      *
-     * @param parentNodeUuid a {@link java.util.UUID} object.
+     * @param taxonNodeUuid a {@link java.util.UUID} object.
      * @return a {@link eu.etaxonomy.taxeditor.editor.TaxonEditorInput} object.
+     * @throws java.lang.Exception if any.
      */
-    public static TaxonEditorInput NewEmptyInstance(UUID parentNodeUuid){
-       ConversationHolder conversation = CdmStore.createConversation();
+    public static TaxonEditorInput NewInstance(UUID taxonNodeUuid) throws Exception {
+        return new TaxonEditorInput(taxonNodeUuid, CdmType.TAXON_NODE);
 
-               TaxonNameBase<?, ?> name = PreferencesUtil.getPreferredNomenclaturalCode().getNewTaxonNameInstance(null);
-               ITaxonTreeNode parentNode = CdmStore.getService(IClassificationService.class).getTreeNodeByUuid(parentNodeUuid);
+    }
 
-               Taxon newTaxon = Taxon.NewInstance(name, parentNode.getReference());
-               TaxonNode newTaxonNode = parentNode.addChildTaxon(newTaxon, parentNode.getReference(), parentNode.getMicroReference());
+    /**
+     * <p>NewInstanceFromTaxonBase</p>
+     *
+     * @param taxonBaseUuid a {@link java.util.UUID} object.
+     * @return a {@link eu.etaxonomy.taxeditor.editor.TaxonEditorInput} object.
+     */
+    public static TaxonEditorInput NewInstanceFromTaxonBase(UUID taxonBaseUuid){
+        return new TaxonEditorInput(taxonBaseUuid, CdmType.TAXON_BASE);
+    }
 
-               // add the new taxon to the editors persistence context
-               UUID newTaxonNodeUuid = CdmStore.getService(ITaxonNodeService.class).save(newTaxonNode).getUuid();
 
-               return new TaxonEditorInput(newTaxonNode, conversation);
+    /**
+     * <p>NewEmptyInstance</p>
+     *
+     * @param parentNodeUuid a {@link java.util.UUID} object.
+     * @return a {@link eu.etaxonomy.taxeditor.editor.TaxonEditorInput} object.
+     */
+    public static TaxonEditorInput NewEmptyInstance(UUID parentNodeUuid){
+        return new TaxonEditorInput(parentNodeUuid, CdmType.PARENT_TAXON_NODE);
     }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#exists()
-        */
-       /**
-        * <p>exists</p>
-        *
-        * @return a boolean.
-        */
-       @Override
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IEditorInput#exists()
+     */
+    /**
+     * <p>exists</p>
+     *
+     * @return a boolean.
+     */
+    @Override
     public boolean exists() {
-               return taxonNode != null;
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
-        */
-       /**
-        * <p>getImageDescriptor</p>
-        *
-        * @return a {@link org.eclipse.jface.resource.ImageDescriptor} object.
-        */
-       @Override
+        return taxonNode != null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+     */
+    /**
+     * <p>getImageDescriptor</p>
+     *
+     * @return a {@link org.eclipse.jface.resource.ImageDescriptor} object.
+     */
+    @Override
     public ImageDescriptor getImageDescriptor() {
-               return null;
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#getName()
-        */
-       /**
-        * <p>getName</p>
-        *
-        * @return a {@link java.lang.String} object.
-        */
-       @Override
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IEditorInput#getName()
+     */
+    /**
+     * <p>getName</p>
+     *
+     * @return a {@link java.lang.String} object.
+     */
+    @Override
     public String getName() {
-               if(getTaxon() == null){
-                       return null;
-               }
-               TaxonNameBase<?, ?> name = getTaxon().getName();
-               if (name == null || name.getTitleCache() == null) {
-                       return "New taxon";
-               } else {
-                       return name.getTitleCache();
-               }
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#getPersistable()
-        */
-       /**
-        * <p>getPersistable</p>
-        *
-        * @return a {@link org.eclipse.ui.IPersistableElement} object.
-        */
-       @Override
+        if(getTaxon() == null){
+            return null;
+        }
+        TaxonNameBase<?, ?> name = getTaxon().getName();
+        if (name == null || name.getTitleCache() == null) {
+            return "New taxon";
+        } else {
+            return name.getTitleCache();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IEditorInput#getPersistable()
+     */
+    /**
+     * <p>getPersistable</p>
+     *
+     * @return a {@link org.eclipse.ui.IPersistableElement} object.
+     */
+    @Override
     public IPersistableElement getPersistable() {
-//             if(CdmStore.isActive()){
-//                     TaxonNode test = CdmStore.getTaxonTreeService().getTaxonNodeByUuid(taxonNode.getUuid());
-//                     boolean isPersistable = CdmStore.getTaxonTreeService().getTaxonNodeByUuid(taxonNode.getUuid()) != null;
-//                     if (isPersistable) {
-//                             return this;
-//                     }
-//             }
-               return null;
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#getToolTipText()
-        */
-       /**
-        * <p>getToolTipText</p>
-        *
-        * @return a {@link java.lang.String} object.
-        */
-       @Override
+        //             if(CdmStore.isActive()){
+        //                     TaxonNode test = CdmStore.getTaxonTreeService().getTaxonNodeByUuid(taxonNode.getUuid());
+        //                     boolean isPersistable = CdmStore.getTaxonTreeService().getTaxonNodeByUuid(taxonNode.getUuid()) != null;
+        //                     if (isPersistable) {
+        //                             return this;
+        //                     }
+        //             }
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IEditorInput#getToolTipText()
+     */
+    /**
+     * <p>getToolTipText</p>
+     *
+     * @return a {@link java.lang.String} object.
+     */
+    @Override
     public String getToolTipText() {
-               return getName();
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
-        */
-       /** {@inheritDoc} */
-       @Override
+        return getName();
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+     */
+    /** {@inheritDoc} */
+    @Override
     public Object getAdapter(Class adapter) {
 
-               if (adapter == Taxon.class) {
-                       return taxonNode.getTaxon();
-               }
+        if (adapter == Taxon.class) {
+            return getTaxon();
+        }
 
-               if (adapter == TaxonNode.class) {
-                       return taxonNode;
-               }
+        if (adapter == TaxonNode.class) {
+            return taxonNode;
+        }
 
-               return null;
-       }
+        return null;
+    }
 
-       /**
-        * {@inheritDoc}
-        *
-        * Overrides equals to ensure that a taxon can only be edited by
-        * one editor at a time.
-        */
-       @Override
+    /**
+     * {@inheritDoc}
+     *
+     * Overrides equals to ensure that a taxon can only be edited by
+     * one editor at a time.
+     */
+    @Override
     public boolean equals(Object obj) {
-               if (TaxonEditorInput.class.equals(obj.getClass())
-                               && getTaxon() != null
-                               && getTaxon().equals(((TaxonEditorInput) obj).getTaxon())){
-                       if(((TaxonEditorInput) obj).getInitiallySelectedTaxonBase() != null){
-                               setInitiallySelectedTaxonBase(((TaxonEditorInput) obj).getInitiallySelectedTaxonBase());
-                       }
-                       return true;
-               }
-               return false;
-       }
-
-       /**
-        * <p>getTaxon</p>
-        *
-        * @return the taxon
-        */
-       public Taxon getTaxon(){
-               return taxonNode.getTaxon();
-       }
-
-       /**
-        * <p>Getter for the field <code>taxonNode</code>.</p>
-        *
-        * @return the taxonNode
-        */
-       public TaxonNode getTaxonNode() {
-               return taxonNode;
-       }
-
-       /*
-        * (non-Javadoc)
-        * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
-        */
-       /**
-        * <p>getConversationHolder</p>
-        *
-        * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        */
-       @Override
+        if (TaxonEditorInput.class.equals(obj.getClass())
+                && getTaxon() != null
+                && getTaxon().equals(((TaxonEditorInput) obj).getTaxon())){
+            if(((TaxonEditorInput) obj).getInitiallySelectedTaxonBase() != null){
+                setInitiallySelectedTaxonBase(((TaxonEditorInput) obj).getInitiallySelectedTaxonBase());
+            }
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * <p>getTaxon</p>
+     *
+     * @return the taxon
+     */
+    public Taxon getTaxon(){
+        Taxon taxon = CdmBase.deproxy(taxonNode.getTaxon(), Taxon.class);
+        return taxon;
+    }
+
+    /**
+     * <p>Getter for the field <code>taxonNode</code>.</p>
+     *
+     * @return the taxonNode
+     */
+    public TaxonNode getTaxonNode() {
+        return taxonNode;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
+     */
+    /**
+     * <p>getConversationHolder</p>
+     *
+     * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+     */
+    @Override
     public ConversationHolder getConversationHolder() {
-               return conversation;
-       }
-
-       /*
-        * (non-Javadoc)
-        * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostCrudObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)
-        */
-       /** {@inheritDoc} */
-       @Override
+        return conversation;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostCrudObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)
+     */
+    /** {@inheritDoc} */
+    @Override
     public void update(CdmDataChangeMap events) {
-               if(dataChangeBehavior == null){
-                       dataChangeBehavior = new TaxonEditorInputDataChangeBehaviour(this);
-               }
-
-               DataChangeBridge.handleDataChange(events, dataChangeBehavior);
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IPersistableElement#getFactoryId()
-        */
-       /**
-        * <p>getFactoryId</p>
-        *
-        * @return a {@link java.lang.String} object.
-        */
-       @Override
+        if(dataChangeBehavior == null){
+            dataChangeBehavior = new TaxonEditorInputDataChangeBehaviour(this);
+        }
+
+        DataChangeBridge.handleDataChange(events, dataChangeBehavior);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IPersistableElement#getFactoryId()
+     */
+    /**
+     * <p>getFactoryId</p>
+     *
+     * @return a {@link java.lang.String} object.
+     */
+    @Override
     public String getFactoryId() {
-               return TaxonEditorInputFactory.getFactoryId();
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)
-        */
-       /** {@inheritDoc} */
-       @Override
+        return TaxonEditorInputFactory.getFactoryId();
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)
+     */
+    /** {@inheritDoc} */
+    @Override
     public void saveState(IMemento memento) {
-               TaxonEditorInputFactory.saveState(memento, this);
-       }
+        TaxonEditorInputFactory.saveState(memento, this);
+    }
 
 
     /**
@@ -393,20 +421,89 @@ public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPe
      * @param taxonBase a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
      */
     public void setInitiallySelectedTaxonBase(TaxonBase taxonBase) {
-               this.initiallySelectedTaxonBase = taxonBase;
-       }
-
-       /**
-        * <p>Getter for the field <code>initiallySelectedTaxonBase</code>.</p>
-        *
-        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
-        */
-       public TaxonBase getInitiallySelectedTaxonBase() {
-               return initiallySelectedTaxonBase;
-       }
-
-       @Override
-       public String toString() {
-               return String.format("%s[%s]", this.getClass().getSimpleName(), getTaxon());
-       }
+        this.initiallySelectedTaxonBase = taxonBase;
+    }
+
+    /**
+     * <p>Getter for the field <code>initiallySelectedTaxonBase</code>.</p>
+     *
+     * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
+     */
+    public TaxonBase getInitiallySelectedTaxonBase() {
+        return initiallySelectedTaxonBase;
+    }
+
+//    @Override
+//    public String toString() {
+//        return String.format("%s[%s]", this.getClass().getSimpleName(), getTaxon());
+//    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public List<TaxonNode> getRootEntities() {
+        return Arrays.asList(taxonNode);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+        CdmStore.getService(ITaxonNodeService.class).merge(taxonNode);
+    }
+
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        return null;
+    }
+
+    private List<String> getTaxonNodePropertyPaths() {
+        List<String> taxonNodePropertyPaths = new ArrayList<String>();
+        for(String propertyPath : getTaxonBasePropertyPaths()) {
+            taxonNodePropertyPaths.add("taxon." + propertyPath);
+        }
+        return taxonNodePropertyPaths;
+    }
+
+    private List<String> getTaxonBasePropertyPaths() {
+        List<String> taxonBasePropertyPaths = Arrays.asList(new String[] {
+                "sec",
+                "createdBy",
+                "updatedBy",
+                "annotations",
+                "markers",
+                "credits",
+                "extensions",
+                "rights",
+                "sources",
+                "descriptions",
+                "relationsToThisTaxon",
+                "relationsFromThisTaxon",
+                "taxonNodes",
+                "descriptions.descriptionElements.feature",
+                "descriptions.descriptionElements.area",
+                "descriptions.descriptionElements.status",
+                "descriptions.markers",
+                "name.descriptions",
+                "name.typeDesignations",
+                "name.status",
+                "name.nomenclaturalReference.inReference",
+                "name.taxonBases.taxonNodes",
+                "name.relationsFromThisName",
+                "name.relationsToThisName",
+                "name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.synonym.name.status",
+                "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName",
+                "synonymRelations.synonym.name.status.type",
+                "synonymRelations.synonym.name.relationsToThisName.fromName",
+                "synonymRelations.synonym.name.nomenclaturalReference.inReference.authorship",
+                "synonymRelations.synonym.name.nomenclaturalReference.authorship",
+                "synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations"
+        });
+
+        return taxonBasePropertyPaths;
+    }
+
 }
index a5bf4e6bedcf4aa0357509d06b8f6214c8ea451c..5c697e7f343913c9e74973b25e29bcc3c14cf198 100644 (file)
@@ -66,6 +66,7 @@ public class CdmAuthorityEditor extends EditorPart implements IConversationEnabl
        @Override
        public void setFocus() {
            PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setFocus();
+           ((CdmAuthorityEditorInput) getEditorInput()).bind();
        }
 
        /* (non-Javadoc)
@@ -76,6 +77,7 @@ public class CdmAuthorityEditor extends EditorPart implements IConversationEnabl
                try {
                        monitor.beginTask("Saving CDM Authority Editor", 1);
                        getConversationHolder().commit(true);
+                       ((CdmAuthorityEditorInput) getEditorInput()).merge();
                        dirty = false;
                        firePropertyChange(PROP_DIRTY);
                        monitor.worked(1);
@@ -172,6 +174,7 @@ public class CdmAuthorityEditor extends EditorPart implements IConversationEnabl
        public void dispose() {
                conversation.unregisterForDataStoreChanges(this);
                conversation.close();
+               ((CdmAuthorityEditorInput) getEditorInput()).getCdmEntitySession().dispose();
                super.dispose();
        }
 }
index 0e2553a51756e8a4d3dad6c6c607ee3dd78a533b..b3b8d6437ddc4f6007e2b79419ab1b00cbca181c 100644 (file)
@@ -1,57 +1,62 @@
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 package eu.etaxonomy.taxeditor.editor.group.authority;
 
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.UUID;
 
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IPersistableElement;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.IGroupService;
 import eu.etaxonomy.cdm.model.common.Group;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * Editor input for the {@link CdmAuthorityEditor}.
- * 
+ *
  * @author cmathew
  * @created Mar 28, 2013
  *
  */
 
-public class CdmAuthorityEditorInput implements IEditorInput, IConversationEnabled {
+public class CdmAuthorityEditorInput extends CdmEntitySessionInput implements IEditorInput, IConversationEnabled {
        private ConversationHolder conversation;
        private Group group;
-       
+
        protected CdmAuthorityEditorInput(ConversationHolder conversation, Group group) {
+           super(true);
                this.conversation = conversation;
-               this.group = group;
-               
+               this.group = CdmApplicationState.getCurrentAppConfig().getGroupService().load(group.getUuid());
+
        }
-       
+
        /**
         * Creates a new instance of the input for a given group.
-        * 
+        *
         * @param groupUuid
         * @return
         * @throws Exception
         */
        public static CdmAuthorityEditorInput NewInstance(UUID groupUuid) throws Exception{
                ConversationHolder conversation = CdmStore.createConversation();
-               Group group = CdmStore.getService(IGroupService.class).load(groupUuid, null);                   
+               Group group = CdmStore.getService(IGroupService.class).load(groupUuid, null);
                return new CdmAuthorityEditorInput(conversation, group);
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
         */
@@ -59,8 +64,8 @@ public class CdmAuthorityEditorInput implements IEditorInput, IConversationEnabl
        public Object getAdapter(Class adapter) {
                if (adapter == Group.class) {
                        return this.group;
-               }               
-               
+               }
+
                return null;
        }
        /* (non-Javadoc)
@@ -69,7 +74,7 @@ public class CdmAuthorityEditorInput implements IEditorInput, IConversationEnabl
        @Override
        public void update(CdmDataChangeMap changeEvents) {
                // TODO Auto-generated method stub
-               
+
        }
        /* (non-Javadoc)
         * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
@@ -114,8 +119,8 @@ public class CdmAuthorityEditorInput implements IEditorInput, IConversationEnabl
        @Override
        public String getToolTipText() {
                return getName();
-       }       
-       
+       }
+
        /* (non-Javadoc)
         * @see java.lang.Object#equals(java.lang.Object)
         */
@@ -129,13 +134,29 @@ public class CdmAuthorityEditorInput implements IEditorInput, IConversationEnabl
                }
                return super.equals(object);
        }
-       
+
        /**
         * Getter method for group member.
-        * 
+        *
         * @return
         */
        public Group getGroup() {
                return this.group;
        }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public Collection<Group> getRootEntities() {
+        return Arrays.asList(group);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+        group = CdmStore.getService(IGroupService.class).merge(group);
+    }
 }
index 318191f82fa760fed8d2b965fd9bf183f57cb0a0..9094200090805c610265ff7987a10c49498462d7 100644 (file)
@@ -21,41 +21,51 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
 public class OpenDerivateViewHandler extends AbstractHandler {
 
-    /* (non-Javadoc)
-     * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-     */
     @Override
     public Object execute(ExecutionEvent event) throws ExecutionException {
-        ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
-        if(currentSelection instanceof IStructuredSelection){
-            Iterator<?> selectionIterator = ((IStructuredSelection) currentSelection).iterator();
-            Set<UUID> selectedElementUUIDs = new HashSet<UUID>();
-            while(selectionIterator.hasNext()){
-                Object object = selectionIterator.next();
-                if(object instanceof SpecimenOrObservationBase<?>){
-                    selectedElementUUIDs.add(((SpecimenOrObservationBase<?>) object).getUuid());
-                }
-                else if(object instanceof IndividualsAssociation){
-                    SpecimenOrObservationBase specimen = ((IndividualsAssociation) object).getAssociatedSpecimenOrObservation();
-                    if(specimen!=null){
-                        selectedElementUUIDs.add(specimen.getUuid());
+        Set<UUID> selectedElementUUIDs = new HashSet<UUID>();
+        Object parameter;
+        //check if parameter is set
+        try {
+            parameter = event.getObjectParameterForExecution("eu.etaxonomy.taxeditor.specimenUuidParameter");
+        } catch (ExecutionException e) {
+            parameter = null;
+        }
+        if(parameter instanceof UUID){
+            selectedElementUUIDs.add((UUID) parameter);
+        }
+        else{
+            //if not, try with current selection
+            ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+            if(currentSelection instanceof IStructuredSelection){
+                Iterator<?> selectionIterator = ((IStructuredSelection) currentSelection).iterator();
+                while(selectionIterator.hasNext()){
+                    Object object = selectionIterator.next();
+                    if(object instanceof SpecimenOrObservationBase<?>){
+                        selectedElementUUIDs.add(((SpecimenOrObservationBase<?>) object).getUuid());
+                    }
+                    else if(object instanceof IndividualsAssociation){
+                        SpecimenOrObservationBase specimen = ((IndividualsAssociation) object).getAssociatedSpecimenOrObservation();
+                        if(specimen!=null){
+                            selectedElementUUIDs.add(specimen.getUuid());
+                        }
                     }
                 }
             }
-            if(!selectedElementUUIDs.isEmpty()){
-                DerivateViewEditorInput input = new DerivateViewEditorInput(selectedElementUUIDs);
-                try {
-                    EditorUtil.open(input);
-                } catch (PartInitException e) {
-                    MessagingUtils.error(OpenDerivateViewHandler.class, "Could not open Derivative Editor", e);
-                } catch (NullPointerException npe){
-                    MessagingUtils.messageDialog("Failed to open Editor", OpenDerivateViewHandler.class, "Could not open Derivative Editor. The derivate hierarchy is corrupted!", npe);
-                }
-            }
-            else{
-                MessagingUtils.informationDialog("Empty selection", "No Specimen selected.");
+        }
+        if(!selectedElementUUIDs.isEmpty()){
+            DerivateViewEditorInput input = new DerivateViewEditorInput(selectedElementUUIDs);
+            try {
+                EditorUtil.open(input);
+            } catch (PartInitException e) {
+                MessagingUtils.error(OpenDerivateViewHandler.class, "Could not open Derivative Editor", e);
+            } catch (NullPointerException npe){
+                MessagingUtils.messageDialog("Failed to open Editor", OpenDerivateViewHandler.class, "Could not open Derivative Editor. The derivate hierarchy is corrupted!", npe);
             }
         }
+        else{
+            MessagingUtils.informationDialog("Empty selection", "No Specimen selected.");
+        }
         return null;
     }
 
index 8ada87fff423fdf3941590273dc5cfac320ffa66..dbd3353708ca5eed81bb348743c09e3b8d5cd2ee 100644 (file)
 
 package eu.etaxonomy.taxeditor.editor.handler.create;
 
-import java.util.Collections;
-
 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.ui.PartInitException;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
 
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeCacheStrategy;
-import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeFieldUnitCacheStrategy;
-import eu.etaxonomy.cdm.api.service.IOccurrenceService;
-import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;
-import eu.etaxonomy.cdm.model.occurrence.DerivationEventType;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
-import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
-import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
-import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.newWizard.NewDerivedUnitBaseWizard;
 
 /**
- * <p>NewSpecimenHandler class.</p>
- *
  * @author n.hoffmann
  * @created Jun 16, 2010
  * @version 1.0
@@ -42,33 +28,32 @@ public class NewSpecimenHandler extends AbstractHandler {
        private static final Logger logger = Logger
                        .getLogger(NewSpecimenHandler.class);
 
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-        */
        /** {@inheritDoc} */
        @Override
     public Object execute(ExecutionEvent event) throws ExecutionException {
-           ConversationHolder conversation = CdmStore.createConversation();
-           conversation.bind();
-           FieldUnit fieldUnit = FieldUnit.NewInstance();
-           DerivedUnit derivedUnit = DerivedUnit.NewInstance(SpecimenOrObservationType.PreservedSpecimen);
-           DerivationEvent.NewSimpleInstance(fieldUnit, derivedUnit, DerivationEventType.GATHERING_IN_SITU());
-           fieldUnit.setCacheStrategy(new DerivedUnitFacadeFieldUnitCacheStrategy());
-           derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
-        CdmStore.getService(IOccurrenceService.class).save(fieldUnit);
-        CdmStore.getService(IOccurrenceService.class).save(derivedUnit);
-        conversation.commit();
-        DerivateViewEditorInput input = new DerivateViewEditorInput(Collections.singleton(fieldUnit.getUuid()));
-        try {
-            EditorUtil.open(input);
-        } catch (PartInitException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-//             NewDerivedUnitBaseWizard wizard = new NewDerivedUnitBaseWizard();
-//             wizard.init(null, null);
-//             WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
-//             dialog.open();
+
+           //TODO: we need to discuss how specimens should be created and handled #5244
+//         ConversationHolder conversation = CdmStore.createConversation();
+//         conversation.bind();
+//         FieldUnit fieldUnit = FieldUnit.NewInstance();
+//         DerivedUnit derivedUnit = DerivedUnit.NewInstance(SpecimenOrObservationType.PreservedSpecimen);
+//         DerivationEvent.NewSimpleInstance(fieldUnit, derivedUnit, DerivationEventType.GATHERING_IN_SITU());
+//         fieldUnit.setCacheStrategy(new DerivedUnitFacadeFieldUnitCacheStrategy());
+//         derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
+//        CdmStore.getService(IOccurrenceService.class).save(fieldUnit);
+//        CdmStore.getService(IOccurrenceService.class).save(derivedUnit);
+//        conversation.commit();
+//        DerivateViewEditorInput input = new DerivateViewEditorInput(Collections.singleton(fieldUnit.getUuid()));
+//        try {
+//            EditorUtil.open(input);
+//        } catch (PartInitException e) {
+//            // TODO Auto-generated catch block
+//            e.printStackTrace();
+//        }
+               NewDerivedUnitBaseWizard wizard = new NewDerivedUnitBaseWizard();
+               wizard.init(null, null);
+               WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
+               dialog.open();
                return null;
        }
 }
index 4bf11c90dff393d6db4ec30929588e7f2533bfbf..15c75555946e302a0acfcbfec2ddb64a4c3d26b3 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.editor.key;
 
@@ -11,23 +11,25 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.model.description.IIdentificationKey;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
 
 /**
  * @author n.hoffmann
- * 
+ *
  */
 public abstract class AbstractIdentificationEditorInput<T extends IIdentificationKey>
-               implements IEditorInput, IConversationEnabled {
+               extends CdmEntitySessionInput implements IEditorInput, IConversationEnabled {
 
        private final ConversationHolder conversation;
 
        protected AbstractIdentificationEditorInput(ConversationHolder conversation) {
+           super(true);
                this.conversation = conversation;
        }
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
         */
        @Override
@@ -38,7 +40,7 @@ public abstract class AbstractIdentificationEditorInput<T extends IIdentificatio
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.ui.IEditorInput#exists()
         */
        @Override
@@ -48,7 +50,7 @@ public abstract class AbstractIdentificationEditorInput<T extends IIdentificatio
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
         */
        @Override
@@ -59,7 +61,7 @@ public abstract class AbstractIdentificationEditorInput<T extends IIdentificatio
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.ui.IEditorInput#getPersistable()
         */
        @Override
@@ -70,7 +72,7 @@ public abstract class AbstractIdentificationEditorInput<T extends IIdentificatio
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.ui.IEditorInput#getToolTipText()
         */
        @Override
@@ -80,7 +82,7 @@ public abstract class AbstractIdentificationEditorInput<T extends IIdentificatio
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.ui.IEditorInput#getName()
         */
        @Override
@@ -98,7 +100,7 @@ public abstract class AbstractIdentificationEditorInput<T extends IIdentificatio
        @Override
        public void update(CdmDataChangeMap changeEvents) {
        }
-       
+
        /* (non-Javadoc)
         * @see java.lang.Object#equals(java.lang.Object)
         */
index 7b9a605cf3719f445a17a58678363142ff271d39..b6ca9645abd52bb6e75739fd5a5f90b63c2d3fe1 100644 (file)
 package eu.etaxonomy.taxeditor.editor.key;
 
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.forms.editor.FormEditor;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent;
+import eu.etaxonomy.cdm.api.application.ICdmChangeListener;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorInput;
 import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyGraphEditor;
 import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyListEditor;
 import eu.etaxonomy.taxeditor.model.DataChangeBridge;
@@ -32,7 +39,7 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
  * @version 1.0
  */
 public class KeyEditor extends FormEditor implements IConversationEnabled,
-               IDirtyMarkable, IPartContentHasDetails {
+               IDirtyMarkable, IPartContentHasDetails, ICdmChangeListener {
 
        public static final String ID = "eu.etaxonomy.taxeditor.editor.key";
 
@@ -42,6 +49,22 @@ public class KeyEditor extends FormEditor implements IConversationEnabled,
 
        private KeyEditorDataChangeBehaviour dataChangeBehavior;
 
+       private PolytomousKeyEditorInput polytomousKeyEditorInput;
+
+       /*
+     * (non-Javadoc)
+     *
+     * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite,
+     * org.eclipse.ui.IEditorInput)
+     */
+    @Override
+    public void init(IEditorSite site, IEditorInput input)
+            throws PartInitException {
+        polytomousKeyEditorInput = (PolytomousKeyEditorInput)input;
+        CdmApplicationState.getCurrentDataChangeService().register(this);
+        super.init(site, input);
+    }
+
        /*
         * (non-Javadoc)
         *
@@ -54,6 +77,7 @@ public class KeyEditor extends FormEditor implements IConversationEnabled,
                        monitor.beginTask("Saving Editor", 1);
                        getConversationHolder().bind();
                        getConversationHolder().commit(true);
+                       polytomousKeyEditorInput.merge();
                        setDirty(false);
                        monitor.worked(1);
                } finally {
@@ -85,6 +109,7 @@ public class KeyEditor extends FormEditor implements IConversationEnabled,
        public void setFocus() {
                getConversationHolder().commit(true);
                getConversationHolder().bind();
+               polytomousKeyEditorInput.bind();
                super.setFocus();
        }
        /*
@@ -181,6 +206,8 @@ public class KeyEditor extends FormEditor implements IConversationEnabled,
        public void dispose() {
                conversation.unregisterForDataStoreChanges(this);
                conversation.close();
+               polytomousKeyEditorInput.dispose();
+               CdmApplicationState.getCurrentDataChangeService().unregister(this);
                super.dispose();
        }
 
@@ -191,14 +218,13 @@ public class KeyEditor extends FormEditor implements IConversationEnabled,
         */
        @Override
        protected void addPages() {
-               AbstractIdentificationEditorInput input = (AbstractIdentificationEditorInput) getEditorInput();
-               conversation = input.getConversationHolder();
+               conversation = polytomousKeyEditorInput.getConversationHolder();
                conversation.registerForDataStoreChanges(this);
 
                try {
-                       addPage(0, new PolytomousKeyListEditor(this), input);
+                       addPage(0, new PolytomousKeyListEditor(this), polytomousKeyEditorInput);
                        setPageText(0, "List");
-                       addPage(1, new PolytomousKeyGraphEditor(this), input);
+                       addPage(1, new PolytomousKeyGraphEditor(this), polytomousKeyEditorInput);
                        setPageText(1, "Graph");
                } catch (PartInitException e) {
                        MessagingUtils.error(getClass(), e);
@@ -214,8 +240,21 @@ public class KeyEditor extends FormEditor implements IConversationEnabled,
         *
         */
        public void setPartName() {
-               AbstractIdentificationEditorInput input = (AbstractIdentificationEditorInput) getEditorInput();
-               PolytomousKey key = (PolytomousKey) input.getKey();
+               PolytomousKey key = polytomousKeyEditorInput.getKey();
                setPartName(key.getTitleCache());
        }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.application.ICdmChangeListener#onChange(eu.etaxonomy.cdm.api.application.CdmChangeEvent)
+     */
+    @Override
+    public void onChange(CdmChangeEvent event) {
+        //editorDirtyStateChanged();
+        IEditorPart activeEditor = getActiveEditor();
+        if (activeEditor instanceof IDirtyMarkable) {
+            for(CdmBase cdmBase : event.getChangedObjects()) {
+                ((IDirtyMarkable) activeEditor).changed(cdmBase);
+            }
+        }
+    }
 }
index 73d84ec90dedf96b50cbcba5d7f81de54e56c36f..a6555ce7d01e3f5ff8266f33ac90ed98995984f6 100644 (file)
@@ -1,8 +1,10 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.editor.key.polytomous;
 
+import java.util.Arrays;
+import java.util.List;
 import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
@@ -17,56 +19,77 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<PolytomousKey> {
 
-       private PolytomousKey key;
-
-       protected PolytomousKeyEditorInput(ConversationHolder conversation,
-                       PolytomousKey key) {
-               super(conversation);
-               this.key = key;
-       }
-       
-       
-
-       public static PolytomousKeyEditorInput NewInstance(UUID polytomousKeyUuid) throws Exception{
-               try{
-                       ConversationHolder conversation = CdmStore.createConversation();
-                                               
-                       return NewInstance(polytomousKeyUuid, conversation);
-               }catch(Exception e){
-                       throw e;
-               }
-       }
-       
-       public static PolytomousKeyEditorInput NewInstance(UUID polytomousKeyUuid, ConversationHolder conversation) throws Exception{
-               PolytomousKey polytomousKey = CdmStore.getService(IPolytomousKeyService.class).load(polytomousKeyUuid, null);
-                       
-               return new PolytomousKeyEditorInput(conversation, polytomousKey);
-       }
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#getName()
-        */
-       @Override
-       public String getName() {
-               return key.getTitleCache();
-       }
-       
-       @Override
-       public PolytomousKey getKey() {
-               return key;
-       }
-       
-       /* (non-Javadoc)
-        * @see java.lang.Object#equals(java.lang.Object)
-        */
-       @Override
-       public boolean equals(Object object) {
-               if (object instanceof PolytomousKeyEditorInput
-                               && getKey() != null
-                               && getKey().equals(((PolytomousKeyEditorInput) object).getKey())
-               ){
-                       return true;
-               }
-               return super.equals(object);
-       }
+    private final String name;
+    private final UUID keyUuid;
+    private PolytomousKey key;
+
+
+    protected PolytomousKeyEditorInput(ConversationHolder conversation,
+            UUID polytomousKeyUuid) {
+        super(conversation);
+        this.keyUuid = polytomousKeyUuid;
+        this.key = CdmStore.getService(IPolytomousKeyService.class).load(polytomousKeyUuid, null);
+        this.name = key.getTitleCache();
+    }
+
+//    public PolytomousKeyEditorInput(UUID polytomousKeyUuid, String name) {
+//        super(CdmStore.createConversation());
+//        this.keyUuid = polytomousKeyUuid;
+//        this.name = name;
+//    }
+
+
+    public static PolytomousKeyEditorInput NewInstance(UUID polytomousKeyUuid) throws Exception{
+        try{
+            ConversationHolder conversation = CdmStore.createConversation();
+            return new PolytomousKeyEditorInput(conversation, polytomousKeyUuid);
+        }catch(Exception e){
+            throw e;
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IEditorInput#getName()
+     */
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public PolytomousKey getKey() {
+        return key;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object object) {
+        if (object instanceof PolytomousKeyEditorInput
+                && getKey() != null
+                && getKey().equals(((PolytomousKeyEditorInput) object).getKey())
+                ){
+            return true;
+        }
+        return super.equals(object);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public  List<PolytomousKey> getRootEntities() {
+        return Arrays.asList(key);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+        key = CdmStore.getService(IPolytomousKeyService.class).merge(key);
+    }
+
 }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorLabels.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorLabels.java
new file mode 100644 (file)
index 0000000..82ee611
--- /dev/null
@@ -0,0 +1,24 @@
+// $Id$
+/**
+* Copyright (C) 2015 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.editor.key.polytomous;
+
+/**
+ * @author cmathew
+ * @date 21 Jul 2015
+ *
+ */
+public interface PolytomousKeyEditorLabels {
+
+    public static final String CREATE_CHILD_POLYTOMOUS_KEY_NODE_LABEL = "Create Child Polytomous Key Node";
+    public static final String CREATE_SIBLING_POLYTOMOUS_KEY_NODE_LABEL = "Create Sibling Polytomous Key Node";
+
+    public static final String NO_KEY_NODE_FOR_CHILD_SELECTED_MESSAGE = "No Key Node Selected.Please right-click on a specific key node to create a new child key node.";
+    public static final String NO_KEY_NODE_FOR_SIBLING_SELECTED_MESSAGE = "No Key Node Selected.Please right-click on a specific key node to create a new sibling key node.";
+}
index a17c56a0a503afd56d350188b8ed65d5c4179f51..90ed20b2b7386d3397d1ce2d2de13f45851709ee 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
  * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy 
+ * European Distributed Institute of Taxonomy
  * http://www.e-taxonomy.eu
- * 
+ *
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
@@ -16,7 +16,6 @@ import java.util.List;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.Viewer;
 
-import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
 
 /**
@@ -29,7 +28,7 @@ public class PolytomousKeyListContentProvider implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.jface.viewers.IContentProvider#dispose()
         */
        @Override
@@ -38,7 +37,7 @@ public class PolytomousKeyListContentProvider implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface
         * .viewers.Viewer, java.lang.Object, java.lang.Object)
@@ -49,17 +48,17 @@ public class PolytomousKeyListContentProvider implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java
         * .lang.Object)
         */
        @Override
        public Object[] getElements(Object inputElement) {
-               if (inputElement instanceof PolytomousKey) {
+               if (inputElement instanceof PolytomousKeyEditorInput) {
                        List<PolytomousKeyNode> result = new ArrayList<PolytomousKeyNode>();
 
-                       PolytomousKeyNode root = ((PolytomousKey) inputElement).getRoot();
+                       PolytomousKeyNode root = ((PolytomousKeyEditorInput) inputElement).getKey().getRoot();
 
                        getChildrenBreadthFirst(result, root);
                        return result.toArray();
index dc81964bcb980a3f797810c654c7f6c6b073264f..7b8fb00a58da47b6e36d9cbf548dbbd7fa5ba0f5 100644 (file)
@@ -250,7 +250,7 @@ public class PolytomousKeyListEditor extends EditorPart implements
 
                setPartName(key.getTitleCache());
 
-               viewer.setInput(key);
+               viewer.setInput(getEditorInput());
        }
 
        public int getTableItemCount() {
@@ -262,7 +262,7 @@ public class PolytomousKeyListEditor extends EditorPart implements
        }
 
        public PolytomousKey getViewerInputKey() {
-           return (PolytomousKey) viewer.getInput();
+           return ((PolytomousKeyEditorInput) viewer.getInput()).getKey();
        }
        private void createMenu() {
                // register context menu
@@ -320,11 +320,14 @@ public class PolytomousKeyListEditor extends EditorPart implements
                if (element instanceof PolytomousKeyNode) {
                        List<PolytomousKeyNode> children = ((PolytomousKeyNode) element)
                                        .getParent().getChildren();
+                       viewer.update(((PolytomousKeyNode) element)
+                    .getParent(), null);
                        for (PolytomousKeyNode child : children) {
                                viewer.update(child, null);
                        }
-               }
 
+               }
+               viewer.refresh();
        }
 
     /* (non-Javadoc)
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/RemotingCreateChildPolytomousKeyNodeHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/RemotingCreateChildPolytomousKeyNodeHandler.java
new file mode 100644 (file)
index 0000000..1d679a8
--- /dev/null
@@ -0,0 +1,90 @@
+// $Id$
+/**
+ * Copyright (C) 2015 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.taxeditor.editor.key.polytomous.handler;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.IPolytomousKeyEditorPage;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorLabels;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyListEditor;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.operation.RemotingCreatePolytomousKeyNodeOperation;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
+
+/**
+ * @author cmathew
+ * @date 21 Jul 2015
+ *
+ */
+public class RemotingCreateChildPolytomousKeyNodeHandler extends RemotingCdmHandler {
+
+    private PolytomousKeyNode parentNode;
+
+    public RemotingCreateChildPolytomousKeyNodeHandler() {
+        super(PolytomousKeyEditorLabels.CREATE_CHILD_POLYTOMOUS_KEY_NODE_LABEL);
+    }
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#allowOperations(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public IStatus allowOperations(ExecutionEvent event) {
+        IEditorPart editor = HandlerUtil.getActiveEditor(event);
+
+        if (editor instanceof KeyEditor) {
+            IPolytomousKeyEditorPage editorPage = (IPolytomousKeyEditorPage) ((KeyEditor) editor)
+                    .getActiveEditor();
+
+            if (editorPage instanceof PolytomousKeyListEditor) {
+                PolytomousKeyListEditor klEditor = (PolytomousKeyListEditor) editorPage;
+                if(klEditor.getTableItemCount() == 0) {
+                    PolytomousKey pk = klEditor.getViewerInputKey();
+                    parentNode = pk.getRoot();
+
+                } else {
+                    IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+                    if (selection.getFirstElement() instanceof PolytomousKeyNode) {
+                        parentNode = (PolytomousKeyNode) selection.getFirstElement();
+                    } else {
+                        return new Status(IStatus.ERROR,
+                                "unknown",
+                                PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_CHILD_SELECTED_MESSAGE);
+                    }
+                }
+            }
+        }
+        return Status.OK_STATUS;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#prepareOperation(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public AbstractOperation prepareOperation(ExecutionEvent event) {
+        return new RemotingCreatePolytomousKeyNodeOperation(event.getTrigger(), false, parentNode);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete()
+     */
+    @Override
+    public void onComplete() {
+        // TODO Auto-generated method stub
+
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/RemotingCreateSiblingPolytomousKeyNodeHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/RemotingCreateSiblingPolytomousKeyNodeHandler.java
new file mode 100644 (file)
index 0000000..7f726a8
--- /dev/null
@@ -0,0 +1,72 @@
+// $Id$
+/**
+* Copyright (C) 2015 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.editor.key.polytomous.handler;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorLabels;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.operation.RemotingCreatePolytomousKeyNodeOperation;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
+
+/**
+ * @author cmathew
+ * @date 21 Jul 2015
+ *
+ */
+public class RemotingCreateSiblingPolytomousKeyNodeHandler extends RemotingCdmHandler {
+
+    private PolytomousKeyNode parentNode;
+
+    public RemotingCreateSiblingPolytomousKeyNodeHandler() {
+        super(PolytomousKeyEditorLabels.CREATE_SIBLING_POLYTOMOUS_KEY_NODE_LABEL);
+    }
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#allowOperations(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public IStatus allowOperations(ExecutionEvent event) {
+
+        IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+        if (selection.getFirstElement() instanceof PolytomousKeyNode) {
+            parentNode = (PolytomousKeyNode) selection.getFirstElement();
+        } else {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_SIBLING_SELECTED_MESSAGE);
+        }
+
+        return Status.OK_STATUS;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#prepareOperation(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public AbstractOperation prepareOperation(ExecutionEvent event) {
+        return new RemotingCreatePolytomousKeyNodeOperation(event.getTrigger(), false, parentNode.getParent());
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete()
+     */
+    @Override
+    public void onComplete() {
+        // TODO Auto-generated method stub
+
+    }
+
+}
index f45ce48b021ba42043a23a5448c5e02835b9c33a..aa1a363f964e4966947112a26db956c8903fbe07 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.editor.key.polytomous.operation;
 
@@ -21,7 +21,7 @@ public class CreateNodeOperation extends AbstractPostTaxonOperation {
 
        PolytomousKeyNode parentNode;
        private PolytomousKeyNode childNode;
-       
+
        public CreateNodeOperation(String label,
                        IUndoContext undoContext, PolytomousKeyNode parentNode, IPostOperationEnabled postOperationEnabled) {
                super(label, undoContext, postOperationEnabled);
@@ -36,7 +36,7 @@ public class CreateNodeOperation extends AbstractPostTaxonOperation {
                        throws ExecutionException {
 
                childNode = PolytomousKeyNode.NewInstance();
-               
+
                parentNode.addChild(childNode);
 
                return postExecute(childNode);
index f31a83125aa62cf9cf7d9846550908e69a0b318d..684d8eebd7ea30f60d6c3356ae05b1d9ebb62371 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.editor.key.polytomous.operation;
 
@@ -9,12 +9,10 @@ import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
-import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
 import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -24,7 +22,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * @author n.hoffmann
- * 
+ *
  */
 public class DeleteNodeOperation extends AbstractPostTaxonOperation {
 
@@ -40,7 +38,7 @@ public class DeleteNodeOperation extends AbstractPostTaxonOperation {
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse
         * .core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
@@ -48,12 +46,12 @@ public class DeleteNodeOperation extends AbstractPostTaxonOperation {
        @Override
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
-               
+
                //parent.removeChild(node);
                ICdmApplicationConfiguration controller;
-               
-               controller = (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration();
-               
+
+               controller = CdmStore.getCurrentApplicationConfiguration();
+
                IPolytomousKeyNodeService service = controller.getPolytomousKeyNodeService();
                DeleteResult result;
                if (node.getChildren().size()>0){
@@ -82,7 +80,7 @@ public class DeleteNodeOperation extends AbstractPostTaxonOperation {
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse
         * .core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
@@ -95,7 +93,7 @@ public class DeleteNodeOperation extends AbstractPostTaxonOperation {
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse
         * .core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/RemotingCreatePolytomousKeyNodeOperation.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/RemotingCreatePolytomousKeyNodeOperation.java
new file mode 100644 (file)
index 0000000..77f0373
--- /dev/null
@@ -0,0 +1,51 @@
+// $Id$
+/**
+* Copyright (C) 2015 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.editor.key.polytomous.operation;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.LanguageString;
+import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmMergeOperation;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author cmathew
+ * @date 21 Jul 2015
+ *
+ */
+public class RemotingCreatePolytomousKeyNodeOperation extends RemotingCdmMergeOperation {
+
+    private final PolytomousKeyNode parentNode;
+
+    private final static String LABEL = "Create new polytomous key node";
+
+    public RemotingCreatePolytomousKeyNodeOperation(Object source,
+            boolean async,
+            PolytomousKeyNode parentNode){
+        super(LABEL, Action.Create, source, async);
+        this.parentNode = parentNode;
+    }
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmMergeOperation#doMergeExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    @Override
+    protected CdmBase doMergeExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
+        PolytomousKeyNode childNode = PolytomousKeyNode.NewInstance();
+        parentNode.addChild(childNode);
+        childNode.getModifyingText().put(CdmStore.getDefaultLanguage(),LanguageString.NewInstance("",CdmStore.getDefaultLanguage()));
+        return CdmApplicationState.getCurrentAppConfig().getPolytomousKeyNodeService().merge(childNode);
+    }
+
+}
index b3cd23d0d5c3b1d348496b9af6cd0c8edc26e363..7733dfd52805ae37089d6d70b08be14788b5d37a 100644 (file)
@@ -44,7 +44,6 @@ import org.eclipse.ui.part.EditorPart;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
-import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
@@ -53,7 +52,6 @@ import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.editor.CdmDataTransfer;
-import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.IDropTargetable;
 import eu.etaxonomy.taxeditor.editor.IMultiPageTaxonEditorPage;
 import eu.etaxonomy.taxeditor.editor.ISecuredEditor;
@@ -74,8 +72,8 @@ import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.TaxeditorPartService;
 import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.security.RequiredPermissions;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
 
 /**
  * <p>
@@ -121,6 +119,8 @@ public class TaxonNameEditor extends EditorPart implements
 
        private TaxonBase objectAffectedByLastOperation;
 
+       private ICdmEntitySession cdmEntitySession;
+
        /**
         * <p>
         * Constructor for TaxonNameEditor.
@@ -235,8 +235,7 @@ public class TaxonNameEditor extends EditorPart implements
         * </p>
         */
        public void createOrUpdateNameComposites() {
-               //this.taxon = (Taxon)CdmStore.getService(ITaxonService.class).load(this.getTaxon().getUuid());
-               //this.taxon = HibernateProxyHelper.deproxy(this.taxon, Taxon.class);
+//             this.taxon = (Taxon)CdmStore.getService(ITaxonService.class).load(this.getTaxon().getUuid());
                ContainerFactory.createOrUpdateAcceptedTaxonsHomotypicGroup(this);
                ContainerFactory.createOrUpdateHeterotypicSynonymyGroups(this);
                ContainerFactory.createOrUpdateMisapplicationsGroup(this);
@@ -509,7 +508,7 @@ public class TaxonNameEditor extends EditorPart implements
         }
 
                if (input.getAdapter(Taxon.class) != null) {
-                       taxon = (Taxon) input.getAdapter(Taxon.class);
+                       taxon = CdmBase.deproxy(input.getAdapter(Taxon.class), Taxon.class);
                } else {
                        throw new PartInitException("Invalid Input: Taxon cannot be null");
                }
@@ -948,4 +947,7 @@ public class TaxonNameEditor extends EditorPart implements
                Color background =  AbstractUtility.getColor(enabled ? Resources.COLOR_COMPOSITE_BACKGROUND : Resources.COLOR_TEXT_DISABLED_BACKGROUND);
                setEnabled(enabled, background);
        }
+
+
+
 }
index e76b8475e3a91bd43d8587fadb357dc6e94bd129..d0eca25f8ee5798022727bc76924e64fba0b9a35 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -38,6 +38,7 @@ import eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToAcceptedTaxon
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
 
 /**
@@ -51,16 +52,17 @@ public class ChangeSynonymToAcceptedTaxonHandler extends AbstractHandler impleme
        private static final Logger logger = Logger
                        .getLogger(ChangeSynonymToAcceptedTaxonHandler.class);
        private MultiPageTaxonEditor editor;
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        /** {@inheritDoc} */
-       public Object execute(ExecutionEvent event) throws ExecutionException {
+       @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
                editor =  (MultiPageTaxonEditor) HandlerUtil.getActiveEditor(event);
                Shell shell = HandlerUtil.getActiveShell(event);
                IEditorInput input = editor.getEditorInput();
-               
+
                if (!(input instanceof TaxonEditorInput)) {
                        logger.error("Editor input is not TaxonEditorInput");
                        return null;
@@ -74,7 +76,7 @@ public class ChangeSynonymToAcceptedTaxonHandler extends AbstractHandler impleme
                }
 
                Synonym synonym = (Synonym) selection.getFirstElement();
-               
+
                // Force user to save taxon - not really necessary though, is it?
                if (!EditorUtil.forceUserSave(editor, shell)) {
                        return null;
@@ -82,25 +84,27 @@ public class ChangeSynonymToAcceptedTaxonHandler extends AbstractHandler impleme
 
                // Get taxon
                Taxon taxon = ((TaxonEditorInput) input).getTaxon();
-               
+
                TaxonNode parentNode = (TaxonNode) HibernateProxyHelper.deproxy(((TaxonEditorInput) input).getTaxonNode().getParent());
-               
+
                List<UUID> excludeTaxa = null;
-               
-               TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select parent", excludeTaxa, null, null);
-               
+
+               TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select parent", excludeTaxa, null, ((TaxonEditorInput) input).getTaxonNode().getClassification());
+
+
                if(newParentNode != null){
-                       
+
                        // TODO get synonyms from homotypical group and add them as homotypic synonyms to new accepted taxon
                        // apply confirmation dialog
                        HomotypicalGroup group = synonym.getHomotypicGroup();
                        Set<TaxonNameBase> namesInGroup = group.getTypifiedNames();
                        // FIXME with this implementation we can not create a taxonNode that is a direct child of the classification node
-                       AbstractPostOperation operation = new ChangeSynonymToAcceptedTaxonOperation("Change synonym to accepted taxon", EditorUtil.getUndoContext(), 
-                                       taxon, newParentNode, synonym, namesInGroup, this, editor); //$NON-NLS-1$
+                       AbstractPostOperation operation = new ChangeSynonymToAcceptedTaxonOperation("Change synonym to accepted taxon", EditorUtil.getUndoContext(),
+                                       taxon, newParentNode, synonym, namesInGroup, this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput()); //$NON-NLS-1$
+
                        EditorUtil.executeOperation(operation);
                }
-               
+
                return null;
        }
 
@@ -108,19 +112,20 @@ public class ChangeSynonymToAcceptedTaxonHandler extends AbstractHandler impleme
         * @see eu.etaxonomy.taxeditor.operations.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
         */
        /** {@inheritDoc} */
-       public boolean postOperation(CdmBase objectAffectedByOperation) {
-               
+       @Override
+    public boolean postOperation(CdmBase objectAffectedByOperation) {
+
                // Redraw existing editor
                ((IPostOperationEnabled) editor).postOperation(null);
-               
+
                editor.doSave(EditorUtil.getMonitor());
-               
+
                if (objectAffectedByOperation instanceof TaxonNode) {
-               
+
                        // Open new unsaved editor with existing taxon's parent as temporary parent
                        TaxonNode newNode = (TaxonNode) objectAffectedByOperation;
 //                     TaxonNode newNode = parentNode.addChild(newTaxon);
-                                       
+
                        try {
                                // TODO
                                /*
@@ -129,7 +134,7 @@ public class ChangeSynonymToAcceptedTaxonHandler extends AbstractHandler impleme
                                 *  doesn't work yet.
                                 */
                                EditorUtil.openTaxonNode(newNode.getUuid());
-                               
+
                        } catch (PartInitException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
@@ -145,7 +150,8 @@ public class ChangeSynonymToAcceptedTaxonHandler extends AbstractHandler impleme
         *
         * @return a boolean.
         */
-       public boolean onComplete() {
+       @Override
+    public boolean onComplete() {
                // TODO Auto-generated method stub
                return false;
        }
index 9f76a0967f0cd16c447c67674e9fc46980a37053..9047c2a137d4e65b3527d10cacd85cd1ffcd6218 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -16,7 +16,7 @@ import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.commands.common.NotDefinedException;
 
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
@@ -40,22 +40,23 @@ public class CreateHomotypicSynonymHandler extends AbstractHandler implements
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        /** {@inheritDoc} */
-       public Object execute(ExecutionEvent event) throws ExecutionException {
+       @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
                TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
                                Page.NAME);
                Taxon taxon = editor.getTaxon();
                HomotypicalGroup group = taxon.getHomotypicGroup();
-               TaxonNameBase newSynonymName = ParseHandler.createEmptyName();
-               
+               NonViralName newSynonymName = ParseHandler.createEmptyName();
+
                AbstractPostOperation operation;
                try {
-                       operation = new CreateSynonymInExistingHomotypicalGroupOperation(event.getCommand().getName(), 
+                       operation = new CreateSynonymInExistingHomotypicalGroupOperation(event.getCommand().getName(),
                                        editor.getUndoContext(), taxon, group, newSynonymName, editor);
                        EditorUtil.executeOperation(operation);
                } catch (NotDefinedException e) {
                        MessagingUtils.error(getClass(), e);
                }
-               
+
 
                return null;
        }
index 4d19f059ce7e6e6544a901a9900e971a44e99a89..45dc4776ccf30ab26a2cd3acac1122996815af70 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -21,7 +21,7 @@ import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
@@ -46,26 +46,27 @@ public class CreateSynonymInHomotypicalGroupHandler extends AbstractHandler
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        /** {@inheritDoc} */
-       public Object execute(ExecutionEvent event) throws ExecutionException {
+       @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
                TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
                                Page.NAME);
                ISelection menuSelection = HandlerUtil.getCurrentSelection(event);
-               
+
                Object selecteObject = ((StructuredSelection) menuSelection).getFirstElement();
-               
+
                if(! (selecteObject instanceof Synonym)){
                        return null;
                }
-               
-               
+
+
                Synonym synonym = (Synonym) selecteObject;
-               
+
                HomotypicalGroup group = synonym.getHomotypicGroup();
-               
-               TaxonNameBase newSynonymName = ParseHandler.createEmptyName();
-               
+
+               NonViralName newSynonymName = ParseHandler.createEmptyName();
+
                AbstractPostOperation operation;
-               
+
                try {
                        operation = new CreateSynonymInExistingHomotypicalGroupOperation(event.getCommand().getName(), editor.getUndoContext(),
                                                                editor.getTaxon(), group, newSynonymName, editor);
@@ -73,7 +74,7 @@ public class CreateSynonymInHomotypicalGroupHandler extends AbstractHandler
                } catch (NotDefinedException e) {
                        logger.warn("Command name not set");
                }
-               
+
                return null;
        }
 }
index ed85b64c00acdb64cf79575bc147cb35fb9d14b0..34119ea2971300778f4819e222816a349e7cb59f 100644 (file)
@@ -32,6 +32,7 @@ import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 
 /**
  * <p>DeleteTaxonBaseHandler class.</p>
@@ -91,7 +92,15 @@ public class DeleteTaxonBaseHandler extends AbstractHandler implements IHandler,
 
                        IWorkbenchPage activePage = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
 
-                       operation = new DeleteTaxonOperation(commandName, editor.getUndoContext(),(Taxon) selectedElement, new TaxonDeletionConfigurator(), null, activePage, this, editor);
+                       operation = new DeleteTaxonOperation(commandName,
+                               editor.getUndoContext(),
+                               (Taxon) selectedElement,
+                               new TaxonDeletionConfigurator(),
+                               null,
+                               activePage,
+                               this,
+                               editor,
+                               (ICdmEntitySessionEnabled)editor.getEditorInput());
                        //editor.dispose();
 
                }
index 82198663a13e18411e7dee7eccfc8ae0b623af0d..b2c7b64532116f49938fa32c2d68de829fee13ce 100644 (file)
@@ -1,82 +1,78 @@
-package eu.etaxonomy.taxeditor.editor.name.handler;\r
-\r
-import java.util.UUID;\r
-\r
-import org.apache.log4j.Logger;\r
-import org.eclipse.core.commands.AbstractHandler;\r
-import org.eclipse.core.commands.ExecutionEvent;\r
-import org.eclipse.core.commands.ExecutionException;\r
-import org.eclipse.core.commands.common.NotDefinedException;\r
-import org.eclipse.core.commands.operations.IUndoContext;\r
-import org.eclipse.jface.dialogs.MessageDialog;\r
-import org.eclipse.jface.viewers.StructuredSelection;\r
-import org.eclipse.swt.widgets.Shell;\r
-import org.eclipse.ui.IEditorInput;\r
-import org.eclipse.ui.handlers.HandlerUtil;\r
-\r
-import eu.etaxonomy.cdm.model.common.CdmBase;\r
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
-import eu.etaxonomy.cdm.model.taxon.Synonym;\r
-import eu.etaxonomy.cdm.model.taxon.Taxon;\r
-import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
-import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
-import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;\r
-import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;\r
-import eu.etaxonomy.taxeditor.editor.name.operation.MoveSynonymToAnotherAcceptedTaxonOperation;\r
-import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
-import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;\r
-\r
-public class MoveSynonymToAnotherAcceptedTaxonHandler extends AbstractHandler implements IPostOperationEnabled {\r
-       private static final Logger logger = Logger\r
-       .getLogger(MoveSynonymToAnotherAcceptedTaxonHandler.class);\r
-       private MultiPageTaxonEditor editor;\r
-       \r
-       @Override\r
-       public Object execute(ExecutionEvent event) throws ExecutionException {\r
-               editor =  (MultiPageTaxonEditor) HandlerUtil.getActiveEditor(event);\r
-               Shell shell = HandlerUtil.getActiveShell(event);\r
-               IEditorInput input = editor.getEditorInput();\r
-               if (!EditorUtil.forceUserSave(editor, shell)) {\r
-                       return null;\r
-               }\r
-               \r
-               if (!(input instanceof TaxonEditorInput)) {\r
-                       logger.error("Editor input is not TaxonEditorInput");\r
-                       return null;\r
-               }\r
-\r
-               // Get synonym from selection\r
-               StructuredSelection selection = (StructuredSelection) HandlerUtil.getCurrentSelection(event);\r
-               if (!(selection.getFirstElement() instanceof Synonym)) {\r
-                       logger.error("Selection does not contain a Synonym");\r
-                       return null;\r
-               }\r
-\r
-               Synonym synonym = (Synonym) selection.getFirstElement();\r
-               TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select new accepted taxon", null, null, null);\r
-               Taxon oldParent = ((TaxonEditorInput)input).getTaxon();\r
-       \r
-                       MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon of Synonym", EditorUtil.getUndoContext(),\r
-                                       oldParent.getUuid(), synonym.getUuid(), newParentNode.getTaxon(), editor);\r
-                       \r
-                       EditorUtil.executeOperation(operation);\r
-       \r
-\r
-               return null;\r
-       }\r
-\r
-       @Override\r
-       public boolean postOperation(CdmBase objectAffectedByOperation) {\r
-               // TODO Auto-generated method stub\r
-               return false;\r
-       }\r
-\r
-       @Override\r
-       public boolean onComplete() {\r
-               // TODO Auto-generated method stub\r
-               return false;\r
-       }\r
-       \r
-       \r
-\r
-}\r
+package eu.etaxonomy.taxeditor.editor.name.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.viewers.StructuredSelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.taxon.Synonym;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.name.operation.MoveSynonymToAnotherAcceptedTaxonOperation;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
+
+public class MoveSynonymToAnotherAcceptedTaxonHandler extends AbstractHandler implements IPostOperationEnabled {
+       private static final Logger logger = Logger
+       .getLogger(MoveSynonymToAnotherAcceptedTaxonHandler.class);
+       private MultiPageTaxonEditor editor;
+
+       @Override
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               editor =  (MultiPageTaxonEditor) HandlerUtil.getActiveEditor(event);
+               Shell shell = HandlerUtil.getActiveShell(event);
+               IEditorInput input = editor.getEditorInput();
+               if (!EditorUtil.forceUserSave(editor, shell)) {
+                       return null;
+               }
+
+               if (!(input instanceof TaxonEditorInput)) {
+                       logger.error("Editor input is not TaxonEditorInput");
+                       return null;
+               }
+
+               // Get synonym from selection
+               StructuredSelection selection = (StructuredSelection) HandlerUtil.getCurrentSelection(event);
+               if (!(selection.getFirstElement() instanceof Synonym)) {
+                       logger.error("Selection does not contain a Synonym");
+                       return null;
+               }
+
+               Synonym synonym = (Synonym) selection.getFirstElement();
+               TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select new accepted taxon", null, null, ((TaxonEditorInput)input).getTaxonNode().getClassification());
+               if(newParentNode!=null){
+                   Taxon oldParent = ((TaxonEditorInput)input).getTaxon();
+
+                   MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon of Synonym", EditorUtil.getUndoContext(),
+                           oldParent.getUuid(), synonym.getUuid(), newParentNode.getTaxon(), editor);
+
+                   AbstractUtility.executeOperation(operation);
+
+               }
+               return null;
+       }
+
+       @Override
+       public boolean postOperation(CdmBase objectAffectedByOperation) {
+               // TODO Auto-generated method stub
+               return false;
+       }
+
+       @Override
+       public boolean onComplete() {
+               // TODO Auto-generated method stub
+               return false;
+       }
+
+
+
+}
index d8c0e370fdd71db8eb35e3d8c90721fd68edc9b7..014f92da1cfa6c34d8f7f914ea7011bb92327c66 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -28,6 +28,7 @@ import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.name.operation.SwapSynonymAndAcceptedOperation;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 
 /**
  * <p>SwapSynonymAndAcceptedHandler class.</p>
@@ -47,26 +48,31 @@ public class SwapSynonymAndAcceptedHandler extends AbstractHandler implements
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        /** {@inheritDoc} */
-       public Object execute(ExecutionEvent event) throws ExecutionException {
+       @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
                editor = EditorUtil.getActiveMultiPageTaxonEditor();
                Shell shell = HandlerUtil.getActiveShell(event);
                Synonym synonym = (Synonym) EditorUtil.getSelection(event).getFirstElement();
-               
+
 
                // Force user to save taxon - not really necessary though, is it?
                if (!EditorUtil.forceUserSave(editor, shell)) {
                        return null;
                }
-               
+
                try {
-                       SwapSynonymAndAcceptedOperation operation = new SwapSynonymAndAcceptedOperation(event.getCommand().getName(), editor.getUndoContext(),
-                                                               editor.getTaxon(), synonym, this);
-                       
+                       SwapSynonymAndAcceptedOperation operation = new SwapSynonymAndAcceptedOperation(event.getCommand().getName(),
+                               editor.getUndoContext(),
+                               editor.getTaxon(),
+                               synonym,
+                               this,
+                               (ICdmEntitySessionEnabled)editor.getEditorInput());
+
                        EditorUtil.executeOperation(operation);
-                       
+
                } catch (NotDefinedException e) {
                        logger.warn("Command name not set");
-               } 
+               }
 
                return null;
        }
@@ -78,15 +84,15 @@ public class SwapSynonymAndAcceptedHandler extends AbstractHandler implements
        public boolean postOperation(CdmBase objectAffectedByOperation) {
                // Redraw existing editor
                //((IPostOperationEnabled) editor).postOperation(null);
-               
+
                editor.doSave(EditorUtil.getMonitor());
                editor.close(true);
-               
+
                if (objectAffectedByOperation instanceof Taxon) {
-               
+
                        taxon = (Taxon) objectAffectedByOperation;
-                                       
-                       
+
+
                }
                return true;
        }
@@ -98,14 +104,15 @@ public class SwapSynonymAndAcceptedHandler extends AbstractHandler implements
        public boolean onComplete() {
                Display display = Display.getCurrent();
                display.asyncExec(new Runnable() {
-                       public void run() {
+                       @Override
+            public void run() {
                                try {
                                        EditorUtil.openTaxonBase(taxon.getUuid());
-                                       
+
                                } catch (Exception e) {
                                        MessagingUtils.warningDialog("Could not open editor for taxon", this, e.getMessage());
                                }
-                               
+
                        }
                });
                return true;
index e3657991601b789219259873cc67af3b9de223db..d964006d30b462496e472b5fc1ffa16299f1760a 100644 (file)
@@ -21,9 +21,9 @@ import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.api.service.exception.DataChangeNoRollbackException;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -93,13 +93,17 @@ public class ChangeConceptToSynonymOperation extends
                TaxonNameBase<?, ?> synonymName = concept.getName();
                Synonym synonym = null;
                try {
-                       synonym = CdmStore.getService(ITaxonService.class).changeRelatedTaxonToSynonym(concept, element, taxonRelationship.getType(), null);
+                       synonym =
+                               (Synonym) CdmStore.getService(ITaxonService.class).changeRelatedTaxonToSynonym(concept.getUuid(),
+                                       element.getUuid(),
+                                       taxonRelationship.getType(),
+                                       null).getCdmEntity();
                } catch (DataChangeNoRollbackException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
-               
-       
+
+
                return postExecute(synonym);
        }
 
index 679b3396e261973291c1feebb38623e9219ab80d..4804d525ec1fc9001bdace129a6e409c3f936e59 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -16,10 +16,8 @@ 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 org.eclipse.core.runtime.Status;
 
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
-import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
@@ -36,7 +34,7 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  */
 public class ChangeHomotypicalGroupBasionymOperation extends
                AbstractPostTaxonOperation {
-       private TaxonBase taxonBase;
+       private final TaxonBase taxonBase;
 
        /**
         * <p>Constructor for ChangeHomotypicalGroupBasionymOperation.</p>
@@ -50,7 +48,7 @@ public class ChangeHomotypicalGroupBasionymOperation extends
        public ChangeHomotypicalGroupBasionymOperation(String text,
                        IUndoContext undoContext, Taxon taxon, TaxonBase taxonBase, IPostOperationEnabled postOperationEnabled) {
                super(text, undoContext, taxon, postOperationEnabled);
-               
+
                this.taxonBase = taxonBase;
        }
 
@@ -61,16 +59,16 @@ public class ChangeHomotypicalGroupBasionymOperation extends
        @Override
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
-               
+
                TaxonNameBase<?, ?> name = taxonBase.getName();
-               
+
                monitor.worked(20);
                name = HibernateProxyHelper.deproxy(name, TaxonNameBase.class);
                HomotypicalGroup group = HibernateProxyHelper.deproxy(name.getHomotypicalGroup(), HomotypicalGroup.class);
         TaxonNameBase oldBasionym = name.getBasionym();
-        
+
                name.setAsGroupsBasionym();
-               
+
                monitor.worked(40);
                oldBasionym = HibernateProxyHelper.deproxy(oldBasionym, TaxonNameBase.class);
                if (oldBasionym != null){
@@ -80,6 +78,7 @@ public class ChangeHomotypicalGroupBasionymOperation extends
                                postExecute(oldBasionymTaxonBase);
                        }
                }
+
                return postExecute(taxonBase);
        }
 
@@ -103,9 +102,9 @@ public class ChangeHomotypicalGroupBasionymOperation extends
                // TODO replace w method from cdmlib
                // FIXME this is also old code: reimplement
 //             CdmUtil.setGroupBasionym(synonym.getName());
-                               
+
                return postExecute(taxonBase);
        }
-       
-       
+
+
 }
index 1b5349173beab2afb4e424aa76c5b6a784279ac0..c62759b72b3a89279d5009c594f00ea81c775d3a 100644 (file)
@@ -28,6 +28,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -40,7 +41,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class ChangeSynonymToAcceptedTaxonOperation extends AbstractPersistentPostOperation {
 
        private Taxon newTaxon;
-       private Synonym synonym;
+       private final Synonym synonym;
        private final ITaxonTreeNode parentNode;
 
        private TaxonNode newNode;
@@ -59,9 +60,16 @@ public class ChangeSynonymToAcceptedTaxonOperation extends AbstractPersistentPos
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
         * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
         */
-       public ChangeSynonymToAcceptedTaxonOperation(String label, IUndoContext undoContext,
-                       Taxon taxon, ITaxonTreeNode parentNode, Synonym synonym, Set<TaxonNameBase> namesInHomotypicalGroup, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled) {
-               super(label, undoContext, postOperationEnabled, conversationEnabled);
+       public ChangeSynonymToAcceptedTaxonOperation(String label,
+               IUndoContext undoContext,
+                       Taxon taxon,
+                       ITaxonTreeNode parentNode,
+                       Synonym synonym,
+                       Set<TaxonNameBase> namesInHomotypicalGroup,
+                       IPostOperationEnabled postOperationEnabled,
+                       IConversationEnabled conversationEnabled,
+                       ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
 
                this.element = taxon;
                this.parentNode = parentNode;
@@ -78,23 +86,30 @@ public class ChangeSynonymToAcceptedTaxonOperation extends AbstractPersistentPos
                        throws ExecutionException {
 
                try {
-                       newTaxon = CdmStore.getService(ITaxonService.class).changeSynonymToAcceptedTaxon(synonym, element, true, true, null, null);
+                       newNode = (TaxonNode) CdmStore.getService(ITaxonService.class).changeSynonymToAcceptedTaxon(synonym.getUuid(),
+                               element.getUuid(),
+                               parentNode.getUuid(),
+                               true,
+                               true,
+                               null,
+                               null).getCdmEntity();
                } catch (HomotypicalGroupChangeException e) {
                        MessagingUtils.warningDialog("Operation may lead to inconsistent data", getClass(), e.getMessage());
                        return postExecute(null);
                }
                monitor.worked(20);
+               //newTaxon = (Taxon) CdmStore.getService(ITaxonService.class).merge(newTaxon);
+               //element.removeSynonym(synonym);
 
-               element.removeSynonym(synonym);
-               newNode = parentNode.addChildTaxon(newTaxon, null, null);
 
                /*if(namesInHomotypicGroup != null){
                        Taxon taxon = newNode.getTaxon();
                        for (TaxonNameBase synonymName : namesInHomotypicGroup){
                                taxon.addHomotypicSynonymName(synonymName, null, null);
-                               
+
                        }
                }*/
+               //newNode = CdmStore.getService(ITaxonNodeService.class).merge(newNode);
 
                monitor.worked(40);
 
index 65b9e179727c29d0e78317ea004eab4e42e61464..2360ceff0c7be50f350b0d2f9d9d6d52e569e49e 100644 (file)
@@ -17,9 +17,7 @@ import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 
-import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
@@ -81,7 +79,12 @@ public class ChangeSynonymToMisapplicationOperation extends AbstractPostTaxonOpe
                // add misapplied name to taxon
                // TODO add microcitation for misapplied name to property sheet (if microcitation is indeed needed?!)
                element.addMisappliedName(misapplication, null, null);*/
-               misapplication = CdmStore.getService(ITaxonService.class).changeSynonymToRelatedTaxon(synonym, element, TaxonRelationshipType.MISAPPLIED_NAME_FOR(), null, null);
+               misapplication =
+                       (Taxon) CdmStore.getService(ITaxonService.class).changeSynonymToRelatedTaxon(synonym.getUuid(),
+                               element.getUuid(),
+                               TaxonRelationshipType.MISAPPLIED_NAME_FOR(),
+                               null,
+                               null).getCdmEntity();
                // redraw editor if exists
                return postExecute(misapplication);
        }
index d0d3d74c3caebe2d30b788ff847bda789f81bc76..c53f5d04111e00ef75be0db73d61eb5016aec11b 100644 (file)
@@ -16,7 +16,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
@@ -33,7 +33,7 @@ public class CreateSynonymInExistingHomotypicalGroupOperation extends
                AbstractPostTaxonOperation {
 
        private final HomotypicalGroup group;
-       private final TaxonNameBase newSynonymName;
+       private final NonViralName newSynonymName;
 
        private SynonymRelationship synonymRelationship;
 
@@ -48,7 +48,7 @@ public class CreateSynonymInExistingHomotypicalGroupOperation extends
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
         */
        public CreateSynonymInExistingHomotypicalGroupOperation(String label,
-                       IUndoContext undoContext, Taxon taxon, HomotypicalGroup group, TaxonNameBase newSynonymName, IPostOperationEnabled postOperationEnabled) {
+                       IUndoContext undoContext, Taxon taxon, HomotypicalGroup group, NonViralName newSynonymName, IPostOperationEnabled postOperationEnabled) {
                super(label, undoContext, taxon, postOperationEnabled);
                this.group = group;
                this.newSynonymName = newSynonymName;
index d32db52ea2a316343727fc4326136a255ed69064..0c03146a44868cc2023c304988504454f0a7925f 100644 (file)
@@ -21,7 +21,6 @@ import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator;
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -68,20 +67,20 @@ public class DeleteMisapplicationOperation extends AbstractPostTaxonOperation {
 
                // Find misapplication relation, save citation information
 
-               for (TaxonRelationship relationship : element.getTaxonRelations()) {
-                       if (relationship.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())
-                                       && relationship.getFromTaxon().equals(misapplication)) {
-                               citation = relationship.getCitation();
-                               microcitation = relationship.getCitationMicroReference();
-                       }
-               }
+//             for (TaxonRelationship relationship : element.getTaxonRelations()) {
+//                     if (relationship.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())
+//                                     && relationship.getFromTaxon().equals(misapplication)) {
+//                             citation = relationship.getCitation();
+//                             microcitation = relationship.getCitationMicroReference();
+//                     }
+//             }
                monitor.worked(20);
 
                // Remove misapplied name relation from taxon
                element.removeTaxon(misapplication, TaxonRelationshipType.MISAPPLIED_NAME_FOR());
                ICdmApplicationConfiguration controller;
 
-               controller = (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration();
+               controller = CdmStore.getCurrentApplicationConfiguration();
 
                ITaxonService service = controller.getTaxonService();
                TaxonDeletionConfigurator config = new TaxonDeletionConfigurator();
index fdef1cd3544a759252bfb21cf303ba7494794b3b..b21efefce203544c29ecc999610838e0d97eb536 100644 (file)
@@ -71,15 +71,15 @@ public class DeleteSynonymOperation extends AbstractPostTaxonOperation {
 
                                ICdmApplicationConfiguration controller;
 
-                               controller = (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration();
+                               controller = CdmStore.getCurrentApplicationConfiguration();
 
                                ITaxonService service = controller.getTaxonService();
                                if (synonym.getId() == 0){
                                        element.removeSynonym(synonym);
 
                                } else {
-                                       
-                                       DeleteResult result = service.deleteSynonym(synonym, null);
+
+                                       DeleteResult result = service.deleteSynonym(synonym.getUuid(), element.getUuid(), null);
                                        if (result.isError()){
                                                MessageDialog.openError(null, "Delete failed", result.toString());
                                        } else if (!result.getUpdatedObjects().isEmpty()){
index c65dda535e5f559e04d9da813723b6cab3b6d58f..5d4c6f945ec16770717989b6bf22ab8a411e6580 100644 (file)
@@ -11,15 +11,20 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;\r
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;\r
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;\r
 \r
 public class DeleteTaxonBaseOperation extends AbstractPersistentPostOperation {\r
 \r
        protected TaxonDeletionConfigurator configurator;\r
 \r
-       public DeleteTaxonBaseOperation(String label, IUndoContext undoContext,\r
-               TaxonDeletionConfigurator configurator, IWorkbenchPage activePage, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled) {\r
-               super(label, undoContext, postOperationEnabled,\r
-                                conversationEnabled);\r
+       public DeleteTaxonBaseOperation(String label,\r
+               IUndoContext undoContext,\r
+               TaxonDeletionConfigurator configurator,\r
+               IWorkbenchPage activePage,\r
+               IPostOperationEnabled postOperationEnabled,\r
+               IConversationEnabled conversationEnabled,\r
+               ICdmEntitySessionEnabled cdmEntitySessionEnabled) {\r
+               super(label, undoContext, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);\r
                this.configurator = configurator;\r
 \r
        }\r
index 8c51e6668ce76e28b8280aeee42a13a4fdcca6b2..b22c6b6771a45528a47b9628c518a99c4d1a7024 100644 (file)
@@ -21,15 +21,23 @@ import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
 import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
 \r
 public class DeleteTaxonOperation extends DeleteTaxonBaseOperation{\r
 \r
     private final Classification classification;\r
 \r
-       public DeleteTaxonOperation(String label, IUndoContext undoContext,\r
-                       Taxon taxon, TaxonDeletionConfigurator configurator, Classification classification, IWorkbenchPage activePage, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled) {\r
-               super(label, undoContext, configurator, activePage, postOperationEnabled, conversationEnabled);\r
+       public DeleteTaxonOperation(String label,\r
+               IUndoContext undoContext,\r
+                       Taxon taxon,\r
+                       TaxonDeletionConfigurator configurator,\r
+                       Classification classification,\r
+                       IWorkbenchPage activePage,\r
+                       IPostOperationEnabled postOperationEnabled,\r
+                       IConversationEnabled conversationEnabled,\r
+            ICdmEntitySessionEnabled cdmEntitySessionEnabled) {\r
+               super(label, undoContext, configurator, activePage, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);\r
                this.element = taxon;\r
 \r
                Set<TaxonNode> nodes = taxon.getTaxonNodes();\r
@@ -64,8 +72,8 @@ public class DeleteTaxonOperation extends DeleteTaxonBaseOperation{
 \r
                                ITaxonService service = controller.getTaxonService();\r
 \r
-\r
                                DeleteResult result =   service.deleteTaxon(element.getUuid(), configurator, classification.getUuid());\r
+
                                if (result.isError()){\r
                                        MessageDialog.openError(null, "Delete failed", result.toString());\r
                                } else if (!result.getUpdatedObjects().isEmpty()){\r
index 2f0d0900f091e885044e2e2186ecbd59263d292a..ac1aca5ecb507148d3d198a5a6c089179e5b5ecb 100644 (file)
@@ -12,12 +12,9 @@ import org.eclipse.core.runtime.IStatus;
 \r
 import eu.etaxonomy.cdm.api.service.ITaxonService;\r
 import eu.etaxonomy.cdm.api.service.exception.HomotypicalGroupChangeException;\r
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;\r
-import eu.etaxonomy.cdm.model.name.HomotypicalGroup;\r
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.taxon.Synonym;\r
 import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;\r
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;\r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;\r
@@ -34,8 +31,8 @@ public class MoveSynonymToAnotherAcceptedTaxonOperation extends
        private final Synonym synonym;\r
 \r
        private final Taxon oldTaxon;\r
-       \r
-       \r
+\r
+\r
        /**\r
         * <p>Constructor for MoveSynonymToAnotherAcceptedTaxon.</p>\r
         *\r
@@ -43,12 +40,12 @@ public class MoveSynonymToAnotherAcceptedTaxonOperation extends
         * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.\r
         * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.\r
         * @param synonym a {@link eu.etaxonomy.cdm.model.taxon.Synonym} object.\r
-        \r
+\r
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.\r
         */\r
        public MoveSynonymToAnotherAcceptedTaxonOperation(String label, IUndoContext undoContext,\r
                        UUID oldTaxonUUID, UUID synonymUUID, Taxon taxon, IPostOperationEnabled postOperationEnabled) {\r
-               \r
+\r
                super(label, undoContext, taxon, postOperationEnabled);\r
                List<String> propertyPaths =  new ArrayList<String>();\r
                propertyPaths.add("synonymRelations");\r
@@ -69,28 +66,34 @@ public class MoveSynonymToAnotherAcceptedTaxonOperation extends
                TaxonNameBase<?, ?> synonymName = synonym.getName();\r
                monitor.worked(20);\r
 \r
-               \r
+\r
 \r
                // Switch groups\r
-               \r
+\r
                monitor.worked(40);\r
                SynonymRelationship synRel = synonym.getSynonymRelations().iterator().next();\r
-               \r
-               \r
-               \r
+\r
+\r
+\r
                ((TaxonNameEditor)EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor()).getConversationHolder().commit();\r
-               \r
-               \r
-               \r
+\r
+\r
+\r
                try {\r
-                       synRel = CdmStore.getService(ITaxonService.class).moveSynonymToAnotherTaxon(synRel, this.element, true, synRel.getType(), null, null, true);\r
+                       synRel = (SynonymRelationship) CdmStore.getService(ITaxonService.class).moveSynonymToAnotherTaxon(synRel,\r
+                               this.element.getUuid(),\r
+                               true,\r
+                               synRel.getType(),\r
+                               null,\r
+                               null,\r
+                               true).getCdmEntity();\r
                } catch (HomotypicalGroupChangeException e) {\r
                        // TODO Auto-generated catch block\r
                        e.printStackTrace();\r
                }\r
                ((TaxonNameEditor)EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor()).getConversationHolder().commit();\r
-               \r
-               \r
+\r
+\r
 \r
                // Redraw editor if it exists\r
                return postExecute(synRel.getSynonym());\r
index 1c7da40a872f184372609304c2907d6214083cea..507b2cfe5ad04ace248f3bd414e5b068afa06e96 100644 (file)
@@ -17,12 +17,14 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 
 import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -48,8 +50,9 @@ public class SwapSynonymAndAcceptedOperation extends AbstractPostTaxonOperation
         * @param synonym a {@link eu.etaxonomy.cdm.model.taxon.Synonym} object.
         */
        public SwapSynonymAndAcceptedOperation(String label, IUndoContext undoContext,
-                       Taxon taxon, Synonym synonym, IPostOperationEnabled postOperationEnabled) {
-               super("Swap Synonym And Accepted Taxon Operation", undoContext, taxon, postOperationEnabled);
+                       Taxon taxon, Synonym synonym, IPostOperationEnabled postOperationEnabled,
+                       ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super("Swap Synonym And Accepted Taxon Operation", undoContext, taxon, postOperationEnabled, cdmEntitySessionEnabled);
 
                this.synonym = synonym;
        }
@@ -64,7 +67,7 @@ public class SwapSynonymAndAcceptedOperation extends AbstractPostTaxonOperation
 
                monitor.worked(20);
 
-               CdmStore.getService(ITaxonService.class).swapSynonymAndAcceptedTaxon(synonym, element);
+               UpdateResult result = CdmStore.getService(ITaxonService.class).swapSynonymAndAcceptedTaxon(synonym.getUuid(), element.getUuid());
 
                monitor.worked(40);
 
index e5665f3939705e96af0216a134c8ab16d05bedeb..cdecde04a0e8e248afbcace4e134729bc470c3e0 100644 (file)
@@ -12,6 +12,7 @@ package eu.etaxonomy.taxeditor.editor.view.checklist;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -57,6 +58,7 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
@@ -75,6 +77,8 @@ import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.preference.Resources;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -87,7 +91,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @version 1.0
  */
 public class ChecklistEditor extends EditorPart implements ISelectionListener, IPartContentHasFactualData,
-        IConversationEnabled, IContextListener, IPartContentHasDetails, IDirtyMarkable {
+        IConversationEnabled, IContextListener, IPartContentHasDetails, IDirtyMarkable, ICdmEntitySessionEnabled {
 
     private static final Logger logger = Logger.getLogger(ChecklistEditor.class);
     /**
@@ -181,6 +185,8 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
 
     private Label statusLabel;
 
+    private final ICdmEntitySession cdmEntitySession;
+
     private SortedSet<DefinedTermBase> terms = null;
        private ToolItem toolItem;
        private ChecklistDropdownSelectionListener dropListener;
@@ -206,6 +212,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
      * </p>
      */
     public ChecklistEditor() {
+        cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
     }
 
     /** {@inheritDoc} */
@@ -439,12 +446,14 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
     /** {@inheritDoc} */
     @Override
     public void dispose() {
+        cdmEntitySession.dispose();
         super.dispose();
     }
 
     /** {@inheritDoc} */
     @Override
     public void setFocus() {
+        cdmEntitySession.bind();
         viewer.getControl().setFocus();
     }
 
@@ -757,4 +766,31 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
     public boolean isDirty() {
         return dirty;
     }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()
+     */
+    @Override
+    public ICdmEntitySession getCdmEntitySession() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public <T extends CdmBase> Collection<T> getRootEntities() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }
index 92f55fcf138292f024e87f47b768ae2a0bbc96cf..bab0e949c77cf58b0d0dbe6002e466b6c74992a1 100644 (file)
@@ -137,4 +137,5 @@ public class ConceptViewPart extends AbstractCdmEditorViewPart implements IPartC
                getViewer().refresh();
                super.changed(object);
        }
+
 }
index d4a254049339ec1297b05fae25dc593e30e4f5b2..298b1f4b66ce0638bc638b0b83471446c81db1ea 100644 (file)
@@ -16,9 +16,11 @@ import java.util.ArrayList;
 import java.util.Collection;
 
 import org.apache.http.client.ClientProtocolException;
+import org.eclipse.core.runtime.jobs.Job;
 
 import eu.etaxonomy.cdm.ext.occurrence.bioCase.BioCaseQueryServiceWrapper;
 import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
+import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
 import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.taxeditor.editor.view.dataimport.transientServices.TransientCdmRepository;
@@ -65,14 +67,19 @@ public class SpecimenImportView extends DataImportView<SpecimenOrObservationBase
             //FIXME move ABCD import to cdmlib -> this will also get rid of the transient services
             InputStream resultStream;
             resultStream = new BioCaseQueryServiceWrapper().query(query, endPoint);
-            Abcd206ImportConfigurator configurator = Abcd206ImportConfigurator.NewInstance(resultStream, null, false);
+            Abcd206ImportConfigurator configurator = Abcd206ImportConfigurator.NewInstance(null, null);
             TransientCdmRepository repo =
                     new TransientCdmRepository(CdmStore.getCurrentApplicationConfiguration());
             configurator.setCdmAppController(repo);
             configurator.setAddMediaAsMediaSpecimen(true);
-
-            CdmDefaultImport<Abcd206ImportConfigurator> importer = new CdmDefaultImport<Abcd206ImportConfigurator>();
-            importer.invoke(configurator);
+            if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                Job job = CdmStore.getImportManager().createIOServiceJob(configurator, resultStream, SOURCE_TYPE.INPUTSTREAM);
+                CdmStore.getImportManager().run(job);
+            } else {
+                configurator.setSource(resultStream);
+                CdmDefaultImport<Abcd206ImportConfigurator> importer = new CdmDefaultImport<Abcd206ImportConfigurator>();
+                importer.invoke(configurator);
+            }
             results = repo.getUnits();
             setResults(results);
         } catch (ClientProtocolException e) {
index fac79adfb19e9ea1e0875118ee202a6ebcba5980..fd4154909e3c7574bbba44f2a807e57ac601d21a 100644 (file)
@@ -1498,21 +1498,22 @@ public class TransientTaxonService implements ITaxonService {
     }
 
     /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.ITaxonService#changeRelatedTaxonToSynonym(java.util.UUID, java.util.UUID, eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType, eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType)
+     * @see eu.etaxonomy.cdm.api.service.ITaxonService#changeSynonymToRelatedTaxon(java.util.UUID, java.util.UUID, eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType, eu.etaxonomy.cdm.model.reference.Reference, java.lang.String)
      */
     @Override
-    public UpdateResult changeRelatedTaxonToSynonym(UUID arg0, UUID arg1, TaxonRelationshipType arg2,
-            SynonymRelationshipType arg3) throws DataChangeNoRollbackException {
-        return defaultService.changeRelatedTaxonToSynonym(arg0, arg1, arg2, arg3);
+    public UpdateResult changeSynonymToRelatedTaxon(UUID arg0, UUID arg1, TaxonRelationshipType arg2, Reference arg3,
+            String arg4) {
+        return defaultService.changeSynonymToRelatedTaxon(arg0, arg1, arg2, arg3, arg4);
     }
 
     /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.ITaxonService#changeSynonymToRelatedTaxon(java.util.UUID, java.util.UUID, eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType, eu.etaxonomy.cdm.model.reference.Reference, java.lang.String)
+     * @see eu.etaxonomy.cdm.api.service.ITaxonService#changeRelatedTaxonToSynonym(java.util.UUID, java.util.UUID, eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType, eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType)
      */
     @Override
-    public UpdateResult changeSynonymToRelatedTaxon(UUID arg0, UUID arg1, TaxonRelationshipType arg2, Reference arg3,
-            String arg4) {
-        return defaultService.changeSynonymToRelatedTaxon(arg0, arg1, arg2, arg3, arg4);
+    public UpdateResult changeRelatedTaxonToSynonym(UUID arg0, UUID arg1, TaxonRelationshipType arg2,
+            SynonymRelationshipType arg3) throws DataChangeNoRollbackException {
+        return defaultService.changeRelatedTaxonToSynonym(arg0, arg1, arg2, arg3);
+
     }
 
     /* (non-Javadoc)
@@ -1523,4 +1524,5 @@ public class TransientTaxonService implements ITaxonService {
             Reference arg5, String arg6) throws HomotypicalGroupChangeException {
         return defaultService.changeSynonymToAcceptedTaxon(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
     }
+
 }
index d7fcc56f8d710cd59e31b4c7d2f0a926a006b217..ec05a6b1d5421ca11cec44955593be749b3237c1 100644 (file)
@@ -4,7 +4,6 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map.Entry;
 import java.util.Set;
-import java.util.UUID;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.action.MenuManager;
@@ -32,7 +31,6 @@ import org.eclipse.ui.part.EditorPart;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
-import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
@@ -56,7 +54,7 @@ import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
  */
 public class DerivateView extends EditorPart implements IPartContentHasFactualData, IDirtyMarkable,
         IConversationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IPartContentHasMedia,
-        ISelectionChangedListener, IPostOperationEnabled {
+        ISelectionChangedListener, IPostOperationEnabled{
 
     public static final String ID = "eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"; //$NON-NLS-1$
 
@@ -77,6 +75,9 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
 
     private ISelection selection = null;
 
+
+    private DerivateContentProvider contentProvider;
+
     /**
      * Default constructor
      */
@@ -86,7 +87,8 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
     @Override
     public void createPartControl(Composite parent) {
         viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION));
-        viewer.setContentProvider(new DerivateContentProvider());
+        contentProvider = new DerivateContentProvider();
+        viewer.setContentProvider(contentProvider);
         labelProvider = new DerivateLabelProvider();
         labelProvider.setConversation(conversation);
         viewer.setLabelProvider(labelProvider);
@@ -106,13 +108,13 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         generateMultiLinkSingleReads();
         labelProvider.setMultiLinkSingleReads(multiLinkSingleReads);
         IEditorInput editorInput = getEditorInput();
-        viewer.setInput(((DerivateViewEditorInput) editorInput).getRootUUIDs());
+        viewer.setInput(((DerivateViewEditorInput) editorInput).getRootEntities());
         //set selection to selected derivate if only one was selected
         if(editorInput instanceof DerivateViewEditorInput){
-            Set<UUID> derivateUUIDs = ((DerivateViewEditorInput) editorInput).getDerivateUUIDs();
-            if(derivateUUIDs.size()==1){
-                SpecimenOrObservationBase<?> specimen = CdmStore.getService(IOccurrenceService.class).load(derivateUUIDs.iterator().next());
-                if(specimen!=null){
+            Set<SpecimenOrObservationBase<?>> derivateEntities = ((DerivateViewEditorInput) editorInput).getDerivateEntities();
+            if(derivateEntities.size()==1){
+                SpecimenOrObservationBase<?> specimen = derivateEntities.iterator().next();
+                if(specimen != null){
                     viewer.setSelection(new StructuredSelection(new TreeNode(specimen)));
                 }
             }
@@ -139,6 +141,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
 
         // commit the conversation and start a new transaction immediately
         conversation.commit(true);
+        ((DerivateViewEditorInput) getEditorInput()).merge();
         monitor.worked(1);
 
         this.setDirty(false);
@@ -196,6 +199,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         if(!conversation.isBound()){
             conversation.bind();
         }
+        ((DerivateViewEditorInput) getEditorInput()).bind();
     }
 
     @Override
@@ -248,6 +252,14 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         viewer.refresh();
     }
 
+    //FIXME:Remoting hack to make this work for remoting
+    //This should actually be resolved using remoting post operations
+    public void remove(Object obj) {
+        Set<SpecimenOrObservationBase<?>> rootEntities = ((DerivateViewEditorInput) getEditorInput()).getRootEntities();
+        rootEntities.remove(obj);
+        viewer.setInput(rootEntities);
+    }
+
     private void generateMultiLinkSingleReads() {
         Set<SingleRead> multiLinkSingleReads = new HashSet<SingleRead>();
         for(Entry<SingleRead, Collection<Sequence>> entry:CdmStore.getService(ISequenceService.class).getSingleReadSequencesMap().entrySet()){
@@ -292,9 +304,15 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         return true;
     }
 
+    @Override
+    public void dispose() {
+        ((DerivateViewEditorInput) getEditorInput()).dispose();
+        super.dispose();
+    }
+
+
     @Override
     public boolean canAttachMedia() {
         return true;
     }
-
 }
index 3527fe5edae30a358c3304dc47172eb03968da75..ced5ad3fa462d63939ba9a608aea09c4879c0663 100644 (file)
@@ -9,7 +9,12 @@
 */
 package eu.etaxonomy.taxeditor.editor.view.derivate;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
@@ -17,11 +22,13 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IPersistableElement;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
+import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -36,19 +43,36 @@ import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
  * @date 25.11.2013
  *
  */
-public class DerivateViewEditorInput implements IEditorInput{
+public class DerivateViewEditorInput extends CdmEntitySessionInput implements IEditorInput {
 
     /**
      * The selected derivate {@link UUID}s
      */
-    private final Set<UUID> derivateUUIDs;
+    private final Set<SpecimenOrObservationBase<?>> derivateEntities;
     /**
      * List of the {@link UUID}s of the root elements of the hierarchy (may be the same objects as the derivates)
      */
+    private Set<SpecimenOrObservationBase<?>> rootEntities;
     private Set<UUID> rootUUIDs;
 
     private final ConversationHolder conversationHolder;
 
+    private static final List<String> SPECIMEN_INIT_STRATEGY = Arrays.asList(new String[] {
+            "descriptions",
+            "annotations",
+            "markers",
+            "credits",
+            "extensions",
+            "rights",
+            "sources",
+            "derivationEvents.derivatives.annotations",
+            "derivationEvents.derivatives.markers",
+            "derivationEvents.derivatives.credits",
+            "derivationEvents.derivatives.extensions",
+            "derivationEvents.derivatives.rights",
+            "derivationEvents.derivatives.sources"
+    });
+
     /**
      * Creates an editor input for the {@link DerivateView} with the currently selected derivates and the
      * corresponding {@link FieldUnit}s (both may be the same object).
@@ -56,28 +80,37 @@ public class DerivateViewEditorInput implements IEditorInput{
      * @param rootUUIDs the root of the hierarchy
      */
     public DerivateViewEditorInput(Set<UUID> derivateUuids) {
-        super();
+        super(false);
+        rootUUIDs = derivateUuids;
+        //FIXME:Remoting temporary hack for making the sessions work
+        //This should ideally be changed to initializing the
+        //super class with a collection of (id) objects which can
+        //then be used for the hashCode, equals methods
+        initSession();
         this.conversationHolder = CdmStore.createConversation();
-        this.derivateUUIDs = derivateUuids;
-        this.rootUUIDs = new HashSet<UUID>();
+        this.derivateEntities = new HashSet<SpecimenOrObservationBase<?>>();
+        this.rootEntities = new HashSet<SpecimenOrObservationBase<?>>();
         for (UUID uuid : derivateUuids) {
-            SpecimenOrObservationBase<?> derivate = CdmStore.getService(IOccurrenceService.class).load(uuid);
+            SpecimenOrObservationBase<?> derivate = CdmStore.getService(IOccurrenceService.class).load(uuid, SPECIMEN_INIT_STRATEGY);
+            derivateEntities.add(derivate);
             if(derivate instanceof FieldUnit){
-                rootUUIDs.add(uuid);
+                rootEntities.add(derivate);
             }
             else if(derivate instanceof DerivedUnit){
                 SpecimenOrObservationBase<?> topMostDerivate = EditorUtil.getTopMostDerivate(derivate);
                 if(topMostDerivate!=null){
-                    rootUUIDs.add(topMostDerivate.getUuid());
+                    rootEntities.add(topMostDerivate);
                 }
             }
         }
-        if(rootUUIDs.isEmpty()){
-            rootUUIDs = derivateUUIDs;
+        if(rootEntities.isEmpty()){
+            rootEntities = derivateEntities;
         }
-        if(rootUUIDs.isEmpty()){
+        if(rootEntities.isEmpty()){
             MessagingUtils.messageDialog(Messages.DerivateViewEditorInput_FAIL_INIT, DerivateViewEditorInput.class, Messages.DerivateViewEditorInput_NO_ROOT);
         }
+
+
     }
 
     /* (non-Javadoc)
@@ -132,8 +165,7 @@ public class DerivateViewEditorInput implements IEditorInput{
 
     private String getEditorName() {
         String name = null;
-        for(UUID uuid:rootUUIDs){
-            SpecimenOrObservationBase<?> specimen = CdmStore.getService(IOccurrenceService.class).load(uuid);
+        for( SpecimenOrObservationBase<?> specimen : rootEntities){
             if(specimen!=null){
                 if(name==null){
                     name = DerivateLabelProvider.getDerivateText(specimen, conversationHolder);
@@ -146,16 +178,17 @@ public class DerivateViewEditorInput implements IEditorInput{
         return name;
     }
 
-    public Set<UUID> getRootUUIDs() {
-        return rootUUIDs;
+    @Override
+    public Set<SpecimenOrObservationBase<?>> getRootEntities() {
+        return rootEntities;
     }
 
-    public Set<UUID> getDerivateUUIDs() {
-        return derivateUUIDs;
+    public Set<SpecimenOrObservationBase<?>> getDerivateEntities() {
+        return derivateEntities;
     }
 
-    public void addRootUuid(UUID root){
-        rootUUIDs.add(root);
+    public void addRootEntity(SpecimenOrObservationBase<?> root){
+        rootEntities.add(root);
     }
 
 
@@ -199,5 +232,35 @@ public class DerivateViewEditorInput implements IEditorInput{
         return true;
     }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+       List<SpecimenOrObservationBase> mergedEntities = CdmApplicationState.getCurrentAppConfig().getOccurrenceService().merge(new ArrayList(getRootEntities()));
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        List<String> specimenPropertyPaths = Arrays.asList(new String[] {
+                "descriptions",
+                "derivationEvents.derivates",
+                "annotations",
+                "markers",
+                "credits",
+                "extensions",
+                "rights",
+                "sources"
+        });
+        Map<Object, List<String>> specimenPropertyPathMap =
+                new HashMap<Object, List<String>>();
+        specimenPropertyPathMap.put(SpecimenOrObservationBase.class,specimenPropertyPaths);
+        return specimenPropertyPathMap;
+    }
+
 
 }
index 2438c4325c2bdc03cf9896fc5efd4c08d2d6d8e8..a491a7abfcbab933ae08c9684d0719cbfe129526 100644 (file)
@@ -13,7 +13,9 @@ import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.actions.CompoundContributionItem;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeCacheStrategy;
+import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.cdm.model.molecular.DnaSample;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
@@ -30,6 +32,7 @@ import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.MediaSelectionDialog;
 
 /**
@@ -135,6 +138,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                         specimenOrObservationBase.addDerivationEvent(DerivationEvent.NewSimpleInstance(specimenOrObservationBase, mediaSpecimen, derivationEventType));
                         mediaSpecimen.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                         mediaSpecimen.getTitleCache(); //update title cache
+                        CdmStore.getService(IOccurrenceService.class).merge(specimenOrObservationBase);
                     }
 
                     //refresh view
@@ -143,6 +147,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                         derivateView = (DerivateView) AbstractUtility.getActivePart();
                     }
                     if(derivateView!=null){
+
                         derivateView.getConversationHolder().commit();
                         derivateView.refreshTree(mediaSpecimen);
                     }
@@ -197,11 +202,13 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                     Sequence newInstance = Sequence.NewInstance(dnaSample, "", 0); //$NON-NLS-1$
                     createdElement = newInstance;
                 }
+                CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate);
             }
             else if(selectedDerivate instanceof Sequence){
                 SingleRead newInstance = SingleRead.NewInstance();
                 ((Sequence) selectedDerivate).addSingleRead(newInstance);
                 createdElement = newInstance;
+                CdmApplicationState.getCurrentAppConfig().getSequenceService().merge((Sequence)selectedDerivate);
             }
             else if(selectedDerivate instanceof SpecimenOrObservationBase && DerivedUnit.class.isAssignableFrom(childClass)){
                 SpecimenOrObservationBase<?> specimenOrObservationBase = (SpecimenOrObservationBase<?>)selectedDerivate;
@@ -227,10 +234,12 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                 derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                 derivedUnit.getTitleCache(); //update title cache
                 createdElement = derivedUnit;
+                CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate);
             }
 
             //refresh view
             if(derivateView!=null){
+                //CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate);
                 derivateView.getConversationHolder().commit();
                 derivateView.refreshTree(createdElement);
             }
index e57cbfbf728e562f367b2b2657fb5176270cea01..5129e44c572cd4673ad5cc1673b9a785f622a50c 100644 (file)
@@ -5,6 +5,7 @@ import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
@@ -23,10 +24,10 @@ public class CreateFieldUnitHandler extends AbstractHandler {
                 return null;
             }
             FieldUnit fieldUnit = FieldUnit.NewInstance();
-            CdmStore.getService(IOccurrenceService.class).save(fieldUnit);
+            fieldUnit = CdmBase.deproxy(CdmStore.getService(IOccurrenceService.class).save(fieldUnit), FieldUnit.class);
             derivateView.getConversationHolder().commit();
             DerivateViewEditorInput input = (DerivateViewEditorInput) derivateView.getEditorInput();
-            input.addRootUuid(fieldUnit.getUuid());
+            input.addRootEntity(fieldUnit);
             derivateView.refreshTree();
         }
         return null;
index 839beb546d070ffa28c4062b2b2678a1a412566e..a095409820eceac0619944df587cb2a934934863 100644 (file)
@@ -21,6 +21,7 @@ import org.eclipse.ui.ISaveablePart;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator;
+import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
 import eu.etaxonomy.cdm.model.molecular.SingleRead;
@@ -79,14 +80,17 @@ public class DeleteDerivateOperation extends AbstractPostOperation<CdmBase> {
                 && treeNode.getValue().equals(element)
                 && treeNode.getParent()!=null
                 && treeNode.getParent().getValue() instanceof Sequence){
-            deleteResult = CdmStore.getService(IOccurrenceService.class).deleteSingleRead((SingleRead)element, (Sequence) treeNode.getParent().getValue());
-        }
-        else{
-            deleteResult = CdmStore.getService(IOccurrenceService.class).deleteDerivateHierarchy(element, deleteConfigurator);
+            deleteResult = CdmStore.getService(IOccurrenceService.class).deleteSingleRead(((SingleRead)element).getUuid(),
+                    ((Sequence) treeNode.getParent().getValue()).getUuid());
+        } else if(element instanceof Sequence){
+            deleteResult = CdmStore.getService(ISequenceService.class).delete(element.getUuid(), deleteConfigurator);
+        } else {
+            deleteResult = CdmStore.getService(IOccurrenceService.class).deleteDerivateHierarchy(element.getUuid(), deleteConfigurator);
         }
         if(deleteResult.isOk()){
             if(getPostOperationEnabled() instanceof DerivateView){
                 DerivateView derivateView = (DerivateView) getPostOperationEnabled();
+                derivateView.remove(element);
                 //update DerivateView
                 derivateView.getConversationHolder().commit();
                 IStatus returnStatus = postExecute(null);
index 5a1756b9c04ae433f1d157d4947f8c195861d4f0..93107ebfe0781ea3402d489115f7d4ef7a5410e4 100644 (file)
@@ -99,7 +99,9 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
             if(fromParentSpecimen instanceof SpecimenOrObservationBase<?>
             && fromNode!=null
             && !fromNode.equals(targetNode)){//don't drag on direct parent node)
-                return occurrenceService.moveDerivate((SpecimenOrObservationBase<?>)fromParentSpecimen, targetSpecimen, draggedSpecimen);
+                return occurrenceService.moveDerivate(((SpecimenOrObservationBase<?>)fromParentSpecimen).getUuid(),
+                        targetSpecimen.getUuid(),
+                        draggedSpecimen.getUuid()).isOk();
             }
         }
 
@@ -107,7 +109,10 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
         else if(draggedNodeValue instanceof SingleRead && targetNodeValue instanceof Sequence){
             SingleRead singleRead = (SingleRead) draggedNodeValue;
             if(fromParentSpecimen instanceof Sequence){
-                return CdmStore.getService(ISequenceService.class).moveSingleRead((Sequence)fromParentSpecimen, (Sequence)targetNodeValue, singleRead).isOk();
+                return CdmStore.getService(ISequenceService.class).moveSingleRead(((Sequence)fromParentSpecimen).getUuid(),
+                        ((Sequence)targetNodeValue).getUuid(),
+                        singleRead.getUuid()).isOk();
+
             }
         }
 
@@ -115,7 +120,10 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
         else if(draggedNodeValue instanceof Sequence && targetNodeValue instanceof DnaSample && ((SpecimenOrObservationBase<?>) targetNodeValue).getRecordBasis()==SpecimenOrObservationType.DnaSample){
             Sequence sequence = (Sequence)draggedNodeValue;
             if(fromParentSpecimen instanceof DnaSample && ((SpecimenOrObservationBase<?>) targetNodeValue).getRecordBasis()==SpecimenOrObservationType.DnaSample){
-                return occurrenceService.moveSequence((DnaSample)fromParentSpecimen, (DnaSample)targetNodeValue, sequence).isOk();
+                return occurrenceService.moveSequence(((DnaSample)fromParentSpecimen).getUuid(),
+                        ((DnaSample)targetNodeValue).getUuid(),
+                        sequence.getUuid()).isOk();
+
             }
         }
         return false;
index 3171375485ddfad8afbd1c4fb09ff7c8d173e551..33626cb75ca5c6ad6a7f206bbd56ee81f3271ac6 100644 (file)
@@ -38,6 +38,7 @@ public class DescriptiveContentProvider implements ITreeContentProvider {
        protected static final Object[] NO_CHILDREN = new Object[0];
        protected Map<DescriptionBase<?>, FeatureNodeContainerTree> featureNodeContainerCache;
        private boolean showOnlyIndividualAssociations;
+       private static FeatureTree defaultFeatureTree = null;
 
        public DescriptiveContentProvider(Map<DescriptionBase<?>, FeatureNodeContainerTree> featureNodeContainerCache) {
            this(featureNodeContainerCache, false);
@@ -144,8 +145,11 @@ public class DescriptiveContentProvider implements ITreeContentProvider {
         * @return
         */
        private FeatureTree getFeatureTree(DescriptionBase description){
-               FeatureTree featureTree = null;
 
+           if(defaultFeatureTree == null) {
+               defaultFeatureTree = FeatureTree.NewInstance(TermStore.getTerms(Feature.class));
+           }
+           FeatureTree featureTree;
                // TODO change this to the feature tree associated with this taxon description
                if (description.hasStructuredData()){
                        featureTree = PreferencesUtil.getDefaultFeatureTreeForStructuredDescription();
@@ -155,7 +159,7 @@ public class DescriptiveContentProvider implements ITreeContentProvider {
 
                // create a transient tree with all features if none was selected
                if(featureTree == null){
-                       featureTree = FeatureTree.NewInstance(TermStore.getTerms(Feature.class));
+                       featureTree = defaultFeatureTree;
                }
 
                return featureTree;
index 7556a73d2612f9b93ca11525614197de02a0c09a..52fedd9b04960d13ab6ffd527757f956339ce945 100644 (file)
@@ -57,6 +57,7 @@ import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
+import eu.etaxonomy.taxeditor.editor.view.media.MediaViewPart;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainerTree;
@@ -223,10 +224,12 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
                if(part == this){
                    return;
                }
-               if(part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart){
-                   // do not show empty page as these views are also used to edit the description selected in this view
-                   return;
-               }
+        if (part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart
+                || part instanceof MediaViewPart) {
+            // do not show empty page as these views are also used to edit the
+            // description selected in this view
+            return;
+        }
                // unpackage TreeNode of DerivateView
                else if(part instanceof DerivateView){
                    TreeNode treeNodeOfSelection = EditorUtil.getTreeNodeOfSelection(selection);
index fc7a044a9bc9005f345431cea3faa3c21827a1e6..31b1169581baa6ebc788d62e0d4c05f3e5b10f8d 100644 (file)
@@ -39,6 +39,7 @@ import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 
 /**
  * <p>DeleteDescriptionHandler class.</p>
@@ -59,6 +60,7 @@ public class DeleteHandler extends AbstractHandler {
 
                IWorkbenchPart part = HandlerUtil.getActivePart(event);
                IPostOperationEnabled postOperationEnabled = (part instanceof IPostOperationEnabled) ? (IPostOperationEnabled) part : null;
+               ICdmEntitySessionEnabled cdmEntitySessionEnabled = (part instanceof ICdmEntitySessionEnabled) ? (ICdmEntitySessionEnabled) part : null;
 
                try {
                        String label = event.getCommand().getName();
@@ -71,20 +73,20 @@ public class DeleteHandler extends AbstractHandler {
 
                                // TaxonDescription
                                if(object instanceof TaxonDescription){
-                                       operations.add(new DeleteTaxonDescriptionOperation(label, undoContext, (TaxonDescription) object, postOperationEnabled));
+                                       operations.add(new DeleteTaxonDescriptionOperation(label, undoContext, (TaxonDescription) object, postOperationEnabled, cdmEntitySessionEnabled));
                                }
                                else if(object instanceof SpecimenDescription){
-                                   operations.add(new DeleteSpecimenDescriptionOperation(label, undoContext, (SpecimenDescription) object, postOperationEnabled));
+                                   operations.add(new DeleteSpecimenDescriptionOperation(label, undoContext, (SpecimenDescription) object, postOperationEnabled, cdmEntitySessionEnabled)) ;
                                }
                                // DescriptionElementBase
                                else if(object instanceof DescriptionElementBase){
-                                       operations.add(new DeleteDescriptionElementOperation(label, undoContext, (DescriptionElementBase) object, postOperationEnabled));
+                                       operations.add(new DeleteDescriptionElementOperation(label, undoContext, (DescriptionElementBase) object, postOperationEnabled, cdmEntitySessionEnabled));
                                }
                                else if(object instanceof FeatureNodeContainer){
                                        List<DescriptionElementBase> descriptions = ((FeatureNodeContainer) object).getDescriptionElementsForEntireBranch();
 
                                        for(DescriptionElementBase description : descriptions){
-                                               operations.add(new DeleteDescriptionElementOperation(label, undoContext, description, postOperationEnabled));
+                                               operations.add(new DeleteDescriptionElementOperation(label, undoContext, description, postOperationEnabled, cdmEntitySessionEnabled));
                                        }
                                }
                                // Media
index 3c1fee4fb25fe4fedafaefdb96797c876f3bb951..b91f68a7bec50a0481af5447497ccd252333e278 100644 (file)
@@ -26,10 +26,7 @@ import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.api.service.IDescriptionService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
-import eu.etaxonomy.cdm.model.common.Annotation;
-import eu.etaxonomy.cdm.model.common.AnnotationType;
 import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
@@ -118,17 +115,13 @@ public class MoveDescriptionElementsHandler extends AbstractHandler implements I
                                return null;
                        }
                        newAcceptedTaxonNodeUuid = newAcceptedTaxonNode.getUuid();
-                       TaxonDescription targetDescription = TaxonDescription.NewInstance(targetTaxon);
+
                        String moveMessage = String.format("Elements moved from %s", EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
-                       targetDescription.setTitleCache(moveMessage, true);
-                       Annotation annotation = Annotation.NewInstance(moveMessage, Language.getDefaultLanguage());
-                       annotation.setAnnotationType(AnnotationType.TECHNICAL());
-                       targetDescription.addAnnotation(annotation);
 
                        try {
                                AbstractPostOperation operation = new MoveDescriptionElementsOperation(
                                                event.getCommand().getName(), EditorUtil.getUndoContext(),
-                                               targetDescription, elements, false, this);
+                                               targetTaxon.getUuid(), moveMessage, elements, false, this);
 
                                EditorUtil.executeOperation(operation);
 
index c4b57e9cb4629968822bd35d951b0bbb9c407a00..a87cb24d2d6b1fd2a8ac2eb64687934d24d2a8cc 100644 (file)
@@ -22,16 +22,19 @@ import eu.etaxonomy.cdm.api.service.IDescriptionService;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
+import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.Page;
+import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.MoveDescriptionToOtherTaxonOperation;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
 
@@ -74,7 +77,7 @@ public class MoveDescriptionToOtherTaxonHandler extends AbstractHandler
                                }       else if (element instanceof DescriptionBase){
                                        uuid = ((DescriptionBase)element).getUuid();
                                }
-                               
+
                                if (uuid != null){
                                        descriptions.add((TaxonDescription) CdmStore.getService(IDescriptionService.class).load(uuid, null));
                                }
@@ -87,12 +90,21 @@ public class MoveDescriptionToOtherTaxonHandler extends AbstractHandler
                        List<UUID> excludeTaxa = new ArrayList<UUID>();
                        editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(Page.NAME);
                        excludeTaxa.add(descriptions.get(0).getTaxon().getUuid());
+
+                       //get current taxon node
+                       TaxonNode node = null;
+                       Classification classification = null;
+                       MultiPageTaxonEditor taxonEditor = EditorUtil.getActiveMultiPageTaxonEditor();
+            if(taxonEditor!=null){
+                node = ((TaxonEditorInput) taxonEditor.getEditorInput()).getTaxonNode();
+                classification = node.getClassification();
+            }
                        TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
                                        editor.getConversationHolder(),
                                        "Choose the accepted taxon",
                                        excludeTaxa,
-                                       null,
-                                       null);
+                                       node,
+                                       classification);
 
                        if (newAcceptedTaxonNode == null) {
                                return null;
@@ -103,7 +115,12 @@ public class MoveDescriptionToOtherTaxonHandler extends AbstractHandler
                        try {
                                for(TaxonDescription description : descriptions){
                                        operation = new MoveDescriptionToOtherTaxonOperation(event.getCommand().getName(),
-                                                                                       editor.getUndoContext(), description, newAcceptedTaxonNode, this, editor);
+                                                                                       editor.getUndoContext(),
+                                                                                       description,
+                                                                                       newAcceptedTaxonNode,
+                                                                                       this,
+                                                                                       editor,
+                                                                                       (ICdmEntitySessionEnabled)editor.getEditorInput());
                                        AbstractUtility.executeOperation(operation);
                                }
 
index ed86d4b2b6a9dc7d0590651fcb48f6d0d89a3821..0c5ded96a98fc79da8af76b361dd185c23175a6a 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -20,6 +20,7 @@ import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 
 /**
  * <p>DeleteDescriptionElementOperation class.</p>
@@ -29,8 +30,8 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  * @version 1.0
  */
 public class DeleteDescriptionElementOperation extends AbstractPostTaxonOperation {
-       
-       private DescriptionElementBase element;
+
+       private final DescriptionElementBase element;
        private DescriptionBase description = null;
 
        /**
@@ -42,9 +43,10 @@ public class DeleteDescriptionElementOperation extends AbstractPostTaxonOperatio
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
         */
        public DeleteDescriptionElementOperation(String label, IUndoContext undoContext,
-                       DescriptionElementBase element, IPostOperationEnabled postOperationEnabled) {
-               super(label, undoContext, postOperationEnabled);
-               
+                       DescriptionElementBase element, IPostOperationEnabled postOperationEnabled,
+                       ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, postOperationEnabled, cdmEntitySessionEnabled);
+
                this.element = element;
        }
 
@@ -55,11 +57,11 @@ public class DeleteDescriptionElementOperation extends AbstractPostTaxonOperatio
        @Override
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
-               
+
                description = element.getInDescription();
-               
+
                monitor.worked(20);
-               
+
                // Remove element from description
                if (description == null) {
                        MessagingUtils.error(this.getClass(), "Couldn't find element's description!", null);
@@ -91,7 +93,7 @@ public class DeleteDescriptionElementOperation extends AbstractPostTaxonOperatio
                        throws ExecutionException {
 
                description.addElement(element);
-               
+
                return postExecute(element);
        }
 }
index 6b5b7f6ecd5c9f38985d63d553823499d89999b5..4f2a465509a71327322ac7fef6760b65b80bf8e2 100644 (file)
@@ -20,6 +20,7 @@ import eu.etaxonomy.cdm.model.description.SpecimenDescription;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -32,9 +33,12 @@ public class DeleteSpecimenDescriptionOperation extends AbstractPostOperation<Sp
 
        private final SpecimenDescription description;
 
-       public DeleteSpecimenDescriptionOperation(String label, IUndoContext undoContext,
-               SpecimenDescription description, IPostOperationEnabled postOperationEnabled) {
-               super(label, undoContext, description.getDescribedSpecimenOrObservation(), postOperationEnabled);
+       public DeleteSpecimenDescriptionOperation(String label,
+               IUndoContext undoContext,
+               SpecimenDescription description,
+               IPostOperationEnabled postOperationEnabled,
+               ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, description.getDescribedSpecimenOrObservation(), postOperationEnabled, cdmEntitySessionEnabled);
                this.description = description;
        }
 
index 5a6cebd41ada0fb17b00e2184025bbf119f9adbc..4c87ecca134ea7fb30df7a71bfec462e6ae63203 100644 (file)
@@ -9,9 +9,6 @@
 
 package eu.etaxonomy.taxeditor.editor.view.descriptive.operation;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IAdaptable;
@@ -22,6 +19,7 @@ import eu.etaxonomy.cdm.api.service.IDescriptionService;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -44,9 +42,12 @@ public class DeleteTaxonDescriptionOperation extends AbstractPostTaxonOperation
         * @param description a {@link eu.etaxonomy.cdm.model.description.TaxonDescription} object.
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
         */
-       public DeleteTaxonDescriptionOperation(String label, IUndoContext undoContext,
-                       TaxonDescription description, IPostOperationEnabled postOperationEnabled) {
-               super(label, undoContext, postOperationEnabled);
+       public DeleteTaxonDescriptionOperation(String label,
+               IUndoContext undoContext,
+                       TaxonDescription description,
+                       IPostOperationEnabled postOperationEnabled,
+                       ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, postOperationEnabled, cdmEntitySessionEnabled);
 
                this.description = description;
                element = description.getTaxon();
@@ -62,14 +63,11 @@ public class DeleteTaxonDescriptionOperation extends AbstractPostTaxonOperation
 
                monitor.worked(20);
                if (description != null){
-                       List<String> propertyPaths = new ArrayList<String>();
-                       propertyPaths.add("taxon");
-                       TaxonDescription loadedDescription = (TaxonDescription) CdmStore.getService(IDescriptionService.class).load(description.getUuid(), propertyPaths);
-                       CdmStore.getService(IDescriptionService.class).deleteDescription(loadedDescription);
+                   CdmStore.getService(IDescriptionService.class).deleteDescription(description.getUuid());
                        return postExecute(description);
                }
                return null;
-               
+
        }
 
        /* (non-Javadoc)
index fd74d72745e6dc55a6ef9ba1e3f7b74ca6c2f8d1..564b12262ae79485dd41789b5d04eb5d5455bbf8 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 package eu.etaxonomy.taxeditor.editor.view.descriptive.operation;
 
 import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.UUID;
 
 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 org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PartInitException;
 
 import eu.etaxonomy.cdm.api.service.IDescriptionService;
-import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -42,10 +39,12 @@ public class MoveDescriptionElementsOperation extends AbstractPostTaxonOperation
        private Collection<DescriptionElementBase> descriptionElements;
        private DescriptionBase targetDescription;
        private IDescriptionService service;
+       private UUID targetTaxonUuid;
+       private String moveMessage;
        private boolean isCopy;
 
        /**
-        * 
+        *
         * @param label
         * @param undoContext
         * @param targetDescription
@@ -54,28 +53,49 @@ public class MoveDescriptionElementsOperation extends AbstractPostTaxonOperation
         * @param postOperationEnabled
         */
        public MoveDescriptionElementsOperation(String label,
-                       IUndoContext undoContext, DescriptionBase targetDescription, 
+                       IUndoContext undoContext, DescriptionBase targetDescription,
                        Collection<DescriptionElementBase> descriptionElements, boolean isCopy,
                        IPostOperationEnabled postOperationEnabled) {
                super(label, undoContext, postOperationEnabled);
                this.targetDescription = targetDescription;
                this.descriptionElements = descriptionElements;
                this.isCopy = isCopy;
-               
+
                service = CdmStore.getService(IDescriptionService.class);
        }
 
+       public MoveDescriptionElementsOperation(String label,
+               IUndoContext undoContext, UUID targetTaxonUuid,String moveMessage,
+               Collection<DescriptionElementBase> descriptionElements, boolean isCopy,
+               IPostOperationEnabled postOperationEnabled) {
+           super(label, undoContext, postOperationEnabled);
+           this.targetTaxonUuid = targetTaxonUuid;
+           this.descriptionElements = descriptionElements;
+           this.moveMessage = moveMessage;
+           this.isCopy = isCopy;
+
+           service = CdmStore.getService(IDescriptionService.class);
+       }
+
        /* (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 {
-               
-               
-               service.moveDescriptionElementsToDescription(descriptionElements, targetDescription, isCopy);
-               
-               
+
+               Set<UUID> descriptionElementsUuid = new HashSet<UUID>();
+               for(DescriptionElementBase deBase : descriptionElements) {
+                   descriptionElementsUuid.add(deBase.getUuid());
+               }
+
+               if(targetDescription == null){
+                   UpdateResult result = service.moveDescriptionElementsToDescription(descriptionElementsUuid, targetTaxonUuid, moveMessage, isCopy);
+
+               } else {
+                   UUID targetDescriptionUuid = targetDescription.getUuid();
+                   service.moveDescriptionElementsToDescription(descriptionElementsUuid, targetDescriptionUuid, isCopy);
+               }
                return postExecute(targetDescription);
        }
 
@@ -98,7 +118,7 @@ public class MoveDescriptionElementsOperation extends AbstractPostTaxonOperation
                // TODO Auto-generated method stub
                return null;
        }
-       
-       
+
+
 
 }
index 8ab3fe60b5235e890a0223edc1650b4aa5361ad5..aeac3d41eb92ebb43a98133a73a24f1b3f799a32 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -27,6 +27,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -37,11 +38,11 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class MoveDescriptionToOtherTaxonOperation extends
                AbstractPersistentPostOperation {
-       
-       private TaxonNode newAcceptedTaxonNode;
 
-       private TaxonDescription description;
-       
+       private final TaxonNode newAcceptedTaxonNode;
+
+       private final TaxonDescription description;
+
        /**
         * <p>Constructor for ChangeAcceptedTaxonToSynonymOperation.</p>
         *
@@ -53,9 +54,13 @@ public class MoveDescriptionToOtherTaxonOperation extends
         * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
         */
        public MoveDescriptionToOtherTaxonOperation(String label,
-                       IUndoContext undoContext, TaxonDescription description, TaxonNode targetTaxonNode,
-                       IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled) {
-               super(label, undoContext, postOperationEnabled, conversationEnabled); // FIXME is this the right constructor ???
+                       IUndoContext undoContext,
+                       TaxonDescription description,
+                       TaxonNode targetTaxonNode,
+                       IPostOperationEnabled postOperationEnabled,
+                       IConversationEnabled conversationEnabled,
+            ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled); // FIXME is this the right constructor ???
                this.description = description;
                this.newAcceptedTaxonNode = targetTaxonNode;
        }
@@ -71,7 +76,7 @@ public class MoveDescriptionToOtherTaxonOperation extends
 
                monitor.worked(20);
                bind();
-               
+
                String moveMessage = String.format("Description moved from %s", EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
                if(description.isProtectedTitleCache()){
                        String separator = "";
@@ -84,9 +89,9 @@ public class MoveDescriptionToOtherTaxonOperation extends
                annotation.setAnnotationType(AnnotationType.TECHNICAL());
                description.addAnnotation(annotation);
                newAcceptedTaxonNode.getTaxon().addDescription(description);
-               CdmStore.getService(IDescriptionService.class).saveOrUpdate(description);       
+               CdmStore.getService(IDescriptionService.class).merge(description);
                monitor.worked(40);
-        
+
                return postExecute(description);
        }
 
index e0520f0027b906427b9f20dc9a5b5934a63d08de..527cfe3f9027d0094564fdbd67e91afc7c55e06e 100644 (file)
@@ -23,14 +23,13 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.IWorkbenchPart;
 
+import eu.etaxonomy.cdm.model.description.IDescribable;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
-import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasMedia;
@@ -97,24 +96,22 @@ public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartCon
                        return;
                }
 
-        if(part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart){
-            // do not show empty page as these views are also used to edit the description selected in this view
+        if (part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart
+                || part instanceof DescriptiveViewPart) {
+            // do not show empty page as these views are also used to edit the
+            // description selected in this view
             return;
         }
 
                if(part instanceof IPartContentHasMedia && ((IPartContentHasMedia) part).canAttachMedia()){
-                   if(part instanceof MultiPageTaxonEditor){
-                       IEditorInput input = ((IEditorPart) part).getEditorInput();
-                       showViewer(part, new StructuredSelection(input));
-                       return;
-                   }
-                   else if(selection instanceof IStructuredSelection){
+                   if(selection instanceof IStructuredSelection){
                        Object firstElement = ((IStructuredSelection) selection).getFirstElement();
                        if(firstElement instanceof TreeNode){
                            showViewer(part, new StructuredSelection(((TreeNode) firstElement).getValue()));
                            return;
                        }
-                       else if(firstElement!=null){
+                       else if(firstElement!=null
+                           && firstElement instanceof IDescribable<?>){
                            showViewer(part, (IStructuredSelection) selection);
                            return;
                        }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/resources/log4j.properties b/eu.etaxonomy.taxeditor.editor/src/main/resources/log4j.properties
deleted file mode 100644 (file)
index 5f2aacc..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-### ************ APPENDER ***********************************###\r
-\r
-### direct log messages to stdout ###\r
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender\r
-log4j.appender.stdout.Target=System.out\r
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n\r
-\r
-### direct messages to file hibernate.log ###\r
-log4j.appender.file=org.apache.log4j.FileAppender\r
-log4j.appender.file.File=taxeditor.log\r
-log4j.appender.file.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n\r
-\r
-### ************* LOG LEVELS *********************************###\r
-\r
-### set log levels - for more verbose logging change 'info' to 'debug' ###\r
-### levels: error, warn, debug, info\r
-log4j.rootLogger=INFO, stdout\r
-\r
-### set directory-specific levels below\r
-\r
-### basic level for editor directory\r
-log4j.logger.eu.etaxonomy.taxeditor.editor = WARN, stdout \r
-\r
-log4j.logger.eu.etaxonomy.taxeditor.editor.handler = DEBUG, stdout\r
-\r
-### log level for conversation handler\r
-#log4j.logger.eu.etaxonomy.cdm.api.application = DEBUG, stdout\r
-\r
-log4j.logger.org.springframework.orm.hibernate3 = WARN, stdout \r
-\r
-\r
index 39909f5cfc37f7d1a7f65024e98c61a99b3d6348..7f476f1d79f643f8b2b797b2097f0c9fb85b3a30 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -17,11 +17,9 @@ import org.junit.Test;
 
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.NonViralName;
-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.editor.name.operation.CreateSynonymInExistingHomotypicalGroupOperation;
 import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
 
 /**
@@ -31,115 +29,115 @@ import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBas
  */
 public class CreateSynonymInExisitingHomotypicalGroupOperationTest extends AbstractTaxeditorOperationTestBase {
 
-       private TaxonNameBase newSynonymName;
+       private NonViralName newSynonymName;
 
        private HomotypicalGroup homotypicalGroup;
 
 
        private NonViralName<?> taxonName;
-       
+
        /**
         * @throws java.lang.Exception
         */
        @Before
        public void setUp() throws Exception {
-               
+
                taxonName = NonViralName.NewInstance(null);
                taxon = Taxon.NewInstance(taxonName, null);
-               
+
                homotypicalGroup = HomotypicalGroup.NewInstance();
                newSynonymName = NonViralName.NewInstance(null);
-               
+
                operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
                                                        undoContext, taxon, homotypicalGroup, newSynonymName, postOperation);
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.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.
-        * 
-        * @throws ExecutionException 
+        *
+        * @throws ExecutionException
         */
        @Test
-       public void testExecuteTaxonHomotypicGroup() throws ExecutionException {                
+       public void testExecuteTaxonHomotypicGroup() throws ExecutionException {
                homotypicalGroup.addTypifiedName(taxonName);
                operation.execute(monitor, info);
-               
+
                Assert.assertTrue("Taxon should have a synonym now.", taxon.getSynonyms().size() > 0);
                Assert.assertTrue("Taxon should have a homotypic synonym now", taxon.getHomotypicSynonymsByHomotypicGroup().size() > 0);
        }
-       
+
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInExistingHomotypicalGroupOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * 
+        *
         * Homotypic group is not the accepted taxons. Heterotypic synonym should be created.
-        * 
-        * @throws ExecutionException 
+        *
+        * @throws ExecutionException
         */
        @Test
-       public void testExecuteSynonymHomotypicGroup() throws ExecutionException {              
+       public void testExecuteSynonymHomotypicGroup() throws ExecutionException {
                // test heterotypic synonym
                operation.execute(monitor, info);
-               
+
                Assert.assertTrue("Taxon should have a synonym now.", taxon.getSynonyms().size() > 0);
                Assert.assertTrue("Taxon should have a homotypic group", taxon.getHomotypicSynonymyGroups().size() > 0);
                Assert.assertEquals("Synonym relationship should be heterotypic", SynonymRelationshipType.HETEROTYPIC_SYNONYM_OF(), taxon.getSynonymRelations().toArray(new SynonymRelationship[0])[0].getType());
        }
-       
+
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInExistingHomotypicalGroupOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testUndoTaxonHomotypicGroup() throws ExecutionException {
                homotypicalGroup.addTypifiedName(taxonName);
-               
+
                operation.execute(monitor, info);
                operation.undo(monitor, info);
-               
+
                Assert.assertTrue("There should not be synonym relationships for the taxon", taxon.getSynonyms().size() == 0);
        }
-       
+
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInExistingHomotypicalGroupOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testUndoSynonymHomotypicGroup() throws ExecutionException {
                operation.execute(monitor, info);
                operation.undo(monitor, info);
-               
+
                Assert.assertTrue("There should not be synonym relationships for the taxon", taxon.getSynonyms().size() == 0);
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInExistingHomotypicalGroupOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testRedoTaxonHomotypicGroup() throws ExecutionException {
                homotypicalGroup.addTypifiedName(taxonName);
-               
+
                operation.execute(monitor, info);
-               operation.undo(monitor, info);          
+               operation.undo(monitor, info);
                operation.redo(monitor, info);
-               
+
                Assert.assertTrue("Taxon should have a synonym now.", taxon.getSynonyms().size() > 0);
                Assert.assertTrue("Taxon should have a homotypic synonym now", taxon.getHomotypicSynonymsByHomotypicGroup().size() > 0);
        }
-       
+
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInExistingHomotypicalGroupOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testRedoSynonymHomotypicGroup() throws ExecutionException {
                operation.execute(monitor, info);
-               operation.undo(monitor, info);          
+               operation.undo(monitor, info);
                operation.redo(monitor, info);
-               
+
                Assert.assertTrue("Taxon should have a synonym now.", taxon.getSynonyms().size() > 0);
                Assert.assertTrue("Taxon should have a homotypic group", taxon.getHomotypicSynonymyGroups().size() > 0);
                Assert.assertEquals("Synonym relationship should be heterotypic", SynonymRelationshipType.HETEROTYPIC_SYNONYM_OF(), taxon.getSynonymRelations().toArray(new SynonymRelationship[0])[0].getType());
index 1dc962c6cec7e27282f6eb41471cf9e948b6d969..f5dd35aec3689082225d10e63d8e4eb8c728e9b1 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -32,7 +32,7 @@ public class DeleteDescriptionElementOperationTest extends AbstractTaxeditorOper
        private static DescriptionElementBase descriptionElement;
 
        private static TaxonDescription description;
-       
+
        /**
         * @throws java.lang.Exception
         */
@@ -40,48 +40,48 @@ public class DeleteDescriptionElementOperationTest extends AbstractTaxeditorOper
        public static void setUpBeforeClass() throws Exception {
                taxon = Taxon.NewInstance(null, null);
                descriptionElement = TextData.NewInstance();
-               
+
                description = TaxonDescription.NewInstance();
-               
+
                description.addElement(descriptionElement);
-               
+
                taxon.addDescription(description);
-               
-               
-               operation = new DeleteDescriptionElementOperation("", undoContext, descriptionElement, postOperation);
+
+
+               operation = new DeleteDescriptionElementOperation("", undoContext, descriptionElement, postOperation, cdmEntitySessionEnabled);
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteDescriptionElementOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
                operation.execute(monitor, info);
-               
+
                Assert.assertTrue(taxon.getDescriptions().toArray(new TaxonDescription[0])[0].getElements().size() == 0);
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteDescriptionElementOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
                operation.undo(monitor, info);
-               
+
                Assert.assertTrue(taxon.getDescriptions().toArray(new TaxonDescription[0])[0].getElements().size() > 0);
                Assert.assertEquals(descriptionElement, taxon.getDescriptions().toArray(new TaxonDescription[0])[0].getElements().toArray(new DescriptionElementBase[0])[0]);
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteDescriptionElementOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
                operation.redo(monitor, info);
-               
+
                Assert.assertTrue(taxon.getDescriptions().toArray(new TaxonDescription[0])[0].getElements().size() == 0);
        }
 }
index 38e6e88611c9231c87dd096779b6df617cc2023d..4876aed8b27b14f089511498de0b536cbfe7e054 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -26,7 +26,6 @@ import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
-import eu.etaxonomy.taxeditor.editor.name.operation.SwapSynonymAndAcceptedOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
 
@@ -38,7 +37,7 @@ import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBas
 public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperationTestBase {
        private static final Logger logger = Logger
                        .getLogger(SwapSynonymAndAcceptedOperationTest.class);
-       
+
        private static AbstractPostOperation operation;
 
        private static Taxon taxon;
@@ -65,19 +64,19 @@ public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperat
 
        private static NonViralName<?> oldTaxonName;
 
-       
+
        /**
         * @throws java.lang.Exception
         */
        @BeforeClass
        public static void setUpBeforeClass() throws Exception {
-               
+
                (new DefaultTermInitializer()).initialize();
-               
+
                // Create the original accepted taxon
                oldTaxonName = NonViralName.NewInstance(null);
                taxon = Taxon.NewInstance(oldTaxonName, null);
-               
+
                // Create its parent taxon
                parentTaxon = Taxon.NewInstance(NonViralName.NewInstance(null), null);
                parentTaxon.addTaxonomicChild(taxon, null, null);
@@ -85,14 +84,14 @@ public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperat
                // Give it a child taxon
                childTaxon = Taxon.NewInstance(NonViralName.NewInstance(null), null);
                childTaxon.setTaxonomicParent(taxon, null, null);
-               
+
                // Create a homotypic synonym for the accepted taxon
                taxon.addHomotypicSynonymName(NonViralName.NewInstance(null), null, null);
 //             homotypicSynonym = Synonym.NewInstance(NonViralName.NewInstance(null), null);
 //             HomotypicalGroup acceptedHomotypicalGroup = HomotypicalGroup.NewInstance();
 //             acceptedHomotypicalGroup.addTypifiedName(oldTaxon.getName());
 //             acceptedHomotypicalGroup.addTypifiedName(homotypicSynonym.getName());
-               
+
                // Create a heterotypic synonym that will be used to create the new accepted taxon
                oldSynonymName = NonViralName.NewInstance(null);
                oldHeterotypicSynonym = Synonym.NewInstance(oldSynonymName, null);
@@ -100,51 +99,51 @@ public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperat
                heteroypicalGroup = HomotypicalGroup.NewInstance();
                heteroypicalGroup.addTypifiedName(oldHeterotypicSynonym.getName());
                taxon.addSynonym(oldHeterotypicSynonym, SynonymRelationshipType.HETEROTYPIC_SYNONYM_OF());
-               
+
                // Create a misapplication
                misapplication = Taxon.NewInstance(NonViralName.NewInstance(null), null);
-               taxon.addMisappliedName(misapplication, null, null);    
-               
+               taxon.addMisappliedName(misapplication, null, null);
+
                // Create a concept relation
                concept = Taxon.NewInstance(NonViralName.NewInstance(null), null);
                conceptRelationshipType = TaxonRelationshipType.CONGRUENT_TO();
-               concept.addTaxonRelation(taxon, conceptRelationshipType, null, null);   
-               
+               concept.addTaxonRelation(taxon, conceptRelationshipType, null, null);
+
                // Create a description
                description = TaxonDescription.NewInstance();
                taxon.addDescription(description);
-               
+
                operation = new SwapSynonymAndAcceptedOperation
-                               (null, undoContext, taxon, oldHeterotypicSynonym, postOperation);
+                               (null, undoContext, taxon, oldHeterotypicSynonym, postOperation, cdmEntitySessionEnabled);
        }
 
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicGroupOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testExecute() throws ExecutionException {
                operation.execute(null, null);
-               
-               // New taxon has correct name?          
+
+               // New taxon has correct name?
                Assert.assertEquals(taxon.getName(), oldSynonymName);
-               
+
                // New taxon has correct parent?
                Assert.assertEquals(taxon.getTaxonomicParent(), parentTaxon);
-               
+
                // New taxon has correct child?
                Assert.assertTrue(taxon.getTaxonomicChildren().contains(childTaxon));
-               
+
                // New taxon has 2 synonyms?
                Assert.assertEquals(taxon.getSynonyms().size(), 2);
-               
+
                // New taxon has a synonym with the name of the previous accepted taxon?
                Assert.assertTrue(taxon.getSynonymNames().contains(oldTaxonName));
-               
+
                // New taxon has misapplication?
                Assert.assertTrue(taxon.getMisappliedNames().contains(misapplication));
-               
+
                // New taxon has 1 concept relation?
                int conceptRelCount = 0;
                for (TaxonRelationship relation : taxon.getTaxonRelations()) {
@@ -155,30 +154,30 @@ public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperat
                        conceptRelCount++;
                }
                Assert.assertEquals(conceptRelCount, 1);
-               
+
                // New taxon has description?
                taxon.getDescriptions().contains(description);
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicGroupOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testUndo() throws ExecutionException {
                operation.undo(null, null);
-               
+
 //             Assert.assertEquals(oldHomotypicalGroup, synonym.getHomotypicGroup());
        }
-       
+
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicGroupOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testRedo() throws ExecutionException {
                operation.redo(null, null);
-               
+
 //             Assert.assertEquals(newHomotypicalGroup, synonym.getHomotypicGroup());
        }
 
index e7506bdf237a45693d2180bf2895fc8e9a8a0aeb..2e9d843d68fa9c8b4fb5632a6d5caf02c65469fa 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature.platform"
       label="Taxeditor Dependencies"
-      version="3.8.0.qualifier"
+      version="3.12.0.qualifier"
       os="linux,macosx,win32"
       ws="cocoa,gtk,win32"
       arch="x86,x86_64">
index 89384ec77a0122a29541acd408708fa5bbddf974..4f66401ae4c9b3b0660ec4e07f70282c9b31ed70 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.8.0-SNAPSHOT</version>
+               <version>3.12.0-SNAPSHOT</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <artifactId>eu.etaxonomy.taxeditor.feature.platform</artifactId>
index 71062e2e8eab8ba742b7c768da36cf326977accb..d578e78517243a33f24c6d556b9b696ac3a5fd8e 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature"
       label="Taxonomic Editor"
-      version="3.8.0.qualifier"
+      version="3.12.0.qualifier"
       provider-name="EDIT"
       plugin="eu.etaxonomy.taxeditor.application"
       os="linux,macosx,win32"
index e75d41e1ab26b9b07c5e5a1bffb3b9817b67fa10..a852a2bd963bd815fc58f5542183fc07b3292ac4 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>3.8.0-SNAPSHOT</version>
+    <version>3.12.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>eu.etaxonomy.taxeditor.feature</artifactId>
index 09d99f6074f5d13455191684a99c870ded2b4742..b93f49c3a329e4e63e82b2ce662495ada11bd02c 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Help
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.help; singleton:=true
-Bundle-Version: 3.8.0.qualifier
+Bundle-Version: 3.12.0.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.help.Activator
 Bundle-Vendor: EDIT
 Require-Bundle: org.eclipse.ui,
index 6a4b52361d3573478da7fc876e320662d3272315..cd38e1d80953f06de126a56ed49d5d8794e9b357 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.8.0-SNAPSHOT</version>
+               <version>3.12.0-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 3ee9c828b60a847b69207b75793900e1e9b5c4a2..5fa66f8fb465765a32ec0f061f7cc2caf53d2a3a 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: eu.etaxonomy.taxeditor.molecular.lib
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.molecular.lib;singleton:=true
-Bundle-Version: 3.8.0.qualifier
+Bundle-Version: 3.12.0.qualifier
 Bundle-ClassPath: .,
  lib/bioinfweb-commons-bio-2-SNAPSHOT.jar,
  lib/bioinfweb-commons-core-2-SNAPSHOT.jar,
index 5700ef85e5c9bdce5c2391835b30aba88b2240a9..a4c99c0090c01fd8c81d5aa14b93d57d9faca273 100644 (file)
@@ -7,7 +7,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>3.8.0-SNAPSHOT</version>
+    <version>3.12.0-SNAPSHOT</version>
   </parent>
 
   <build>
                   timestamp</echo>
                 <move todir="./lib">
                   <fileset dir="./lib" />
-                  <mapper type="regexp"
-                    from="(^bioinfweb\-.*\-[0-9]-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
+                  <mapper type="regexp" from="(^bioinfweb\-.*\-[0-9]-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
                 </move>
                 <move todir="./lib">
                   <fileset dir="./lib" />
-                  <mapper type="regexp"
-                    from="(^libralign\-.*\-[0-9]-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
+                  <mapper type="regexp" from="(^libralign\-.*\-[0-9]-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
                 </move>
                 <move todir="./lib">
                   <fileset dir="./lib" />
-                  <mapper type="regexp"
-                    from="(^tic\-.*\-[0-9]-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
+                  <mapper type="regexp" from="(^tic\-.*\-[0-9]-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
                 </move>
                 <move todir="./lib">
                   <fileset dir="./lib" />
-                  <mapper type="regexp"
-                    from="(^core\-[0-9]\.[0-9]\.[0-9])(\.jar)" to="\1-SNAPSHOT\2" />
+                  <mapper type="regexp" from="(^core\-[0-9]\.[0-9]\.[0-9])(\.jar)" to="\1-SNAPSHOT\2" />
                 </move>
                 <move todir="./lib">
                   <fileset dir="./lib" />
-                  <mapper type="regexp"
-                    from="(^sequencing\-[0-9]\.[0-9]\.[0-9])(\.jar)" to="\1-SNAPSHOT\2" />
+                  <mapper type="regexp" from="(^sequencing\-[0-9]\.[0-9]\.[0-9])(\.jar)" to="\1-SNAPSHOT\2" />
                 </move>
               </target>
             </configuration>
index 05dba64f189a6a8eeac1d30c54bd3e541a0f3c3d..ee9813cbcf30a15655799689bd497c9c17132e40 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Molecular Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.molecular;singleton:=true
-Bundle-Version: 3.8.0.qualifier
+Bundle-Version: 3.12.0.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
index 1e91c23b5485a8efa209b33091ba62c3f86c736f..60a3edfe9448c9665a897b1ea3d392c314e63bcf 100644 (file)
@@ -1,10 +1,9 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>3.8.0-SNAPSHOT</version>
+    <version>3.12.0-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
index 2debdb9bdeb730adbe99bf6df85c3df0640c8af1..78d112612aa35a7cc5346125e855a0e882bb8d41 100644 (file)
@@ -2,13 +2,15 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Navigation Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.navigation;singleton:=true
-Bundle-Version: 3.8.0.qualifier
+Bundle-Version: 3.12.0.qualifier
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.navigation,
  eu.etaxonomy.taxeditor.navigation.internal,
  eu.etaxonomy.taxeditor.navigation.key.polytomous,
+ eu.etaxonomy.taxeditor.navigation.key.polytomous.operation,
  eu.etaxonomy.taxeditor.navigation.navigator,
+ eu.etaxonomy.taxeditor.navigation.navigator.operation,
  eu.etaxonomy.taxeditor.navigation.search
 Require-Bundle: org.eclipse.ui,
  org.eclipse.ui.navigator,
index 9d828fb455d36b9a94c4fbefd695a12d73f2c5d5..20ce35a52df9f4f25b7f65f43a6f269712ee4092 100644 (file)
                commandId="eu.etaxonomy.taxeditor.navigation.command.create.taxonNode"
                label="%command.label.13"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
          <separator
                name="eu.etaxonomy.navigation.menu.new.separator1"
                id="eu.etaxonomy.taxeditor.navigation.create.classificationHandler"
                label="%command.label.14"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
       </menuContribution>
       <menuContribution
             </with>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.navigator.handler.RemotingChangeAcceptedTaxonToSynonymHandler"
+            commandId="eu.etaxonomy.taxeditor.navigator.command.update.changeAcceptedToSynonym">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.navigator.handler.RemotingMoveFactualDataHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.moveFactualData">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.navigator.handler.RemotingMoveTaxonNodeHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.command.update.moveTaxon">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.navigator.handler.RemotingDeleteTaxonNodeHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.command.delete">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.RemotingDeletePolytomousKeyHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.command.delete">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.RemotingUpdatePolytomousKeyAllNodesHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.refreshKeyNodes">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.RemotingEditPolytomousKeyNodesHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.editNodes">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
    </extension>
 
       
          class="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
          id="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
          namespace="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
-         properties="isCdmStoreConnected"
+         properties="isCdmStoreConnected,isRemoting,isStandAlone"
          type="java.lang.Object">
    </propertyTester>
    </extension>
             </test>
          </with>
       </definition>
+      <definition
+            id="isRemoting">
+         <test
+               property="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester.isRemoting">
+         </test>
+      </definition>
+      <definition
+            id="isStandAlone">
+         <test
+               property="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester.isStandAlone">
+         </test>
+      </definition>
    </extension>
    <extension
          point="eu.etaxonomy.taxeditor.store.cdmViewer">
index 992838c22da67c0d344a5140f600a529cf4981a1..8694ba2b55ee1cf7a605499a9c592bc1428e0d8b 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.8.0-SNAPSHOT</version>
+               <version>3.12.0-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 7e48f97fcf6066329bdb081c0b236c6e0c17236f..a266c8d9249de70341c8ddebb3d14107d3c44dd8 100644 (file)
@@ -43,6 +43,7 @@ import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
+import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 
 /**
  * <p>NavigationUtil class.</p>
@@ -98,7 +99,12 @@ public class NavigationUtil extends AbstractUtility{
                } catch (PartInitException e) {
                        MessagingUtils.error(NavigationUtil.class, "Error opening the editor", e);
                } catch (Exception e) {
-                       MessagingUtils.warningDialog("Could not create Taxon", NavigationUtil.class, e.getMessage());
+                   MessagingUtils.errorDialog("Could not create Taxon",
+                           NavigationUtil.class,
+                           e.getMessage(), TaxeditorStorePlugin.PLUGIN_ID,
+                           e,
+                           true);
+
                }
        }
 
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewLabels.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewLabels.java
new file mode 100644 (file)
index 0000000..6961c3a
--- /dev/null
@@ -0,0 +1,25 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.key.polytomous;
+
+/**
+ * @author cmathew
+ * @date 25 Jun 2015
+ *
+ */
+public interface PolytomousKeyViewLabels {
+
+    public static final String DELETE_POLYTOMOUS_KEY_LABEL = "Delete Polytomous Key";
+    public static final String UPDATE_ALL_POLYTOMOUS_KEY_NODES_LABEL = "Update All Polytomous Key Nodes";
+
+    public static final String ERROR_OPENING_KEY_EDITOR_MESSAGE = "Error opening Polytomous Key Editor";
+
+
+}
index 09861da31f570eab8ec72987fa1871250de4df73..e6757a31ba5d57fcb2b4071587dab500ac2706a9 100644 (file)
@@ -4,6 +4,7 @@
 package eu.etaxonomy.taxeditor.navigation.key.polytomous;
 
 import java.util.List;
+import java.util.Map;
 
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.common.NotDefinedException;
@@ -33,6 +34,10 @@ import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.part.ViewPart;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.application.ICdmChangeListener;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
@@ -44,6 +49,8 @@ import eu.etaxonomy.taxeditor.model.DataChangeBridge;
 import eu.etaxonomy.taxeditor.model.IContextListener;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 
@@ -52,7 +59,8 @@ import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
  *
  */
 public class PolytomousKeyViewPart extends ViewPart implements
-               IConversationEnabled, IPostOperationEnabled {
+               IConversationEnabled, ICdmEntitySessionEnabled, IPostOperationEnabled,
+               ICdmChangeListener {
 
        private class FilterModifyListener implements ModifyListener{
                @Override
@@ -111,6 +119,7 @@ public class PolytomousKeyViewPart extends ViewPart implements
        private IContextListener contextListener;
        private final CdmFormFactory formFactory;
        private Text text_filter;
+       private ICdmEntitySession cdmEntitySession;
 
        private PolytomousKeyViewPartDataChangeBehavior dataChangeBehavior;
 
@@ -195,6 +204,9 @@ public class PolytomousKeyViewPart extends ViewPart implements
        private void setInput() {
                conversation = CdmStore.createConversation();
                conversation.registerForDataStoreChanges(this);
+               cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
+               CdmApplicationState.getCurrentDataChangeService().register(this);
+
                List<PolytomousKey> input = CdmStore.getService(IPolytomousKeyService.class).list(PolytomousKey.class, null, null, null, null);
                if(!viewer.getControl().isDisposed()){
                    viewer.setInput(input);
@@ -206,6 +218,9 @@ public class PolytomousKeyViewPart extends ViewPart implements
         */
        @Override
        public void setFocus() {
+           if(cdmEntitySession != null) {
+            cdmEntitySession.bind();
+        }
                viewer.getControl().setFocus();
        }
 
@@ -239,6 +254,10 @@ public class PolytomousKeyViewPart extends ViewPart implements
                conversation.close();
                CdmStore.getContextManager().removeContextListener(contextListener);
            }
+           if(cdmEntitySession != null) {
+               cdmEntitySession.dispose();
+           }
+           CdmApplicationState.getCurrentDataChangeService().unregister(this);
                super.dispose();
        }
 
@@ -278,4 +297,40 @@ public class PolytomousKeyViewPart extends ViewPart implements
                return (List<PolytomousKey>)viewer.getInput();
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()
+     */
+    @Override
+    public ICdmEntitySession getCdmEntitySession() {
+        return cdmEntitySession;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public  List<PolytomousKey> getRootEntities() {
+        return getKeys();
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.application.ICdmChangeListener#onChange(eu.etaxonomy.cdm.api.application.CdmChangeEvent)
+     */
+    @Override
+    public void onChange(CdmChangeEvent event) {
+        if(event.getAction() == Action.Delete && PolytomousKey.class.equals(event.getEntityType())) {
+            refresh();
+        }
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
 }
index 449a661f0835530b985a3910961d8153e197905b..07e8caca4bf020d8a7c44996152382c4090030be 100644 (file)
@@ -17,14 +17,9 @@ import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorInput;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart;
@@ -38,33 +33,32 @@ import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
  */
 public class DeleteHandler extends AbstractHandler {
 
-    protected IWorkbenchPage activePage;
        /* (non-Javadoc)
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
                IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
-               activePage =  HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
+
                List<PolytomousKey> keys = selection.toList();
 
                if(keys.isEmpty()){
                        return null;
                }
-               for (PolytomousKey key : keys){
-                   closeObsoleteEditor(key);
-               }
-               boolean confirmation = MessagingUtils.confirmDialog("Confirm deletion", "Do you want to delete the selected key" + (keys.size() == 1 ? "" : "s") + "?");
+
+               boolean confirmation = MessagingUtils.confirmDialog("Confirm deletaion", "Do you want to delete the selected key" + (keys.size() == 1 ? "" : "s") + "?");
 
                if(confirmation){
 
                        for(PolytomousKey key : keys){
                                try {
+                                   PolytomousKeyViewPart pkvp = (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false);
                                        AbstractPostOperation operation = new DeleteOperation(
                                                        event.getCommand().getName(),
                                                        NavigationUtil.getUndoContext(), key,
-                                                       (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false),
-                                                       (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false));
+                                                       pkvp,
+                                                       pkvp,
+                                                       pkvp);
                                        NavigationUtil.executeOperation(operation);
                                } catch (NotDefinedException e) {
                                        MessagingUtils.error(getClass(), e);
@@ -75,26 +69,4 @@ public class DeleteHandler extends AbstractHandler {
                return null;
        }
 
-
-       protected boolean closeObsoleteEditor(PolytomousKey key){
-        boolean result = true;
-        for (IEditorReference ref : activePage.getEditorReferences()) {
-            try {
-
-                IEditorInput input = ref.getEditorInput();
-                if (input instanceof PolytomousKeyEditorInput) {
-                    PolytomousKey pKey = ((PolytomousKeyEditorInput)input).getKey();
-                    //if node is a child of taxonNode then close the editor
-                    if(key.equals(pKey)){
-                    //if (taxonNode.equals(node)) {
-                        result &= activePage.closeEditor(ref.getEditor(false), true);
-
-                    }
-                }
-            } catch (PartInitException e) {
-                continue;
-            }
-        }
-        return result;
-    }
 }
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingDeletePolytomousKeyHandler.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingDeletePolytomousKeyHandler.java
new file mode 100644 (file)
index 0000000..691cccb
--- /dev/null
@@ -0,0 +1,83 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.key.polytomous.handler;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewLabels;
+import eu.etaxonomy.taxeditor.navigation.key.polytomous.operation.RemotingDeletePolytomousKeyOperation;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
+import eu.etaxonomy.taxeditor.util.OperationsUtil;
+
+/**
+ * @author cmathew
+ * @date 25 Jun 2015
+ *
+ */
+public class RemotingDeletePolytomousKeyHandler extends RemotingCdmHandler {
+
+    List<UUID> keysToDelete;
+    /**
+     * @param label
+     */
+    public RemotingDeletePolytomousKeyHandler() {
+        super(PolytomousKeyViewLabels.DELETE_POLYTOMOUS_KEY_LABEL);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#allowOperations(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public IStatus allowOperations(ExecutionEvent event) {
+        IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+        keysToDelete = OperationsUtil.convertToUuidList(selection.toList());
+
+        if(keysToDelete.isEmpty()){
+           return Status.CANCEL_STATUS;
+        }
+
+        boolean confirmation = MessagingUtils.confirmDialog("Confirm deletaion", "Do you want to delete the selected key" + (keysToDelete.size() == 1 ? "" : "s") + "?");
+
+        if(!confirmation) {
+            return Status.CANCEL_STATUS;
+        }
+        return Status.OK_STATUS;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#prepareOperation(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public AbstractOperation prepareOperation(ExecutionEvent event) {
+        return new RemotingDeletePolytomousKeyOperation(event.getTrigger(),
+                false,
+                keysToDelete);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete()
+     */
+    @Override
+    public void onComplete() {
+        // TODO Auto-generated method stub
+
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingEditPolytomousKeyNodesHandler.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingEditPolytomousKeyNodesHandler.java
new file mode 100644 (file)
index 0000000..56949fc
--- /dev/null
@@ -0,0 +1,90 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.key.polytomous.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.widgets.Display;
+
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewLabels;
+import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart;
+
+/**
+ * @author cmathew
+ * @date 29 Jun 2015
+ *
+ */
+public class RemotingEditPolytomousKeyNodesHandler extends AbstractHandler {
+
+    /* (non-Javadoc)
+     * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public Object execute(final ExecutionEvent event) throws ExecutionException {
+        PolytomousKeyViewPart view = (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false);
+
+        ISelection selection = view.getSite().getSelectionProvider().getSelection();
+        if(selection instanceof StructuredSelection){
+
+            final StructuredSelection structuredSelection = (StructuredSelection) selection;
+
+            Job job = new Job("Opening Polytomous Keys"){
+
+                @Override
+                protected IStatus run(IProgressMonitor monitor) {
+                    monitor.beginTask("Opening Polytomous Keys", structuredSelection.size());
+
+                    for(final Object selectedObject : structuredSelection.toArray()){
+                        if(selectedObject instanceof PolytomousKey){
+
+                            Display.getDefault().asyncExec(new Runnable(){
+
+                                @Override
+                                public void run() {
+                                    try {
+                                        PolytomousKey key = (PolytomousKey) selectedObject;
+                                    EditorUtil.openPolytomousKey(key.getUuid());
+                                    } catch(Exception ex) {
+                                        MessagingUtils.warningDialog(PolytomousKeyViewLabels.ERROR_OPENING_KEY_EDITOR_MESSAGE,
+                                                event.getTrigger(),
+                                                ex.getLocalizedMessage());
+                                        ex.printStackTrace();
+                                    }
+                                }
+
+                            });
+                            monitor.worked(1);
+                        }
+                    }
+                    monitor.done();
+                    return Status.OK_STATUS;
+                }
+
+            };
+
+            job.setPriority(Job.SHORT);
+            job.schedule();
+
+        }
+        return null;
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingUpdatePolytomousKeyAllNodesHandler.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingUpdatePolytomousKeyAllNodesHandler.java
new file mode 100644 (file)
index 0000000..6c5ec41
--- /dev/null
@@ -0,0 +1,60 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.key.polytomous.handler;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewLabels;
+import eu.etaxonomy.taxeditor.navigation.key.polytomous.operation.RemotingUpdatePolytomousKeyAllNodesOperation;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
+
+/**
+ * @author cmathew
+ * @date 29 Jun 2015
+ *
+ */
+public class RemotingUpdatePolytomousKeyAllNodesHandler extends RemotingCdmHandler {
+
+    /**
+     * @param label
+     */
+    public RemotingUpdatePolytomousKeyAllNodesHandler() {
+        super(PolytomousKeyViewLabels.UPDATE_ALL_POLYTOMOUS_KEY_NODES_LABEL);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#allowOperations(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public IStatus allowOperations(ExecutionEvent event) {
+        return Status.OK_STATUS;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#prepareOperation(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public AbstractOperation prepareOperation(ExecutionEvent event) {
+        return new RemotingUpdatePolytomousKeyAllNodesOperation(event.getTrigger(), false);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete()
+     */
+    @Override
+    public void onComplete() {
+        // TODO Auto-generated method stub
+
+    }
+
+}
index 868116c208841f12714ec1f7265d8557e9e81a2c..01bf873c5afdf670c0eb81b50edf62d82e794da2 100644 (file)
@@ -23,6 +23,7 @@ import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -33,6 +34,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class DeleteOperation extends AbstractPersistentPostOperation {
 
        private final PolytomousKey key;
+       private final ICdmEntitySessionEnabled cdmEntitySessionEnabled;
+
 
        /**
         * @param label
@@ -41,9 +44,12 @@ public class DeleteOperation extends AbstractPersistentPostOperation {
         */
        public DeleteOperation(String label, IUndoContext undoContext,
                        PolytomousKey key,
-                       IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled) {
-               super(label, undoContext, postOperationEnabled, conversationEnabled);
+                       IPostOperationEnabled postOperationEnabled,
+                       IConversationEnabled conversationEnabled,
+                       ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
                this.key = key;
+               this.cdmEntitySessionEnabled = cdmEntitySessionEnabled;
        }
 
        @Override
@@ -52,6 +58,7 @@ public class DeleteOperation extends AbstractPersistentPostOperation {
                bind();
 
                DeleteResult result = CdmStore.getService(IPolytomousKeyService.class).delete(key);
+
                if (result.isError() && !result.getExceptions().isEmpty()){
                        MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
 
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/RemotingDeletePolytomousKeyOperation.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/RemotingDeletePolytomousKeyOperation.java
new file mode 100644 (file)
index 0000000..6551fe3
--- /dev/null
@@ -0,0 +1,57 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.key.polytomous.operation;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author cmathew
+ * @date 25 Jun 2015
+ *
+ */
+public class RemotingDeletePolytomousKeyOperation extends RemotingCdmUpdateOperation {
+
+    private final static String LABEL = "Delete Polytomous Key operation";
+
+    private final List<UUID> keysToDelete;
+    /**
+     * @param label
+     * @param action
+     * @param source
+     * @param async
+     */
+    public RemotingDeletePolytomousKeyOperation(Object source,
+            boolean async,
+            List<UUID> keysToDelete) {
+        super(LABEL, Action.Delete, source, async);
+        this.keysToDelete = keysToDelete;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    @Override
+    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
+        entityType = PolytomousKey.class;
+        return CdmStore.getService(IPolytomousKeyService.class).delete(keysToDelete);
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/RemotingUpdatePolytomousKeyAllNodesOperation.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/RemotingUpdatePolytomousKeyAllNodesOperation.java
new file mode 100644 (file)
index 0000000..f002c93
--- /dev/null
@@ -0,0 +1,66 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.key.polytomous.operation;
+
+import java.util.UUID;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author cmathew
+ * @date 29 Jun 2015
+ *
+ */
+public class RemotingUpdatePolytomousKeyAllNodesOperation extends RemotingCdmUpdateOperation {
+
+    private final UUID polytomousKeyUuid;
+    /**
+     * @param label
+     * @param action
+     * @param source
+     * @param async
+     */
+    public RemotingUpdatePolytomousKeyAllNodesOperation(Object source,
+            boolean async,
+            UUID polytomousKeyUuid) {
+        super(LABEL, Action.Update, source, async);
+        this.polytomousKeyUuid = polytomousKeyUuid;
+
+    }
+
+    public RemotingUpdatePolytomousKeyAllNodesOperation(Object source,
+            boolean async) {
+        super(LABEL, Action.Update, source, async);
+        // this implies that we have to update all nodes of all keys
+        this.polytomousKeyUuid = null;
+    }
+
+    private final static String LABEL = "Update All Polytomous Key Nodes operation";
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    @Override
+    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
+        if(polytomousKeyUuid == null) {
+            return CdmStore.getService(IPolytomousKeyService.class).updateAllNodeNumberings();
+        } else {
+            return CdmStore.getService(IPolytomousKeyService.class).updateAllNodeNumberings(polytomousKeyUuid);
+        }
+    }
+
+}
index ef4e0317c1c1c878e12207b33c43417f5a6edd3e..7294a137b6ec2d071fb95cd74ee4cf4f0dad4d75 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -38,8 +38,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class Root extends PlatformObject implements IAdaptable, IPersistableElement, IElementFactory, IConversationEnabled {
 
-       private ConversationHolder conversation;
-       
+       private final ConversationHolder conversation;
+
        /**
         * <p>Constructor for Root.</p>
         *
@@ -48,7 +48,7 @@ public class Root extends PlatformObject implements IAdaptable, IPersistableElem
        public Root (ConversationHolder conversation){
                this.conversation = conversation;
        }
-       
+
        /**
         * <p>getParentBeans</p>
         *
@@ -56,18 +56,18 @@ public class Root extends PlatformObject implements IAdaptable, IPersistableElem
         */
        public List<Classification> getParentBeans() {
                List<String> propertyPaths = Arrays.asList(new String[]{"name"});
-               
+
                List<Classification> classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, propertyPaths);
-               
+
                if(classifications.size() == 0){
                        Classification classification = Classification.NewInstance("My Classification");
-                       AbstractPostOperation operation = new CreateClassification("Creating initial classification", NavigationUtil.getUndoContext(), classification, NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false));
+                       AbstractPostOperation operation = new CreateClassification("Creating initial classification", NavigationUtil.getUndoContext(), classification, NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false));
                        NavigationUtil.executeOperation(operation);
-                       
+
                        classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, propertyPaths);
                }
-               
-               return classifications; 
+
+               return classifications;
        }
 
        /* (non-Javadoc)
@@ -78,7 +78,8 @@ public class Root extends PlatformObject implements IAdaptable, IPersistableElem
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getFactoryId() {
+       @Override
+    public String getFactoryId() {
                return null;
        }
 
@@ -86,14 +87,16 @@ public class Root extends PlatformObject implements IAdaptable, IPersistableElem
         * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)
         */
        /** {@inheritDoc} */
-       public void saveState(IMemento memento) {
+       @Override
+    public void saveState(IMemento memento) {
        }
 
        /* (non-Javadoc)
         * @see org.eclipse.ui.IElementFactory#createElement(org.eclipse.ui.IMemento)
         */
        /** {@inheritDoc} */
-       public IAdaptable createElement(IMemento memento) {
+       @Override
+    public IAdaptable createElement(IMemento memento) {
                return null;
        }
 
index 1d30e554f83d3011fc589edeaa8313451b48c384..bacbf1f98c2e5e17932a66eaf3fb9be1c39524c2 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -13,7 +13,6 @@ package eu.etaxonomy.taxeditor.navigation.navigator;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.navigator.ILinkHelper;
 
@@ -33,28 +32,29 @@ public class TaxonLinkHelper implements ILinkHelper {
 
        /** Constant <code>ID="eu.etaxonomy.taxeditor.navigation.taxon"{trunked}</code> */
        public static final String ID = "eu.etaxonomy.taxeditor.navigation.taxonlinkhelper"; //$NON-NLS-1$
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.navigator.ILinkHelper#activateEditor(org.eclipse.ui.IWorkbenchPage, org.eclipse.jface.viewers.IStructuredSelection)
         */
        /** {@inheritDoc} */
-       public void activateEditor(IWorkbenchPage page,
+       @Override
+    public void activateEditor(IWorkbenchPage page,
                        IStructuredSelection selection) {
                try {
                        if (selection == null || selection.isEmpty()) {
                                return;
                        }
-                       if (selection.getFirstElement() instanceof TaxonNode) {
-                               TaxonNode taxonNode = (TaxonNode) selection.getFirstElement();
-                               TaxonEditorInput taxonEditorInput;
-                               
-                                       taxonEditorInput = TaxonEditorInput.NewInstance(taxonNode.getUuid());
-                               
-                               IEditorPart editor = null;
-                               if ((editor = page.findEditor(taxonEditorInput)) != null) {
-                                       page.bringToTop(editor);
-                               }
-                       }
+//                     if (selection.getFirstElement() instanceof TaxonNode) {
+//                             TaxonNode taxonNode = (TaxonNode) selection.getFirstElement();
+//                             TaxonEditorInput taxonEditorInput;
+//
+//                                     taxonEditorInput = TaxonEditorInput.NewInstance(taxonNode.getUuid());
+//
+//                             IEditorPart editor = null;
+//                             if ((editor = page.findEditor(taxonEditorInput)) != null) {
+//                                     page.bringToTop(editor);
+//                             }
+//                     }
                } catch (Exception e) {
                        MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
                }
@@ -64,7 +64,8 @@ public class TaxonLinkHelper implements ILinkHelper {
         * @see org.eclipse.ui.navigator.ILinkHelper#findSelection(org.eclipse.ui.IEditorInput)
         */
        /** {@inheritDoc} */
-       public IStructuredSelection findSelection(IEditorInput editorInput) {
+       @Override
+    public IStructuredSelection findSelection(IEditorInput editorInput) {
                if (editorInput instanceof TaxonEditorInput) {
                        TaxonNode taxonNode = ((TaxonEditorInput) editorInput).getTaxonNode();
                        if (taxonNode != null) {
index 273d9ad36383f11750f991bcafab80a3f7fcc5aa..c2d28d358fa70b5e7943a6229cca03f58ccc46bd 100644 (file)
 package eu.etaxonomy.taxeditor.navigation.navigator;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Comparator;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Observable;
 import java.util.Observer;
 import java.util.Set;
@@ -28,10 +31,15 @@ import org.eclipse.ui.IViewSite;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.navigator.CommonNavigator;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.application.ICdmChangeListener;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.IClassificationService;
 import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.TaxonNaturalComparator;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNodeByRankAndNameComparator;
@@ -42,6 +50,8 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.LoginManager;
 
@@ -54,7 +64,8 @@ import eu.etaxonomy.taxeditor.store.LoginManager;
  * @version 1.0
  */
 public class TaxonNavigator extends CommonNavigator implements
-               IPostOperationEnabled, IConversationEnabled, Observer {
+               IPostOperationEnabled, IConversationEnabled, Observer,
+               ICdmEntitySessionEnabled, ICdmChangeListener {
 
        /**
         * Constant
@@ -68,10 +79,14 @@ public class TaxonNavigator extends CommonNavigator implements
 
        private ConversationHolder conversation;
 
+       private ICdmEntitySession cdmEntitySession;
+
        private String partNameCache;
 
        private IDataChangeBehavior dataChangeBehavior;
 
+       private Root root;
+
        /*
         * (non-Javadoc)
         *
@@ -111,8 +126,8 @@ public class TaxonNavigator extends CommonNavigator implements
                        // we do not preserve state. Closing the view, in contrary to
                        // closing the whole application
                        // should be handled by the state manager too
-
-                       return new Root(conversation);
+                   root = new Root(conversation);
+                       return root;
                }
                return new EmptyRoot();
        }
@@ -130,10 +145,15 @@ public class TaxonNavigator extends CommonNavigator implements
         * </p>
         */
        public void init() {
+
                if (CdmStore.isActive() && conversation == null) {
                        conversation = CdmStore.createConversation();
                        conversation.registerForDataStoreChanges(TaxonNavigator.this);
                }
+               if (CdmStore.isActive()) {
+                   cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
+                   CdmApplicationState.getCurrentDataChangeService().register(this);
+               }
                CdmStore.getLoginManager().addObserver(this);
        }
 
@@ -151,6 +171,15 @@ public class TaxonNavigator extends CommonNavigator implements
                getCommonViewer().refresh();
        }
 
+          /**
+     * Refresh this navigators viewer
+     */
+    public void refresh(Set objects) {
+        for(Object obj : objects) {
+            getCommonViewer().refresh(obj);
+        }
+    }
+
        /**
         * Removes all content
         */
@@ -169,8 +198,9 @@ public class TaxonNavigator extends CommonNavigator implements
         *            a {@link org.eclipse.core.runtime.IProgressMonitor} object.
         */
        public void restore(IMemento memento, IProgressMonitor monitor) {
+           root = new Root(conversation);
                if (memento == null) {
-                       getCommonViewer().setInput(new Root(conversation));
+                       getCommonViewer().setInput(root);
                        return;
                }
                int mementoWork = 0;
@@ -198,7 +228,7 @@ public class TaxonNavigator extends CommonNavigator implements
                subProgressMonitor.worked(1);
                conversation.registerForDataStoreChanges(TaxonNavigator.this);
                subProgressMonitor.worked(1);
-               getCommonViewer().setInput(new Root(conversation));
+               getCommonViewer().setInput(root);
                subProgressMonitor.worked(1);
                getCommonViewer().refresh();
                subProgressMonitor.worked(1);
@@ -359,6 +389,12 @@ public class TaxonNavigator extends CommonNavigator implements
                if (conversation != null) {
                        conversation.unregisterForDataStoreChanges(this);
                }
+               if(cdmEntitySession != null) {
+                   cdmEntitySession.dispose();
+               }
+               if(CdmApplicationState.getCurrentDataChangeService() != null) {
+                   CdmApplicationState.getCurrentDataChangeService().unregister(this);
+               }
        }
 
        /*
@@ -374,6 +410,9 @@ public class TaxonNavigator extends CommonNavigator implements
                if (getConversationHolder() != null) {
                        getConversationHolder().bind();
                }
+               if(cdmEntitySession != null) {
+                   cdmEntitySession.bind();
+               }
        }
 
        /*
@@ -461,4 +500,60 @@ public class TaxonNavigator extends CommonNavigator implements
                }
 
        }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()
+     */
+    @Override
+    public ICdmEntitySession getCdmEntitySession() {
+       return cdmEntitySession;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public List<Classification> getRootEntities() {
+        if(root != null) {
+            return root.getParentBeans();
+        }
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.application.ICdmChangeListener#onChange(eu.etaxonomy.cdm.api.application.CdmChangeEvent)
+     */
+    @Override
+    public void onChange(CdmChangeEvent event) {
+        if(event.getAction() == Action.Delete && Classification.class.equals(event.getEntityType())) {
+            refresh();
+            return;
+        }
+        for(CdmBase cb : event.getChangedObjects()) {
+            if(cb instanceof TaxonNode) {
+                TaxonNode tn = (TaxonNode)cb;
+                if(tn.getTaxon() == null) {
+                    getCommonViewer().refresh(tn.getClassification());
+                } else {
+                    getCommonViewer().refresh(cb);
+                }
+            } else if (cb instanceof Classification) {
+                getCommonViewer().refresh();
+            }
+        }
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        Map<Object, List<String>> propertyPathsMap = new HashMap<Object, List<String>>();
+        List<String> taxonNodePropertyPaths = Arrays.asList(new String[] {
+                "taxon.name"
+        });
+         propertyPathsMap.put("childNodes", taxonNodePropertyPaths);
+        return propertyPathsMap;
+    }
 }
index 0bb6c999c8d7c1d111b17677e594e3a94763c939..b1a636182f437497435f86860f87cc197b8712d8 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.IEditorPart;
 
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
@@ -26,7 +27,6 @@ import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.model.AbstractDataChangeBehaviour;
 import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
@@ -38,13 +38,13 @@ import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
  * @created 01.04.2009
  * @version 1.0
  */
-public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviour implements 
+public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviour implements
                IDataChangeBehavior {
 
-       private TaxonNavigator source;
+       private final TaxonNavigator source;
 
        private Set<CdmBase> staleObjects;
-       
+
        /**
         * <p>Constructor for TaxonNavigatorDataChangeBehavior.</p>
         *
@@ -53,7 +53,7 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
        public TaxonNavigatorDataChangeBehavior(TaxonNavigator taxonNavigator) {
                source = taxonNavigator;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.store.model.IDataChangeBehavior#isRelevant(java.lang.Object, eu.etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)
         */
@@ -64,22 +64,29 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
         * @return a boolean.
         */
        public boolean isRelevant(CdmDataChangeMap events) {
-               
+
                // TODO react only on insert/update/delete of taxon and synonym objects
                // and on update of name objects
                boolean relevant = false;
                staleObjects = new HashSet<CdmBase>();
-               
+
                for(CdmDataChangeEvent event : events.getAllEvents()){
                        EventType eventType = event.getEventType();
                        CdmBase eventEntity = event.getEntity();
-                       
+
+                       Set<CdmBase> affectedObjects = event.getAffectedObjects();
+                       if(affectedObjects != null) {
+                           for(CdmBase cb : affectedObjects) {
+                               staleObjects.add((CdmBase)HibernateProxyHelper.deproxy(cb));
+                           }
+                       }
+
                        // all tree node changes are relevant
-                       if((eventType == EventType.INSERT || eventType == EventType.DELETE || eventType == EventType.UPDATE) 
+                       if((eventType == EventType.INSERT || eventType == EventType.DELETE || eventType == EventType.UPDATE)
                                        && event.getEntity() instanceof ITaxonTreeNode){
                                return true;
                        }
-                       
+
                        // name updates of the accepted taxon of open editors are relevant
                        if(eventType == EventType.UPDATE && event.getEntity() instanceof TaxonNameBase){
                                TaxonNameBase name = null;
@@ -90,10 +97,10 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
                                }else{
                                        continue;
                                }
-                               
+
                                Set<IEditorPart> openEditors = NavigationUtil.getOpenEditors();
                                /*for(IEditorPart editor : openEditors){
-                                       
+
                                        if(name.equals(((TaxonEditorInput) editor.getEditorInput()).getTaxon().getName())){
                                                return true;
                                        }
@@ -102,7 +109,9 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
                        if (eventType == EventType.DELETE){
                                return true;
                        }
-                       
+
+
+
                        if(eventType == EventType.UPDATE && event.getEntity() instanceof Taxon){
                                TaxonNameBase name = null;
                                if(eventEntity instanceof Taxon){
@@ -110,16 +119,16 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
                                }else{
                                        continue;
                                }
-                               
-                               Set<IEditorPart> openEditors = NavigationUtil.getOpenEditors();
+
+                               // Set<IEditorPart> openEditors = NavigationUtil.getOpenEditors();
                                /*for(IEditorPart editor : openEditors){
-                                       
+
                                        if(name.equals(((TaxonEditorInput) editor.getEditorInput()).getTaxon().getName())){
                                                return true;
                                        }
                                }*/
                        }
-                       
+
 //                     if(eventType == EventType.UPDATE){
 //                             relevant = true;
 //                             CdmBase entity = event.getEntity();
@@ -130,9 +139,9 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
 //                             }
 //                     }
                }
-               
+
                return false;
-               
+
                // @deprecated
                // react on everything except load
 //             if(events.sizeByEventType(EventType.INSERT) > 0){
@@ -156,12 +165,12 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
 
                        final Display display = Display.getCurrent();
                        Job job = new Job("Updating Taxon Navigator") {
-                               
+
                                @Override
                                protected IStatus run(IProgressMonitor monitor) {
                                        monitor.beginTask("Updating Taxon Navigator", 3);
                                        monitor.worked(1);
-                                       
+
                                        // clear the session completely
                                        monitor.subTask("Clearing Taxon Navigators session");
                                        display.asyncExec(new Runnable() {
@@ -169,8 +178,8 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
                                                 public void run() {
                                                         source.getConversationHolder().clear();
                                                 }
-                                       });                                     
-                                       // FIXME completely clearing the session is a brute force approach. 
+                                       });
+                                       // FIXME completely clearing the session is a brute force approach.
                                        // It would be much more elegant to clear only those elements that have been changed.
                                        // I could not get that to work but we should consider workin on this because we might
                                        // run into serious performance issues, especially when it comes to large trees
@@ -178,27 +187,31 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
                                        // at least, we moved this to a job so it can run in a background thred
                                        // seems to improve the situation but not sure if final solution
                                        monitor.worked(1);
-                                       
+
                                        monitor.subTask("Refreshing viewer");
-                                       
+
                                        display.asyncExec(new Runnable() {
                                            @Override
                                            public void run() {
-                                               source.refresh();
+                                               if(staleObjects != null && staleObjects.size() > 0) {
+                                                  source.refresh(staleObjects);
+                                               } else {
+                                                   source.refresh();
+                                               }
                                            }
                                        });
-                                       
-                                       
-                                       
+
+
+
                                        monitor.worked(1);
                                        monitor.done();
                                        return Status.OK_STATUS;
                                }
                        };
-                       
+
                        job.setPriority(Job.SHORT);
                        job.schedule();
-                       
+
                }
        }
 }
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorLabels.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorLabels.java
new file mode 100644 (file)
index 0000000..2b579e4
--- /dev/null
@@ -0,0 +1,36 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.navigator;
+
+/**
+ * @author cmathew
+ * @date 19 Jun 2015
+ *
+ */
+public interface TaxonNavigatorLabels {
+
+    public static final String CHANGE_ACCEPTED_TAXON_TO_SYNONYM_LABEL = "Change Accepted Taxon to Synonym";
+    public static final String MOVE_TAXON_LABEL = "Move Taxon";
+    public static final String MOVE_FACTUAL_DATA_LABEL = "Move Factual Data";
+    public static final String DELETE_TAXON_NODE_LABEL = "Delete Taxon Node";
+
+    public static final String NO_TAXON_SELECTION_MESSAGE = "No taxon tree node selected for operation.";
+    public static final String SINGLE_TAXON_SELECTION_MESSAGE = "The chosen operation is available only for a single taxon.";
+    public static final String SOURCE_TAXON_HAS_CHILDREN_MESSAGE = "The chosen taxon must not have any childen. You need to move all childen to " +
+            "another taxon node in the TaxonNavigator before attempting to turn the accepted " +
+            "taxon into a synonym.";
+    public static final String RELATED_EDITOR_NOT_CLOSED_MESSAGE = "Could not close related taxon name editor. " +
+            "Please close it manually and try again.";
+    public static final String SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE = "Selected object is not a taxon tree node";
+    public static final String UNSAVED_CHANGES_MESSAGE = "There are unsaved changes in the source taxon. Please save first.";
+
+
+
+}
index 289d9d1b99596249b0fc4da64faf594532475e2a..842f9a8c6fb0b43ff0cf68a2cc98fac3f1957b10 100644 (file)
@@ -17,6 +17,7 @@ import java.util.Set;
 import java.util.UUID;
 
 import org.apache.log4j.Logger;
+import org.eclipse.core.commands.operations.AbstractOperation;
 import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
@@ -37,6 +38,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
@@ -195,9 +197,14 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                return Status.CANCEL_STATUS;
                        }
 
-                       AbstractPostOperation operation = new MoveTaxonOperation
-                                       ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, true);
-                       NavigationUtil.executeOperation(operation);
+                       if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                           AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, true);
+                           NavigationUtil.executeOperation(operation, null);
+                       } else {
+                           AbstractPostOperation operation = new MoveTaxonOperation
+                                   ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, true);
+                           NavigationUtil.executeOperation(operation);
+            }
 
                        logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                        return Status.OK_STATUS;
@@ -213,9 +220,14 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                        return Status.CANCEL_STATUS;
                                }
 
-                               AbstractPostOperation operation = new MoveTaxonOperation
-                                               ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, true);
-                               NavigationUtil.executeOperation(operation);
+                               if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                                   AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, true);
+                                   NavigationUtil.executeOperation(operation, null);
+                               } else {
+                                   AbstractPostOperation operation = new MoveTaxonOperation
+                                           ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, true);
+                                   NavigationUtil.executeOperation(operation);
+                               }
 
                                logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                                return Status.OK_STATUS;
@@ -226,10 +238,15 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                        return Status.CANCEL_STATUS;
                                }
                                TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
-                               AbstractPostOperation operation = new MoveTaxonOperation
-                                               ("Move Taxon", workspaceUndoContext, uuids, targetNode.getParent(), this, taxonNavigator, false);
-                               NavigationUtil.executeOperation(operation);
 
+                               if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                                   AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, targetNode.getParent(), true);
+                                   NavigationUtil.executeOperation(operation, null);
+                               } else {
+                                   AbstractPostOperation operation = new MoveTaxonOperation
+                                           ("Move Taxon", workspaceUndoContext, uuids, targetNode.getParent(), this, taxonNavigator, false);
+                                   NavigationUtil.executeOperation(operation);
+                               }
                                logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                                return Status.OK_STATUS;
                        } else{
index 3763adc75f9daa0fa9295d72c26fe8ea89f4f38e..f79c91facdce45f3236ed2b7dcac8c44e80b4125 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.navigation.navigator.handler;
 
@@ -11,33 +11,25 @@ import java.util.Set;
 import java.util.UUID;
 
 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.core.commands.IHandler;
 import org.eclipse.core.commands.common.NotDefinedException;
-import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
-import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
 import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
-import eu.etaxonomy.taxeditor.editor.Page;
-import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.ChangeAcceptedTaxonToSynonymOperation;
-import eu.etaxonomy.taxeditor.navigation.navigator.operation.DeleteOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
@@ -57,14 +49,15 @@ public class ChangeAcceptedTaxonToSynonymHandler extends DeleteHandler
 
        private UUID newAcceptedTaxonNodeUuid;
        private TaxonNameEditor editor;
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        /** {@inheritDoc} */
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               
-               
+       @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+
+
                 activePage = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
 
                taxonNavigator = NavigationUtil.showNavigator();
@@ -73,8 +66,8 @@ public class ChangeAcceptedTaxonToSynonymHandler extends DeleteHandler
 
                String plural = selection.size() > 1 ? "s" : "";
                // Prompt user for confirmation
-               
-               
+
+
 
                Iterator selectionIterator = selection.iterator();
                Set<ITaxonTreeNode> treeNodes = new HashSet<ITaxonTreeNode>();
@@ -94,50 +87,55 @@ public class ChangeAcceptedTaxonToSynonymHandler extends DeleteHandler
                AbstractPostOperation operation = null;
                if (treeNodes.size() == 1 ){
                        try {
-                               
+
                                ITaxonTreeNode treeNode = treeNodes.iterator().next();
                                ITaxonTreeNode oldAcceptedTaxonNode =treeNode;
-                               
+
                                // check if taxon has no children
                                if(((TaxonNode)oldAcceptedTaxonNode).getCountChildren() > 0) {
-                                       MessagingUtils.warningDialog("Prerequisite not met", this, 
+                                       MessagingUtils.warningDialog("Prerequisite not met", this,
                                                        "The accepted taxon must not have any childen. You need to move all childen to " +
                                                        "another taxon node in the TaxonNavigator before attempting to turn the accepted " +
                                                        "taxon into a synonym.");
                                        return null;
                                }
                                /*if(((TaxonNode)oldAcceptedTaxonNode).getTaxon().hasSynonyms()) {
-                                       EditorUtil.warningDialog("Prerequisite not met", this, 
+                                       EditorUtil.warningDialog("Prerequisite not met", this,
                                                        "The accepted taxon must not have any synonyms. You need to move all synonyms to " +
                                                        "another taxon before attempting to turn the accepted " +
                                                        "taxon into a synonym.");
                                        return null;
                                }*/
-                               
+
                                List<UUID> excludeTaxa = new ArrayList<UUID>();
                                excludeTaxa.add(oldAcceptedTaxonNode.getUuid());
-                               TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), 
-                                               taxonNavigator.getConversationHolder(), 
-                                               "Choose the accepted taxon", 
-                                               excludeTaxa, 
-                                               null, 
-                                               ((TaxonNode)oldAcceptedTaxonNode).getClassification());                 
+                               TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
+                                               taxonNavigator.getConversationHolder(),
+                                               "Choose the accepted taxon",
+                                               excludeTaxa,
+                                               null,
+                                               ((TaxonNode)oldAcceptedTaxonNode).getClassification());
 
                                if (newAcceptedTaxonNode == null) {
                                        return null;
                                }
-       
+
                                if (allEditorsClosed){
-                                       
-                                               operation = new ChangeAcceptedTaxonToSynonymOperation(event.getCommand().getName(), NavigationUtil.getUndoContext(), oldAcceptedTaxonNode, newAcceptedTaxonNode,
-                                                               taxonNavigator, taxonNavigator);
-                       
+
+                                               operation = new ChangeAcceptedTaxonToSynonymOperation(event.getCommand().getName(),
+                                                       NavigationUtil.getUndoContext(),
+                                                       oldAcceptedTaxonNode,
+                                                       newAcceptedTaxonNode,
+                                                               taxonNavigator,
+                                                               taxonNavigator,
+                                                               taxonNavigator);
+
                                                NavigationUtil.executeOperation(operation);
                                                //}
                                }
-       
-               
-       
+
+
+
                        } catch (NotDefinedException e) {
                                MessagingUtils.warn(getClass(), "Command name not set");
                        }
@@ -146,22 +144,24 @@ public class ChangeAcceptedTaxonToSynonymHandler extends DeleteHandler
                                return null;
                        }
                }
-               
-               
+
+
                return null;
-               
+
        }
 
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.operations.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
         */
        /** {@inheritDoc} */
-       public boolean postOperation(CdmBase objectAffectedByOperation) {
+       @Override
+    public boolean postOperation(CdmBase objectAffectedByOperation) {
                Display.getDefault().asyncExec(new Runnable(){
 
-                       public void run() {
+                       @Override
+            public void run() {
                                EditorUtil.close(editor.getMultiPageTaxonEditor());
-                               
+
                                try {
                                        MultiPageTaxonEditor possibleOpenEditor = (MultiPageTaxonEditor) EditorUtil.findEditorByTaxonNodeUuid(newAcceptedTaxonNodeUuid);
                                        if(possibleOpenEditor != null){
@@ -175,10 +175,10 @@ public class ChangeAcceptedTaxonToSynonymHandler extends DeleteHandler
                                        MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
                                }
                        }
-                       
+
                });
-               
-               
+
+
                return true;
        }
 
@@ -187,8 +187,9 @@ public class ChangeAcceptedTaxonToSynonymHandler extends DeleteHandler
         *
         * @return a boolean.
         */
-       public boolean onComplete() {
+       @Override
+    public boolean onComplete() {
                // TODO Auto-generated method stub
                return false;
-       }       
+       }
 }
index 157286a6407cbbbd9804c722da8ad884e9f00f41..ecbc76b929bcf8b837d4c8bc0fced02405984fb6 100644 (file)
@@ -34,7 +34,6 @@ import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
@@ -64,6 +63,12 @@ public class DeleteHandler extends AbstractHandler{
 
                TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
 
+
+               String plural = selection.size() > 1 ? "s" : "";
+               // Prompt user for confirmation
+
+
+
                Iterator selectionIterator = selection.iterator();
                Set<ITaxonTreeNode> treeNodes = new HashSet<ITaxonTreeNode>();
 
@@ -137,11 +142,17 @@ public class DeleteHandler extends AbstractHandler{
                                        /*if(! MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the selected nodes?")){
                                                return null;
                                        }*/
-                                               operation = new DeleteOperation(
-                                                               event.getCommand().getName(), NavigationUtil.getUndoContext(),
-                                                               taxonNode, config, taxonNavigator, taxonNavigator);
 
-                                               AbstractUtility.executeOperation(operation);
+                                               operation = new DeleteOperation(event.getCommand().getName(),
+                                                       NavigationUtil.getUndoContext(),
+                                                               taxonNode,
+                                                               config,
+                                                               taxonNavigator,
+                                                               taxonNavigator,
+                                                               taxonNavigator);
+
+                                               NavigationUtil.executeOperation(operation);
+
                                                //}
                                }
 
@@ -158,11 +169,17 @@ public class DeleteHandler extends AbstractHandler{
                                        return null;
                                }
                                if (allEditorsClosed){
-                                       operation = new DeleteOperation(
-                                                       event.getCommand().getName(), NavigationUtil.getUndoContext(),
-                                                       treeNodes, new TaxonDeletionConfigurator(), taxonNavigator, taxonNavigator);
 
-                                       AbstractUtility.executeOperation(operation);
+                                       operation = new DeleteOperation(event.getCommand().getName(),
+                                               NavigationUtil.getUndoContext(),
+                                                       treeNodes,
+                                                       new TaxonDeletionConfigurator(),
+                                                       taxonNavigator,
+                                                       taxonNavigator,
+                                                       taxonNavigator);
+
+                                       NavigationUtil.executeOperation(operation);
+
                                }
                        }catch (NotDefinedException e) {
                                MessagingUtils.warn(getClass(), "Command name not set");
index d89a11fda672cc994a353abcbc617d7d0460bee3..9810418ca26bf8fbf9f4d0346f609b2398665922 100644 (file)
@@ -4,7 +4,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
 
-import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
@@ -21,10 +20,6 @@ import eu.etaxonomy.cdm.api.service.IDescriptionService;
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
-import eu.etaxonomy.cdm.model.common.Annotation;
-import eu.etaxonomy.cdm.model.common.AnnotationType;
-import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
@@ -69,8 +64,8 @@ public class MoveFactualDataHandler extends AbstractHandler {
                             navigator.getConversationHolder(),
                             "Choose the accepted taxon",
                             excludeTaxa,
-                            null,
-                            null);
+                            sourceTaxonNode,
+                            sourceTaxonNode.getClassification());
                     if (dialogTaxonNode == null) {
                         return null;
                     }
@@ -81,26 +76,10 @@ public class MoveFactualDataHandler extends AbstractHandler {
                                 "changes in the target taxon. Please save first.");
                         return null;
                     }
-                    for(TaxonDescription description : taxon.getDescriptions()){
-                        //reload to avoid session conflicts
-                        description = HibernateProxyHelper.deproxy(CdmStore.getService(IDescriptionService.class).load(description.getUuid()), TaxonDescription.class);
+                    CdmStore.getService(IDescriptionService.class).moveTaxonDescriptions(taxon.getUuid(),targetTaxonNode.getTaxon().getUuid());
 
-                        String moveMessage = String.format("Description moved from %s", taxon);
-                        if(description.isProtectedTitleCache()){
-                            String separator = "";
-                            if(!StringUtils.isBlank(description.getTitleCache())){
-                                separator = " - ";
-                            }
-                            description.setTitleCache(description.getTitleCache() + separator + moveMessage, true);
-                        }
-                        Annotation annotation = Annotation.NewInstance(moveMessage, Language.getDefaultLanguage());
-                        annotation.setAnnotationType(AnnotationType.TECHNICAL());
-                        description.addAnnotation(annotation);
-                        targetTaxonNode.getTaxon().addDescription(description);
-                        CdmStore.getService(IDescriptionService.class).saveOrUpdate(description);
-                        navigator.getConversationHolder().bind();
-                        navigator.getConversationHolder().commit();
-                    }
+                    navigator.getConversationHolder().bind();
+                    navigator.getConversationHolder().commit();
 
                     Display.getDefault().asyncExec(new Runnable(){
 
index a761433ad4462b238d487c9d39d809ea973cc21b..9cc52f1b9aed1428ce1abe5a31e40e07d89ba19e 100644 (file)
@@ -26,6 +26,7 @@ import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
@@ -84,14 +85,15 @@ public class MoveTaxonHandler extends AbstractHandler implements IPostOperationE
 
 //             TaxonNode taxonNode = (TaxonNode) selection.getFirstElement();
                if (taxonNodes.size() >= 1){
+                   Classification classification = taxonNodes.iterator().next().getClassification();
                        boolean moveToNewParent = true;
                        if (PreferencesUtil.getSortNodesNaturally()){
                                if(!MessageDialog.openQuestion(null, "Target node", "The choosen target node should be the parent?")){
                                        moveToNewParent = false;
                                }
-                               parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), "Choose the taxon above the moved taxon.", excludeTaxa, null, null);
+                               parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), "Choose the taxon above the moved taxon.", excludeTaxa, null, classification);
                        }else{
-                               parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), "Choose new parent", excludeTaxa, null, null);
+                               parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), "Choose new parent", excludeTaxa, null, classification);
                        }
                        if(parentTaxonNode != null){
                                if(NavigationUtil.isDirty(parentTaxonNode)){
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/NavigatorHandlerUtils.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/NavigatorHandlerUtils.java
new file mode 100644 (file)
index 0000000..3b1eae7
--- /dev/null
@@ -0,0 +1,55 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.navigator.handler;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.model.common.ITreeNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+
+/**
+ * @author cmathew
+ * @date 16 Jun 2015
+ *
+ */
+public class NavigatorHandlerUtils {
+
+    protected static boolean closeObsoleteEditor(ExecutionEvent event, TaxonNode taxonNode){
+        IWorkbenchPage activePage = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
+        boolean result = true;
+        for (IEditorReference ref : activePage.getEditorReferences()) {
+            try {
+                String treeIndex = ((ITreeNode)taxonNode).treeIndex();
+
+
+                IEditorInput input = ref.getEditorInput();
+                if (input instanceof TaxonEditorInput) {
+                    TaxonNode node = ((TaxonEditorInput) input).getTaxonNode();
+                    //if node is a child of taxonNode then close the editor
+                    if( ((ITreeNode) node).treeIndex().startsWith(treeIndex)){
+                    //if (taxonNode.equals(node)) {
+                        result &= activePage.closeEditor(ref.getEditor(false), true);
+
+                    }
+                }
+            } catch (PartInitException e) {
+                continue;
+            }
+        }
+        return result;
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingChangeAcceptedTaxonToSynonymHandler.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingChangeAcceptedTaxonToSynonymHandler.java
new file mode 100644 (file)
index 0000000..a42c6df
--- /dev/null
@@ -0,0 +1,133 @@
+/**
+ *
+ */
+package eu.etaxonomy.taxeditor.navigation.navigator.handler;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingChangeAcceptedTaxonToSynonymOperation;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
+
+/**
+ * <p>ChangeAcceptedTaxonToSynonymHandler class.</p>
+ *
+ * @author n.hoffmann
+ * @created Jan 4, 2010
+ * @version 1.0
+ */
+public class RemotingChangeAcceptedTaxonToSynonymHandler extends RemotingCdmHandler {
+
+    private static final Logger logger = Logger
+            .getLogger(RemotingChangeAcceptedTaxonToSynonymHandler.class);
+
+
+    private ITaxonTreeNode oldTaxonNode;
+
+       /**
+     * @param label
+     */
+    public RemotingChangeAcceptedTaxonToSynonymHandler() {
+        super(TaxonNavigatorLabels.CHANGE_ACCEPTED_TAXON_TO_SYNONYM_LABEL);
+    }
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#allowOperations(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public IStatus allowOperations(ExecutionEvent event) {
+        TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
+        // check that only a single taxon tree node has been selected
+        if(selection.size() > 1) {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.SINGLE_TAXON_SELECTION_MESSAGE);
+        }
+
+        // check for no taxon tree node selected
+        if(selection.size() == 0) {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
+        }
+
+        // check that selected object is a taxon node
+        Object obj = selection.iterator().next();
+        if(obj instanceof ITaxonTreeNode) {
+            oldTaxonNode = (ITaxonTreeNode)obj;
+        } else {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
+        }
+        // check that the source taxon node does not have children
+        if(((TaxonNode)oldTaxonNode).getCountChildren() > 0) {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.SOURCE_TAXON_HAS_CHILDREN_MESSAGE);
+
+        }
+
+        // check if corresponding name editor is closed
+        boolean editorClosed = NavigatorHandlerUtils.closeObsoleteEditor(event, (TaxonNode) oldTaxonNode);
+        if(editorClosed != true) {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.RELATED_EDITOR_NOT_CLOSED_MESSAGE);
+        }
+
+        return Status.OK_STATUS;
+    }
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#doOperations(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public AbstractOperation prepareOperation(ExecutionEvent event) {
+        List<UUID> excludeTaxa = new ArrayList<UUID>();
+        excludeTaxa.add(oldTaxonNode.getUuid());
+        TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
+                new ConversationHolderMock(),
+                "Choose the accepted taxon",
+                excludeTaxa,
+                null,
+                ((TaxonNode)oldTaxonNode).getClassification());
+
+        if (newAcceptedTaxonNode == null) {
+            return null;
+        }
+
+        RemotingChangeAcceptedTaxonToSynonymOperation rcattso =
+                new RemotingChangeAcceptedTaxonToSynonymOperation(event.getTrigger(),
+                        false,
+                        oldTaxonNode.getUuid(),
+                        newAcceptedTaxonNode.getUuid());
+
+        return rcattso;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public void onComplete() {
+        // TODO Auto-generated method stub
+
+    }
+
+
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingDeleteTaxonNodeHandler.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingDeleteTaxonNodeHandler.java
new file mode 100644 (file)
index 0000000..236dd72
--- /dev/null
@@ -0,0 +1,153 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.navigation.navigator.handler;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
+import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator;
+import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator.ChildHandling;
+import eu.etaxonomy.cdm.model.taxon.Classification;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingDeleteTaxonNodeOperation;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
+import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+
+/**
+ * @author cmathew
+ * @date 22 Jun 2015
+ *
+ */
+public class RemotingDeleteTaxonNodeHandler extends RemotingCdmHandler {
+
+    private TaxonDeletionConfigurator config;
+    private Set<ITaxonTreeNode> treeNodes;
+
+    /**
+     * @param label
+     */
+    public RemotingDeleteTaxonNodeHandler() {
+        super(TaxonNavigatorLabels.DELETE_TAXON_NODE_LABEL);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#allowOperations(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public IStatus allowOperations(ExecutionEvent event) {
+        TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
+
+        Iterator selectionIterator = selection.iterator();
+        treeNodes = new HashSet<ITaxonTreeNode>();
+
+        while (selectionIterator.hasNext()){
+            Object object = selectionIterator.next();
+            if(object instanceof ITaxonTreeNode) {
+                treeNodes.add((ITaxonTreeNode) object);
+            }
+        }
+        boolean allEditorsClosed = true;
+        IWorkbenchPage activePage = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
+        for (ITaxonTreeNode treeNode : treeNodes) {
+            if(treeNode instanceof TaxonNode) {
+                allEditorsClosed &= EditorUtil.closeObsoleteEditor((TaxonNode) treeNode, activePage);
+            }
+        }
+        if(!allEditorsClosed) {
+            return new Status(IStatus.WARNING,
+                    "unknown",
+                    TaxonNavigatorLabels.RELATED_EDITOR_NOT_CLOSED_MESSAGE);
+        }
+
+        config = new TaxonDeletionConfigurator();
+
+        if (treeNodes.size() == 1 ){
+
+            ITaxonTreeNode treeNode = treeNodes.iterator().next();
+            ITaxonTreeNode taxonNode = treeNode;
+            TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator();
+            if (taxonNode instanceof Classification && taxonNode.hasChildNodes()){
+                if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the classification? The tree has children, they will be deleted, too.")){
+                    return Status.CANCEL_STATUS;
+                }
+            } else if (taxonNode instanceof Classification && !taxonNode.hasChildNodes()){
+                if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the classification?")){
+                    return Status.CANCEL_STATUS;
+                }
+            } else {
+
+                if (taxonNode.hasChildNodes()){
+                    DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(
+                            config,
+                            HandlerUtil.getActiveShell(event),
+                            "Confirm Deletion",
+                            null,
+                            "Do you really want to delete the selected node? It has childnodes, they will be deleted, too.",
+                            MessageDialog.WARNING, new String[] { "Delete all children",
+                                "Move children to parent node", "Skip" }, 0);
+                    int result = dialog.open();
+
+                    if (result == 0){
+                        //delete all children
+                        configNodes.setChildHandling(ChildHandling.DELETE);
+                        config.setTaxonNodeConfig(configNodes);
+                    } else if (result == 1){
+                        //move children
+                        configNodes.setChildHandling(ChildHandling.MOVE_TO_PARENT);
+                        config.setTaxonNodeConfig(configNodes);
+                    } else if (result == 2){
+                        return Status.CANCEL_STATUS;
+                    }
+                } else{
+                    if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(configNodes, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the selected node?")){
+                        return Status.CANCEL_STATUS;
+                    }
+                    config.setTaxonNodeConfig(configNodes);
+                }
+            }
+        }
+        return Status.OK_STATUS;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#prepareOperation(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public AbstractOperation prepareOperation(ExecutionEvent event) {
+        return new RemotingDeleteTaxonNodeOperation(event.getTrigger(),
+                false,
+                treeNodes,
+                config);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete()
+     */
+    @Override
+    public void onComplete() {
+        // TODO Auto-generated method stub
+
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveFactualDataHandler.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveFactualDataHandler.java
new file mode 100644 (file)
index 0000000..f0fa3d9
--- /dev/null
@@ -0,0 +1,155 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.navigator.handler;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveFactualDataOperation;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
+
+/**
+ * @author cmathew
+ * @date 19 Jun 2015
+ *
+ */
+public class RemotingMoveFactualDataHandler extends RemotingCdmHandler {
+
+
+    private TaxonNode sourceTaxonNode;
+    private TaxonNode targetTaxonNode;
+    /**
+     * @param label
+     */
+    public RemotingMoveFactualDataHandler() {
+        super(TaxonNavigatorLabels.MOVE_FACTUAL_DATA_LABEL);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#allowOperations(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public IStatus allowOperations(ExecutionEvent event) {
+        TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
+        // check that only a single taxon tree node has been selected
+        if(selection.size() > 1) {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.SINGLE_TAXON_SELECTION_MESSAGE);
+        }
+
+        // check for no taxon tree node selected
+        if(selection.size() == 0) {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
+        }
+
+        // check that selected object is a taxon node
+        Object obj = selection.iterator().next();
+        if(obj instanceof ITaxonTreeNode) {
+            sourceTaxonNode = (TaxonNode)obj;
+        } else {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
+        }
+
+        if(NavigationUtil.isDirty(sourceTaxonNode)) {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.UNSAVED_CHANGES_MESSAGE);
+        }
+
+        List<UUID> excludeTaxa = new ArrayList<UUID>();
+        excludeTaxa.add(sourceTaxonNode.getTaxon().getUuid());
+
+        targetTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
+                new ConversationHolderMock(),
+                "Choose the accepted taxon",
+                excludeTaxa,
+                null,
+                null);
+
+        if(targetTaxonNode == null) {
+            return new Status(IStatus.CANCEL,
+                    "unknown",
+                    "");
+        }
+        if(NavigationUtil.isDirty(targetTaxonNode)){
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.UNSAVED_CHANGES_MESSAGE);
+        }
+        return Status.OK_STATUS;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#prepareOperation(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public AbstractOperation prepareOperation(ExecutionEvent event) {
+        return new RemotingMoveFactualDataOperation(event.getTrigger(),
+                false,
+                sourceTaxonNode.getTaxon().getUuid(),
+                targetTaxonNode.getTaxon().getUuid());
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete()
+     */
+    @Override
+    public void onComplete() {
+        Display.getDefault().asyncExec(new Runnable(){
+            @Override
+            public void run() {
+                try {
+                    //close and re-open to refresh factual data view
+                    MultiPageTaxonEditor sourceEditor = (MultiPageTaxonEditor) EditorUtil.findEditorByTaxonNodeUuid(sourceTaxonNode.getUuid());
+                    MultiPageTaxonEditor targetEditor = (MultiPageTaxonEditor) EditorUtil.findEditorByTaxonNodeUuid(targetTaxonNode.getUuid());
+                    if(targetEditor != null){
+                        AbstractUtility.close(sourceEditor);
+                        AbstractUtility.close(targetEditor);
+                    }
+                    EditorUtil.openTaxonNode(sourceTaxonNode.getUuid());
+                    EditorUtil.openTaxonNode(targetTaxonNode.getUuid());
+                } catch (PartInitException e) {
+                    MessagingUtils.error(this.getClass(), e);
+                    throw new RuntimeException(e);
+                } catch (Exception e) {
+                    MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+                }
+            }
+
+        });
+
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveTaxonNodeHandler.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveTaxonNodeHandler.java
new file mode 100644 (file)
index 0000000..2882118
--- /dev/null
@@ -0,0 +1,139 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.navigation.navigator.handler;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveTaxonOperation;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
+
+/**
+ * @author cmathew
+ * @date 19 Jun 2015
+ *
+ */
+public class RemotingMoveTaxonNodeHandler extends RemotingCdmHandler {
+
+    private TaxonNode oldTaxonNode;
+
+    public RemotingMoveTaxonNodeHandler() {
+        super(TaxonNavigatorLabels.MOVE_TAXON_LABEL);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#allowOperations(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public IStatus allowOperations(ExecutionEvent event) {
+        TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
+        // check that only a single taxon tree node has been selected
+        if(selection.size() > 1) {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.SINGLE_TAXON_SELECTION_MESSAGE);
+        }
+
+        // check for no taxon tree node selected
+        if(selection.size() == 0) {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
+        }
+        // check that selected object is a taxon node
+        Object obj = selection.iterator().next();
+        if(obj instanceof TaxonNode) {
+            oldTaxonNode = (TaxonNode)obj;
+        } else {
+            return new Status(IStatus.ERROR,
+                    "unknown",
+                    TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
+        }
+        return Status.OK_STATUS;
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#prepareOperation(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public AbstractOperation prepareOperation(ExecutionEvent event) {
+        Shell activeShell = HandlerUtil.getActiveShell(event);
+        TaxonNode parentTaxonNode;
+
+        List<UUID> excludeTaxa = new ArrayList<UUID>();
+        excludeTaxa.add(oldTaxonNode.getUuid());
+
+        boolean moveToNewParent = true;
+
+        if (PreferencesUtil.getSortNodesNaturally()){
+            if(!MessageDialog.openQuestion(activeShell, "Target node", "The choosen target node should be the parent?")){
+                moveToNewParent = false;
+            }
+            parentTaxonNode = TaxonNodeSelectionDialog.select(activeShell,
+                    new ConversationHolderMock(),
+                    "Choose the taxon above the moved taxon.",
+                    excludeTaxa,
+                    null,
+                    null);
+        } else {
+            parentTaxonNode = TaxonNodeSelectionDialog.select(activeShell,
+                    new ConversationHolderMock(),
+                    "Choose new parent",
+                    excludeTaxa,
+                    null,
+                    null);
+        }
+
+
+        if(parentTaxonNode != null){
+            if(NavigationUtil.isDirty(parentTaxonNode)){
+                MessageDialog.openWarning(activeShell,
+                        "Unsaved Parent Taxon",
+                        "There are unsaved changes in the parent taxon. Please save first.");
+                return null;
+            }
+
+            return new RemotingMoveTaxonOperation(event.getTrigger(),
+                    false,
+                    oldTaxonNode.getUuid(),
+                    parentTaxonNode.getUuid(),
+                    moveToNewParent);
+        }
+
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete()
+     */
+    @Override
+    public void onComplete() {
+        // TODO Auto-generated method stub
+
+    }
+
+}
index d427aba71bd754b2a18d9a692abc93f17731c612..d06bfba63c176450d12982e12bf6f15a814df443 100644 (file)
@@ -18,8 +18,8 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
-import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
@@ -28,6 +28,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -41,6 +42,8 @@ public class ChangeAcceptedTaxonToSynonymOperation extends
        DeleteOperation {
 
        private final TaxonNode newAcceptedTaxonNode;
+       private final ICdmEntitySessionEnabled cdmEntitySessionEnabled;
+
 
        //private TaxonNode oldTaxonNode;
 
@@ -55,10 +58,15 @@ public class ChangeAcceptedTaxonToSynonymOperation extends
         * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
         */
        public ChangeAcceptedTaxonToSynonymOperation(String label,
-                       IUndoContext undoContext, ITaxonTreeNode oldTaxonNode, TaxonNode newAcceptedTaxonNode,
-                       IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled) {
-               super(label, undoContext, oldTaxonNode, new TaxonDeletionConfigurator(),postOperationEnabled, conversationEnabled);
+                       IUndoContext undoContext,
+                       ITaxonTreeNode oldTaxonNode,
+                       TaxonNode newAcceptedTaxonNode,
+                       IPostOperationEnabled postOperationEnabled,
+                       IConversationEnabled conversationEnabled,
+            ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, oldTaxonNode, new TaxonDeletionConfigurator(),postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
                this.newAcceptedTaxonNode = newAcceptedTaxonNode;
+               this.cdmEntitySessionEnabled = cdmEntitySessionEnabled;
        }
 
 
@@ -72,11 +80,13 @@ public class ChangeAcceptedTaxonToSynonymOperation extends
 
                monitor.worked(20);
                bind();
+
        Taxon oldTaxon = HibernateProxyHelper.deproxy(((TaxonNode) taxonNode).getTaxon(), Taxon.class);
        Taxon newAcceptedTaxon = HibernateProxyHelper.deproxy(newAcceptedTaxonNode.getTaxon(), Taxon.class);
 
                try {
-                   DeleteResult result = CdmStore.getService(ITaxonNodeService.class).makeTaxonNodeASynonymOfAnotherTaxonNode((TaxonNode) taxonNode, newAcceptedTaxonNode, null, null, null);
+                   UpdateResult result = CdmStore.getService(ITaxonNodeService.class).makeTaxonNodeASynonymOfAnotherTaxonNode(taxonNode.getUuid(), newAcceptedTaxonNode.getUuid(), null, null, null);
+
 
                    if (!result.getExceptions().isEmpty() && result.isOk()){
                        String separator = ", ";
index 5e78bd2ddb6ff8da75c17075ec28f1443afec236..a2fea97595d44cac993dbb5498591d26fc726f81 100644 (file)
@@ -1,16 +1,18 @@
 // $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.
-*/
+ * 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.navigation.navigator.operation;
 
+import java.util.HashSet;
 import java.util.Set;
+import java.util.UUID;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.operations.IUndoContext;
@@ -29,9 +31,9 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -43,45 +45,51 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class DeleteOperation extends AbstractPersistentPostOperation{
 
-       private Set<ITaxonTreeNode> treeNodes;
-       protected final TaxonDeletionConfigurator config;
+    private Set<ITaxonTreeNode> treeNodes;
+    protected final TaxonDeletionConfigurator config;
+    private final ICdmEntitySessionEnabled cdmEntitySessionEnabled;
+
+    /**
+     * <p>Constructor for DeleteTreeNodeOperation.</p>
+     *
+     * @param label a {@link java.lang.String} object.
+     * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+     * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
+     * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
+     * @param treeNodes a {@link java.util.Set} object.
+     */
+    public DeleteOperation(String label, IUndoContext undoContext,
+            ITaxonTreeNode taxonNode, TaxonDeletionConfigurator config,
+            IPostOperationEnabled postOperationEnabled,
+            IConversationEnabled conversationEnabled,
+            ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+        super(label, undoContext, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
+        this.taxonNode = (ITaxonTreeNode)CdmBase.deproxy(taxonNode, CdmBase.class);
+        this.config = config;
+        this.cdmEntitySessionEnabled = cdmEntitySessionEnabled;
+    }
+
+    /**
+     * <p>Constructor for DeleteTreeNodeOperation.</p>
+     *
+     * @param label a {@link java.lang.String} object.
+     * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+     * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
+     * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
+     * @param treeNodes a {@link java.util.Set} object.
+     */
+    public DeleteOperation(String label, IUndoContext undoContext,
+            Set<ITaxonTreeNode> treeNodes, TaxonDeletionConfigurator config,
+            IPostOperationEnabled postOperationEnabled,
+            IConversationEnabled conversationEnabled,
+            ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+        super(label, undoContext, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
+        this.treeNodes = treeNodes;
+        this.config = config;
+        this.cdmEntitySessionEnabled = cdmEntitySessionEnabled;
+    }
 
 
-       /**
-        * <p>Constructor for DeleteTreeNodeOperation.</p>
-        *
-        * @param label a {@link java.lang.String} object.
-        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
-        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
-        * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
-        * @param treeNodes a {@link java.util.Set} object.
-        */
-       public DeleteOperation(String label, IUndoContext undoContext,
-                       ITaxonTreeNode taxonNode, TaxonDeletionConfigurator config,
-                       IPostOperationEnabled postOperationEnabled,
-                       IConversationEnabled conversationEnabled) {
-               super(label, undoContext, postOperationEnabled, conversationEnabled);
-               this.taxonNode = (ITaxonTreeNode)CdmBase.deproxy(taxonNode, CdmBase.class);
-               this.config = config;
-       }
-
-       /**
-        * <p>Constructor for DeleteTreeNodeOperation.</p>
-        *
-        * @param label a {@link java.lang.String} object.
-        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
-        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
-        * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
-        * @param treeNodes a {@link java.util.Set} object.
-        */
-       public DeleteOperation(String label, IUndoContext undoContext,
-                       Set<ITaxonTreeNode> treeNodes, TaxonDeletionConfigurator config,
-                       IPostOperationEnabled postOperationEnabled,
-                       IConversationEnabled conversationEnabled) {
-               super(label, undoContext, postOperationEnabled, conversationEnabled);
-               this.treeNodes = treeNodes;
-               this.config = config;
-       }
 
 
        /* (non-Javadoc)
@@ -108,76 +116,61 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
                                } else if (!result.getExceptions().isEmpty()){
                                        String separator = ", ";
                                    String exceptionString = "";
-                                   int count = 1;
                                    for (Exception exception : result.getExceptions()) {
-                                       exceptionString += exception.getLocalizedMessage();
-                                       if (count < result.getExceptions().size()){
-                                           exceptionString += separator;
-                                       }
+                                   exceptionString += exception.getLocalizedMessage()+separator;
                                }
-                                       MessagingUtils.informationDialog("Delete of the node was successful but the taxon could not be deleted.", exceptionString);
+                                       MessageDialog.openInformation(null, "Delete of the node was successful but the taxon could not be deleted.", exceptionString);
                                }
 
 
                        }else if(taxonNode != null && taxonNode instanceof Classification){
                                Classification taxonomicTree = (Classification) taxonNode;
-                               /*if(taxonomicTree.hasChildNodes()){
-                                       if(! MessageDialog.openConfirm(null, "Confirm Deletion", "The selected tree has children, do yu realy want to delete the whole tree with its children?")){
-                                               return null;
-                                       }
-                               }*/
 
-                               DeleteResult result = CdmStore.getService(IClassificationService.class).delete(taxonomicTree);
-                               if (result.isError() && !result.getExceptions().isEmpty()){
-                                   String separator = ", ";
-                    String exceptionString = "";
-                    for (Exception exception : result.getExceptions()) {
-                        exceptionString += exception.getLocalizedMessage()+separator;
-                    }
-                                   MessagingUtils.error(null, exceptionString, result.getExceptions().iterator().next());
-                               }
-
-                               /*}else{
-                                       try{
-                                       CdmStore.getService(IClassificationService.class).delete(taxonomicTree);
-                                       }catch(ReferencedObjectUndeletableException e){
-                                               throw new ExecutionException(e.getMessage());
-                                       }
-                               }*/
-                       } else {
-
-                               DeleteResult result =service.deleteTaxonNodes(treeNodes, config);
-                               if (result.isError() && !result.getExceptions().isEmpty()){
-                                   String separator = ", ";
-                    String exceptionString = "";
-                    for (Exception exception : result.getExceptions()) {
-                        exceptionString += exception.getLocalizedMessage()+separator;
-                    }
-                    MessagingUtils.error(null, exceptionString, result.getExceptions().iterator().next());
-                               }
+                               DeleteResult result = CdmStore.getService(IClassificationService.class).delete(taxonomicTree.getUuid());
+                if (result.isError() && !result.getExceptions().isEmpty()){
+                    //TODO:Error message!
+                    MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
+                }
+        } else {
+            Set<UUID> treeNodeUuids = new HashSet<UUID>();
+            ITaxonTreeNode entity = null;
+            for(ITaxonTreeNode treeNode : treeNodes) {
+                if(entity == null) {
+                    entity = treeNode;
+                }
+                treeNodeUuids.add(treeNode.getUuid());
+            }
+
+            DeleteResult result = service.deleteTaxonNodes(treeNodeUuids, config);
+            if (result.isError() && !result.getExceptions().isEmpty()){
+                               //TODO:Error message!
+                               MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
                        }
 
-               monitor.worked(40);
-               return postExecute(null);
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public IStatus redo(IProgressMonitor monitor, IAdaptable info)
-                       throws ExecutionException {
-               return null;
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public IStatus undo(IProgressMonitor monitor, IAdaptable info)
-                       throws ExecutionException {
-               return null;
-       }
+        }
+
+        monitor.worked(40);
+
+        return postExecute(null);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    /** {@inheritDoc} */
+    @Override
+    public IStatus redo(IProgressMonitor monitor, IAdaptable info)
+            throws ExecutionException {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    /** {@inheritDoc} */
+    @Override
+    public IStatus undo(IProgressMonitor monitor, IAdaptable info)
+            throws ExecutionException {
+        return null;
+    }
 }
index 072fc2fb526ad56c2443f11c69ddb7e6076a0a46..f8ee6d9f1c14a154d3f68365a272f35419722711 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -21,6 +21,7 @@ import eu.etaxonomy.cdm.api.service.IClassificationService;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -31,7 +32,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @version 1.0
  */
 public class EditClassificationOperation extends AbstractPersistentPostOperation {
-       private Classification classification;
+       private final Classification classification;
 
        /**
         * <p>Constructor for EditTaxonomicTreeOperation.</p>
@@ -44,12 +45,13 @@ public class EditClassificationOperation extends AbstractPersistentPostOperation
         */
        public EditClassificationOperation(String label, IUndoContext undoContext, Classification classification,
                        IPostOperationEnabled postOperationEnabled,
-                       IConversationEnabled conversationEnabled) {
-               super(label, undoContext, postOperationEnabled, conversationEnabled);
-               
+                       IConversationEnabled conversationEnabled,
+            ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
+
                this.classification = classification;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
         */
@@ -58,13 +60,13 @@ public class EditClassificationOperation extends AbstractPersistentPostOperation
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
                bind();
-               
+
                CdmStore.getService(IClassificationService.class).save(classification);
-               
+
                monitor.worked(40);
 
                return postExecute(classification);
-               
+
        }
 
        /* (non-Javadoc)
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingChangeAcceptedTaxonToSynonymOperation.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingChangeAcceptedTaxonToSynonymOperation.java
new file mode 100644 (file)
index 0000000..ac34629
--- /dev/null
@@ -0,0 +1,61 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.navigator.operation;
+
+import java.util.UUID;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
+
+
+/**
+ * @author cmathew
+ * @date 17 Jun 2015
+ *
+ */
+public class RemotingChangeAcceptedTaxonToSynonymOperation extends RemotingCdmUpdateOperation {
+
+    private final UUID oldTaxonNodeUuid;
+    private final UUID newAcceptedTaxonNodeUuid;
+
+
+    private final static String LABEL = "Change Accepted Taxon to Synonym operation";
+
+    /**
+     * @param label
+     */
+    public RemotingChangeAcceptedTaxonToSynonymOperation(Object source,
+            boolean async,
+            UUID oldTaxonNodeUuid,
+            UUID newAcceptedTaxonNodeUuid) {
+        super(LABEL, Action.Update, source, async);
+        this.oldTaxonNodeUuid = oldTaxonNodeUuid;
+        this.newAcceptedTaxonNodeUuid = newAcceptedTaxonNodeUuid;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    @Override
+    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
+        return CdmApplicationState.getService(ITaxonNodeService.class).makeTaxonNodeASynonymOfAnotherTaxonNode(oldTaxonNodeUuid,
+                newAcceptedTaxonNodeUuid,
+                null,
+                null,
+                null);
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingDeleteTaxonNodeOperation.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingDeleteTaxonNodeOperation.java
new file mode 100644 (file)
index 0000000..4fefa62
--- /dev/null
@@ -0,0 +1,87 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.navigator.operation;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.UUID;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
+import eu.etaxonomy.cdm.model.taxon.Classification;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
+
+/**
+ * @author cmathew
+ * @date 22 Jun 2015
+ *
+ */
+public class RemotingDeleteTaxonNodeOperation extends RemotingCdmUpdateOperation {
+
+    private final static String LABEL = "Delete Taxon Node operation";
+
+    private final Set<ITaxonTreeNode> treeNodes;
+    private final TaxonDeletionConfigurator config;
+
+    /**
+     * @param label
+     * @param action
+     * @param source
+     * @param async
+     */
+    public RemotingDeleteTaxonNodeOperation(Object source,
+            boolean async,
+            Set<ITaxonTreeNode> treeNodes,
+            TaxonDeletionConfigurator config) {
+        super(LABEL, Action.Delete, source, async);
+        this.treeNodes = treeNodes;
+        this.config = config;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    @Override
+    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
+
+
+        if(treeNodes.size() == 1) {
+            // when single node this is either a taxon or a classification
+            ITaxonTreeNode node = treeNodes.iterator().next();
+            if(node instanceof TaxonNode) {
+                return CdmApplicationState.getCurrentAppConfig().getTaxonNodeService().deleteTaxonNode(((TaxonNode)node).getUuid(), config);
+            } else if(node instanceof Classification) {
+                entityType = Classification.class;
+                return CdmApplicationState.getCurrentAppConfig().getClassificationService().delete(((Classification)node).getUuid());
+            }
+        } else {
+            // when list we assume all are taxon nodes
+            Set<UUID> treeNodeUuids = new HashSet<UUID>();
+            ITaxonTreeNode entity = null;
+            for(ITaxonTreeNode treeNode : treeNodes) {
+                if(entity == null) {
+                    entity = treeNode;
+                }
+                treeNodeUuids.add(treeNode.getUuid());
+            }
+
+            return CdmApplicationState.getCurrentAppConfig().getTaxonNodeService().deleteTaxonNodes(treeNodeUuids, new TaxonDeletionConfigurator());
+        }
+        return null;
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveFactualDataOperation.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveFactualDataOperation.java
new file mode 100644 (file)
index 0000000..15351e9
--- /dev/null
@@ -0,0 +1,59 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.navigator.operation;
+
+import java.util.UUID;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.service.IDescriptionService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
+
+/**
+ * @author cmathew
+ * @date 19 Jun 2015
+ *
+ */
+public class RemotingMoveFactualDataOperation extends RemotingCdmUpdateOperation {
+
+    private final static String LABEL = "Move Factual Data operation";
+
+    private final UUID sourceTaxonUuid;
+    private final UUID targetParentTaxonUuid;
+
+    /**
+     * @param label
+     * @param action
+     * @param source
+     * @param async
+     */
+    public RemotingMoveFactualDataOperation(Object source,
+            boolean async,
+            UUID sourceTaxonUuid,
+            UUID targetParentTaxonUuid) {
+        super(LABEL, Action.Update, source, async);
+        this.sourceTaxonUuid = sourceTaxonUuid;
+        this.targetParentTaxonUuid = targetParentTaxonUuid;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    @Override
+    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
+        return CdmApplicationState.getService(IDescriptionService.class).moveTaxonDescriptions(sourceTaxonUuid,
+                targetParentTaxonUuid);
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveTaxonOperation.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveTaxonOperation.java
new file mode 100644 (file)
index 0000000..65e5144
--- /dev/null
@@ -0,0 +1,83 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.navigation.navigator.operation;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.UUID;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
+
+/**
+ * @author cmathew
+ * @date 19 Jun 2015
+ *
+ */
+public class RemotingMoveTaxonOperation extends RemotingCdmUpdateOperation {
+
+    private final static String LABEL = "Move Taxon operation";
+
+    private Set<UUID> taxonNodesToMoveUuid;
+    private final UUID newParentTreeNodeUuid;
+    private final boolean moveToParentNode;
+
+    public RemotingMoveTaxonOperation(Object source,
+            boolean async,
+            UUID taxonNodeToMoveUuid,
+            UUID newParentTreeNodeUuid,
+            boolean moveToParentNode) {
+        super(LABEL, Action.Update, source,async);
+        taxonNodesToMoveUuid = new HashSet<UUID>();
+        taxonNodesToMoveUuid.add(taxonNodeToMoveUuid);
+        this.newParentTreeNodeUuid = newParentTreeNodeUuid;
+        this.moveToParentNode = moveToParentNode;
+    }
+
+    public RemotingMoveTaxonOperation(Object source,
+            boolean async,
+            TaxonNode taxonNodeToMove,
+            TaxonNode newParentTreeNode,
+            boolean moveToParentNode) {
+        super(LABEL, Action.Update, source,async);
+        taxonNodesToMoveUuid = new HashSet<UUID>();
+        taxonNodesToMoveUuid.add(taxonNodeToMove.getUuid());
+        this.newParentTreeNodeUuid = newParentTreeNode.getUuid();
+        this.moveToParentNode = moveToParentNode;
+    }
+
+    public RemotingMoveTaxonOperation(Object source,
+            boolean async,
+            Set<UUID> taxonNodesToMoveUuid,
+            TaxonNode newParentTreeNode,
+            boolean moveToParentNode) {
+        super(LABEL, Action.Update, source,async);
+        this.taxonNodesToMoveUuid = taxonNodesToMoveUuid;
+        this.newParentTreeNodeUuid = newParentTreeNode.getUuid();
+        this.moveToParentNode = moveToParentNode;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    @Override
+    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
+        return CdmApplicationState.getService(ITaxonNodeService.class).moveTaxonNodes(taxonNodesToMoveUuid,
+                newParentTreeNodeUuid);
+    }
+
+}
index 12c9d5548fad1aba909026ac100cb3f967e8c926..ea53a013928a74a8022c76ca106c8576c73f7841 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -23,6 +23,7 @@ import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -35,8 +36,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 @Deprecated // we do not undo creation of elements
 public class CreateClassification extends AbstractPersistentPostOperation {
 
-       private Classification classification;
-       
+       private final Classification classification;
+
        /**
         * <p>Constructor for SaveClassificationOperation.</p>
         *
@@ -48,13 +49,14 @@ public class CreateClassification extends AbstractPersistentPostOperation {
         */
        public CreateClassification(String label, IUndoContext undoContext, Classification classification,
                        IPostOperationEnabled postOperationEnabled,
-                       IConversationEnabled conversationEnabled) {
-               super(label, undoContext, postOperationEnabled, conversationEnabled);
-               
+                       IConversationEnabled conversationEnabled,
+                       ICdmEntitySessionEnabled cdmEntitiySessionEnabled) {
+               super(label, undoContext, postOperationEnabled, conversationEnabled, cdmEntitiySessionEnabled);
+
                this.classification = classification;
-               
+
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
         */
@@ -64,15 +66,15 @@ public class CreateClassification extends AbstractPersistentPostOperation {
                        throws ExecutionException {
                bind();
                monitor.worked(20);
-               
+
                if(classification.getReference() == null){
                        Reference reference = ReferenceFactory.newGeneric();
                        reference.setTitleCache(classification.getTitleCache());
                        classification.setReference(reference);
                }
-               
+
                CdmStore.getService(IClassificationService.class).saveOrUpdate(classification);
-               
+
                monitor.worked(40);
 
                return postExecute(classification);
index 293811bd11a655df8a4c995e6f8eb57d595afd8f..051f408b4790102dc16ce98ba1808bbfaee5f7dd 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -21,6 +21,7 @@ import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -31,7 +32,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 @Deprecated // we do not undo creation of elements
 public class CreatePolytomousKey extends AbstractPersistentPostOperation {
 
-       private PolytomousKey key;
+       private final PolytomousKey key;
 
        /**
         * @param label
@@ -43,8 +44,9 @@ public class CreatePolytomousKey extends AbstractPersistentPostOperation {
                        IUndoContext undoContext,
                        PolytomousKey key,
                        IPostOperationEnabled postOperationEnabled,
-                       IConversationEnabled conversationEnabled) {
-               super(label, undoContext, postOperationEnabled, conversationEnabled);
+                       IConversationEnabled conversationEnabled,
+                       ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
                this.key = key;
        }
 
@@ -58,7 +60,7 @@ public class CreatePolytomousKey extends AbstractPersistentPostOperation {
                monitor.worked(20);
                CdmStore.getService(IPolytomousKeyService.class).saveOrUpdate(key);
                monitor.worked(40);
-               
+
                return postExecute(key);
        }
 
index 8b391876f1be3125b2d7227c94cef08589b70b5d..495f009dc3a942b01143ef4d471268dbe7b48801 100644 (file)
@@ -26,6 +26,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -38,7 +39,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 @Deprecated // we do not undo creation of elements
 public class CreateTaxonNode extends AbstractPersistentPostOperation {
 
-       private Taxon newTaxon;
+       private final Taxon newTaxon;
 
        private TaxonNode childTaxonNode;
 
@@ -52,10 +53,13 @@ public class CreateTaxonNode extends AbstractPersistentPostOperation {
         * @param parentNode a {@link eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode} object.
         * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
         */
-       public CreateTaxonNode(String label, IUndoContext undoContext,
-               ITaxonTreeNode parentNode, TaxonNameBase<?, ?> name, IPostOperationEnabled postOperationEnabled,
-                       IConversationEnabled conversationEnabled) {
-               super(label, undoContext, parentNode, postOperationEnabled, conversationEnabled);
+       public CreateTaxonNode(String label,
+               IUndoContext undoContext,
+               ITaxonTreeNode parentNode, TaxonNameBase<?, ?> name,
+               IPostOperationEnabled postOperationEnabled,
+                       IConversationEnabled conversationEnabled,
+            ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, parentNode, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
 
                newTaxon = Taxon.NewInstance(name, null);
        }
@@ -70,10 +74,14 @@ public class CreateTaxonNode extends AbstractPersistentPostOperation {
         * @param parentNode a {@link eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode} object.
         * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
         */
-       public CreateTaxonNode(String label, IUndoContext undoContext,
-               ITaxonTreeNode parentNode, Taxon taxon, IPostOperationEnabled postOperationEnabled,
-                       IConversationEnabled conversationEnabled) {
-               super(label, undoContext, parentNode, postOperationEnabled, conversationEnabled);
+       public CreateTaxonNode(String label,
+               IUndoContext undoContext,
+               ITaxonTreeNode parentNode,
+               Taxon taxon,
+               IPostOperationEnabled postOperationEnabled,
+                       IConversationEnabled conversationEnabled,
+            ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, parentNode, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
 
                this.newTaxon = taxon;
        }
diff --git a/eu.etaxonomy.taxeditor.navigation/src/test/resources/log4j.properties b/eu.etaxonomy.taxeditor.navigation/src/test/resources/log4j.properties
deleted file mode 100644 (file)
index 10ed8e4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-### ************ APPENDER ***********************************###
-
-### direct log messages to stdout ###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-### direct messages to file hibernate.log ###
-log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.File=taxeditor.log
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-### ************* LOG LEVELS *********************************###
-
-### set log levels - for more verbose logging change 'info' to 'debug' ###
-### levels: error, warn, debug, info
-log4j.rootLogger=WARN, stdout
-
-### set directory-specific levels below
-
-### basic level for editor directory
-log4j.logger.eu.etaxonomy.taxeditor.editor = INFO, stdout 
-
-log4j.logger.eu.etaxonomy.taxeditor.editor.handler = INFO, stdout
-
-### log level for conversation handler
-#log4j.logger.eu.etaxonomy.cdm.api.application = DEBUG, stdout
index bb4cbcbe76bb59bf34705f0b3bc236898ab62501..b48e075d0ffc6be168cb4a095c49e4fe7f31d37c 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Printpublisher Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.printpublisher;singleton:=true
-Bundle-Version: 3.8.0.qualifier
+Bundle-Version: 3.12.0.qualifier
 Require-Bundle: org.eclipse.osgi,
  org.eclipse.ui,
  eu.etaxonomy.taxeditor.cdmlib,
index 4c2859ebb5d3ac23d6cd6209157b0ca3ca3bf4d4..c613a4a79f8dac7f2847fb349f5b73beb9dcb3ba 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <artifactId>taxeditor-parent</artifactId>
                <groupId>eu.etaxonomy</groupId>
-               <version>3.8.0-SNAPSHOT</version>
+               <version>3.12.0-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index e7a05f6b5bb0d40a6ed573d659b073264771eb28..c6f939078aa42c0bb528f4cefb4b2da78c0ee1c9 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: DataStore Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.store;singleton:=true
-Bundle-Version: 3.8.0.qualifier
+Bundle-Version: 3.12.0.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.cdm,
@@ -47,6 +47,7 @@ Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.ui.section.supplemental,
  eu.etaxonomy.taxeditor.ui.section.taxon,
  eu.etaxonomy.taxeditor.ui.selection,
+ eu.etaxonomy.taxeditor.util,
  eu.etaxonomy.taxeditor.view,
  eu.etaxonomy.taxeditor.view.datasource,
  eu.etaxonomy.taxeditor.view.datasource.handler,
@@ -84,7 +85,8 @@ Import-Package: org.eclipse.core.commands,
  org.eclipse.ui.editors.text,
  org.eclipse.ui.forms.widgets,
  org.eclipse.ui.ide.undo,
- org.osgi.framework
+ org.osgi.framework,
+ org.osgi.service.prefs;version="1.1.1"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ClassPath: .,
index 282c00b7f59e2e9acdefbabc7fa5d1932dbc577c..0521535061ed0b26a326b50a689c45036504c677 100644 (file)
@@ -16,7 +16,7 @@ LanguageEditorPreferencePage_PleaseRestart=Please Restart
 LanguageEditorPreferencePage_RestartRequired=After changing the default language, a restart is required,\nin order for the new settings to take effect.\r
 OrderPreferencePage_NewNavigatorWindowRequired=After changing the order of the taxon nodes, closing and reopen of the taxon navigator is required.\r
 OrderPreferencePage_PleaseReopenNavigator=Please close and reopen the taxon navigator.\r
-UriWithLabelElement_URL_NOT_SAVED=URL won't be saved\! \r
+UriWithLabelElement_URL_NOT_SAVED=URI won't be saved\! \r
 UriWithLabelElement_COULD_NOT_OPEN_BROWSER=Could not open external browser. URI is invalid.\r
 UriWithLabelElement_INVALID_URL=Invalid URI\r
 UriWithLabelElement_OPEN_EXTERNAL_BROWSER=Open in external browser\r
index f60b1dc309f846c8e9054a9a9728abd70233be1f..ea9b770aad255268fb8be303e02c0b378bdaf562 100644 (file)
@@ -15,7 +15,7 @@ LanguageEditorPreferencePage_EditorHasToRestart=Der Anwendung muss neu gestartet
 LanguageEditorPreferencePage_PleaseRestart=Bitte neu starten
 LanguageEditorPreferencePage_RestartRequired=Nach dem Wechsel der Standardsprache ist ein Neustart erforderlich.
 OrderPreferencePage_NewNavigatorWindowRequired=Nach dem Ã„ndern der Taxon Sortierung, ist das Schließen und erneute Ã–ffnen des taxon Navigators erforderlich.
-UriWithLabelElement_URL_NOT_SAVED=URL wird nicht gespeichert\! 
+UriWithLabelElement_URL_NOT_SAVED=URI wird nicht gespeichert\! 
 UriWithLabelElement_COULD_NOT_OPEN_BROWSER=Externer Browser konnte nicht geöffnet werden. URI ist ung\u00FCtlig.
 UriWithLabelElement_INVALID_URL=Ung\u00FCltige URI
 UriWithLabelElement_OPEN_EXTERNAL_BROWSER=Im Browser Ã¶ffnen 
\ No newline at end of file
index 320968a8ba32cac8b9abdb71a6e7b08e4d0451ce..fb44e4eda1880887a311e3d276d9501cad7760e3 100644 (file)
         id="eu.etaxonomy.taxeditor.view.derivateSearch.DerivateSearchView"
         name="%view.name.6"
         restorable="true">
+  </view>
+  <view
+        allowMultiple="false"
+        class="eu.etaxonomy.taxeditor.view.sessions.SessionsViewPart"
+        id="eu.etaxonomy.taxeditor.view.sessions.SessionsViewPart"
+        name="Sessions"
+        restorable="false">
   </view>
    </extension>
    <extension
                   </reference>
                </visibleWhen>
             </command>
+            <command
+                  commandId="org.eclipse.ui.views.showView"
+                  label="Sessions"
+                  style="push">
+               <parameter
+                     name="org.eclipse.ui.views.showView.viewId"
+                     value="eu.etaxonomy.taxeditor.view.sessions.SessionsViewPart">
+               </parameter>
+            </command>
          </menu>
       </menuContribution>
       <menuContribution
       </menuContribution>
       <menuContribution
             locationURI="menu:org.eclipse.ui.main.menu.file?after=eu.etaxonomy.taxeditor.application.filemenu.io">
+         <command
+               commandId="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow"
+               label="Connect"
+               style="push">
+         </command>
          <command
                commandId="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"
                label="%command.label.5"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isUserLoggedIn">
+               </reference>
+            </visibleWhen>
+         </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.store.operations.reconnect"
+               label="Re-Connect"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isUserLoggedIn">
+               </reference>
+            </visibleWhen>
          </command>
          <separator
                name="eu.etaxonomy.taxeditor.application.filemenu.login"
          </activeWhen>
       </handler>
       <handler
-            class="eu.etaxonomy.taxeditor.handler.ShowLoginWindowHandler"
-            commandId="eu.etaxonomy.taxeditor.store.operations.showLoginWindow">
-         <enabledWhen>
-            <reference
-                  definitionId="isUserLoggedIn">
-            </reference></enabledWhen>
+            class="eu.etaxonomy.taxeditor.handler.ShowRemotingLoginWindowHandler"
+            commandId="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow">
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.handler.OpenPasswordWizzardHandler"
             </reference>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.handler.SwitchUserHandler"
+            commandId="eu.etaxonomy.taxeditor.store.operations.showLoginWindow">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
    </extension>
    <extension
          name="%extension.name.0"
             name="%command.name.3">
       </command>
       <command
+            defaultHandler="eu.etaxonomy.taxeditor.handler.ShowLoginWindowHandler"
             id="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"
             name="%command.name.4">
       </command>
+      <command
+            id="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow"
+            name="Connect">
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.handler.ReconnectHandler"
+            id="eu.etaxonomy.taxeditor.store.operations.reconnect"
+            name="Re-Connect">
+      </command>
       <command
             defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.OpenDefinedTermEditorHandler"
             id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
             id="eu.etaxonomy.taxeditor.editor.definedTerms.delete"
             name="%command.name.14">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.handler.OpenInspectSessionsHandler"
+            id="eu.etaxonomy.taxeditor.store.open.InspectSessionsDialog"
+            name="Inspect Active Session">
+      </command>
       <command
             defaultHandler="eu.etaxonomy.taxeditor.handler.OpenHandler"
             id="eu.etaxonomy.taxeditor.store.open"
index 30f30166fd06b5790f12000c70f100795d077c0a..c7460a5a96344fc7e7855f8da2218f0391ae276c 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
        <groupId>eu.etaxonomy</groupId>
        <artifactId>taxeditor-parent</artifactId>
-       <version>3.8.0-SNAPSHOT</version>
+       <version>3.12.0-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
index d676ca2a2ace038346efb62bceadab981bee56e5..0275cc47100a772f81bd429b74d96f82ddc37257 100644 (file)
@@ -30,12 +30,13 @@ import eu.etaxonomy.cdm.database.CdmPersistentDataSource;
 import eu.etaxonomy.cdm.database.DataSourceNotFoundException;
 import eu.etaxonomy.cdm.database.ICdmDataSource;
 import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
-import eu.etaxonomy.cdm.remote.CdmPersistentRemoteSource;
-import eu.etaxonomy.cdm.remote.CdmRemoteSourceException;
-import eu.etaxonomy.cdm.remote.ICdmRemoteSource;
+
 import eu.etaxonomy.taxeditor.model.MementoHelper;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.remoting.source.CdmPersistentRemoteSource;
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSourceException;
+import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 public class CdmDataSourceRepository{
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/CdmEntitySessionInput.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/CdmEntitySessionInput.java
new file mode 100644 (file)
index 0000000..8b9362d
--- /dev/null
@@ -0,0 +1,63 @@
+// $Id$
+/**
+* Copyright (C) 2015 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.editor;
+
+import java.util.List;
+import java.util.Map;
+
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author cmathew
+ * @date 5 Feb 2015
+ *
+ */
+public abstract class CdmEntitySessionInput implements ICdmEntitySessionEnabled {
+
+    private ICdmEntitySession cdmEntitySession;
+
+    public CdmEntitySessionInput(boolean init) {
+        if(init) {
+            initSession();
+        }
+    }
+
+    protected void initSession() {
+        cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
+    }
+
+    @Override
+    public ICdmEntitySession getCdmEntitySession() {
+        return cdmEntitySession;
+    }
+
+    public void bind() {
+        cdmEntitySession.bind();
+    }
+
+    public void dispose() {
+        cdmEntitySession.dispose();
+    }
+
+    public abstract void merge();
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}
index 8cae931e980bcd485a7b65b85932fae29afce75c..d83a187cb3fb349a39a54d2ce709478ef7100f12 100644 (file)
@@ -9,6 +9,11 @@
  */\r
 package eu.etaxonomy.taxeditor.editor.definedterm;\r
 \r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.Set;\r
+\r
 import org.eclipse.core.runtime.IProgressMonitor;\r
 import org.eclipse.jface.action.GroupMarker;\r
 import org.eclipse.jface.action.MenuManager;\r
@@ -35,12 +40,17 @@ import org.eclipse.ui.part.EditorPart;
 \r
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
+import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
 import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
 import eu.etaxonomy.cdm.model.common.OrderedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;\r
 import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput;\r
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;\r
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;\r
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
 import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;\r
 \r
@@ -49,7 +59,7 @@ import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
  * @date 3 Jan 2012\r
  *\r
  */\r
-public class DefinedTermEditor extends EditorPart implements IConversationEnabled, ISelectionListener, IDirtyMarkable, IPostOperationEnabled {\r
+public class DefinedTermEditor extends EditorPart implements IConversationEnabled, ISelectionListener, IDirtyMarkable, IPostOperationEnabled, ICdmEntitySessionEnabled {\r
 \r
        public static final String ID = "eu.etaxonomy.taxeditor.editor.definedTerm";\r
 \r
@@ -60,6 +70,7 @@ public class DefinedTermEditor extends EditorPart implements IConversationEnable
        private ISelectionService selectionService;\r
        private boolean dirty;\r
 \r
+       private final ICdmEntitySession cdmEntitySession;\r
 \r
 \r
        private final int dndOperations = DND.DROP_COPY | DND.DROP_MOVE;\r
@@ -69,6 +80,7 @@ public class DefinedTermEditor extends EditorPart implements IConversationEnable
        public DefinedTermEditor() {\r
                super();\r
                conversation = CdmStore.createConversation();\r
+               cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);\r
        }\r
 \r
        @Override\r
@@ -149,8 +161,10 @@ public class DefinedTermEditor extends EditorPart implements IConversationEnable
        @Override\r
        public void doSave(IProgressMonitor monitor) {\r
                getConversationHolder().commit();\r
+               CdmStore.getService(IVocabularyService.class).merge(new ArrayList<TermVocabulary>(getRootEntities()));\r
                setDirty(false);\r
                getDefinedTermEditorInput().initialiseVocabularies();\r
+               viewer.refresh();\r
        }\r
 \r
 \r
@@ -178,6 +192,7 @@ public class DefinedTermEditor extends EditorPart implements IConversationEnable
        public void setFocus() {\r
            viewer.getControl().setFocus();\r
                getConversationHolder().bind();\r
+               cdmEntitySession.bind();\r
        }\r
 \r
        @Override\r
@@ -256,5 +271,36 @@ public class DefinedTermEditor extends EditorPart implements IConversationEnable
            }\r
        }\r
 \r
+       @Override\r
+       public void dispose() {\r
+           cdmEntitySession.dispose();\r
+           super.dispose();\r
+       }\r
+\r
+    /* (non-Javadoc)\r
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()\r
+     */\r
+    @Override\r
+    public ICdmEntitySession getCdmEntitySession() {\r
+        return cdmEntitySession;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()\r
+     */\r
+    @Override\r
+    public Set<TermVocabulary<DefinedTermBase>> getRootEntities() {\r
+        return getDefinedTermEditorInput().getVocabularies();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()\r
+     */\r
+    @Override\r
+    public Map<Object, List<String>> getPropertyPathsMap() {\r
+        // TODO Auto-generated method stub\r
+        return null;\r
+    }\r
+\r
 \r
 }
\ No newline at end of file
index b96cacdc0e3799702e0e3e5a416485751b8a5873..7d0439b6dd08e978d02f40e4a0ed4a3ce26ac404 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$\r
 /**\r
 * Copyright (C) 2009 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
 * http://www.e-taxonomy.eu\r
-* \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
@@ -23,6 +23,7 @@ import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;\r
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
 import eu.etaxonomy.taxeditor.store.StoreUtil;\r
 \r
 /**\r
@@ -32,10 +33,10 @@ import eu.etaxonomy.taxeditor.store.StoreUtil;
  */\r
 public class CreateDefinedTermOperation extends AbstractPostTaxonOperation {\r
 \r
-       \r
 \r
-       private TermBase parentTermBase;\r
-       private TermEditorInput definedTermInput;\r
+\r
+       private final TermBase parentTermBase;\r
+       private final TermEditorInput definedTermInput;\r
 \r
        /**\r
         * @param label\r
@@ -43,7 +44,7 @@ public class CreateDefinedTermOperation extends AbstractPostTaxonOperation {
         * @param postOperationEnabled\r
         */\r
        public CreateDefinedTermOperation(String label,\r
-                       IUndoContext undoContext, \r
+                       IUndoContext undoContext,\r
                        TermBase termBase,\r
                        TermEditorInput definedTermInput,\r
                        IPostOperationEnabled postOperationEnabled) {\r
@@ -58,27 +59,28 @@ public class CreateDefinedTermOperation extends AbstractPostTaxonOperation {
        @Override\r
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
-               \r
+\r
                DefinedTermBase newTerm = definedTermInput.getTermType().getEmptyDefinedTermBase();\r
                if (newTerm == null) {\r
-                       IStatus status = \r
-                                       new Status(IStatus.CANCEL, \r
-                                                       StoreUtil.getPluginId(), \r
+                       IStatus status =\r
+                                       new Status(IStatus.CANCEL,\r
+                                                       StoreUtil.getPluginId(),\r
                                                        "Creation of term corresponding to type '" + definedTermInput.getTermType().getMessage() + "' is not yet supported");\r
                        MessagingUtils.warningDialog("Cannot create term", newTerm, status);\r
                        return status;\r
                }\r
-               \r
+               newTerm = CdmStore.getCurrentApplicationConfiguration().getTermService().save(newTerm);\r
+\r
                if (parentTermBase instanceof TermVocabulary){\r
                        TermVocabulary vocabulary = (TermVocabulary) parentTermBase;\r
                        vocabulary.addTerm(newTerm);\r
                } else if (parentTermBase instanceof DefinedTermBase) {\r
-                       DefinedTermBase parent = (DefinedTermBase) parentTermBase;                      \r
-                       parent.addIncludes(newTerm);                    \r
+                       DefinedTermBase parent = (DefinedTermBase) parentTermBase;\r
+                       parent.addIncludes(newTerm);\r
                        TermVocabulary vocabulary = parent.getVocabulary();\r
                        vocabulary.addTerm(newTerm);\r
                }\r
-               \r
+\r
                return postExecute(newTerm);\r
        }\r
 \r
index 74a8b7cf821cf881ef6b316d8a0cf89cef583461..7911410a71c708154a8a57aae37894b852b5440e 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$\r
 /**\r
 * Copyright (C) 2009 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
 * http://www.e-taxonomy.eu\r
-* \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
@@ -29,16 +29,16 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */\r
 public class CreateTermVocabularyOperation extends AbstractPostTaxonOperation {\r
 \r
-       private TermEditorInput definedEditorInput;\r
-       \r
+       private final TermEditorInput definedEditorInput;\r
+\r
        /**\r
         * @param label\r
         * @param undoContext\r
         * @param postOperationEnabled\r
         */\r
        public CreateTermVocabularyOperation(String label,\r
-                       IUndoContext undoContext, \r
-                       TermEditorInput definedEditorInput, \r
+                       IUndoContext undoContext,\r
+                       TermEditorInput definedEditorInput,\r
                        IPostOperationEnabled postOperationEnabled) {\r
                super(label, undoContext, postOperationEnabled);\r
                this.definedEditorInput = definedEditorInput;\r
@@ -50,17 +50,17 @@ public class CreateTermVocabularyOperation extends AbstractPostTaxonOperation {
        @Override\r
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
-       \r
-               TermVocabulary termVocabulary = \r
+\r
+               TermVocabulary termVocabulary =\r
                                        TermVocabulary.NewInstance(definedEditorInput.getTermType(),\r
-                                               null, \r
-                                               "Untitled", \r
-                                               null, \r
-                                               null);          \r
-               \r
-               CdmStore.getService(IVocabularyService.class).save(termVocabulary);\r
+                                               null,\r
+                                               "Untitled",\r
+                                               null,\r
+                                               null);\r
+\r
+               termVocabulary = CdmStore.getService(IVocabularyService.class).save(termVocabulary);\r
                definedEditorInput.getVocabularies().add(termVocabulary);\r
-               \r
+\r
                return postExecute(termVocabulary);\r
        }\r
 \r
index 043332141b11245bd21714525c6e8b070aa65639..6ec4fc4c2e04a7fb1fb58a2cb2102cceafb5c1f0 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$\r
 /**\r
 * Copyright (C) 2009 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
 * http://www.e-taxonomy.eu\r
-* \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
@@ -20,8 +20,6 @@ import org.eclipse.jface.dialogs.MessageDialog;
 import eu.etaxonomy.cdm.api.service.DeleteResult;\r
 import eu.etaxonomy.cdm.api.service.ITermService;\r
 import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
-import eu.etaxonomy.cdm.api.service.exception.DataChangeNoRollbackException;\r
-import eu.etaxonomy.cdm.model.common.DefinedTerm;\r
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
 import eu.etaxonomy.cdm.model.common.TermBase;\r
 import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
@@ -40,22 +38,22 @@ import eu.etaxonomy.taxeditor.store.StoreUtil;
  */\r
 public class DeleteTermBaseOperation extends AbstractPostTaxonOperation {\r
 \r
-       private TermEditorInput definedEditorInput;\r
-       private TermBase termBase;\r
+       private final TermEditorInput definedEditorInput;\r
+       private final TermBase termBase;\r
        private DefinedTermEditor definedTermEditor;\r
        /**\r
         * @param label\r
         * @param undoContext\r
         * @param postOperationEnabled\r
         */\r
-       public DeleteTermBaseOperation(String label, \r
-                       IUndoContext undoContext, \r
+       public DeleteTermBaseOperation(String label,\r
+                       IUndoContext undoContext,\r
                        TermBase termBase,\r
                        TermEditorInput definedEditorInput,\r
                        IPostOperationEnabled postOperationEnabled) {\r
                super(label, undoContext, postOperationEnabled);\r
                this.termBase = termBase;\r
-               this.definedEditorInput = definedEditorInput;           \r
+               this.definedEditorInput = definedEditorInput;\r
        }\r
 \r
        /* (non-Javadoc)\r
@@ -64,25 +62,25 @@ public class DeleteTermBaseOperation extends AbstractPostTaxonOperation {
        @Override\r
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
-               \r
-               \r
-               \r
+\r
+\r
+\r
                if (termBase instanceof TermVocabulary) {\r
                        if (((TermVocabulary)termBase).getCreatedBy() == null) {\r
                                IStatus status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "This is a CDM system vocabulary");\r
                                MessagingUtils.warningDialog("Cannot delete vocabulary", termBase, status);\r
                                return status;\r
                        }\r
-                       \r
+\r
                        if (!((TermVocabulary)termBase).getTerms().isEmpty()) {\r
                                IStatus status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "Delete all terms from this vocaulary before deleting the vocabulary.");\r
                                MessagingUtils.warningDialog("Vocabulary not empty", termBase, status);\r
                                return status;\r
-                       }                       \r
+                       }\r
 \r
-                       definedEditorInput.getVocabularies().remove((TermVocabulary)termBase); \r
-                       \r
-                       DeleteResult result =   CdmStore.getService(IVocabularyService.class).delete((TermVocabulary)termBase);\r
+                       definedEditorInput.getVocabularies().remove(termBase);\r
+\r
+                       DeleteResult result =   CdmStore.getService(IVocabularyService.class).delete(termBase.getUuid());\r
                        if (result.isError()){\r
                                StringBuffer errorString = new StringBuffer();\r
                                for (Exception e:result.getExceptions()){\r
@@ -90,41 +88,41 @@ public class DeleteTermBaseOperation extends AbstractPostTaxonOperation {
                                }\r
                                MessageDialog.openError(null, "Delete failed", errorString.toString());\r
                        }\r
-                       \r
+\r
                } else if (termBase instanceof DefinedTermBase) {\r
-                       \r
-                       \r
+\r
+\r
                        DefinedTermBase definedTermBase = (DefinedTermBase) termBase;\r
-                       \r
+\r
                        if (((DefinedTermBase)termBase).getCreatedBy() == null) {\r
                                IStatus status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "This is a CDM system defined term");\r
                                MessagingUtils.warningDialog("Cannot delete defined term", termBase, status);\r
                                return status;\r
                        }\r
                        if(!definedTermBase.getIncludes().isEmpty()){\r
-                               IStatus status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "This term includes other terms. Please delete the included terms before deleting this term.");                            \r
+                               IStatus status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "This term includes other terms. Please delete the included terms before deleting this term.");\r
                                MessagingUtils.warningDialog("Term has included terms", termBase, status);\r
                                return status;\r
-                       } \r
-                                               \r
+                       }\r
+\r
 \r
                        DefinedTermBase partOf = definedTermBase.getPartOf();\r
                        if(partOf != null){\r
                                partOf.removeIncludes(definedTermBase);\r
                        }\r
-                       \r
+\r
                        DefinedTermBase kindOf = definedTermBase.getKindOf();\r
                        if(kindOf != null){\r
                                definedTermBase.removeGeneralization(kindOf);\r
                        }\r
-                       \r
+\r
                        TermVocabulary vocabulary = definedTermBase.getVocabulary();\r
                        if(vocabulary != null){\r
                                vocabulary.removeTerm(definedTermBase);\r
                        }\r
-                       \r
-                       DeleteResult result =   CdmStore.getService(ITermService.class).delete((DefinedTermBase)termBase);\r
-                       \r
+\r
+                       DeleteResult result =   CdmStore.getService(ITermService.class).delete(termBase.getUuid());\r
+\r
                        if (result.isError()){\r
                                StringBuffer errorString = new StringBuffer();\r
                                for (Exception e:result.getExceptions()){\r
@@ -133,7 +131,7 @@ public class DeleteTermBaseOperation extends AbstractPostTaxonOperation {
                                MessageDialog.openError(null, "Delete failed", errorString.toString());\r
                        }\r
                }\r
-               \r
+\r
                return postExecute(termBase);\r
        }\r
 \r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/CreateFieldUnitHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/CreateFieldUnitHandler.java
new file mode 100644 (file)
index 0000000..60ca90f
--- /dev/null
@@ -0,0 +1,21 @@
+package eu.etaxonomy.taxeditor.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+public class CreateFieldUnitHandler extends AbstractHandler {
+
+    @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+        if(currentSelection instanceof IStructuredSelection){
+            System.out.println(currentSelection);
+        }
+        return null;
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenInspectSessionsHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenInspectSessionsHandler.java
new file mode 100644 (file)
index 0000000..6a61501
--- /dev/null
@@ -0,0 +1,62 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.handler;
+
+import java.util.Collection;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.swt.SWT;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.view.sessions.InspectSessionsDialog;
+
+/**
+ * @author cmathew
+ * @date 18 Feb 2015
+ *
+ */
+public class OpenInspectSessionsHandler extends AbstractHandler implements IHandler {
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+     */
+    /** {@inheritDoc} */
+    @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+
+        Object principal = CdmStore.getCurrentAuthentiation().getPrincipal();
+
+        ICdmEntitySession activeSession = CdmStore.getCurrentSessionManager().getActiveSession();
+
+        if(activeSession == null) {
+            MessagingUtils.warningDialog("No Active Session", this, "Active Session is null");
+        } else {
+            Collection<CdmBase> rootEntities = activeSession.getRootEntities();
+            if(rootEntities == null || rootEntities.isEmpty()) {
+                MessagingUtils.warningDialog("No Root Entities", this, "No root entities to inspect");
+            } else {
+                InspectSessionsDialog dialog = new InspectSessionsDialog(AbstractUtility.getShell(), SWT.NONE);
+                dialog.open();
+            }
+
+        }
+
+        return null;
+
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ReconnectHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ReconnectHandler.java
new file mode 100644 (file)
index 0000000..28ffa45
--- /dev/null
@@ -0,0 +1,46 @@
+// $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.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
+
+/**
+ *
+ *
+ * @author c.mathew
+ */
+public class ReconnectHandler extends AbstractHandler implements IHandler {
+
+       /* (non-Javadoc)
+        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+        */
+       /** {@inheritDoc} */
+       @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+
+               RemotingLoginDialog loginDialog = new RemotingLoginDialog(HandlerUtil.getActiveShell(event),
+                       SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+
+               loginDialog.open((CdmRemoteSource) CdmStore.getActiveCdmSource(), true, true);
+
+               return null;
+
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowRemotingLoginWindowHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowRemotingLoginWindowHandler.java
new file mode 100644 (file)
index 0000000..25b8d84
--- /dev/null
@@ -0,0 +1,44 @@
+// $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.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
+
+/**
+ *
+ *
+ * @author c.mathew
+ */
+public class ShowRemotingLoginWindowHandler extends AbstractHandler implements IHandler{
+
+       /* (non-Javadoc)
+        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+        */
+       /** {@inheritDoc} */
+       @Override
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+
+           RemotingLoginDialog loginDialog = new RemotingLoginDialog(HandlerUtil.getActiveShell(event),
+                   SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+           loginDialog.open();
+
+
+               return null;
+
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/SwitchUserHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/SwitchUserHandler.java
new file mode 100644 (file)
index 0000000..93e12bd
--- /dev/null
@@ -0,0 +1,47 @@
+// $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.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
+
+/**
+ *
+ *
+ * @author c.mathew
+ */
+public class SwitchUserHandler extends AbstractHandler implements IHandler {
+
+       /* (non-Javadoc)
+        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+        */
+       /** {@inheritDoc} */
+       @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+
+               RemotingLoginDialog loginDialog = new RemotingLoginDialog(HandlerUtil.getActiveShell(event),
+                       SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+
+               loginDialog.open((CdmRemoteSource) CdmStore.getActiveCdmSource(), false, false);
+
+               return null;
+
+       }
+}
+
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/UuidParameterConverter.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/UuidParameterConverter.java
new file mode 100644 (file)
index 0000000..5bd3db1
--- /dev/null
@@ -0,0 +1,24 @@
+package eu.etaxonomy.taxeditor.handler;
+
+import java.util.UUID;
+
+import org.eclipse.core.commands.AbstractParameterValueConverter;
+import org.eclipse.core.commands.ParameterValueConversionException;
+
+public class UuidParameterConverter extends AbstractParameterValueConverter {
+
+    public UuidParameterConverter() {
+        // TODO Auto-generated constructor stub
+    }
+
+    @Override
+    public Object convertToObject(String parameterValue) throws ParameterValueConversionException {
+        return UUID.fromString(parameterValue);
+    }
+
+    @Override
+    public String convertToString(Object parameterValue) throws ParameterValueConversionException {
+        return parameterValue.toString();
+    }
+
+}
index 2504f4a1746edbacbacd88e041137d6cc4ba2462..5b01fc7e08258a87e32a888c0c4a2be1e8545bce 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
  * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy 
+ * European Distributed Institute of Taxonomy
  * http://www.e-taxonomy.eu
- * 
+ *
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
@@ -20,7 +20,7 @@ import eu.etaxonomy.cdm.io.common.IIoConfigurator;
  * <p>
  * Abstract AbstractIOHandler class.
  * </p>
- * 
+ *
  * @author n.hoffmann
  * @created Sep 11, 2009
  * @version 1.0
@@ -37,7 +37,7 @@ public abstract class AbstractIOManager<CONFIGURATOR extends IIoConfigurator> {
         * <p>
         * Constructor for AbstractIOHandler.
         * </p>
-        * 
+        *
         * @param applicationController
         *            a
         *            {@link eu.etaxonomy.cdm.api.application.CdmApplicationController}
@@ -52,29 +52,33 @@ public abstract class AbstractIOManager<CONFIGURATOR extends IIoConfigurator> {
 
        /**
         * Starts the IO process
-        * 
+        *
         * @param configurator
         *            a CONFIGURATOR object.
         */
        public void run(final CONFIGURATOR configurator) {
-               // create job
-               Job job = createIOJob(configurator);
-               // configure the job
-               job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
-               job.setUser(true);
-               // schedule job
-               job.schedule();
+           // create job
+           Job job = createIOJob(configurator);
+           run(job);
+       }
 
+       public void run(Job job) {
+           // configure the job
+           job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
+           job.setUser(true);
+           // schedule job
+           job.schedule();
        }
 
        /**
         * <p>
         * createIOJob
         * </p>
-        * 
+        *
         * @param configurator
         *            a CONFIGURATOR object.
         * @return a {@link org.eclipse.core.runtime.jobs.Job} object.
         */
        protected abstract Job createIOJob(CONFIGURATOR configurator);
+
 }
index e3fbfe9ab2862d0159f4d3fd7577bf3a40b31c06..9afd3ceea5d92e8b84353d98306c24afc790efb1 100644 (file)
 
 package eu.etaxonomy.taxeditor.io;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.List;
+
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -18,16 +22,20 @@ import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.IWorkbenchPart;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.io.common.CdmDefaultExport;
+import eu.etaxonomy.cdm.io.common.ExportResult;
 import eu.etaxonomy.cdm.io.common.IExportConfigurator;
 import eu.etaxonomy.cdm.io.common.IIoConfigurator;
 import eu.etaxonomy.cdm.io.jaxb.JaxbExportConfigurator;
 import eu.etaxonomy.cdm.io.sdd.out.SDDExportConfigurator;
+import eu.etaxonomy.cdm.io.service.IIOService;
 import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 
 /**
  * <p>
@@ -157,6 +165,42 @@ public class ExportManager extends AbstractIOManager<IExportConfigurator> {
                return job;
        }
 
+       public Job createIOServiceJob(final IExportConfigurator configurator, final File exportFile) {
+           Assert.isNotNull(configurator, "Configuration may not be null");
+
+           final Display display = Display.getCurrent();
+
+           Job job = new Job("Export: " + configurator.getClass().getSimpleName()) {
+               @Override
+               protected IStatus run(IProgressMonitor monitor) {
+                   monitor.beginTask("Exporting database. This will take some time.", IProgressMonitor.UNKNOWN);
+                   try {
+                       IIOService ioService = CdmApplicationState.getIOService();
+
+                       ExportResult result = ioService.export(configurator);
+                       List<byte[]> dataList = result.getExportData();
+                       byte[] exportData = dataList.get(0);
+
+                       FileOutputStream stream = new FileOutputStream(exportFile);
+                       try {
+                           stream.write(exportData);
+                       } finally {
+                           stream.close();
+                       }
+
+                   } catch (Exception e) {
+                       MessagingUtils.errorDialog("Error exporting data",
+                               this,
+                               e.getMessage(),
+                               TaxeditorStorePlugin.PLUGIN_ID,
+                               e,
+                               true);
+                   }
+                   return Status.OK_STATUS;
+               }
+           };
+           return job;
+       }
        /**
         * @param jaxb
         * @return
@@ -198,4 +242,6 @@ public class ExportManager extends AbstractIOManager<IExportConfigurator> {
                return (SDDExportConfigurator) getConfigurator(TYPE.Sdd);
        }
 
+
+
 }
index a607e3f0f43c686cdb0e9e1e346144f1f8ba700d..89249cddc02f43a90f6d1dad5e9a9a85e6075259 100644 (file)
@@ -1,15 +1,22 @@
 // $Id$
 /**
  * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy 
+ * European Distributed Institute of Taxonomy
  * http://www.e-taxonomy.eu
- * 
+ *
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
 
 package eu.etaxonomy.taxeditor.io;
 
+import java.io.File;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import org.apache.commons.io.IOUtils;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -17,26 +24,29 @@ import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.swt.widgets.Display;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
 import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
 import eu.etaxonomy.cdm.io.common.IImportConfigurator;
+import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
 import eu.etaxonomy.cdm.io.excel.taxa.NormalExplicitImportConfigurator;
 import eu.etaxonomy.cdm.io.jaxb.JaxbImportConfigurator;
 import eu.etaxonomy.cdm.io.reference.endnote.in.EndnoteImportConfigurator;
 import eu.etaxonomy.cdm.io.sdd.in.SDDImportConfigurator;
+import eu.etaxonomy.cdm.io.service.IIOService;
 import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
 import eu.etaxonomy.cdm.io.specimen.excel.in.SpecimenCdmExcelImportConfigurator;
 import eu.etaxonomy.cdm.io.tcsxml.in.TcsXmlImportConfigurator;
 import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 
 /**
  * <p>
  * ImportHandler class.
  * </p>
- * 
+ *
  * @author n.hoffmann
  * @created Sep 11, 2009
  * @version 1.0
@@ -54,7 +64,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
         * <p>
         * NewInstance
         * </p>
-        * 
+        *
         * @param applicationConfiguration
         *            a
         *            {@link eu.etaxonomy.cdm.api.application.CdmApplicationController}
@@ -68,7 +78,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
 
        /**
         * Use when importing data into the current application context
-        * 
+        *
         * @param configurator
         *            a {@link eu.etaxonomy.cdm.io.common.IImportConfigurator}
         *            object.
@@ -91,7 +101,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
                                monitor.worked(5);
 
                                CdmDefaultImport<IImportConfigurator> importer = new CdmDefaultImport<IImportConfigurator>();
-                               importer.setCdmAppController((ICdmApplicationConfiguration) applicationConfiguration);
+                               importer.setCdmAppController(applicationConfiguration);
                                monitor.worked(5);
 
                                try {
@@ -127,6 +137,66 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
 
        }
 
+       public Job createIOServiceJob(IImportConfigurator configurator, InputStream is, SOURCE_TYPE type) {
+
+           try {
+               return createIOServiceJob(configurator, IOUtils.toByteArray(is), type);
+           } catch (Exception e) {
+               MessagingUtils.errorDialog("Error importing input stream",
+                       this,
+                       e.getMessage(),
+                       TaxeditorStorePlugin.PLUGIN_ID,
+                       e,
+                       true);
+           }
+           return null;
+       }
+
+       public Job createIOServiceJob(IImportConfigurator configurator, File importFile, SOURCE_TYPE type) {
+           Path path = Paths.get(importFile.toURI());
+           try {
+               return createIOServiceJob(configurator, Files.readAllBytes(path), type);
+           } catch (Exception e) {
+               MessagingUtils.errorDialog("Error importing file",
+                       this,
+                       e.getMessage(),
+                       TaxeditorStorePlugin.PLUGIN_ID,
+                       e,
+                       true);
+           }
+           return null;
+       }
+
+    public Job createIOServiceJob(final IImportConfigurator configurator, final byte[] data, final SOURCE_TYPE type) {
+        Assert.isNotNull(configurator, "Configuration may not be null");
+        final Display display = Display.getDefault();
+        Job job = new Job("Import: " + configurator.getClass().getSimpleName()) {
+
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                monitor.beginTask("Importing data", IProgressMonitor.UNKNOWN);
+                IIOService ioService = CdmApplicationState.getIOService();
+
+                ioService.importData(configurator, data, type);
+
+                monitor.done();
+
+                display.asyncExec(new Runnable() {
+
+                    @Override
+                    public void run() {
+                        CdmStore.getContextManager().notifyContextRefresh();
+                    }
+                });
+
+                return Status.OK_STATUS;
+            }
+        };
+
+        return job;
+
+    }
+
        private IImportConfigurator getConfigurator(TYPE type) {
                Assert.isNotNull(type, "Type should not be null");
 
@@ -157,7 +227,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
         * <p>
         * JaxbConfigurator
         * </p>
-        * 
+        *
         * @return a {@link eu.etaxonomy.cdm.io.jaxb.JaxbImportConfigurator} object.
         */
        public final JaxbImportConfigurator JaxbConfigurator() {
@@ -168,7 +238,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
         * <p>
         * TcsConfigurator
         * </p>
-        * 
+        *
         * @return a {@link eu.etaxonomy.cdm.io.tcsxml.in.TcsXmlImportConfigurator}
         *         object.
         */
@@ -180,7 +250,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
         * <p>
         * EndnoteConfigurator
         * </p>
-        * 
+        *
         * @return a
         *         {@link eu.etaxonomy.cdm.io.reference.endnote.in.EndnoteImportConfigurator}
         *         object.
@@ -193,7 +263,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
         * <p>
         * NormalExplicitConfigurator
         * </p>
-        * 
+        *
         * @return a
         *         {@link eu.etaxonomy.cdm.io.excel.taxa.NormalExplicitImportConfigurator}
         *         object.
@@ -206,7 +276,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
         * <p>
         * SddConfigurator
         * </p>
-        * 
+        *
         * @return a {@link eu.etaxonomy.cdm.io.sdd.in.SDDImportConfigurator}
         *         object.
         */
@@ -218,7 +288,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
         * <p>
         * AbcdConfigurator
         * </p>
-        * 
+        *
         * @return a
         *         {@link eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator}
         *         object.
@@ -231,4 +301,5 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
                return (SpecimenCdmExcelImportConfigurator) getConfigurator(TYPE.SpecimenCdmExcel);
        }
 
+
 }
index 19eb4604d84c79aa0919c8bc74c5664ab84ae361..70bc683baa8c356fbc7002fd54a1bfc9eb37a631 100644 (file)
@@ -16,10 +16,12 @@ import java.io.FileNotFoundException;
 import java.net.URI;
 
 import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IWorkbench;
 
 import eu.etaxonomy.cdm.database.DbSchemaValidation;
+import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
 import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -55,23 +57,28 @@ public class AbcdImportWizard extends AbstractImportWizard<Abcd206ImportConfigur
        /** {@inheritDoc} */
        @Override
        public boolean performFinish() {
-               URI source = dataSourcePage.getUri();
-               try {
-            configurator.setSource(new FileInputStream(new File(source)));
-        } catch (FileNotFoundException e) {
-            MessagingUtils.errorDialog("File not found.", this, "Import file was not found.", TaxeditorStorePlugin.PLUGIN_ID, e, false);
-            logger.error("File not found!", e);
-            return false;
-        }
-               configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
+           URI source = dataSourcePage.getUri();
+           configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
 
-               if(classificationChooserWizardPage.getClassification()!=null){
-                   configurator.setClassificationUuid(classificationChooserWizardPage.getClassification().getUuid());
-               }
-               configurator.setReportUri(classificationChooserWizardPage.getReportUri());
+           if(classificationChooserWizardPage.getClassification()!=null){
+               configurator.setClassificationUuid(classificationChooserWizardPage.getClassification().getUuid());
+           }
+           configurator.setReportUri(classificationChooserWizardPage.getReportUri());
 
-               CdmStore.getImportManager().run(configurator);
-               return true;
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
+               CdmStore.getImportManager().run(job);
+           } else {
+               try {
+                   configurator.setSource(new FileInputStream(new File(source)));
+               } catch (FileNotFoundException e) {
+                   MessagingUtils.errorDialog("File not found.", this, "Import file was not found.", TaxeditorStorePlugin.PLUGIN_ID, e, false);
+                   logger.error("File not found!", e);
+                   return false;
+               }
+               CdmStore.getImportManager().run(configurator);
+           }
+           return true;
 
        }
 
index 744876e944ccf966a07e23717543669f933f6b2d..e703c2d3dbc74f7f2807088a9d866f8889f9c152 100644 (file)
@@ -15,9 +15,11 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.UUID;
 
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.progress.IProgressConstants;
 
 import eu.etaxonomy.cdm.io.csv.redlist.demo.CsvDemoExportConfigurator;
 import eu.etaxonomy.cdm.model.taxon.Classification;
@@ -91,10 +93,19 @@ public class CsvExportWizard extends AbstractExportWizard<CsvDemoExportConfigura
                        configurator.setLastChange(true);
                    }
                }
-               configurator.setDestination(new File(urlString));
-
-               CdmStore.getExportManager().run(configurator);
-
+               if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                   // create job
+                   Job job = CdmStore.getExportManager().createIOServiceJob(configurator, new File(urlString));
+                   // configure the job
+                   job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
+                   job.setUser(true);
+                   // schedule job
+                   job.schedule();
+               } else {
+
+                   configurator.setDestination(new File(urlString));
+                   CdmStore.getExportManager().run(configurator);
+               }
                return true;
        }
 
index 24d0db49c9c428db666476dff16b2e3fe51f4d05..36f8d024c7114c6c5d099ef3d1b82582369587a5 100644 (file)
@@ -12,9 +12,11 @@ package eu.etaxonomy.taxeditor.io.wizard;
 \r
 import java.io.File;\r
 \r
+import org.eclipse.core.runtime.jobs.Job;\r
 import org.eclipse.jface.viewers.IStructuredSelection;\r
 import org.eclipse.swt.widgets.Combo;\r
 import org.eclipse.ui.IWorkbench;\r
+import org.eclipse.ui.progress.IProgressConstants;\r
 \r
 import eu.etaxonomy.cdm.io.csv.caryophyllales.out.CsvNameExportConfigurator;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
@@ -59,15 +61,23 @@ public class CsvNameExportWizard extends AbstractExportWizard<CsvNameExportConfi
         */\r
        @Override\r
        public boolean performFinish() {\r
-               String urlString = page.getFolderText() + File.separator\r
-                               + page.getExportFileName();\r
-\r
-               final Combo combo = page.getCombo();\r
-               \r
-               configurator.setDestination(new File(urlString));\r
-\r
-               CdmStore.getExportManager().run(configurator);\r
-\r
+           String urlString = page.getFolderText() + File.separator\r
+                   + page.getExportFileName();\r
+\r
+           final Combo combo = page.getCombo();\r
+\r
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {\r
+               // create job\r
+               Job job = CdmStore.getExportManager().createIOServiceJob(configurator, new File(urlString));\r
+               // configure the job\r
+               job.setProperty(IProgressConstants.KEEP_PROPERTY, true);\r
+               job.setUser(true);\r
+               // schedule job\r
+               job.schedule();\r
+           } else {\r
+               configurator.setDestination(new File(urlString));\r
+               CdmStore.getExportManager().run(configurator);\r
+           }\r
                return true;\r
        }\r
 \r
index 81e8105821b0fa8d2c726dedf8bf8dde62e583c2..61905f31f057bfb22947f96fbb3b96f045bbccce 100644 (file)
@@ -5,17 +5,19 @@ import java.util.HashSet;
 import java.util.List;\r
 import java.util.UUID;\r
 \r
+import org.eclipse.core.runtime.jobs.Job;\r
 import org.eclipse.jface.viewers.IStructuredSelection;\r
 import org.eclipse.swt.widgets.Combo;\r
 import org.eclipse.ui.IWorkbench;\r
+import org.eclipse.ui.progress.IProgressConstants;\r
 \r
 import eu.etaxonomy.cdm.io.csv.caryophyllales.out.CsvNameExportConfigurator;\r
 import eu.etaxonomy.cdm.model.taxon.Classification;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
 \r
 public class CsvPrintExportWizard extends CsvNameExportWizard{\r
-       \r
-       \r
+\r
+\r
        private final String description = "Export the contents of the currently selected database into Semicolon Separated Value format.";\r
        @Override\r
        public void init(IWorkbench workbench, IStructuredSelection selection) {\r
@@ -25,11 +27,11 @@ public class CsvPrintExportWizard extends CsvNameExportWizard{
 \r
        @Override\r
        public CsvNameExportConfigurator getConfigurator() {\r
-               \r
+\r
                return configurator;\r
        }\r
 \r
-       \r
+\r
 \r
        /*\r
         * (non-Javadoc)\r
@@ -72,17 +74,26 @@ public class CsvPrintExportWizard extends CsvNameExportWizard{
                                set.add(c.getUuid());\r
                            }\r
                        }\r
-                      \r
+\r
                        configurator.setHasHeaderLines(true);\r
-                       \r
+\r
                    }\r
-               } else{         \r
+               } else{\r
                        configurator.setClassificationUUID(listClassifications.get(0).getUuid());\r
                }\r
-               configurator.setDestination(new File(urlString));\r
-\r
-               CdmStore.getExportManager().run(configurator);\r
 \r
+               if(CdmStore.getCurrentSessionManager().isRemoting()) {\r
+                   // create job\r
+                   Job job = CdmStore.getExportManager().createIOServiceJob(configurator, new File(urlString));\r
+                   // configure the job\r
+                   job.setProperty(IProgressConstants.KEEP_PROPERTY, true);\r
+                   job.setUser(true);\r
+                   // schedule job\r
+                   job.schedule();\r
+               } else {\r
+                   configurator.setDestination(new File(urlString));\r
+                   CdmStore.getExportManager().run(configurator);\r
+               }\r
                return true;\r
        }\r
 \r
index 744044a2b4efeaa97acf39a7f06121d62e10a2d7..f6d43baf8a87ad54781bc3133d77849036a302b3 100644 (file)
 
 package eu.etaxonomy.taxeditor.io.wizard;
 
+import java.io.File;
 import java.net.URI;
 
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IWorkbench;
 
 import eu.etaxonomy.cdm.database.DbSchemaValidation;
+import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
 import eu.etaxonomy.cdm.io.excel.taxa.NormalExplicitImportConfigurator;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -52,7 +55,13 @@ public class ExcelNormalExplicitTaxaImportWizard extends AbstractImportWizard<No
                configurator.setSource(source);
                configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
 
-               CdmStore.getImportManager().run(configurator);
+               if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                   Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
+                   CdmStore.getImportManager().run(job);
+               } else {
+                   CdmStore.getImportManager().run(configurator);
+               }
+
 
                return true;
        }
index 6d63fbd675122e32ac450352a3266913668b9487..a35e64490f9a9f6d3c6879b9d90a08572fc013a8 100644 (file)
@@ -28,8 +28,8 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
 
 import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.remote.CdmRemoteSourceException;
 import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSourceException;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
index 3ca24a788f303bd812c5455e5a1f10bbb2a75de7..00a9c1bc6f2623c14c784c577c827770318e25c5 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -13,8 +13,10 @@ package eu.etaxonomy.taxeditor.io.wizard;
 import java.io.File;
 import java.net.URI;
 
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.progress.IProgressConstants;
 
 import eu.etaxonomy.cdm.io.jaxb.JaxbExportConfigurator;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -36,11 +38,12 @@ public class JaxbExportWizard extends AbstractExportWizard<JaxbExportConfigurato
         * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
         */
        /** {@inheritDoc} */
-       public void init(IWorkbench workbench, IStructuredSelection selection) {
+       @Override
+    public void init(IWorkbench workbench, IStructuredSelection selection) {
                this.setWindowTitle("JAXB Export");
                this.configurator = CdmStore.getExportManager().JaxbConfigurator();
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.jface.wizard.Wizard#performFinish()
         */
@@ -48,12 +51,21 @@ public class JaxbExportWizard extends AbstractExportWizard<JaxbExportConfigurato
        @Override
        public boolean performFinish() {
                boolean performFinish = false;
-               URI urlString;
-               File savePath = new File(page.getFolderText() + File.separator + page.getExportFileName());
-               urlString = savePath.toURI();
-               //orig: urlString = new URI(page.getFolderText() + File.separator + page.getExportFileName());
+
+               File exportFile = new File(page.getFolderText() + File.separator + page.getExportFileName());
+               URI urlString = exportFile.toURI();
                configurator.setDestination(urlString);
-               CdmStore.getExportManager().run(configurator);
+               if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                   // create job
+                   Job job = CdmStore.getExportManager().createIOServiceJob(configurator, exportFile);
+                   // configure the job
+                   job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
+                   job.setUser(true);
+                   // schedule job
+                   job.schedule();
+               } else {
+               CdmStore.getExportManager().run(configurator);
+               }
                performFinish = true;
                return performFinish;
        }
@@ -65,7 +77,7 @@ public class JaxbExportWizard extends AbstractExportWizard<JaxbExportConfigurato
        @Override
        public void addPages() {
                super.addPages();
-                               
+
                page = ExportToFileDestinationWizardPage.Jaxb();
                addPage(page);
        }
@@ -78,6 +90,6 @@ public class JaxbExportWizard extends AbstractExportWizard<JaxbExportConfigurato
        public JaxbExportConfigurator getConfigurator() {
                return configurator;
        }
-       
+
 
 }
index c6eb0787ba710544d51b349a2461fead6ecb7e9b..379a59f1ae1b89ea1fc0fbe421e67091f629fcc5 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -12,8 +12,10 @@ package eu.etaxonomy.taxeditor.io.wizard;
 
 import java.io.File;
 
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.progress.IProgressConstants;
 
 import eu.etaxonomy.cdm.io.sdd.out.SDDExportConfigurator;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -28,9 +30,9 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class SddExportWizard extends AbstractExportWizard<SDDExportConfigurator> {
 
        private ExportToFileDestinationWizardPage page;
-       
+
        private SDDExportConfigurator configurator;
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.io.wizard.AbstractExportWizard#getConfigurator()
         */
@@ -46,13 +48,21 @@ public class SddExportWizard extends AbstractExportWizard<SDDExportConfigurator>
        /** {@inheritDoc} */
        @Override
        public boolean performFinish() {
-               File file = new File(page.getFolderText() + File.separator + page.getExportFileName());
-               
-               configurator.setDestination(file);
-               
-               CdmStore.getExportManager().run(configurator);
-               
-               return true;
+           File file = new File(page.getFolderText() + File.separator + page.getExportFileName());
+
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               // create job
+               Job job = CdmStore.getExportManager().createIOServiceJob(configurator, file);
+               // configure the job
+               job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
+               job.setUser(true);
+               // schedule job
+               job.schedule();
+           } else {
+               configurator.setDestination(file);
+               CdmStore.getExportManager().run(configurator);
+           }
+           return true;
        }
 
        /*
@@ -63,16 +73,17 @@ public class SddExportWizard extends AbstractExportWizard<SDDExportConfigurator>
        @Override
        public void addPages() {
                super.addPages();
-               
+
                page = ExportToFileDestinationWizardPage.Sdd();
                addPage(page);
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
         */
        /** {@inheritDoc} */
-       public void init(IWorkbench workbench, IStructuredSelection selection) {                
+       @Override
+    public void init(IWorkbench workbench, IStructuredSelection selection) {
                this.setWindowTitle("SDD Export");
                this.configurator = CdmStore.getExportManager().SddConfigurator();
        }
index 294c68481528788a7eb0a915d19fb9405a64a247..8f4d382fe447410f271f066467f0656caa06a8d0 100644 (file)
@@ -1,21 +1,24 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.io.wizard;
 
+import java.io.File;
 import java.net.URI;
 
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IWorkbench;
 
 import eu.etaxonomy.cdm.database.DbSchemaValidation;
+import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
 import eu.etaxonomy.cdm.io.sdd.in.SDDImportConfigurator;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -29,9 +32,9 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class SddImportWizard extends AbstractImportWizard<SDDImportConfigurator> {
 
        private SDDImportConfigurator configurator;
-       
+
        private ImportFromFileDataSourceWizardPage dataSourcePage;
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.io.wizard.AbstractImportWizard#getConfigurator()
         */
@@ -40,7 +43,7 @@ public class SddImportWizard extends AbstractImportWizard<SDDImportConfigurator>
        public SDDImportConfigurator getConfigurator() {
                return configurator;
        }
-       
+
        /*
         * (non-Javadoc)
         * @see org.eclipse.jface.wizard.Wizard#addPage(org.eclipse.jface.wizard.IWizardPage)
@@ -49,12 +52,12 @@ public class SddImportWizard extends AbstractImportWizard<SDDImportConfigurator>
        @Override
        public void addPages() {
                super.addPages();
-               
-               dataSourcePage = new ImportFromFileDataSourceWizardPage("Choose File", 
+
+               dataSourcePage = new ImportFromFileDataSourceWizardPage("Choose File",
                                "Please choose an XML file in the SDD format.", new String[]{"*.xml", "*.sdd"});
                addPage(dataSourcePage);
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.jface.wizard.Wizard#performFinish()
         */
@@ -64,9 +67,14 @@ public class SddImportWizard extends AbstractImportWizard<SDDImportConfigurator>
                URI source = dataSourcePage.getUri();
                configurator.setSource(source);
                configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
-               
-               CdmStore.getImportManager().run(configurator);
-               
+
+               if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                   Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
+                   CdmStore.getImportManager().run(job);
+               } else {
+                   CdmStore.getImportManager().run(configurator);
+               }
+
                return true;
        }
 
@@ -74,7 +82,8 @@ public class SddImportWizard extends AbstractImportWizard<SDDImportConfigurator>
         * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
         */
        /** {@inheritDoc} */
-       public void init(IWorkbench workbench, IStructuredSelection selection) {
+       @Override
+    public void init(IWorkbench workbench, IStructuredSelection selection) {
                super.init(workbench, selection);
                configurator =  CdmStore.getImportManager().SddConfigurator();
        }
index 96a95ae554bd9a61476a7baa8a46362a1c330731..13113c2e49a6bf93ee1058b30955bb69d58d2396 100644 (file)
@@ -1,21 +1,24 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.io.wizard;
 
+import java.io.File;
 import java.net.URI;
 
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IWorkbench;
 
 import eu.etaxonomy.cdm.database.DbSchemaValidation;
+import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
 import eu.etaxonomy.cdm.io.tcsxml.in.TcsXmlImportConfigurator;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -26,8 +29,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created 15.06.2009
  * @version 1.0
  */
-public class TcsImportWizard extends AbstractImportWizard<TcsXmlImportConfigurator>{
-       
+public class TcsImportWizard extends AbstractImportWizard<TcsXmlImportConfigurator> {
+
        private TcsXmlImportConfigurator configurator;
 
        private ImportFromFileDataSourceWizardPage dataSourcePage;
@@ -38,20 +41,26 @@ public class TcsImportWizard extends AbstractImportWizard<TcsXmlImportConfigurat
        /** {@inheritDoc} */
        @Override
        public boolean performFinish() {
-               URI source = dataSourcePage.getUri();
-               configurator.setSource(source);
-               configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
-               
-               CdmStore.getImportManager().run(configurator);
-               
-               return true;
+           URI source = dataSourcePage.getUri();
+           configurator.setSource(source);
+           configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
+
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
+               CdmStore.getImportManager().run(job);
+           } else {
+               CdmStore.getImportManager().run(configurator);
+           }
+
+           return true;
        }
 
        /* (non-Javadoc)
         * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
         */
        /** {@inheritDoc} */
-       public void init(IWorkbench workbench, IStructuredSelection selection) {
+       @Override
+    public void init(IWorkbench workbench, IStructuredSelection selection) {
                super.init(workbench, selection);
                configurator = CdmStore.getImportManager().TcsConfigurator();
        }
@@ -72,7 +81,7 @@ public class TcsImportWizard extends AbstractImportWizard<TcsXmlImportConfigurat
        @Override
        public void addPages() {
                super.addPages();
-               
+
                dataSourcePage = ImportFromFileDataSourceWizardPage.XML();
                addPage(dataSourcePage);
        }
index 2d21f05c071faad720ffdee9321fe36bda723f15..560fd61f04b8dc701883df406c8c9934b2940eb4 100644 (file)
@@ -18,6 +18,10 @@ import java.util.List;
 import java.util.TreeSet;
 
 import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.NotEnabledException;
+import org.eclipse.core.commands.NotHandledException;
+import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.core.commands.operations.AbstractOperation;
 import org.eclipse.core.commands.operations.IOperationHistory;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -44,6 +48,7 @@ import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
 import org.eclipse.ui.part.EditorPart;
 import org.eclipse.ui.progress.IProgressService;
@@ -54,6 +59,7 @@ import org.eclipse.ui.themes.IThemeManager;
 import eu.etaxonomy.cdm.model.common.IEnumTerm;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer;
 import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
@@ -341,6 +347,51 @@ public abstract class AbstractUtility {
                return Status.OK_STATUS;
        }
 
+          public static IStatus executeOperation(final AbstractOperation operation, final RemotingCdmHandler handler) {
+               if (getOperationHistory() == null) {
+                   throw new IllegalArgumentException(
+                           "There is no operation history for this context");
+               }
+
+               final IAdaptable uiInfoAdapter = WorkspaceUndoUtil
+                       .getUIInfoAdapter(getShell());
+
+               IRunnableWithProgress runnable = new IRunnableWithProgress() {
+
+                   @Override
+                   public void run(IProgressMonitor monitor)
+                           throws InvocationTargetException, InterruptedException {
+                       String operationlabel = operation.getLabel();
+                       monitor.beginTask(operationlabel, 100);
+                       IStatus status = Status.CANCEL_STATUS;
+                       try {
+                           operation.addContext(IOperationHistory.GLOBAL_UNDO_CONTEXT);
+                           status = getOperationHistory().execute(operation, monitor,
+                                   uiInfoAdapter);
+                           if(handler != null) {
+                               handler.postOperation(status);
+                           }
+                       } catch (ExecutionException e) {
+                           MessagingUtils.operationDialog(this, e, TaxeditorStorePlugin.PLUGIN_ID, operationlabel, null);
+                       } finally {
+                           monitor.done();
+                       }
+
+                       String statusString = status.equals(Status.OK_STATUS) ? "completed"
+                               : "cancelled";
+                       setStatusLine(operationlabel + " " + statusString + ".");
+
+                   }
+               };
+
+               try {
+                   runInUI(runnable, null);
+               } catch (Exception e) {
+                   MessagingUtils.messageDialog("Error executing operation", AbstractUtility.class, "An error occured while executing " + operation.getLabel(), e);
+               }
+
+               return Status.OK_STATUS;
+           }
        /**
         * <p>
         * getOperationHistory
@@ -776,4 +827,28 @@ public abstract class AbstractUtility {
     }
 
 
+    public static void executeCommand(String commandId, Object source, String pluginId) {
+        IHandlerService handlerService = (IHandlerService) AbstractUtility.getService(IHandlerService.class);
+        Exception exception = null;
+        try {
+            handlerService.executeCommand(commandId, null);
+        } catch (ExecutionException e) {
+            exception = e;
+        } catch (NotDefinedException e) {
+            exception = e;
+        } catch (NotEnabledException e) {
+            exception = e;
+        } catch (NotHandledException e) {
+            exception = e;
+        } finally {
+            if(exception != null) {
+                MessagingUtils.errorDialog("Error executing command",
+                        source,
+                        "Could not execute command with id " + commandId ,
+                        pluginId,
+                        exception,
+                        true);
+            }
+        }
+    }
 }
index e9f2eef6a52108b91be1330c83c9d92e2de35e4a..02012cdbb023b2670ad4cc66e5cf982ded21293f 100644 (file)
@@ -38,7 +38,7 @@ public class NewAmplificationWizard  extends AbstractNewEntityWizard<Amplificati
     /** {@inheritDoc} */
     @Override
     protected void saveEntity() {
-        CdmStore.getService(IAmplificationService.class).saveOrUpdate(getEntity());
+        CdmStore.getService(IAmplificationService.class).merge(getEntity());
     }
 
     /** {@inheritDoc} */
index 6b23b4bc04b8974d7f04b79dae779a71fa605be5..c298a5781a61d905f78707b0ae8c436de73d8b82 100644 (file)
@@ -1,15 +1,18 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.newWizard;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
 import eu.etaxonomy.cdm.api.service.IClassificationService;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -36,16 +39,22 @@ public class NewClassificationWizard extends AbstractNewEntityWizard<Classificat
                entity = CdmStore.getService(IClassificationService.class).load(entity.getUuid());
                super.setEntity(entity);
        }
-       
+
        @Override
        public void addPages() {
                classificationWizardPage = new ClassificationWizardPage(formFactory, getConversationHolder(), getEntity());
                addPage(classificationWizardPage);
        }
-       
+
        @Override
        protected void saveEntity() {
-               CdmStore.getService(IClassificationService.class).saveOrUpdate(getEntity());
+               //CdmStore.getService(IClassificationService.class).saveOrUpdate(getEntity());
+           Classification classification = getEntity();
+           CdmStore.getService(IClassificationService.class).merge(getEntity());
+
+           CdmApplicationState.getCurrentDataChangeService()
+        .fireChangeEvent(new CdmChangeEvent(Action.Create, classification, NewTaxonNodeWizard.class), true);
+
        }
 
        @Override
index d28f0ec5d6ddf22aebde5d18e77193ed517b6ba5..e81a0e50b70b331b31d21fbadbdb773dfdbce9b4 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -29,14 +29,14 @@ public class NewCollectionWizard extends AbstractNewEntityWizard<Collection> {
        public void addPages() {
                addPage(new CollectionWizardPage(formFactory, getConversationHolder(), getEntity()));
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#saveEntity()
         */
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-               CdmStore.getService(ICollectionService.class).saveOrUpdate(getEntity());
+               CdmStore.getService(ICollectionService.class).merge(getEntity());
        }
 
        /* (non-Javadoc)
@@ -52,5 +52,5 @@ public class NewCollectionWizard extends AbstractNewEntityWizard<Collection> {
        protected String getEntityName() {
                return "Collection";
        }
-       
+
 }
index 6849014316f3ee9d65d1590c5769ca6c7eacdb61..59dee8496855c1bac5928fe4b999b16cd9d67b00 100644 (file)
@@ -1,15 +1,32 @@
 // $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.
-*/
+ * 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.newWizard;
 
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.NotEnabledException;
+import org.eclipse.core.commands.NotHandledException;
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.IHandlerService;
+
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
@@ -19,7 +36,10 @@ import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseWizardPage;
@@ -27,55 +47,48 @@ import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralWizardPage
 import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralWizardPage;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitWizardPage;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventWizardPage;
+import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateSearchCompositeController;
 
 /**
- * <p>NewDerivedUnitBaseWizard class.</p>
- *
  * @author n.hoffmann
  * @created Jun 16, 2010
  * @version 1.0
  */
 public class NewDerivedUnitBaseWizard extends AbstractNewEntityWizard<SpecimenOrObservationBase> implements IDerivedUnitFacadePart{
-       private SpecimenOrObservationType specOrObsType = null;
+    private SpecimenOrObservationType specOrObsType = null;
 
-       public NewDerivedUnitBaseWizard() {
-               super();
-       }
+    public NewDerivedUnitBaseWizard() {
+        super();
+    }
 
-       public NewDerivedUnitBaseWizard(SpecimenOrObservationType specOrObsType) {
-               super();
-               this.specOrObsType = specOrObsType;
-       }
-       /** {@inheritDoc} */
-       @Override
-       public void addPages() {
-           DerivedUnitFacade facade = null;
-           try {
-               if(getEntity() instanceof DerivedUnit) {
-                   facade = DerivedUnitFacade.NewInstance((DerivedUnit)getEntity(), PreferencesUtil.getDerivedUnitConfigurator());
-                   addPage(new DerivedUnitGeneralWizardPage(formFactory, getConversationHolder(), facade));
-                   addPage(new GatheringEventWizardPage(formFactory, getConversationHolder(), facade));
-                   addPage(new FieldUnitWizardPage(formFactory, getConversationHolder(), facade));
-                   addPage(new DerivedUnitBaseWizardPage(formFactory, getConversationHolder(), facade));
-               }
-               else if(getEntity() instanceof FieldUnit){
-                   facade = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit)getEntity(), PreferencesUtil.getDerivedUnitConfigurator());
-                   addPage(new FieldUnitGeneralWizardPage(formFactory, getConversationHolder(), facade));
-                   addPage(new GatheringEventWizardPage(formFactory, getConversationHolder(), facade));
-                   addPage(new FieldUnitWizardPage(formFactory, getConversationHolder(), facade));
-               }
-           } catch (DerivedUnitFacadeNotSupportedException e) {
-               // we should never get here
-               throw new IllegalStateException();
-           }
-       }
+    public NewDerivedUnitBaseWizard(SpecimenOrObservationType specOrObsType) {
+        super();
+        this.specOrObsType = specOrObsType;
+    }
+    /** {@inheritDoc} */
+    @Override
+    public void addPages() {
+        DerivedUnitFacade facade = null;
+        try {
+            if(getEntity() instanceof DerivedUnit) {
+                facade = DerivedUnitFacade.NewInstance((DerivedUnit)getEntity(), PreferencesUtil.getDerivedUnitConfigurator());
+                addPage(new DerivedUnitGeneralWizardPage(formFactory, getConversationHolder(), facade));
+                addPage(new GatheringEventWizardPage(formFactory, getConversationHolder(), facade));
+                addPage(new FieldUnitWizardPage(formFactory, getConversationHolder(), facade));
+                addPage(new DerivedUnitBaseWizardPage(formFactory, getConversationHolder(), facade));
+            }
+            else if(getEntity() instanceof FieldUnit){
+                facade = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit)getEntity(), PreferencesUtil.getDerivedUnitConfigurator());
+                addPage(new FieldUnitGeneralWizardPage(formFactory, getConversationHolder(), facade));
+                addPage(new GatheringEventWizardPage(formFactory, getConversationHolder(), facade));
+                addPage(new FieldUnitWizardPage(formFactory, getConversationHolder(), facade));
+            }
+        } catch (DerivedUnitFacadeNotSupportedException e) {
+            // we should never get here
+            throw new IllegalStateException();
+        }
+    }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#
-     * createNewEntity()
-     */
     /** {@inheritDoc} */
     @Override
     protected SpecimenOrObservationBase createNewEntity() {
@@ -84,8 +97,8 @@ public class NewDerivedUnitBaseWizard extends AbstractNewEntityWizard<SpecimenOr
         } else {
             if (SpecimenOrObservationType.Media.equals(specOrObsType)
                     || ((specOrObsType.getKindOf() != null) && specOrObsType.getKindOf().equals(SpecimenOrObservationType.Media))) {
-                   MediaSpecimen mediaSpecimen = MediaSpecimen.NewInstance(specOrObsType);
-                   //a MediaSpecimen with no media attached does not make sense. Hence, we add one
+                MediaSpecimen mediaSpecimen = MediaSpecimen.NewInstance(specOrObsType);
+                //a MediaSpecimen with no media attached does not make sense. Hence, we add one
                 mediaSpecimen.setMediaSpecimen(Media.NewInstance());
                 return mediaSpecimen;
             } else if (specOrObsType.equals(SpecimenOrObservationType.FieldUnit)) {
@@ -96,19 +109,66 @@ public class NewDerivedUnitBaseWizard extends AbstractNewEntityWizard<SpecimenOr
         }
     }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#saveEntity()
-        */
+
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-               CdmStore.getService(IOccurrenceService.class).saveOrUpdate(getEntity());
+               CdmStore.getService(IOccurrenceService.class).merge(getEntity());
        }
 
-       @Override
-       protected String getEntityName() {
-               return "Specimen";
-       }
+
+    @Override
+    protected String getEntityName() {
+        return "Specimen";
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean performFinish() {
+        boolean performFinish = super.performFinish();
+        int returnCode = IDialogConstants.NO_ID;
+        if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.PROMPT_FOR_OPEN_SPECIMEN_IN_EDITOR)){
+            MessageDialogWithToggle messageDialog = MessageDialogWithToggle.openYesNoQuestion(getShell(),
+                    "Choose opening option", "Do you want to open the specimen in the specimen editor?",
+                    "Remember my decision?", false, PreferencesUtil.getPreferenceStore(),
+                    IPreferenceKeys.ALWAYS_OPEN_SPECIMEN_IN_EDITOR);
+            returnCode = messageDialog.getReturnCode();
+            PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.PROMPT_FOR_OPEN_SPECIMEN_IN_EDITOR, messageDialog.getToggleState());
+            if (returnCode != IDialogConstants.YES_ID) {
+                return performFinish;
+            }
+        }
+        if (returnCode==IDialogConstants.YES_ID ||
+                PreferencesUtil.getPreferenceStore().getString(IPreferenceKeys.ALWAYS_OPEN_SPECIMEN_IN_EDITOR)
+                .equals(MessageDialogWithToggle.ALWAYS)) {
+            IHandlerService handlerService = (IHandlerService) AbstractUtility.getService(IHandlerService.class);
+
+            // get the command from plugin.xml
+            IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+            ICommandService cmdService = (ICommandService) window.getService(ICommandService.class);
+            Command command = cmdService.getCommand("eu.etaxonomy.taxeditor.editor.openSpecimenEditor");
+            Map<String, UUID> parameters = new HashMap<String, UUID>();
+            parameters.put("eu.etaxonomy.taxeditor.specimenUuidParameter", getEntity().getUuid());
+            ParameterizedCommand parameterizedCommand = ParameterizedCommand.generateCommand(command, parameters);
+
+
+            // execute the command
+            try {
+                handlerService.executeCommand(parameterizedCommand, null);
+            } catch (ExecutionException e) {
+                MessagingUtils.error(DerivateSearchCompositeController.class, e);
+            } catch (NotDefinedException e) {
+                MessagingUtils.error(DerivateSearchCompositeController.class, e);
+            } catch (NotEnabledException e) {
+                MessagingUtils.error(DerivateSearchCompositeController.class, e);
+            } catch (NotHandledException e) {
+                MessagingUtils.error(DerivateSearchCompositeController.class, e);
+            }
+        }
+        return performFinish;
+    }
 
 
 }
index a93e8f18541aa099c634f4d0492858ca5375eef6..48bff08362a3577ea85f75b404616fbbb147e29a 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -38,7 +38,7 @@ public class NewFieldUnitWizard extends AbstractNewEntityWizard<FieldUnit> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-               CdmStore.getService(IOccurrenceService.class).saveOrUpdate(getEntity());
+               CdmStore.getService(IOccurrenceService.class).merge(getEntity());
        }
 
        @Override
index d14e60819095bb07201120674d8c3be2daae0fe1..4a3fb425ce38408e5695e3b8c0bb06b5a3c4422a 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -20,9 +20,9 @@ import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetail
  * @created Sept 13 2012
  */
 public class NewGrantedAuthorityWizard extends AbstractNewEntityWizard<GrantedAuthorityImpl> {
-       
+
        private GrantedAuthorityDetailWizardPage authorityPage;
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.jface.wizard.Wizard#addPages()
         */
@@ -38,7 +38,7 @@ public class NewGrantedAuthorityWizard extends AbstractNewEntityWizard<GrantedAu
         */
        @Override
        protected void saveEntity() {
-               CdmStore.getService(IGrantedAuthorityService.class).saveOrUpdate(getEntity());
+               CdmStore.getService(IGrantedAuthorityService.class).merge(getEntity());
        }
 
        /* (non-Javadoc)
index ad6c3ac255de9a5d835726ce5b3b8ef04734a295..54758d1fac71bbe74fc701bb26c699e04d4ce692 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -23,7 +23,7 @@ import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailWizardPage;
 public class NewGroupWizard extends AbstractNewEntityWizard<Group> {
 
        private GroupDetailWizardPage groupPage;
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.jface.wizard.Wizard#addPages()
         */
@@ -32,13 +32,13 @@ public class NewGroupWizard extends AbstractNewEntityWizard<Group> {
                groupPage = new GroupDetailWizardPage(formFactory, getConversationHolder(), getEntity());
                super.addPage(groupPage);
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#saveEntity()
         */
        @Override
        protected void saveEntity() {
-               CdmStore.getService(IGroupService.class).saveOrUpdate(getEntity());
+               CdmStore.getService(IGroupService.class).merge(getEntity());
        }
 
        /* (non-Javadoc)
index 1eba0be640dbf9de4c056c80c32d23bdedc40e47..c14d13ab09867d7f12096a1af40f2d4ec8b1c804 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -29,13 +29,13 @@ public class NewInstitutionWizard extends AbstractNewEntityWizard<Institution> {
        public void addPages() {
                addPage(new InstitutionWizardPage(formFactory, getConversationHolder(), getEntity()));
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#saveEntity()
         */
        @Override
        protected void saveEntity() {
-               CdmStore.getService(IAgentService.class).saveOrUpdate(getEntity());
+               CdmStore.getService(IAgentService.class).merge(getEntity());
        }
 
        /* (non-Javadoc)
index 6e6ec088643f8ea272f1983d83a6d03f7ecac373..575f6a7ee615cba3e3ef3ccf1719095b48568534 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -33,7 +33,7 @@ public class NewNonViralNameWizard extends AbstractNewEntityWizard<NonViralName>
        public void addPages() {
                addPage(new NonViralNameWizardPage(formFactory, getConversationHolder(), getEntity()));
        }
-       
+
        /** {@inheritDoc} */
        @Override
        protected NonViralName createNewEntity() {
@@ -49,7 +49,7 @@ public class NewNonViralNameWizard extends AbstractNewEntityWizard<NonViralName>
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-               CdmStore.getService(INameService.class).saveOrUpdate(getEntity());
+               CdmStore.getService(INameService.class).merge(getEntity());
        }
 
        @Override
index da18787665f6b06ea4ce61095da79e6055b150b8..abb03bd1cbc80543739685411758b2d742c55344 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -29,7 +29,7 @@ public class NewPersonWizard extends AbstractNewEntityWizard<Person> {
        public void addPages() {
                addPage(new PersonWizardPage(formFactory, getConversationHolder(), getEntity()));
        }
-       
+
        /** {@inheritDoc} */
        @Override
        protected Person createNewEntity() {
@@ -39,7 +39,7 @@ public class NewPersonWizard extends AbstractNewEntityWizard<Person> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-               CdmStore.getService(IAgentService.class).saveOrUpdate(getEntity());
+               CdmStore.getService(IAgentService.class).merge(getEntity());
        }
 
        @Override
index 8a9d17db502c78cf2855e2d135dcd6602f9abd05..9333780ac38c754dc66e000de69a81ceacd63563 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.newWizard;
 
@@ -14,24 +14,24 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class NewPolytomousKeyWizard extends AbstractNewEntityWizard<PolytomousKey> {
 
     private PolytomousKeyWizardPage polytomousKeyPage;
-    
+
        @Override
        public void addPages() {
                polytomousKeyPage = new PolytomousKeyWizardPage(formFactory, getConversationHolder(), getEntity());
                super.addPage(polytomousKeyPage);
        }
-       
+
        public String getPolytomousKeyName() {
            return polytomousKeyPage.getPolytomousKeyName();
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#saveEntity()
         */
        @Override
        protected void saveEntity() {
            if(!polytomousKeyPage.getPolytomousKeyName().equals("")) {
-               CdmStore.getService(IPolytomousKeyService.class).saveOrUpdate(getEntity());
+               CdmStore.getService(IPolytomousKeyService.class).merge(getEntity());
            }
        }
 
index dbe73be468f3f4702022d9291b67347bc3286f61..1e31797d6e9ba9905dd5bbf588c17272fdf01928 100644 (file)
@@ -38,7 +38,7 @@ public class NewPrimerWizard  extends AbstractNewEntityWizard<Primer> {
     /** {@inheritDoc} */
     @Override
     protected void saveEntity() {
-        CdmStore.getService(IPrimerService.class).saveOrUpdate(getEntity());
+        CdmStore.getService(IPrimerService.class).merge(getEntity());
     }
 
     /** {@inheritDoc} */
index f1b19c94a5dac2417fac4d26252401f63d027f98..f89d0458e18d054efac1cf7cf3b4a140a5b775ca 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -24,9 +24,9 @@ import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceWizardPage;
  * @version 1.0
  */
 public class NewReferenceWizard extends AbstractNewEntityWizard<Reference> {
-       
+
        private ReferenceWizardPage referencePage;
-       
+
        /** {@inheritDoc} */
        @Override
        public void addPages() {
@@ -45,7 +45,7 @@ public class NewReferenceWizard extends AbstractNewEntityWizard<Reference> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-               CdmStore.getService(IReferenceService.class).saveOrUpdate(getEntity());
+           CdmStore.getService(IReferenceService.class).save(getEntity());
        }
 
        /** {@inheritDoc} */
index 82550414bc3fae12207efa57711d0140b5bf86a0..735bb0870bac07967f30f6d94a521c69c83f1913 100644 (file)
@@ -3,12 +3,18 @@
  */
 package eu.etaxonomy.taxeditor.newWizard;
 
+import java.util.HashSet;
+import java.util.Set;
 import java.util.UUID;
 
 import org.apache.commons.lang.StringUtils;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
 import eu.etaxonomy.cdm.api.service.IClassificationService;
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
@@ -26,94 +32,113 @@ import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeWizardPage;
  */
 public class NewTaxonNodeWizard extends AbstractNewEntityWizard<ITaxonTreeNode>{
 
-       private TaxonNodeWizardPage taxonNodePage;
-       private boolean openEmptyEditor;
-       private UUID generatedTaxonNodeUuid;
+    private TaxonNodeWizardPage taxonNodePage;
+    private boolean openEmptyEditor;
+    private UUID generatedTaxonNodeUuid;
     private IWizardPageListener wizardPageListener;
 
-       @Override
-       public void addPages() {
-               taxonNodePage = new TaxonNodeWizardPage(formFactory, getConversationHolder(), getEntity(), wizardPageListener);
-               addPage(taxonNodePage);
-       }
-
-       @Override
-       protected void saveEntity() {
-               if(taxonNodePage.getTaxon() == null || StringUtils.isEmpty(taxonNodePage.getTaxon().getName().getFullTitleCache())){
-                       openEmptyEditor = true;
-               }else{
-                       getConversationHolder().bind();
-                       ITaxonTreeNode parent = getParentTreeNode();
-                       Taxon taxon = taxonNodePage.getTaxon();
-                       try{
-                               TaxonNode taxonNode = parent.addChildTaxon(taxon, parent.getReference(), parent.getMicroReference());
-                               generatedTaxonNodeUuid = CdmStore.getService(ITaxonNodeService.class).saveOrUpdate(taxonNode);
-                       }catch(IllegalArgumentException e){
-                               MessagingUtils.warningDialog("Taxon already exists in classfication", getClass(), e.getMessage());
-                       }
-               }
-       }
-
-       @Override
-       protected ITaxonTreeNode createNewEntity() {
-               if(getSelection() != null){
-                       Object selectedObject = getSelection().getFirstElement();
-                       if(selectedObject instanceof ITaxonTreeNode){
-                           ITaxonTreeNode treeNode = (ITaxonTreeNode) selectedObject;
-
-                               if(treeNode instanceof Classification){
-                                       return CdmStore.getService(IClassificationService.class).load(treeNode.getUuid());
-                               }
-                               else if(treeNode instanceof TaxonNode){
-                                       return CdmStore.getService(ITaxonNodeService.class).load(treeNode.getUuid());
-                               }
-                       }
-               }
-
-               return null;
-       }
-
-       /**
-        * <p>openInEditor</p>
-        *
-        * @return a boolean.
-        */
-       public boolean openInEditor(){
-               return taxonNodePage.openInEditor();
-       }
-
-       /**
-        * <p>openEmpty</p>
-        *
-        * @return a boolean.
-        */
-       public boolean openEmpty(){
-               return openInEditor() && openEmptyEditor;
-       }
-
-       /**
-        * <p>getTaxonNode</p>
-        *
-        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
-        */
-       public TaxonNode getTaxonNode(){
-               if(generatedTaxonNodeUuid != null){
-                       return CdmStore.getService(ITaxonNodeService.class).load(generatedTaxonNodeUuid);
-               }
-               return null;
-       }
-
-       public ITaxonTreeNode getParentTreeNode(){
-               return taxonNodePage.getParentTreeNode();
-       }
-
-       @Override
-       protected String getEntityName() {
-               return "Taxon";
-       }
-
-       public void addWizardPageListener(IWizardPageListener wizardPageListener){
-           this.wizardPageListener = wizardPageListener;
-       }
+    @Override
+    public void addPages() {
+        taxonNodePage = new TaxonNodeWizardPage(formFactory, getConversationHolder(), getEntity(), wizardPageListener);
+        addPage(taxonNodePage);
+    }
+
+    @Override
+    protected void saveEntity() {
+        if(taxonNodePage.getTaxon() == null || StringUtils.isEmpty(taxonNodePage.getTaxon().getName().getFullTitleCache())){
+            openEmptyEditor = true;
+        }else{
+            getConversationHolder().bind();
+            ITaxonTreeNode parent = getParentTreeNode();
+            Taxon taxon = taxonNodePage.getTaxon();
+            try{
+                TaxonNode taxonNode = parent.addChildTaxon(taxon, parent.getReference(), parent.getMicroReference());
+                taxonNode = CdmStore.getService(ITaxonNodeService.class).merge(taxonNode);
+                generatedTaxonNodeUuid = taxonNode.getUuid();
+                Set<CdmBase> affectedObjects = new HashSet<CdmBase>();
+                //FIXME:Remoting Hack for now - need to generalise this
+                // by making the affected objects a set of ICdmBase
+                // Also, this needs to be moved to the new operations
+                // architecture.
+
+                TaxonNode parentNode = taxonNode.getParent();
+                if(parentNode.getParent() == null) {
+                    affectedObjects.add(taxonNode.getClassification());
+                }
+
+                if(parentNode instanceof TaxonNode) {
+                    affectedObjects.add(parentNode);
+                }
+
+                CdmApplicationState.getCurrentDataChangeService()
+                .fireChangeEvent(new CdmChangeEvent(Action.Create, affectedObjects, NewTaxonNodeWizard.class), true);
+
+            }catch(IllegalArgumentException e){
+                MessagingUtils.warningDialog("Taxon already exists in classfication", getClass(), e.getMessage());
+            }
+        }
+    }
+
+    @Override
+    protected ITaxonTreeNode createNewEntity() {
+        if(getSelection() != null){
+            Object selectedObject = getSelection().getFirstElement();
+            if(selectedObject instanceof ITaxonTreeNode){
+                ITaxonTreeNode treeNode = (ITaxonTreeNode) selectedObject;
+
+                if(treeNode instanceof Classification){
+                    return CdmStore.getService(IClassificationService.class).load(treeNode.getUuid());
+                }
+                else if(treeNode instanceof TaxonNode){
+                    return CdmStore.getService(ITaxonNodeService.class).load(treeNode.getUuid());
+                }
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * <p>openInEditor</p>
+     *
+     * @return a boolean.
+     */
+    public boolean openInEditor(){
+        return taxonNodePage.openInEditor();
+    }
+
+    /**
+     * <p>openEmpty</p>
+     *
+     * @return a boolean.
+     */
+    public boolean openEmpty(){
+        return openInEditor() && openEmptyEditor;
+    }
+
+    /**
+     * <p>getTaxonNode</p>
+     *
+     * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
+     */
+    public TaxonNode getTaxonNode(){
+        if(generatedTaxonNodeUuid != null){
+            return CdmStore.getService(ITaxonNodeService.class).load(generatedTaxonNodeUuid);
+        }
+        return null;
+    }
+
+    public ITaxonTreeNode getParentTreeNode(){
+        return taxonNodePage.getParentTreeNode();
+    }
+
+    @Override
+    protected String getEntityName() {
+        return "Taxon";
+    }
+
+    public void addWizardPageListener(IWizardPageListener wizardPageListener){
+        this.wizardPageListener = wizardPageListener;
+    }
 
 }
\ No newline at end of file
index 050b5984334b77d838c98d2b54b95715fcd87b6c..faf7cb34069f5be98e870b5f8b565ba0c431af7c 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -29,7 +29,7 @@ public class NewTeamWizard extends AbstractNewEntityWizard<Team> {
        public void addPages() {
                addPage(new TeamWizardPage(formFactory, getConversationHolder(), getEntity()));
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#createNewEntity()
         */
@@ -42,7 +42,7 @@ public class NewTeamWizard extends AbstractNewEntityWizard<Team> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-               CdmStore.getService(IAgentService.class).saveOrUpdate(getEntity());
+               CdmStore.getService(IAgentService.class).merge(getEntity());
        }
 
        @Override
index aa3cd19dd733d2ae274bbc270091134c2b05eb6c..322b798dca2084d9669f4a86177d43e6782deae4 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.newWizard;
 
@@ -15,16 +15,16 @@ import eu.etaxonomy.taxeditor.ui.section.user.UserDetailWizardPage;
 public class NewUserWizard extends AbstractNewEntityWizard<User> {
 
        private UserDetailWizardPage userPage;
-       
+
        @Override
        public void addPages() {
                userPage = new UserDetailWizardPage(formFactory, getConversationHolder(), getEntity());
                addPage(userPage);
        }
-       
+
        @Override
        protected void saveEntity() {
-               CdmStore.getService(IUserService.class).saveOrUpdate(getEntity());
+               CdmStore.getService(IUserService.class).merge(getEntity());
        }
 
        @Override
index e42030d986305da803da9b07c1ffa30f1af89181..66e29b8a985164f989e30cc513a17d96ed8c7d00 100644 (file)
@@ -18,6 +18,7 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 
 /**
  * Superclass for all operation that have to be committed imediately after execution.
@@ -31,10 +32,24 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
  * @version 1.0
  */
 public abstract class AbstractPersistentPostOperation extends AbstractPostTaxonOperation {
-       private IConversationEnabled conversationEnabled;
+       private final IConversationEnabled conversationEnabled;
 
        protected ITaxonTreeNode parentNode;
 
+          /**
+     * <p>Constructor for AbstractPersistentPostOperation.</p>
+     *
+     * @param label a {@link java.lang.String} object.
+     * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+     * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
+     * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
+     */
+    protected AbstractPersistentPostOperation(String label, IUndoContext undoContext,
+            IPostOperationEnabled postOperationEnabled,
+            IConversationEnabled conversationEnabled) {
+        this(label, undoContext, postOperationEnabled, conversationEnabled, null);
+    }
+
        /**
         * <p>Constructor for AbstractPersistentPostOperation.</p>
         *
@@ -45,8 +60,9 @@ public abstract class AbstractPersistentPostOperation extends AbstractPostTaxonO
         */
        protected AbstractPersistentPostOperation(String label, IUndoContext undoContext,
                        IPostOperationEnabled postOperationEnabled,
-                       IConversationEnabled conversationEnabled) {
-               super(label, undoContext, postOperationEnabled);
+                       IConversationEnabled conversationEnabled,
+                       ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, postOperationEnabled, cdmEntitySessionEnabled);
                this.conversationEnabled = conversationEnabled;
        }
 
@@ -62,9 +78,11 @@ public abstract class AbstractPersistentPostOperation extends AbstractPostTaxonO
        public AbstractPersistentPostOperation(String label,
                        IUndoContext undoContext, TaxonNode taxonNode,
                        IPostOperationEnabled postOperationEnabled,
-                       IConversationEnabled conversationEnabled) {
-               super(label, undoContext, taxonNode, postOperationEnabled);
+                       IConversationEnabled conversationEnabled,
+                       ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, taxonNode, postOperationEnabled, cdmEntitySessionEnabled);
                this.conversationEnabled = conversationEnabled;
+
        }
 
        /**
@@ -79,10 +97,12 @@ public abstract class AbstractPersistentPostOperation extends AbstractPostTaxonO
        public AbstractPersistentPostOperation(String label,
                        IUndoContext undoContext, ITaxonTreeNode parentNode,
                        IPostOperationEnabled postOperationEnabled,
-                       IConversationEnabled conversationEnabled) {
-               super(label, undoContext, postOperationEnabled);
+                       IConversationEnabled conversationEnabled,
+            ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               super(label, undoContext, postOperationEnabled, cdmEntitySessionEnabled);
                this.parentNode = parentNode;
                this.conversationEnabled = conversationEnabled;
+
        }
 
        /* (non-Javadoc)
@@ -93,7 +113,7 @@ public abstract class AbstractPersistentPostOperation extends AbstractPostTaxonO
     protected IStatus postExecute(CdmBase objectAffectedByOperation) {
                Assert.isNotNull(conversationEnabled, "Operation has to have a valid conversation attached.");
 
-               
+
                if (!conversationEnabled.getConversationHolder().isClosed()){
                        conversationEnabled.getConversationHolder().bind();
                        conversationEnabled.getConversationHolder().commit(true);
@@ -108,6 +128,9 @@ public abstract class AbstractPersistentPostOperation extends AbstractPostTaxonO
         */
        public void bind(){
                conversationEnabled.getConversationHolder().bind();
+               if(getCdmEntitySessionEnabled() != null) {
+                   getCdmEntitySessionEnabled().getCdmEntitySession().bind();
+        }
        }
 
 }
index 5b7c68ec8230074a7de6ef72c0fd5ae812bb3636..c313d1f0f9f236ea48bcc8c0e558ad82a5e8a84a 100644 (file)
@@ -16,6 +16,7 @@ import org.eclipse.core.runtime.Status;
 
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 
 /**
  * @author pplitzner
@@ -35,6 +36,8 @@ public abstract class AbstractPostOperation<T extends ICdmBase> extends Abstract
      */
     protected IPostOperationEnabled postOperationEnabled;
 
+    private ICdmEntitySessionEnabled cdmEntitySessionEnabled;
+
 
     /**
      * <p>Constructor for AbstractPostOperation.</p>
@@ -71,6 +74,15 @@ public abstract class AbstractPostOperation<T extends ICdmBase> extends Abstract
         this.postOperationEnabled = postOperationEnabled;
     }
 
+    public AbstractPostOperation(String label, IUndoContext undoContext,
+            T element, IPostOperationEnabled postOperationEnabled,
+            ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+        this(label, undoContext);
+        this.element = element;
+        this.postOperationEnabled = postOperationEnabled;
+        this.cdmEntitySessionEnabled = cdmEntitySessionEnabled;
+    }
+
     /**
      * This method will try to call the post operation on a possibly registered
      * IPostOperationEnabled implementor. Objects that were affected by the operation
@@ -80,10 +92,11 @@ public abstract class AbstractPostOperation<T extends ICdmBase> extends Abstract
      * @return a {@link org.eclipse.core.runtime.IStatus} object.
      */
     protected IStatus postExecute(CdmBase objectAffectedByOperation) {
-       if(postOperationEnabled != null){
-               return postOperationEnabled.postOperation(objectAffectedByOperation) ? Status.OK_STATUS : Status.CANCEL_STATUS;
-       }
-       return Status.OK_STATUS;
+
+        if(postOperationEnabled != null){
+            return postOperationEnabled.postOperation(objectAffectedByOperation) ? Status.OK_STATUS : Status.CANCEL_STATUS;
+        }
+        return Status.OK_STATUS;
     }
 
     /**
@@ -92,7 +105,34 @@ public abstract class AbstractPostOperation<T extends ICdmBase> extends Abstract
      * @return a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
      */
     public IPostOperationEnabled getPostOperationEnabled() {
-       return postOperationEnabled;
+        return postOperationEnabled;
+    }
+
+//    protected IStatus updateSession(CdmBase clientObjectAffectedByOperation, UpdateResult updateResult) {
+//        Set<CdmBase> affectedObjects;
+//        if(updateResult == null) {
+//            affectedObjects = new HashSet<CdmBase>();
+//        } else {
+//            affectedObjects = updateResult.getUpdatedObjects();
+//        }
+//
+//        if(cdmEntitySessionEnabled != null) {
+//            cdmEntitySessionEnabled.getCdmEntitySession().update(clientObjectAffectedByOperation, affectedObjects);
+//        }
+//        return Status.OK_STATUS;
+//    }
+//
+//    protected IStatus updateSession(UUID uuid) {
+//
+//        if(cdmEntitySessionEnabled != null) {
+//            CdmBase cdmBase = cdmEntitySessionEnabled.getCdmEntitySession().remoteLoad(CdmStore.getService(IService.class),uuid);
+//            cdmEntitySessionEnabled.getCdmEntitySession().update(null, cdmBase);
+//        }
+//        return Status.OK_STATUS;
+//    }
+
+    public ICdmEntitySessionEnabled getCdmEntitySessionEnabled() {
+        return cdmEntitySessionEnabled;
     }
 
 }
\ No newline at end of file
index b37c5401060a7b0dc3825b3e1210422ba01ac992..6604f27bb22cd09fda681b1fd62231c5182e681d 100644 (file)
@@ -1,11 +1,11 @@
 /**
-* 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.
-*/
+ * 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.operation;
 
@@ -16,6 +16,7 @@ import org.eclipse.core.commands.operations.IUndoContext;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 
 /**
  * <p>Abstract AbstractPostOperation class.</p>
@@ -27,64 +28,78 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
  */
 public abstract class AbstractPostTaxonOperation extends AbstractPostOperation<Taxon> {
 
-       /**
-        * A reference to the taxons TaxonNode
-        */
-       protected ITaxonTreeNode taxonNode;
-
-       protected UUID parentNodeUuid;
-
-
-       /**
-        * <p>Constructor for AbstractPostOperation.</p>
-        *
-        * @param label a {@link java.lang.String} object.
-        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
-        * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
-        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
-        */
-       public AbstractPostTaxonOperation(String label, IUndoContext undoContext,
-                       Taxon taxon, IPostOperationEnabled postOperationEnabled) {
-               super(label, undoContext, taxon, postOperationEnabled);
-       }
-
-       /**
-        * <p>Constructor for AbstractPostOperation.</p>
-        *
-        * @param label a {@link java.lang.String} object.
-        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
-        * @param taxonNode a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
-        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
-        */
-       public AbstractPostTaxonOperation(String label, IUndoContext undoContext, TaxonNode taxonNode, IPostOperationEnabled postOperationEnabled){
-               this(label, undoContext, taxonNode.getTaxon(), postOperationEnabled);
-               this.taxonNode = taxonNode;
-       }
-
-       /**
-        * <p>Constructor for AbstractPostOperation.</p>
-        *
-        * @param label a {@link java.lang.String} object.
-        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
-        * @param parentNodeUuid a {@link java.util.UUID} object.
-        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
-        */
-       public AbstractPostTaxonOperation(String label, IUndoContext undoContext, UUID parentNodeUuid, IPostOperationEnabled postOperationEnabled){
-               super(label, undoContext, null, postOperationEnabled);
-               this.parentNodeUuid = parentNodeUuid;
-       }
-
-       /**
-        * <p>Constructor for AbstractPostOperation.</p>
-        *
-        * @param label a {@link java.lang.String} object.
-        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
-        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
-        */
-       public AbstractPostTaxonOperation(String label, IUndoContext undoContext,
-                       IPostOperationEnabled postOperationEnabled) {
-               super(label, undoContext, null, postOperationEnabled);
-       }
+    /**
+     * A reference to the taxons TaxonNode
+     */
+    protected ITaxonTreeNode taxonNode;
+
+    protected UUID parentNodeUuid;
+
+
+    /**
+     * <p>Constructor for AbstractPostOperation.</p>
+     *
+     * @param label a {@link java.lang.String} object.
+     * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+     * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
+     * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
+     */
+    public AbstractPostTaxonOperation(String label, IUndoContext undoContext,
+            Taxon taxon, IPostOperationEnabled postOperationEnabled) {
+        super(label, undoContext, taxon, postOperationEnabled, null);
+    }
+
+    public AbstractPostTaxonOperation(String label, IUndoContext undoContext,
+            Taxon taxon, IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+        super(label, undoContext, taxon, postOperationEnabled, cdmEntitySessionEnabled);
+    }
+
+    /**
+     * <p>Constructor for AbstractPostOperation.</p>
+     *
+     * @param label a {@link java.lang.String} object.
+     * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+     * @param taxonNode a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
+     * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
+     */
+    public AbstractPostTaxonOperation(String label, IUndoContext undoContext, TaxonNode taxonNode, IPostOperationEnabled postOperationEnabled){
+        this(label, undoContext, taxonNode, postOperationEnabled, null);
+    }
+
+    public AbstractPostTaxonOperation(String label, IUndoContext undoContext, TaxonNode taxonNode, IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled){
+        this(label, undoContext, taxonNode.getTaxon(), postOperationEnabled, cdmEntitySessionEnabled);
+        this.taxonNode = taxonNode;
+    }
+
+    /**
+     * <p>Constructor for AbstractPostOperation.</p>
+     *
+     * @param label a {@link java.lang.String} object.
+     * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+     * @param parentNodeUuid a {@link java.util.UUID} object.
+     * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
+     */
+    public AbstractPostTaxonOperation(String label, IUndoContext undoContext, UUID parentNodeUuid, IPostOperationEnabled postOperationEnabled){
+        super(label, undoContext, null, postOperationEnabled, null);
+        this.parentNodeUuid = parentNodeUuid;
+    }
+
+    /**
+     * <p>Constructor for AbstractPostOperation.</p>
+     *
+     * @param label a {@link java.lang.String} object.
+     * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+     * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
+     */
+    public AbstractPostTaxonOperation(String label, IUndoContext undoContext,
+            IPostOperationEnabled postOperationEnabled) {
+        super(label, undoContext, null, postOperationEnabled, null);
+    }
+
+    public AbstractPostTaxonOperation(String label, IUndoContext undoContext,
+            IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+        super(label, undoContext, null, postOperationEnabled, cdmEntitySessionEnabled);
+    }
 
     /**
      * @param text
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmHandler.java
new file mode 100644 (file)
index 0000000..1ce4165
--- /dev/null
@@ -0,0 +1,75 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.operation;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.ErrorDialog;
+
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+
+/**
+ * @author cmathew
+ * @date 16 Jun 2015
+ *
+ */
+public abstract class RemotingCdmHandler extends AbstractHandler {
+
+    private final String label;
+
+    public RemotingCdmHandler(String label) {
+        this.label = label;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        IStatus allowStatus = allowOperations(event);
+        if(allowStatus.isOK()) {
+            AbstractOperation op = prepareOperation(event);
+            if(op != null) {
+                AbstractUtility.executeOperation(op, this);
+            }
+        } else if(allowStatus.getSeverity() == IStatus.ERROR ||
+                allowStatus.getSeverity() == IStatus.WARNING ||
+                allowStatus.getSeverity() == IStatus.INFO) {
+            MessagingUtils.warningDialog("Can not perform " + label, event.getTrigger(), allowStatus);
+        }
+        return null;
+    }
+
+    public void postOperation(IStatus status) {
+
+        switch(status.getSeverity()) {
+        case IStatus.WARNING:
+            ErrorDialog.openError(null, "Operation successful but with warnings", null, status);
+            break;
+        case IStatus.ERROR:
+            ErrorDialog.openError(null, "Error executing operation", null, status);
+            break;
+        default:
+        }
+
+        onComplete();
+    }
+
+    public abstract IStatus allowOperations(ExecutionEvent event);
+
+    public abstract AbstractOperation prepareOperation(ExecutionEvent event);
+
+    public abstract void onComplete();
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmMergeOperation.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmMergeOperation.java
new file mode 100644 (file)
index 0000000..b93937e
--- /dev/null
@@ -0,0 +1,62 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.operation;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+/**
+ * @author cmathew
+ * @date 21 Jul 2015
+ *
+ */
+public abstract class RemotingCdmMergeOperation extends RemotingCdmOperation {
+
+    private CdmBase mergedCdmEntity;
+
+    public RemotingCdmMergeOperation(String label, Action action, Object source, boolean async) {
+        super(label, action, source, async);
+    }
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmOperation#doExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    @Override
+    protected boolean doExecute(IProgressMonitor monitor, IAdaptable info) {
+        try {
+            mergedCdmEntity = doMergeExecute(monitor, info);
+        } catch (Exception e) {
+             throw new RuntimeException(e);
+        }
+        return true;
+    }
+
+    protected abstract CdmBase doMergeExecute(IProgressMonitor monitor, IAdaptable info) throws Exception;
+
+    @Override
+    protected void postExecute(boolean success) {
+        if(success && mergedCdmEntity != null) {
+            fireDataChangeEvent(mergedCdmEntity);
+        }
+
+    }
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmOperation#onComplete(boolean)
+     */
+    @Override
+    protected IStatus onComplete(boolean success) {
+        return Status.OK_STATUS;
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmOperation.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmOperation.java
new file mode 100644 (file)
index 0000000..129b96c
--- /dev/null
@@ -0,0 +1,98 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.operation;
+
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+/**
+ * @author cmathew
+ * @date 16 Jun 2015
+ *
+ */
+public abstract class RemotingCdmOperation extends AbstractOperation {
+
+    private final Object source;
+    private final Action action;
+    private final boolean async;
+    protected Class entityType;
+
+    public RemotingCdmOperation(String label, Action action, Object source, boolean async) {
+        super(label);
+        this.source = source;
+        this.action = action;
+        this.async = async;
+    }
+
+    /* (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 {
+
+       boolean success = doExecute(monitor, info);
+       postExecute(success);
+       return onComplete(success);
+    }
+
+    protected abstract boolean doExecute(IProgressMonitor monitor, IAdaptable info);
+
+    protected void postExecute(boolean success) {}
+
+    protected abstract IStatus onComplete(boolean success);
+
+    protected void fireDataChangeEvent(Set<CdmBase> changedObjects) {
+        if(changedObjects != null && !changedObjects.isEmpty()) {
+            CdmApplicationState.getCurrentDataChangeService().fireChangeEvent(new CdmChangeEvent(action, changedObjects, source.getClass()), async);
+        }
+    }
+
+    protected void fireDataChangeEvent(UpdateResult updateResult) {
+        Set<CdmBase> updatedObjects = updateResult.getUpdatedObjects();
+        CdmApplicationState.getCurrentDataChangeService()
+            .fireChangeEvent(new CdmChangeEvent(action, updatedObjects, source.getClass(), entityType), async);
+    }
+
+    protected void fireDataChangeEvent(CdmBase cdmBase) {
+        if(cdmBase != null) {
+            CdmApplicationState.getCurrentDataChangeService().fireChangeEvent(new CdmChangeEvent(action, cdmBase, source.getClass()), async);
+        }
+    }
+
+    /* (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 {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (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;
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperation.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperation.java
new file mode 100644 (file)
index 0000000..f06fb2e
--- /dev/null
@@ -0,0 +1,123 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.operation;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+
+/**
+ * @author cmathew
+ * @date 16 Jun 2015
+ *
+ */
+public abstract class RemotingCdmUpdateOperation extends RemotingCdmOperation {
+
+    private UpdateResult updateResult;
+    public static boolean throwExceptions = false;
+
+    /**
+     * @param label
+     */
+    public RemotingCdmUpdateOperation(String label, Action action, Object source, boolean async) {
+        super(label, action, source, async);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmOperation#doExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    @Override
+    protected boolean doExecute(IProgressMonitor monitor, IAdaptable info) {
+        try {
+            updateResult = doUpdateExecute(monitor, info);
+        } catch (Exception e) {
+            if(throwExceptions) {
+                throw new RuntimeException(e);
+            } else {
+                UpdateResult exceptionResult = new UpdateResult();
+                exceptionResult.addException(e);
+                exceptionResult.setAbort();
+                updateResult = exceptionResult;
+            }
+        }
+        return updateResult.isOk();
+    }
+
+    protected abstract UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception;
+
+    @Override
+    protected void postExecute(boolean success) {
+        if(success && updateResult != null) {
+            fireDataChangeEvent(updateResult);
+        }
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmOperation#onComplete(boolean)
+     */
+    @Override
+    protected IStatus onComplete(boolean success) {
+
+        if(updateResult != null) {
+            int statusFlag = IStatus.OK;
+
+            Collection<Exception> exceptions = updateResult.getExceptions();
+            StringBuffer statusMsg = new StringBuffer();
+            if(success && updateResult.isOk()) {
+                if(exceptions.isEmpty()) {
+                    return Status.OK_STATUS;
+                } else {
+                    statusFlag = IStatus.WARNING;
+                    statusMsg.append(getLabel() + " executed sucessfully but with warnings." + System.lineSeparator());
+                }
+            } else if (updateResult.isError()) {
+                statusFlag = IStatus.ERROR;
+                statusMsg.append(getLabel() + " failed." + System.lineSeparator());
+            } else if (updateResult.isAbort()) {
+                statusFlag = IStatus.ERROR;
+                statusMsg.append(getLabel() + " aborted." + System.lineSeparator());
+            }
+
+            Status[] childStatus = new Status[exceptions.size()];
+            int count = 0;
+            Set<String> messages = new HashSet<String>();
+            for(Exception ex : exceptions) {
+                Status status = new Status(statusFlag,
+                        "unknown",
+                        statusFlag,
+                        ex.getLocalizedMessage(),
+                        ex);
+                messages.add(ex.getLocalizedMessage());
+                childStatus[count] = status;
+                count++;
+            }
+
+            statusMsg.append("Please click on the 'Details' button to see all the errors / warnings");
+
+            MultiStatus multiStatus = new MultiStatus("unknown",
+                    statusFlag,
+                    childStatus,
+                    statusMsg.toString(),
+                    null);
+            return multiStatus;
+        }
+        return null;
+    }
+}
index 48a56f518ae00f2d6e96d95e8d6cbaba7fd8a303..31eda3f375d09ec1285c94ec48fab148e1bcc516 100644 (file)
@@ -14,6 +14,7 @@ import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.strategy.match.MatchException;
+import eu.etaxonomy.cdm.strategy.match.MatchStrategyConfigurator.MatchStrategy;
 import eu.etaxonomy.cdm.strategy.parser.NonViralNameParserImpl;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
@@ -87,8 +88,8 @@ public class ParseHandler{
         * @param unparsedNameString a {@link java.lang.String} object.
         * @return a {@link eu.etaxonomy.cdm.model.name.TaxonNameBase} object.
         */
-       public static TaxonNameBase parseReferencedName(String unparsedNameString, Rank rank){
-               TaxonNameBase name = nonViralNameParser.parseReferencedName(unparsedNameString,
+       public static NonViralName parseReferencedName(String unparsedNameString, Rank rank){
+           NonViralName name = nonViralNameParser.parseReferencedName(unparsedNameString,
                                PreferencesUtil.getPreferredNomenclaturalCode(), rank);
 
 //             if (name.hasProblem()) {
@@ -98,8 +99,8 @@ public class ParseHandler{
                return name;
        }
 
-       public static TaxonNameBase parseName(String unparsedNameString, Rank rank){
-               TaxonNameBase name = nonViralNameParser.parseFullName(unparsedNameString,
+       public static NonViralName parseName(String unparsedNameString, Rank rank){
+               NonViralName name = nonViralNameParser.parseFullName(unparsedNameString,
                                PreferencesUtil.getPreferredNomenclaturalCode(), rank);
 
                return name;
@@ -111,7 +112,7 @@ public class ParseHandler{
         *
         * @return a {@link eu.etaxonomy.cdm.model.name.TaxonNameBase} object.
         */
-       public static TaxonNameBase createEmptyName(){
+       public static NonViralName createEmptyName(){
                return nonViralNameParser.getNonViralNameInstance("", PreferencesUtil.getPreferredNomenclaturalCode());
        }
 
@@ -301,7 +302,9 @@ public class ParseHandler{
             return new ArrayList<INomenclaturalReference>();
         }
                try{
-                       return CdmStore.getCommonService().findMatching(nomenclaturalReference, MatchStrategyConfigurator.ReferenceMatchStrategy());
+
+                       return CdmStore.getCommonService().findMatching(nomenclaturalReference, MatchStrategy.Reference);
+
                }catch (MatchException e) {
                        MessagingUtils.error(this.getClass(), "Error finding matching references", e);
                }
@@ -319,7 +322,9 @@ public class ParseHandler{
                }
 
                try{
-                       return CdmStore.getCommonService().findMatching(authorTeam, MatchStrategyConfigurator.TeamOrPersonMatchStrategy());
+
+                       return CdmStore.getCommonService().findMatching(authorTeam, MatchStrategy.TeamOrPerson);
+
                }catch (MatchException e) {
                        MessagingUtils.error(this.getClass(), "Error finding matching authors", e);
                }
@@ -333,7 +338,9 @@ public class ParseHandler{
        private List<TaxonNameBase> findMatchingLatinNames(TaxonNameBase taxonNameBase) {
 
                try {
-                       return CdmStore.getCommonService().findMatching(taxonNameBase, MatchStrategyConfigurator.NonViralNameMatchStrategy());
+
+                       return CdmStore.getCommonService().findMatching(taxonNameBase, MatchStrategy.NonViralName);
+
 
                } catch (MatchException e) {
                        MessagingUtils.error(this.getClass(), "Error finding matching names", e);
index b28e46d6117141fb66e3c2da57b476b5cdf031d8..26877a9e3d6638a75959b0378fdd8dc2d8f5ba01 100644 (file)
@@ -1,12 +1,12 @@
 // $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.
-*/
+ * 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;
 
@@ -21,20 +21,45 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class CdmStorePropertyTester extends PropertyTester {
 
-       private static final String EDITOR_IS_CONNECTED_TO_DB = "isCdmStoreConnected";
+    private static final String EDITOR_IS_CONNECTED_TO_DB = "isCdmStoreConnected";
+    private static final String IS_REMOTING = "isRemoting";
+    private static final String IS_STANDALONE = "isStandAlone";
+
+    @Override
+    public boolean test(Object receiver, String property, Object[] args,
+            Object expectedValue) {
+
+        if(EDITOR_IS_CONNECTED_TO_DB.equals(property)){
+            return isCdmStoreConnected();
+        }
+
+        if(IS_REMOTING.equals(property)){
+            if(!isCdmStoreConnected()) {
+                return false;
+            } else {
+                return isRemoting();
+            }
+        }
+
+        if(IS_STANDALONE.equals(property)){
+            if(!isCdmStoreConnected()) {
+                return false;
+            } else {
+                return !isRemoting();
+            }
+        }
+        return false;
+    }
+
+    private boolean isCdmStoreConnected(){
+        boolean active = CdmStore.isActive();
+        return active;
+    }
+
+    private boolean isRemoting() {
+        return CdmStore.getCurrentSessionManager().isRemoting();
 
-       @Override
-       public boolean test(Object receiver, String property, Object[] args,
-                       Object expectedValue) {
+    }
 
-           if(EDITOR_IS_CONNECTED_TO_DB.equals(property)){
-               return isCdmStoreConnected();
-           }
-               return false;
-       }
 
-       private boolean isCdmStoreConnected(){
-           boolean active = CdmStore.isActive();
-           return active;
-       }
 }
index c5363d6e3212107a389f16d9dea51a08a1b5ca60..c957ef1d370adc2cee5237f25eca5b92c1237cec 100644 (file)
@@ -12,7 +12,6 @@ package eu.etaxonomy.taxeditor.preference;
 
 import java.util.List;
 
-import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.ListViewer;
@@ -32,6 +31,7 @@ import eu.etaxonomy.cdm.model.description.FeatureTree;
 import eu.etaxonomy.taxeditor.featuretree.FeatureTreeContentProvider;
 import eu.etaxonomy.taxeditor.featuretree.FeatureTreeLabelProvider;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -41,7 +41,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created Sep 16, 2010
  * @version 1.0
  */
-public class DefaultFeatureTreePreferenecs extends PreferencePage implements IWorkbenchPreferencePage {
+public class DefaultFeatureTreePreferenecs extends CdmPreferencePage implements IWorkbenchPreferencePage {
 
        private FeatureTree defaultFeatureTreeForTextualDescription;
        private FeatureTree defaultFeatureTreeForStructuredDescription;
index fc2422da97852185043d89dd3254ebce88d9377f..5e9432541ac74e65e983e505ac5cf0629cfc0e4e 100644 (file)
@@ -143,6 +143,10 @@ public interface IPreferenceKeys {
 
     public static final String SHOW_ADVANCED_MEDIA_SECTION = "eu.etaxonomy.taxeditor.media.showAdvancedMedia";
 
+    public static final String ALWAYS_OPEN_SPECIMEN_IN_EDITOR = "eu.etaxonomy.taxeditor.specimen.alwaysOpenSpecimenInEditor";
+
+    public static final String PROMPT_FOR_OPEN_SPECIMEN_IN_EDITOR = "eu.etaxonomy.taxeditor.specimen.promptForOpenSpecimenInEditor";
+
     // TODO RL
     public static final String IS_RL = "eu.etaxonomy.taxeditor.isRL";
 
index 9c9bd5aee17d34aaf503280f48c7394b1a51b4bd..d9a9ac3cc47bcd9ec02c87aa489635523a2dff21 100644 (file)
@@ -9,7 +9,9 @@
 */
 package eu.etaxonomy.taxeditor.preference;
 
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
 import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.ComboFieldEditor;
 import org.eclipse.jface.preference.FieldEditorPreferencePage;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
@@ -21,17 +23,11 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
  */
 public class SpecimenOrObservationPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
-     */
     @Override
     public void init(IWorkbench workbench) {
         setPreferenceStore(PreferencesUtil.getPreferenceStore());
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
-     */
     @Override
     protected void createFieldEditors() {
         addField(new BooleanFieldEditor(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS,
@@ -43,7 +39,10 @@ public class SpecimenOrObservationPreferences extends FieldEditorPreferencePage
         addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS,
                 "Show taxon associations of a specimen in the details view",
                 getFieldEditorParent()));
-
+        addField(new ComboFieldEditor(IPreferenceKeys.ALWAYS_OPEN_SPECIMEN_IN_EDITOR,
+                "Open newly created specimens in specimen editor", new String[][] {
+                        { "always", MessageDialogWithToggle.ALWAYS }, { "never", MessageDialogWithToggle.NEVER } },
+                getFieldEditorParent()));
     }
 
 
index e09625ccecdfd2c3703a481ef9be111123a26838..6d2ddb9bc92792faa37e28d4b6bfc938a0a071ed 100644 (file)
@@ -33,7 +33,7 @@ import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
 import eu.etaxonomy.cdm.strategy.match.MatchException;
 import eu.etaxonomy.cdm.strategy.match.MatchMode;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.parser.MatchStrategyConfigurator;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -208,7 +208,7 @@ public abstract class AbstractMatchingPreferences<T extends IdentifiableEntity>
        /** {@inheritDoc} */
        @Override
        protected void performApply() {
-               MatchStrategyConfigurator.setMatchStrategy(matchStrategy);
+           PreferencesUtil.setMatchStrategy(matchStrategy);
                super.performApply();
        }
 
index 72acd566669b98c4b4ce9b457b67dfe03ed6c871..339232c7aacf8f14bab108f5f394c505bf0b472f 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -15,8 +15,8 @@ import org.eclipse.ui.IWorkbench;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
 import eu.etaxonomy.cdm.strategy.match.MatchException;
+import eu.etaxonomy.cdm.strategy.match.MatchStrategyConfigurator;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.parser.MatchStrategyConfigurator;
 
 /**
  * <p>NonViralNameMatchingPreference class.</p>
@@ -31,9 +31,10 @@ public class NonViralNameMatchingPreference extends AbstractMatchingPreferences<
         * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
         */
        /** {@inheritDoc} */
-       public void init(IWorkbench workbench) {
+       @Override
+    public void init(IWorkbench workbench) {
                clazz = NonViralName.class;
-               
+
                try {
                        matchStrategy = MatchStrategyConfigurator.NonViralNameMatchStrategy();
                } catch (MatchException e) {
@@ -41,7 +42,7 @@ public class NonViralNameMatchingPreference extends AbstractMatchingPreferences<
                        throw new RuntimeException(e);
                }
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.preference.matching.AbstractMatchingPreferences#getDefaultMatchStrategy()
         */
index fd3fbdd32b24422a08f29d27e8996f0d9b10e46f..9a578c0c4a929a2dee67474f21f5689e1afd795d 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -15,8 +15,8 @@ import org.eclipse.ui.IWorkbench;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
 import eu.etaxonomy.cdm.strategy.match.MatchException;
+import eu.etaxonomy.cdm.strategy.match.MatchStrategyConfigurator;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.parser.MatchStrategyConfigurator;
 
 /**
  * <p>ReferenceMatchingPreference class.</p>
@@ -31,9 +31,10 @@ public class ReferenceMatchingPreference extends AbstractMatchingPreferences<Ref
         * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
         */
        /** {@inheritDoc} */
-       public void init(IWorkbench workbench) {
+       @Override
+    public void init(IWorkbench workbench) {
                clazz = Reference.class;
-               
+
                try {
                        matchStrategy = MatchStrategyConfigurator.ReferenceMatchStrategy();
                } catch (MatchException e) {
index 4cce0cf6d817a637996a5c037c71046b476d07be..fac1a2b109ec0a634cccc5d2ae4a76c0218fc0f4 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -15,8 +15,8 @@ import org.eclipse.ui.IWorkbench;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
 import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
 import eu.etaxonomy.cdm.strategy.match.MatchException;
+import eu.etaxonomy.cdm.strategy.match.MatchStrategyConfigurator;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.parser.MatchStrategyConfigurator;
 
 /**
  * <p>TeamOrPersonMatchingPreference class.</p>
@@ -32,17 +32,18 @@ public class TeamOrPersonMatchingPreference extends
         * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
         */
        /** {@inheritDoc} */
-       public void init(IWorkbench workbench) {
+       @Override
+    public void init(IWorkbench workbench) {
 
                clazz = TeamOrPersonBase.class;
-               
+
                try {
                        matchStrategy = MatchStrategyConfigurator.TeamOrPersonMatchStrategy();
                } catch (MatchException e) {
                        MessagingUtils.error(this.getClass(), e);
                        throw new RuntimeException(e);
                }
-       }       
+       }
 
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.preference.matching.AbstractMatchingPreferences#getDefaultMatchStrategy()
index e98123ac9d339b34739187da3747f00aaf9c963a..43f3df9a9e69bdbb4b2ee233a62c59875af2bc0d 100644 (file)
@@ -20,7 +20,6 @@ import org.eclipse.core.commands.Parameterization;
 import org.eclipse.core.commands.ParameterizedCommand;
 import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.jface.viewers.CheckStateChangedEvent;
 import org.eclipse.jface.viewers.CheckboxTableViewer;
 import org.eclipse.jface.viewers.ICheckStateListener;
@@ -58,7 +57,7 @@ import eu.etaxonomy.taxeditor.store.TermStore;
  * @created 12.06.2009
  * @version 1.0
  */
-public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends PreferencePage implements
+public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends CdmPreferencePage implements
                IWorkbenchPreferencePage, IConversationEnabled{
 
        private Button toggleButton;
@@ -333,7 +332,8 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
 
                PreferencesUtil.firePreferencesChanged(this.getClass());
 
-               return true;
+
+               return super.performOk();
        }
 
        private boolean checkNoneChecked(){
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/CdmPreferencePage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/CdmPreferencePage.java
new file mode 100644 (file)
index 0000000..756d146
--- /dev/null
@@ -0,0 +1,87 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.preference.PreferencePage;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author cmathew
+ * @date 30 Jul 2015
+ *
+ */
+public abstract class CdmPreferencePage extends PreferencePage implements ICdmEntitySessionEnabled {
+
+    public CdmPreferencePage() {
+        bindNullSession();
+    }
+
+    public CdmPreferencePage(String title) {
+        super(title);
+        bindNullSession();
+    }
+
+    private void bindNullSession() {
+        if(CdmStore.isActive()) {
+            CdmStore.getCurrentSessionManager().bindNullSession(this);
+        }
+    }
+
+    protected void disposeNullSession() {
+        if(CdmStore.isActive()) {
+            CdmStore.getCurrentSessionManager().dispose(this);
+        }
+    }
+
+    @Override
+    public boolean performOk() {
+        disposeNullSession();
+        return super.performOk();
+    }
+
+    @Override
+    public boolean performCancel() {
+        disposeNullSession();
+        return super.performCancel();
+    }
+
+       /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()
+     */
+    @Override
+    public ICdmEntitySession getCdmEntitySession() {
+        return CdmStore.getCurrentSessionManager().getNullSession();
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public <T extends CdmBase> Collection<T> getRootEntities() {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        return null;
+    }
+
+}
index cc3ec2fdcb139e730e0b5ab885541bef452c6d8c..7a876f545bc833655936bec3bdabe1791bd0d2b1 100644 (file)
@@ -11,7 +11,10 @@ package eu.etaxonomy.taxeditor.preference.wizard;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
@@ -32,12 +35,15 @@ import org.eclipse.swt.widgets.Display;
 
 import eu.etaxonomy.cdm.api.service.ITermService;
 import eu.etaxonomy.cdm.api.service.IVocabularyService;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.taxeditor.editor.definedterm.TermContentProvider;
 import eu.etaxonomy.taxeditor.editor.definedterm.TermLabelProvider;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -45,7 +51,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @date 21.07.2014
  *
  */
-public class AvailableDistributionPage extends WizardPage {
+public class AvailableDistributionPage extends WizardPage implements ICdmEntitySessionEnabled {
 
     private CheckboxTreeViewer viewer;
 
@@ -57,6 +63,7 @@ public class AvailableDistributionPage extends WizardPage {
     protected AvailableDistributionPage(String pageName) {
         super(pageName);
         // TODO check if configuration exists
+        CdmStore.getCurrentSessionManager().bindNullSession(this);
     }
 
     /*
@@ -245,4 +252,39 @@ public class AvailableDistributionPage extends WizardPage {
         }
     }
 
+    @Override
+    public void dispose() {
+        CdmStore.getCurrentSessionManager().dispose(this);
+        super.dispose();
+    }
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()
+     */
+    @Override
+    public ICdmEntitySession getCdmEntitySession() {
+        return CdmStore.getCurrentSessionManager().getNullSession();
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public <T extends CdmBase> Collection<T> getRootEntities() {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        Map<Object, List<String>> propertyPathsMap = new HashMap<Object, List<String>>();
+        List<String> termsPropertyPaths = Arrays.asList(new String[] {
+                "includes"
+        });
+        propertyPathsMap.put("includes", termsPropertyPaths);
+        propertyPathsMap.put("terms", termsPropertyPaths);
+        return propertyPathsMap;
+    }
+
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmAuthenticationException.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmAuthenticationException.java
new file mode 100644 (file)
index 0000000..8e58a09
--- /dev/null
@@ -0,0 +1,23 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.store;
+
+/**
+ * @author cmathew
+ * @date 24 Jul 2015
+ *
+ */
+public class CdmAuthenticationException extends RuntimeException {
+
+    public CdmAuthenticationException(String message, Throwable t) {
+        super(message,t);
+    }
+
+}
index 39e46a4fa366291775432879d4198448a756f71f..8d96d335990f46e0da8826e6be52b0a63e9667af 100644 (file)
@@ -9,9 +9,6 @@
 
 package eu.etaxonomy.taxeditor.store;
 
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
 import java.util.EnumSet;
 
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -20,31 +17,37 @@ import org.eclipse.swt.widgets.Display;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
 import org.springframework.security.access.PermissionEvaluator;
-import org.springframework.security.authentication.ProviderManager;
+import org.springframework.security.authentication.AuthenticationManager;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.context.SecurityContext;
 import org.springframework.security.core.context.SecurityContextHolder;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationException;
+import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.cache.CdmServiceCacher;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.ICommonService;
 import eu.etaxonomy.cdm.api.service.IService;
 import eu.etaxonomy.cdm.config.ICdmSource;
 import eu.etaxonomy.cdm.database.DbSchemaValidation;
-import eu.etaxonomy.cdm.ext.geo.IEditGeoService;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD;
 import eu.etaxonomy.cdm.persistence.hibernate.permission.ICdmPermissionEvaluator;
 import eu.etaxonomy.cdm.persistence.hibernate.permission.Role;
-import eu.etaxonomy.cdm.remote.CdmRemoteSourceException;
 import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
 import eu.etaxonomy.taxeditor.io.ExportManager;
 import eu.etaxonomy.taxeditor.io.ImportManager;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmRemoteCacheManager;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
+import eu.etaxonomy.taxeditor.session.mock.MockCdmEntitySessionManager;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
+import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
 import eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart;
 
 /**
@@ -61,482 +64,527 @@ import eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart;
  */
 public class CdmStore {
 
-       private static final Resource DEFAULT_APPLICATION_CONTEXT = new ClassPathResource(
-                       "/eu/etaxonomy/cdm/editorApplicationContext.xml",
-                       TaxeditorStorePlugin.class);
-       private static final DbSchemaValidation DEFAULT_DB_SCHEMA_VALIDATION = DbSchemaValidation.VALIDATE;
-
-       private static CdmStore instance;
-
-       private final ICdmApplicationConfiguration applicationConfiguration;
-
-       private static ContextManager contextManager = new ContextManager();
-
-       private static LoginManager loginManager = new LoginManager();
-
-       private static TermManager termManager = new TermManager();
-
-       private static SearchManager searchManager = new SearchManager();
-
-       private static EditorManager editorManager = new EditorManager();
-       
-       private static UseObjectStore useObjectInitializer = new UseObjectStore(); 
-
-       private static CdmStoreConnector job;
-
-       private Language language;
-
-       private ICdmSource cdmSource;
-
-       private boolean isConnected;
-
-       /**
-        * <p>
-        * getDefault
-        * </p>
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.store.CdmStore} object.
-        */
-       protected static CdmStore getDefault() {
-               if (instance != null && instance.isConnected) {
-                       return instance;
-               } else{// if (instance == null || !instance.isConnected) {
-
-                       MessagingUtils.noDataSourceWarningDialog(instance);
-
-                       AbstractUtility.showView(CdmDataSourceViewPart.ID);
-                       return null;
-               }
-       }
-
-       /**
-        * Initialize the with the last edited datasource
-        */
-       public static void connect() {
-
-               ICdmSource cdmSource;
-               try {
-                       cdmSource = CdmDataSourceRepository.getCurrentCdmSource();
-                       connect(cdmSource);
-               } catch (CdmRemoteSourceException e) {
-                       MessagingUtils.messageDialog("Connection to CDM Source Failed", CdmStore.class, "Could not connect to target CDM Source", e);
-               }
-
-
-       }
-
-       /**
-        * Initialize with a specific datasource
-        *
-        * @param datasource
-        *            a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
-        */
-       public static void connect(ICdmSource cdmSource) {
-               connect(cdmSource, DEFAULT_DB_SCHEMA_VALIDATION,
-                               DEFAULT_APPLICATION_CONTEXT);
-       }
-
-       /**
-        * Initialize and provide
-        *
-        * @param datasource
-        * @param dbSchemaValidation
-        * @param applicationContextBean
-        */
-       private static void connect(final ICdmSource cdmSource,
-                       final DbSchemaValidation dbSchemaValidation,
-                       final Resource applicationContextBean) {
-               MessagingUtils.info("Connecting to datasource: " + cdmSource);
-
-               job = new CdmStoreConnector(Display.getDefault(), cdmSource,
-                               dbSchemaValidation, applicationContextBean);
-               job.setUser(true);
-               job.setPriority(Job.BUILD);
-               job.schedule();
-
-       }
-
-       public static boolean isConnecting() {
-               return job != null && job.getState() == Job.RUNNING;
-       }
-
-       /**
-        * Closes the current application context
-        *
-        * @param monitor
-        *            a {@link org.eclipse.core.runtime.IProgressMonitor} object.
-        */
-       public static void close(final IProgressMonitor monitor) {
-               Display.getDefault().asyncExec(new Runnable() {
-                       /*
-                        * (non-Javadoc)
-                        *
-                        * @see java.lang.Runnable#run()
-                        */
-                       @Override
-                       public void run() {
-                               getContextManager().notifyContextAboutToStop(monitor);
-                               if ((monitor == null || (!monitor.isCanceled()) && isActive())) {
-                                       getContextManager().notifyContextStop(monitor);
-                                       instance.close();
-                               }
-                       }
-               });
-       }
-
-       private void close() {
-               isConnected = false;
-               cdmSource = null;
-       }
-
-       static void setInstance(ICdmApplicationConfiguration applicationController,
-                       ICdmSource cdmSource) {
-               instance = new CdmStore(applicationController, cdmSource);
-       }
-
-       private CdmStore(ICdmApplicationConfiguration applicationController,
-                       ICdmSource cdmSource) {
-               this.applicationConfiguration = applicationController;
-               this.cdmSource = cdmSource;
-               isConnected = true;
-       }
-
-       /**
-        * All calls to the datastore require
-        *
-        * @return
-        */
-       private ICdmApplicationConfiguration getApplicationConfiguration() {
-               try {
-                       return applicationConfiguration;
-               } catch (Exception e) {
-                       MessagingUtils.error(CdmStore.class, e);
-               }
-               return null;
-       }
-
-       /**
-        * <p>
-        * getCurrentApplicationController
-        * </p>
-        *
-        * @return a
-        *         {@link eu.etaxonomy.cdm.remote.api.application.CdmApplicationController}
-        *         object.
-        */
-       public static ICdmApplicationConfiguration getCurrentApplicationConfiguration() {
-               if (getDefault() != null) {
-                       return getDefault().getApplicationConfiguration();
-               }
-               return null;
-       }
-
-       /*
-        * CONVERSATIONS
-        */
-
-       /**
-        * Creates a new conversation, binds resources to the conversation and start
-        * a transaction for this conversation.
-        *
-        * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *         object.
-        */
-       public static ConversationHolder createConversation() {
-               ConversationHolder conversation = getCurrentApplicationConfiguration()
-                               .NewConversation();
-               try{
-                       conversation.startTransaction();
-               }catch(Exception e){
-                       MessagingUtils.messageDialog("No database connection", CdmStore.class, "No database connection available", e);
-               }
-               return conversation;
-       }
-
-       /**
-        * Generic method that will scan the getters of {@link ICdmApplicationConfiguration} for the given service
-        * interface. If a matching getter is found the according service implementation is returned by
-        * invoking the getter otherwise the method returns <code>null</code>.
-        *
-        * @param <T>
-        * @param serviceClass
-        * @return the configured implementation of <code>serviceClass</code> or <code>null</code>
-        */
-       public static <T extends IService> T getService(Class<T> serviceClass) {
-               ICdmApplicationConfiguration configuration = getCurrentApplicationConfiguration();
-
-               Method[] methods = ICdmApplicationConfiguration.class.getDeclaredMethods();
-
-               T service = null;
-
-               for (Method method : methods) {
-                       Type type = method.getGenericReturnType();
-
-                       if (type.equals(serviceClass)) {
-                               try {
-                                       service = (T) method.invoke(configuration, null);
-                                       break;
-                               } catch (IllegalArgumentException e) {
-                                       MessagingUtils.error(CdmStore.class, e);
-                               } catch (IllegalAccessException e) {
-                                       MessagingUtils.error(CdmStore.class, e);
-                               } catch (InvocationTargetException e) {
-                                       MessagingUtils.error(CdmStore.class, e);
-                               }
-                       }
-               }
-
-               return service;
-       }
-       
-       /**
-        * @see #getService(Class)
-        * As ICommonService is not extending IService we need a specific request here
-        */
-       public static ICommonService getCommonService() {
-               ICdmApplicationConfiguration configuration = getCurrentApplicationConfiguration();
-
-               return configuration.getCommonService();
-
-       }
-
-       /**
-        * <p>
-        * getAuthenticationManager
-        * </p>
-        *
-        * @return a
-        *         {@link org.springframework.security.authentication.ProviderManager}
-        *         object.
-        */
-       public static ProviderManager getAuthenticationManager() {
-               return getCurrentApplicationConfiguration().getAuthenticationManager();
-       }
-
-       /**
-        * <p>
-        * getAuthenticationManager
-        * </p>
-        *
-        * @return a
-        *         {@link ICdmPermissionEvaluator} object.
-        */
-       public static ICdmPermissionEvaluator getPermissionEvaluator() {
-               return getCurrentApplicationConfiguration().getPermissionEvaluator();
-       }
-
-       /**
-        * <p>
-        * getGeoService
-        * </p>
-        *
-        * @return a {@link eu.etaxonomy.cdm.ext.geo.IEditGeoService} object.
-        */
-       public static IEditGeoService getGeoService() {
-               return (IEditGeoService) getCurrentApplicationConfiguration().getBean(
-                               "editGeoService");
-       }
-
-       /*
-        * SECURITY RELATED CONVENIENCE METHODS
-        */
-
-       /**
-        * @see org.springframework.security.access.PermissionEvaluator#hasPermission(org.springframework.security.core.Authentication, java.lang.Object, java.lang.Object)
+    private static final Resource DEFAULT_APPLICATION_CONTEXT = new ClassPathResource(
+            "/eu/etaxonomy/cdm/editorApplicationContext.xml",
+            TaxeditorStorePlugin.class);
+    private static final DbSchemaValidation DEFAULT_DB_SCHEMA_VALIDATION = DbSchemaValidation.VALIDATE;
+
+    private static CdmStore instance;
+
+    //private final ICdmApplicationConfiguration applicationConfiguration;
+
+    private static ContextManager contextManager = new ContextManager();
+
+    private static LoginManager loginManager = new LoginManager();
+
+    private static TermManager termManager = new TermManager();
+
+    private static SearchManager searchManager = new SearchManager();
+
+    private static EditorManager editorManager = new EditorManager();
+
+    private static UseObjectStore useObjectInitializer = new UseObjectStore();
+
+    private static CdmStoreConnector job;
+
+    private Language language;
+
+    private ICdmSource cdmSource;
+
+    private boolean isConnected;
+
+
+
+    /**
+     * <p>
+     * getDefault
+     * </p>
+     *
+     * @return a {@link eu.etaxonomy.taxeditor.store.CdmStore} object.
+     */
+    protected static CdmStore getDefault() {
+        if (instance != null && instance.isConnected) {
+            return instance;
+        } else{// if (instance == null || !instance.isConnected) {
+
+            MessagingUtils.noDataSourceWarningDialog(instance);
+
+            AbstractUtility.showView(CdmDataSourceViewPart.ID);
+            return null;
+        }
+    }
+
+    /**
+     * Initialize the with the last edited datasource
+     */
+    public static void connect() {
+
+        ICdmSource cdmSource;
+        try {
+
+            cdmSource = CdmDataSourceRepository.getCurrentCdmSource();
+            connect(cdmSource);
+        } catch (Exception e) {
+            MessagingUtils.messageDialog("Connection to CDM Source Failed", CdmStore.class, "Could not connect to target CDM Source", e);
+        }
+
+
+    }
+
+    /**
+     * Initialize with a specific datasource
+     *
+     * @param datasource
+     *            a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
+     */
+    public static void connect(ICdmSource cdmSource) {
+        connect(cdmSource, DEFAULT_DB_SCHEMA_VALIDATION,
+                DEFAULT_APPLICATION_CONTEXT);
+    }
+
+    public static void connect(ICdmSource cdmSource, RemotingLoginDialog loginDialog) {
+        connect(cdmSource,
+                DEFAULT_DB_SCHEMA_VALIDATION,
+                DEFAULT_APPLICATION_CONTEXT,
+                loginDialog);
+    }
+
+    /**
+     * Initialize and provide
+     *
+     * @param datasource
+     * @param dbSchemaValidation
+     * @param applicationContextBean
+     */
+    private static void connect(final ICdmSource cdmSource,
+            final DbSchemaValidation dbSchemaValidation,
+            final Resource applicationContextBean) {
+
+        MessagingUtils.info("Connecting to datasource: " + cdmSource);
+
+        job = new CdmStoreConnector(Display.getDefault(), cdmSource,
+                dbSchemaValidation, applicationContextBean);
+        job.setUser(true);
+        job.setPriority(Job.BUILD);
+        job.schedule();
+
+    }
+
+    private static void connect(final ICdmSource cdmSource,
+            final DbSchemaValidation dbSchemaValidation,
+            final Resource applicationContextBean,
+            RemotingLoginDialog remotingLoginDialog) {
+        RemotingLoginDialog loginDialog = remotingLoginDialog;
+        if(isActive()) {
+            // before we connect we clear the entity caches and the sessions
+            CdmRemoteCacheManager.removeEntityCaches();
+            if(getCurrentSessionManager() != null) {
+                getCurrentSessionManager().disposeAll();
+            }
+        }
+        MessagingUtils.info("Connecting to datasource: " + cdmSource);
+
+        job = new CdmStoreConnector(Display.getDefault(),
+                cdmSource,
+                dbSchemaValidation,
+                applicationContextBean);
+        job.start(loginDialog);
+
+    }
+
+    public static boolean isConnecting() {
+        return job != null && job.getState() == Job.RUNNING;
+    }
+
+    /**
+     * Closes the current application context
+     *
+     * @param monitor
+     *            a {@link org.eclipse.core.runtime.IProgressMonitor} object.
+     */
+    public static void close(final IProgressMonitor monitor) {
+        Display.getDefault().asyncExec(new Runnable() {
+            /*
+             * (non-Javadoc)
+             *
+             * @see java.lang.Runnable#run()
+             */
+            @Override
+            public void run() {
+                getContextManager().notifyContextAboutToStop(monitor);
+                if ((monitor == null || (!monitor.isCanceled()) && isActive())) {
+                    getContextManager().notifyContextStop(monitor);
+                    instance.close();
+                }
+            }
+        });
+    }
+
+    public static void close(IProgressMonitor monitor, boolean async) {
+        if(async) {
+            close(monitor);
+        } else {
+            getContextManager().notifyContextAboutToStop(monitor);
+            if ((monitor == null || (!monitor.isCanceled()) && isActive())) {
+                getContextManager().notifyContextStop(monitor);
+                instance.close();
+            }
+        }
+
+    }
+    private void close() {
+        isConnected = false;
+        cdmSource = null;
+        CdmApplicationState.dispose();
+    }
+
+    static void setInstance(ICdmApplicationConfiguration applicationController,
+            ICdmSource cdmSource) {
+        instance = new CdmStore(applicationController, cdmSource);
+        if(getCurrentSessionManager().isRemoting()) {
+            CdmApplicationState.setCdmServiceCacher(new CdmServiceCacher());
+        }
+    }
+
+    private CdmStore(ICdmApplicationConfiguration applicationController,
+            ICdmSource cdmSource) {
+        CdmApplicationState.setCurrentAppConfig(applicationController);
+        CdmApplicationState.setCurrentDataChangeService(new CdmUIDataChangeService());
+        this.cdmSource = cdmSource;
+        isConnected = true;
+    }
+
+    /**
+     * All calls to the datastore require
+     *
+     * @return
+     */
+    private ICdmApplicationConfiguration getApplicationConfiguration() {
+        try {
+            return CdmApplicationState.getCurrentAppConfig();
+        } catch (Exception e) {
+            MessagingUtils.error(CdmStore.class, e);
+        }
+        return null;
+    }
+
+    /**
+     * <p>
+     * getCurrentApplicationController
+     * </p>
+     *
+     * @return a
+     *         {@link eu.etaxonomy.cdm.remote.api.application.CdmApplicationController}
+     *         object.
+     */
+    public static ICdmApplicationConfiguration getCurrentApplicationConfiguration() {
+        if (getDefault() != null) {
+            return getDefault().getApplicationConfiguration();
+        }
+        return null;
+    }
+
+    /*
+     * CONVERSATIONS
+     */
+
+    /**
+     * Creates a new conversation, binds resources to the conversation and start
+     * a transaction for this conversation.
+     *
+     * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
+     *         object.
+     */
+    public static ConversationHolder createConversation() {
+        ConversationHolder conversation = getCurrentApplicationConfiguration()
+                .NewConversation();
+        try {
+            conversation.startTransaction();
+        }catch(Exception e){
+            MessagingUtils.messageDialog("No database connection", CdmStore.class, "No database connection available", e);
+        }
+        return conversation;
+    }
+
+    //FIXME:Remoting should be removed after moving completely to remoting
+    private MockCdmEntitySessionManager mockCdmEntitySessionManager;
+
+    private ICdmEntitySessionManager getSessionManager() {
+        //FIXME:Remoting we should only have CdmApplicationRemoteConfiguration after move to remoting
+        //               bad hack which should be finally removed
+        if(getCurrentApplicationConfiguration() instanceof CdmApplicationRemoteController) {
+            return ((CdmApplicationRemoteController)getCurrentApplicationConfiguration()).getCdmEntitySessionManager();
+        } else {
+            if(mockCdmEntitySessionManager == null) {
+                mockCdmEntitySessionManager = new MockCdmEntitySessionManager();
+            }
+            return mockCdmEntitySessionManager;
+        }
+    }
+
+    public static  ICdmEntitySessionManager getCurrentSessionManager() {
+        if (getDefault() != null) {
+            return getDefault().getSessionManager();
+        }
+        return null;
+
+    }
+
+    /**
+     * Generic method that will scan the getters of {@link ICdmApplicationConfiguration} for the given service
+     * interface. If a matching getter is found the according service implementation is returned by
+     * invoking the getter otherwise the method returns <code>null</code>.
+     *
+     * @param <T>
+     * @param serviceClass
+     * @return the configured implementation of <code>serviceClass</code> or <code>null</code>
+     */
+    public static <T extends IService> T getService(Class<T> serviceClass) {
+        T service = null;
+        try {
+            service = CdmApplicationState.getService(serviceClass);
+        } catch (CdmApplicationException cae) {
+            MessagingUtils.error(CdmStore.class, cae);
+        }
+
+        return service;
+    }
+
+    /**
+     * @see #getService(Class)
+     * As ICommonService is not extending IService we need a specific request here
+     */
+    public static ICommonService getCommonService() {
+        return CdmApplicationState.getCommonService();
+
+    }
+
+    /**
+     * <p>
+     * getAuthenticationManager
+     * </p>
+     *
+     * @return a
+     *         {@link org.springframework.security.authentication.ProviderManager}
+     *         object.
+     */
+    public static AuthenticationManager getAuthenticationManager() {
+        return getCurrentApplicationConfiguration().getAuthenticationManager();
+    }
+
+    /**
+     * <p>
+     * getAuthenticationManager
+     * </p>
      *
-        * @param targetDomainObject
-        * @param permission
-        * @return
-        */
-       public static boolean currentAuthentiationHasPermission(CdmBase targetDomainObject, EnumSet<CRUD> permission){
-               //TODO use getCurrentApplicationConfiguration().currentAuthentiationHasPermission(CdmBase targetDomainObject, Operation permission) instead
-               SecurityContext context = SecurityContextHolder.getContext();
-               PermissionEvaluator pe = getPermissionEvaluator();
-               boolean hasPermission = false;
-               try {
+     * @return a
+     *         {@link ICdmPermissionEvaluator} object.
+     */
+    public static ICdmPermissionEvaluator getPermissionEvaluator() {
+        return getCurrentApplicationConfiguration().getPermissionEvaluator();
+    }
+
+
+    /*
+     * SECURITY RELATED CONVENIENCE METHODS
+     */
+
+    /**
+     * @see org.springframework.security.access.PermissionEvaluator#hasPermission(org.springframework.security.core.Authentication, java.lang.Object, java.lang.Object)
+     *
+     * @param targetDomainObject
+     * @param permission
+     * @return
+     */
+    public static boolean currentAuthentiationHasPermission(CdmBase targetDomainObject, EnumSet<CRUD> permission){
+        //TODO use getCurrentApplicationConfiguration().currentAuthentiationHasPermission(CdmBase targetDomainObject, Operation permission) instead
+        SecurityContext context = SecurityContextHolder.getContext();
+        PermissionEvaluator pe = getPermissionEvaluator();
+        boolean hasPermission = false;
+        try {
             hasPermission = getPermissionEvaluator().hasPermission(context.getAuthentication(), targetDomainObject,
                     permission);
         } catch (org.springframework.security.access.AccessDeniedException e) {
             /* IGNORE */
         }
         return hasPermission;
-       }
+    }
 
-       /**
-        * @see org.springframework.security.access.PermissionEvaluator#hasPermission(org.springframework.security.core.Authentication, java.lang.Object, java.lang.Object)
+    /**
+     * @see org.springframework.security.access.PermissionEvaluator#hasPermission(org.springframework.security.core.Authentication, java.lang.Object, java.lang.Object)
      *
-        * @param targetDomainObject
-        * @param permission
-        * @return
-        */
-       public static boolean currentAuthentiationHasPermission(Class<? extends CdmBase> targetType, EnumSet<CRUD> permission){
-           boolean hasPermission = false;
+     * @param targetDomainObject
+     * @param permission
+     * @return
+     */
+    public static boolean currentAuthentiationHasPermission(Class<? extends CdmBase> targetType, EnumSet<CRUD> permission){
+        boolean hasPermission = false;
         try {
             hasPermission = getPermissionEvaluator().hasPermission(getCurrentAuthentiation(), null, targetType.getName(), permission);
         } catch (org.springframework.security.access.AccessDeniedException e) {
             /* IGNORE */
         }
         return hasPermission;
-       }
+    }
 
-       public static boolean currentAuthentiationHasOneOfRoles(Role ... roles){
-           boolean hasPermission = false;
+    public static boolean currentAuthentiationHasOneOfRoles(Role ... roles){
+        boolean hasPermission = false;
         try {
             hasPermission =  getPermissionEvaluator().hasOneOfRoles(getCurrentAuthentiation(), roles);
         } catch (org.springframework.security.access.AccessDeniedException e) {
             /* IGNORE */
         }
         return hasPermission;
-       }
-
-       public static Authentication getCurrentAuthentiation() {
-               SecurityContext context = SecurityContextHolder.getContext();
-               return context.getAuthentication();
-       }
-
-       /*
-        * LANGUAGE
-        */
-
-       /**
-        * Provides access to the global default language set in the application preferences.
-        *
-        * @return a {@link eu.etaxonomy.cdm.model.common.Language} object.
-        */
-       public static Language getDefaultLanguage() {
-               if (getDefault().getLanguage() == null) {
-                       getDefault().setLanguage(PreferencesUtil.getGlobalLanguage());
-               }
-               return getDefault().getLanguage();
-       }
-
-       /**
-        * <p>
-        * setDefaultLanguage
-        * </p>
-        *
-        * @param language
-        *            a {@link eu.etaxonomy.cdm.model.common.Language} object.
-        */
-       public static void setDefaultLanguage(Language language) {
-               getDefault().setLanguage(language);
-       }
-
-       /**
-        * @return the language
-        */
-       private Language getLanguage() {
-               return language;
-       }
-
-       /**
-        * @param language
-        *            the language to set
-        */
-       private void setLanguage(Language language) {
-               this.language = language;
-       }
-
-       /*
-        * LOGIN
-        */
-
-       /**
-        * <p>
-        * Getter for the field <code>loginManager</code>.
-        * </p>
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.store.LoginManager} object.
-        */
-       public static LoginManager getLoginManager() {
-               return loginManager;
-       }
-
-       /**
-        * <p>
-        * Getter for the field <code>contextManager</code>.
-        * </p>
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.store.ContextManager} object.
-        */
-       public static ContextManager getContextManager() {
-               return contextManager;
-       }
-
-       public static TermManager getTermManager() {
-               return termManager;
-       }
-
-       public static SearchManager getSearchManager() {
-               return searchManager;
-       }
-
-       public static EditorManager getEditorManager() {
-               return editorManager;
-       }
-
-       /*
-        * IMPORT/EXPORT FACTORIES
-        */
-
-       /**
-        * <p>
-        * Getter for the field <code>importHandler</code>.
-        * </p>
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.io.ImportManager} object.
-        */
-       public static ImportManager getImportManager() {
-               return ImportManager.NewInstance(getCurrentApplicationConfiguration());
-       }
-
-       /**
-        * <p>
-        * Getter for the field <code>exportHandler</code>.
-        * </p>
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.io.ExportManager} object.
-        */
-       public static ExportManager getExportManager() {
-               return ExportManager.NewInstance(getCurrentApplicationConfiguration());
-       }
-
-       /**
-        * Whether this CdmStore is currently connected to a datasource
-        *
-        * @return a boolean.
-        */
-       public static boolean isActive() {
-               return instance != null && instance.isConnected;
-       }
-
-       public static ICdmSource getActiveCdmSource() {
-               if (isActive()) {
-                       return instance.getCdmSource();
-               }
-               return null;
-       }
-
-       /**
-        * <p>
-        * getDataSource
-        * </p>
-        *
-        * @return a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
-        * @deprecated currently retained for backward compatibility - use {@link getActiveCdmSource()} instead
-        */
-//     public static ICdmDataSource getDataSource() {
-//             if (isActive()) {
-//                     return (ICdmDataSource)instance.getCdmSource();
-//             }
-//             return null;
-//     }
-
-       /**
-        * @return
-        */
-       private ICdmSource getCdmSource() {
-               return cdmSource;
-       }
+    }
+
+    public static Authentication getCurrentAuthentiation() {
+        SecurityContext context = SecurityContextHolder.getContext();
+        return context.getAuthentication();
+    }
+
+    /*
+     * LANGUAGE
+     */
+
+    /**
+     * Provides access to the global default language set in the application preferences.
+     *
+     * @return a {@link eu.etaxonomy.cdm.model.common.Language} object.
+     */
+    public static Language getDefaultLanguage() {
+        if (getDefault().getLanguage() == null) {
+            getDefault().setLanguage(PreferencesUtil.getGlobalLanguage());
+        }
+        return getDefault().getLanguage();
+    }
+
+    /**
+     * <p>
+     * setDefaultLanguage
+     * </p>
+     *
+     * @param language
+     *            a {@link eu.etaxonomy.cdm.model.common.Language} object.
+     */
+    public static void setDefaultLanguage(Language language) {
+        getDefault().setLanguage(language);
+    }
+
+    /**
+     * @return the language
+     */
+    private Language getLanguage() {
+        return language;
+    }
+
+    /**
+     * @param language
+     *            the language to set
+     */
+    private void setLanguage(Language language) {
+        this.language = language;
+    }
+
+    /*
+     * LOGIN
+     */
+
+    /**
+     * <p>
+     * Getter for the field <code>loginManager</code>.
+     * </p>
+     *
+     * @return a {@link eu.etaxonomy.taxeditor.store.LoginManager} object.
+     */
+    public static LoginManager getLoginManager() {
+        return loginManager;
+    }
+
+    /**
+     * <p>
+     * Getter for the field <code>contextManager</code>.
+     * </p>
+     *
+     * @return a {@link eu.etaxonomy.taxeditor.store.ContextManager} object.
+     */
+    public static ContextManager getContextManager() {
+        return contextManager;
+    }
+
+    public static TermManager getTermManager() {
+        return termManager;
+    }
+
+    public static SearchManager getSearchManager() {
+        return searchManager;
+    }
+
+    public static EditorManager getEditorManager() {
+        return editorManager;
+    }
+
+    /*
+     * IMPORT/EXPORT FACTORIES
+     */
+
+    /**
+     * <p>
+     * Getter for the field <code>importHandler</code>.
+     * </p>
+     *
+     * @return a {@link eu.etaxonomy.taxeditor.io.ImportManager} object.
+     */
+    public static ImportManager getImportManager() {
+        return ImportManager.NewInstance(getCurrentApplicationConfiguration());
+    }
+
+    /**
+     * <p>
+     * Getter for the field <code>exportHandler</code>.
+     * </p>
+     *
+     * @return a {@link eu.etaxonomy.taxeditor.io.ExportManager} object.
+     */
+    public static ExportManager getExportManager() {
+        return ExportManager.NewInstance(getCurrentApplicationConfiguration());
+    }
+
+    /**
+     * Whether this CdmStore is currently connected to a datasource
+     *
+     * @return a boolean.
+     */
+    public static boolean isActive() {
+        return instance != null && instance.isConnected;
+    }
+
+    public static ICdmSource getActiveCdmSource() {
+        if (isActive()) {
+            return instance.getCdmSource();
+        }
+        return null;
+    }
+
+    /**
+     * <p>
+     * getDataSource
+     * </p>
+     *
+     * @return a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
+     * @deprecated currently retained for backward compatibility - use {@link getActiveCdmSource()} instead
+     */
+    // public static ICdmDataSource getDataSource() {
+    //         if (isActive()) {
+    //                 return (ICdmDataSource)instance.getCdmSource();
+    //         }
+    //         return null;
+    // }
+
+    /**
+     * @return
+     */
+    private ICdmSource getCdmSource() {
+        return cdmSource;
+    }
 
 }
index f174f86773252b951c855dcd41951a105f44c0a9..4a9d7e1d1be5d0f3ee3b7c5eb234aae8ed19358e 100644 (file)
@@ -10,6 +10,7 @@
 
 package eu.etaxonomy.taxeditor.store;
 
+import java.lang.reflect.InvocationTargetException;
 import java.sql.SQLException;
 import java.util.concurrent.CancellationException;
 
@@ -17,6 +18,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.swt.widgets.Display;
 import org.springframework.core.io.Resource;
 
@@ -28,235 +31,340 @@ import eu.etaxonomy.cdm.config.ICdmSource;
 import eu.etaxonomy.cdm.database.DbSchemaValidation;
 import eu.etaxonomy.cdm.database.ICdmDataSource;
 import eu.etaxonomy.cdm.model.metadata.CdmMetaData;
-import eu.etaxonomy.cdm.remote.ICdmRemoteSource;
+import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
 import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
 import eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart;
 
+
 /**
  * @author n.hoffmann
  * @created Dec 8, 2010
  * @version 1.0
  */
 class CdmStoreConnector extends Job {
-       private final Display display;
-       private final ICdmSource cdmSource;
-       private DbSchemaValidation dbSchemaValidation;
-       private final Resource applicationContextBean;
-
-       /**
-        * @param datasource
-        * @param dbSchemaValidation
-        * @param applicationContextBean
-        */
-       public CdmStoreConnector(Display display, ICdmSource cdmSource,
-                       DbSchemaValidation dbSchemaValidation,
-                       Resource applicationContextBean) {
-               super("Connecting to datasource: " + cdmSource);
-               this.display = display;
-               this.cdmSource = cdmSource;
-               this.dbSchemaValidation = dbSchemaValidation;
-               this.applicationContextBean = applicationContextBean;
-       }
-
-       @Override
-       public IStatus run(final IProgressMonitor monitor) {
-
-               monitor.beginTask(getConnectionMessage(), 10);
-
-               // check if database is up and running
-               checkDatabaseReachable(monitor);
-
-               if (!monitor.isCanceled()) {
-                       // check if the datasource actually holds data
-                       checkIsNonEmptyCdmDatabase(monitor);
-               }
-
-               if (dbSchemaValidation != DbSchemaValidation.CREATE
-                               && !monitor.isCanceled()) {
-                       // if we do not create the datasource, we want to check if the
-                       // datasource is compatible with this editor
-                       checkDbSchemaVersionCompatibility(monitor);
-               }
-
-               // we are done with our low level checking and will free resources now
-               cdmSource.closeOpenConnections();
-
-               if (!monitor.isCanceled()) {
-                       CdmStore.close(monitor);
-               }
-
-               ICdmApplicationConfiguration applicationController = null;
-
-               if (!monitor.isCanceled()) {
-                       CdmProgressMonitorAdapter subprogressMonitor = CdmProgressMonitorAdapter
-                                       .CreateSubMonitor(monitor, 7);
-                       // This is where we instantiate the application controller
-                       int oldPriority = Thread.currentThread().getPriority();
-                       try {
-                               Thread.currentThread().setPriority(10);
-                               applicationController = getApplicationController(cdmSource,subprogressMonitor);
-                       } catch (Exception e) {
-                               if(! causeIsCancelationExceptionRecursive(e)){
-                                       return new Status(IStatus.ERROR, "Could not connect to CDM Store", "An error occurred while trying to connect to datasource: " + cdmSource.getName(), e);
-                               }
-                       } finally {
-                               monitor.done();
-                               Thread.currentThread().setPriority(oldPriority);
-                       }
-               }
-
-
-
-               if (!monitor.isCanceled()) {
-                       CdmStore.setInstance(applicationController, cdmSource);
-
-                       display.asyncExec(new Runnable() {
-                               /*
-                                * (non-Javadoc)
-                                *
-                                * @see java.lang.Runnable#run()
-                                */
-                               @Override
-                               public void run() {
-                                       authenticate();
-
-                                       startContext();
-                               }
-                       });
-
-                       MessagingUtils.info("Application context initialized.");
-                       return Status.OK_STATUS;
-               } else {
-                       // Show datasource view if not shown yet
-                       display.asyncExec(new Runnable() {
-                               /*
-                                * (non-Javadoc)
-                                *
-                                * @see java.lang.Runnable#run()
-                                */
-                               @Override
-                               public void run() {
-                                       StoreUtil.showView(CdmDataSourceViewPart.ID);
-                               }
-                       });
-                       return Status.CANCEL_STATUS;
-               }
-
-       }
-
-       private ICdmApplicationConfiguration getApplicationController(ICdmSource cdmSource, CdmProgressMonitorAdapter subprogressMonitor) {
-               if(cdmSource instanceof ICdmDataSource) {
-                       return  CdmApplicationController.NewInstance(applicationContextBean,
-                                       (ICdmDataSource)cdmSource,
-                                       dbSchemaValidation,
-                                       false,
-                                       subprogressMonitor);
-               } else if(cdmSource instanceof ICdmRemoteSource) {
-                       return CdmApplicationRemoteController.NewInstance((ICdmRemoteSource)cdmSource,
-                                                       false,
-                                                       subprogressMonitor,
-                                                       null);
-               } else {
-                       throw new UnsupportedOperationException("Cannot create application controller for " + cdmSource.getName());
-               }
-       }
-       private void authenticate() {
-               LoginDialog loginDialog = new LoginDialog(StoreUtil.getShell());
-               loginDialog.open();
-       }
-
-       private void startContext() {
-               CdmStore.getContextManager().notifyContextStart();
-       }
-
-       /**
-        * @return
-        */
-       private String getConnectionMessage() {
-               return cdmSource.getConnectionMessage();
-       }
-
-       /**
-        * @return
-        * @throws SQLException
-        */
-       private void checkDbSchemaVersionCompatibility(IProgressMonitor monitor) {
-               monitor.subTask("Checking if datasource is compatible with this editor.");
-               String dbSchemaVersion;
-
-               String message = null;
-               try {
-                       dbSchemaVersion = cdmSource.getDbSchemaVersion();
-                       // we assume that empty dbSchemaVersion means an empty database and
-                       // skip version checking
-
-                       if(dbSchemaVersion != null) {
-                           int compareVersion = CdmMetaData.compareVersion(dbSchemaVersion, CdmMetaData.getDbSchemaVersion(), 3, null);
-                           // if the datasource version is greater than the taxeditor compatible version then the taxeditor needs to
-                           // be updated else the datasource needs to be updated
-                           if(compareVersion > 0) {
-                               message = "Please update the Taxonomic Editor (Help->Check for Updates) or choose a compatible datasource";
-                           } else if (compareVersion < 0) {
-                               message = "Please update the chosen datasource or choose a new data source to connect to in the Datasource View.";
-                           }
-                       }
-                       monitor.worked(1);
-               } catch (CdmSourceException e) {
-                       //
-               }
-
-               if (message != null) {
-                       // Show an error message
-                       MessagingUtils
-                                       .messageDialog(
-                                                       "Datasource Compatibility Check failed",
-                                                       this,
-                                                       "The database schema for the chosen "
-                                                                       + "datasource '"
-                                                                       + cdmSource
-                                                                       + "' \n is not compatible for this version of the taxonomic editor. \n\n"
-                                                                       + message,
-                                                       null);
-
-                       monitor.setCanceled(true);
-               }
-
-       }
-
-       private void checkIsNonEmptyCdmDatabase(IProgressMonitor monitor) {
-               monitor.subTask("Checking if datasource is a non empty CDM database.");
-               boolean isDbEmpty = false;
-               try {
-                       isDbEmpty = cdmSource.isDbEmpty();
-               } catch (CdmSourceException e) {
-                       isDbEmpty = true;
-               }
-               if(isDbEmpty) {
-                       dbSchemaValidation = DbSchemaValidation.CREATE;
-               }
-       }
-
-       private boolean causeIsCancelationExceptionRecursive(Throwable throwable){
-               if(throwable == null){
-                       return false;
-               }else if(throwable instanceof CancellationException){
-                       return true;
-               }else{
-                       return causeIsCancelationExceptionRecursive(throwable.getCause());
-               }
-       }
-
-       private void checkDatabaseReachable(IProgressMonitor monitor) {
-               try {
-                       monitor.subTask("Checking if datasource is reachable.");
-                       cdmSource.checkConnection();
-                       monitor.worked(1);
-               } catch (CdmSourceException e) {
-                       MessagingUtils.messageDialog("Could not connect to chosen datasource",
-                                       this, "Reason: " + e.getMessage(), e);
-                       monitor.setCanceled(true);
-               }
-       }
+    private final Display display;
+    private final ICdmSource cdmSource;
+    private DbSchemaValidation dbSchemaValidation;
+    private final Resource applicationContextBean;
+
+
+    /**
+     * @param datasource
+     * @param dbSchemaValidation
+     * @param applicationContextBean
+     */
+    public CdmStoreConnector(Display display,
+            ICdmSource cdmSource,
+            DbSchemaValidation dbSchemaValidation,
+            Resource applicationContextBean) {
+        super("Connecting to datasource: " + cdmSource);
+        this.display = display;
+        this.cdmSource = cdmSource;
+        this.dbSchemaValidation = dbSchemaValidation;
+        this.applicationContextBean = applicationContextBean;
+    }
+
+
+
+    @Override
+    public IStatus run(final IProgressMonitor monitor) {
+
+        monitor.beginTask(getConnectionMessage(), 10);
+
+        // check if database is up and running
+        checkDatabaseReachable(monitor);
+
+        if (!monitor.isCanceled()) {
+            // check if the datasource actually holds data
+            checkIsNonEmptyCdmDatabase(monitor);
+        }
+
+        if (dbSchemaValidation != DbSchemaValidation.CREATE
+                && !monitor.isCanceled()) {
+            // if we do not create the datasource, we want to check if the
+            // datasource is compatible with this editor
+            checkDbSchemaVersionCompatibility(monitor);
+        }
+
+        // we are done with our low level checking and will free resources now
+        cdmSource.closeOpenConnections();
+
+        if (!monitor.isCanceled()) {
+            CdmStore.close(monitor);
+        }
+
+        ICdmApplicationConfiguration applicationController = null;
+
+        if (!monitor.isCanceled()) {
+            CdmProgressMonitorAdapter subprogressMonitor = CdmProgressMonitorAdapter
+                    .CreateSubMonitor(monitor, 7);
+            // This is where we instantiate the application controller
+            int oldPriority = Thread.currentThread().getPriority();
+            try {
+                Thread.currentThread().setPriority(10);
+                applicationController = getApplicationController(cdmSource,subprogressMonitor);
+            } catch (Exception e) {
+                if(! causeIsCancelationExceptionRecursive(e)){
+                    return new Status(IStatus.ERROR, "Could not connect to CDM Store", "An error occurred while trying to connect to datasource: " + cdmSource.getName(), e);
+                }
+            } finally {
+                monitor.done();
+                Thread.currentThread().setPriority(oldPriority);
+            }
+        }
+
+
+
+        if (!monitor.isCanceled()) {
+            CdmStore.setInstance(applicationController, cdmSource);
+
+            display.asyncExec(new Runnable() {
+                /*
+                 * (non-Javadoc)
+                 *
+                 * @see java.lang.Runnable#run()
+                 */
+                @Override
+                public void run() {
+                    authenticate();
+
+                    startContext();
+                }
+            });
+
+            MessagingUtils.info("Application context initialized.");
+            return Status.OK_STATUS;
+        } else {
+            // Show datasource view if not shown yet
+            display.asyncExec(new Runnable() {
+                /*
+                 * (non-Javadoc)
+                 *
+                 * @see java.lang.Runnable#run()
+                 */
+                @Override
+                public void run() {
+                    StoreUtil.showView(CdmDataSourceViewPart.ID);
+                }
+            });
+            return Status.CANCEL_STATUS;
+        }
+
+    }
+
+    public void start(final RemotingLoginDialog loginDialog) {
+        // hide login dialog and start connection dialog
+        loginDialog.setMessage(null);
+        loginDialog.hide(true);
+
+
+        ProgressMonitorDialog dialog = new ProgressMonitorDialog(StoreUtil.getShell());
+
+        try {
+            dialog.run(true, true, new IRunnableWithProgress() {
+                @Override
+                public void run(final IProgressMonitor monitor) {
+                    try {
+                        monitor.beginTask(getConnectionMessage(), 7);
+
+                        // check if database is up and running
+                        checkDatabaseReachable(monitor);
+
+                        // check if the datasource actually holds data
+                        checkIsNonEmptyCdmDatabase(monitor);
+
+                        if (dbSchemaValidation != DbSchemaValidation.CREATE) {
+                            // if we do not create the datasource, we want to check if the
+                            // datasource is compatible with this editor
+                            checkDbSchemaVersionCompatibility(monitor);
+                        }
+
+                        // we are done with our low level checking and will free resources now
+                        cdmSource.closeOpenConnections();
+
+                        display.syncExec(new Runnable() {
+                            /*
+                             * (non-Javadoc)
+                             *
+                             * @see java.lang.Runnable#run()
+                             */
+                            @Override
+                            public void run() {
+                                // close the current context
+                                CdmStore.close(monitor, false);
+                            }
+                        });
+
+                        ICdmApplicationConfiguration applicationController = null;
+
+                        if (!monitor.isCanceled()) {
+                            CdmProgressMonitorAdapter subprogressMonitor = CdmProgressMonitorAdapter
+                                    .CreateSubMonitor(monitor, 3);
+                            // genrerate new application controller
+                            applicationController = getApplicationController(cdmSource,subprogressMonitor);
+                        }
+
+
+                        if (!monitor.isCanceled()) {
+                            CdmStore.setInstance(applicationController, cdmSource);
+                            monitor.subTask("Authenticating user");
+                            display.syncExec(new Runnable() {
+                                /*
+                                 * (non-Javadoc)
+                                 *
+                                 * @see java.lang.Runnable#run()
+                                 */
+                                @Override
+                                public void run() {
+
+                                    try {
+                                        // create new security context
+                                        CdmStore.getLoginManager().doAuthenticate(loginDialog.getUsername(), loginDialog.getPassword());
+                                        loginDialog.onComplete();
+                                        CdmStore.getContextManager().notifyContextStart();
+                                        Rank.initDefaultTerms();
+                                    } catch(CdmAuthenticationException cae) {
+                                        loginDialog.hide(false);
+                                        loginDialog.setMessage(cae.getMessage());
+                                    }
+
+                                }
+                            });
+                        } else {
+                            throw new RuntimeException("Login cancelled");
+                        }
+                    } finally {
+                        monitor.done();
+                    }
+                }
+            });
+        } catch (InvocationTargetException e) {
+            loginDialog.hide(false);
+            loginDialog.setMessage(e.getMessage());
+        } catch (InterruptedException e) {
+            loginDialog.hide(false);
+            loginDialog.setMessage(e.getMessage());
+        }
+    }
+
+
+    private ICdmApplicationConfiguration getApplicationController(ICdmSource cdmSource, CdmProgressMonitorAdapter subprogressMonitor) {
+        if(cdmSource instanceof ICdmDataSource) {
+            return  CdmApplicationController.NewInstance(applicationContextBean,
+                    (ICdmDataSource)cdmSource,
+                    dbSchemaValidation,
+                    false,
+                    subprogressMonitor);
+        } else if(cdmSource instanceof ICdmRemoteSource) {
+            return CdmApplicationRemoteController.NewInstance((ICdmRemoteSource)cdmSource,
+                    subprogressMonitor,
+                    null);
+        } else {
+            throw new UnsupportedOperationException("Cannot create application controller for " + cdmSource.getName());
+        }
+    }
+
+    private void authenticate() {
+        LoginDialog saloginDialog = new LoginDialog(StoreUtil.getShell());
+        saloginDialog.open();
+    }
+
+    private void startContext() {
+        CdmStore.getContextManager().notifyContextStart();
+    }
+
+    /**
+     * @return
+     */
+    private String getConnectionMessage() {
+        return cdmSource.getConnectionMessage();
+    }
+
+    /**
+     * @return
+     * @throws SQLException
+     */
+    private void checkDbSchemaVersionCompatibility(IProgressMonitor monitor) {
+        monitor.subTask("Checking if datasource is compatible with this editor.");
+        String dbSchemaVersion;
+
+        String message = null;
+        try {
+            dbSchemaVersion = cdmSource.getDbSchemaVersion();
+            // we assume that empty dbSchemaVersion means an empty database and
+            // skip version checking
+
+            if(dbSchemaVersion != null) {
+                int compareVersion = CdmMetaData.compareVersion(dbSchemaVersion, CdmMetaData.getDbSchemaVersion(), 3, null);
+                // if the datasource version is greater than the taxeditor compatible version then the taxeditor needs to
+                // be updated else the datasource needs to be updated
+                if(compareVersion > 0) {
+                    message = "Please update the Taxonomic Editor (Help->Check for Updates) or choose a compatible datasource";
+                } else if (compareVersion < 0) {
+                    message = "Please update the chosen datasource or choose a new data source to connect to in the Datasource View.";
+                }
+            }
+            monitor.worked(1);
+        } catch (CdmSourceException e) {
+            //
+        }
+
+        if (message != null) {
+            // Show an error message
+            MessagingUtils
+            .messageDialog(
+                    "Datasource Compatibility Check failed",
+                    this,
+                    "The database schema for the chosen "
+                            + "datasource '"
+                            + cdmSource
+                            + "' \n is not compatible for this version of the taxonomic editor. \n\n"
+                            + message,
+                            null);
+
+            monitor.setCanceled(true);
+        }
+
+    }
+
+    private void checkIsNonEmptyCdmDatabase(IProgressMonitor monitor) {
+        monitor.subTask("Checking if datasource is a non empty CDM database.");
+        boolean isDbEmpty = false;
+        try {
+            isDbEmpty = cdmSource.isDbEmpty();
+        } catch (CdmSourceException e) {
+            isDbEmpty = true;
+        }
+        if(isDbEmpty) {
+            dbSchemaValidation = DbSchemaValidation.CREATE;
+        }
+    }
+
+    private boolean causeIsCancelationExceptionRecursive(Throwable throwable){
+        if(throwable == null){
+            return false;
+        }else if(throwable instanceof CancellationException){
+            return true;
+        }else{
+            return causeIsCancelationExceptionRecursive(throwable.getCause());
+        }
+    }
+
+    private void checkDatabaseReachable(IProgressMonitor monitor) {
+        try {
+            monitor.subTask("Checking if datasource is reachable.");
+            cdmSource.checkConnection();
+            monitor.worked(1);
+        } catch (CdmSourceException e) {
+            MessagingUtils.messageDialog("Could not connect to chosen datasource",
+                    this, "Reason: " + e.getMessage(), e);
+            monitor.setCanceled(true);
+        }
+    }
+
+
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmUIDataChangeService.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmUIDataChangeService.java
new file mode 100644 (file)
index 0000000..0a9d445
--- /dev/null
@@ -0,0 +1,50 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.store;
+
+import org.eclipse.swt.widgets.Display;
+
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent;
+import eu.etaxonomy.cdm.api.application.CdmDataChangeService;
+import eu.etaxonomy.cdm.api.application.ICdmChangeListener;
+
+/**
+ * @author cmathew
+ * @date 18 Jun 2015
+ *
+ */
+public class CdmUIDataChangeService extends CdmDataChangeService {
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#fireChangeEvent(eu.etaxonomy.cdm.api.application.CdmChangeEvent, boolean)
+     */
+    @Override
+    public void fireChangeEvent(final CdmChangeEvent event, boolean async) {
+        for(final ICdmChangeListener listener : listeners) {
+            // Update the user interface asynchronously
+            if(async) {
+                Display.getDefault().asyncExec(new Runnable() {
+                    @Override
+                    public void run() {
+                        listener.onChange(event);
+                    }
+                });
+            }
+            // Update the user interface synchronously
+            Display.getDefault().syncExec(new Runnable() {
+                @Override
+                public void run() {
+                    listener.onChange(event);
+                }
+            });
+        }
+    }
+
+}
index d7ca5a0d06d1916e81d7a0eaa801f7ea9874e362..822f4e8108e7760eac00e56756b64bf937ae8a32 100644 (file)
@@ -1,12 +1,12 @@
 // $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.
-*/
+ * 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.store;
 
@@ -24,6 +24,7 @@ import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchListener;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.XMLMemento;
+import org.eclipse.ui.internal.Workbench;
 
 import eu.etaxonomy.taxeditor.model.IContextListener;
 import eu.etaxonomy.taxeditor.model.MementoHelper;
@@ -38,226 +39,237 @@ import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
  * @version 1.0
  */
 public class ContextManager implements IWorkbenchListener{
-       
-       private ListenerList contextListeners = new ListenerList();
-
-       private IMemento memento;
-               
-       /**
-        * <p>Constructor for ContextManager.</p>
-        */
-       protected ContextManager() {
-               PlatformUI.getWorkbench().addWorkbenchListener(this);
-       }
-       
-       /**
-        * <p>addContextListener</p>
-        *
-        * @param listener a {@link eu.etaxonomy.taxeditor.model.IContextListener} object.
-        */
-       public void addContextListener(IContextListener listener){
-               contextListeners.add(listener);
-       }
-       
-       /**
-        * <p>removeContextListener</p>
-        *
-        * @param listener a {@link eu.etaxonomy.taxeditor.model.IContextListener} object.
-        */
-       public void removeContextListener(IContextListener listener) {
-               contextListeners.remove(listener);
-       }
-       
-       /**
-        * <p>notifyContextStart</p>
-        */
-       public void notifyContextStart() {
-               MessagingUtils.info("Notifying context listeners, that the context has started.");
-               ProgressMonitorDialog dialog = new ProgressMonitorDialog(StoreUtil.getShell());
-               
-               try {
-                       dialog.run(false, false, new IRunnableWithProgress() {
-                               /* (non-Javadoc)
-                                * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
-                                */
-                               @Override
-                               public void run(IProgressMonitor monitor)
-                                               throws InvocationTargetException, InterruptedException {
-                                       monitor.beginTask("Starting context", contextListeners.size());
-                                       
-                                       
-                                       readMemento();                          
-                                       
-                                       for(final Object listener : contextListeners.getListeners()){
-                                               ((IContextListener) listener).contextStart(memento, monitor);
-                                               monitor.worked(1);
-                                       }
-                                       monitor.done();
-                               }
-                       });
-               } catch (InvocationTargetException e) {
-                       MessagingUtils.error(getClass(), e);
-               } catch (InterruptedException e) {
-                       MessagingUtils.error(getClass(), e);
-               }
-       }
-       
-
-       /**
-        * 
-        */
-       public void notifyContextRefresh() {
-               MessagingUtils.info("Notifying context listeners, that the context needs to be refreshed.");
-               ProgressMonitorDialog dialog = new ProgressMonitorDialog(StoreUtil.getShell());
-               
-               try {
-                       dialog.run(false, false, new IRunnableWithProgress() {
-                               /* (non-Javadoc)
-                                * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
-                                */
-                               @Override
-                               public void run(IProgressMonitor monitor)
-                                               throws InvocationTargetException, InterruptedException {
-                                       monitor.beginTask("Refreshing context", contextListeners.size());                       
-                                       
-                                       for(final Object listener : contextListeners.getListeners()){
-                                               ((IContextListener) listener).contextRefresh(monitor);
-                                               monitor.worked(1);
-                                       }
-                                       monitor.done();
-                               }
-                       });
-               } catch (InvocationTargetException e) {
-                       MessagingUtils.error(getClass(), e);
-               } catch (InterruptedException e) {
-                       MessagingUtils.error(getClass(), e);
-               }
-       }
-       
-       /**
-        * <p>notifyContextAboutToStop</p>
-        *
-        * @param monitor a {@link org.eclipse.core.runtime.IProgressMonitor} object.
-        */
-       public void notifyContextAboutToStop(final IProgressMonitor monitor){
-
-               IProgressMonitor subMonitor = StoreUtil.getSubProgressMonitor(monitor, 1);
-
-               subMonitor.beginTask("Stoping context", contextListeners.size());
-               // we are creating the memento here; even if the context is not stopped
-               createMemento();
-               
-               for(final Object listener : contextListeners.getListeners()){
-                       ((IContextListener) listener).contextAboutToStop(memento, subMonitor);
-                       subMonitor.worked(1);
-               }       
-               
-               subMonitor.done();
-       }
-       
-       /**
-        * <p>notifyContextStop</p>
-        *
-        * @param monitor a {@link org.eclipse.core.runtime.IProgressMonitor} object.
-        */
-       public void notifyContextStop(IProgressMonitor monitor) {
-               
-               IProgressMonitor subMonitor = StoreUtil.getSubProgressMonitor(monitor, 1);
-
-               subMonitor.beginTask("Stoping context", contextListeners.size());
-               MessagingUtils.info("Notifying context listeners, that the context has stopped.");
-                               
-               for(Object listener : contextListeners.getListeners()){
-                       ((IContextListener) listener).contextStop(memento, subMonitor);
-                       subMonitor.worked(1);
-               }       
-
-               saveMemento();
-               subMonitor.done();
-       }
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IWorkbenchListener#preShutdown(org.eclipse.ui.IWorkbench, boolean)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public boolean preShutdown(IWorkbench workbench, boolean forced) {
-
-               createMemento();
-               
-               IProgressMonitor monitor = null;
-               
-               for(Object listener : contextListeners.getListeners()){
-                       ((IContextListener) listener).workbenchShutdown(memento, monitor);
-               }       
-               
-               saveMemento();
-               
-               // return true in any case, otherwise the application will not stop
-               return true;
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IWorkbenchListener#postShutdown(org.eclipse.ui.IWorkbench)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void postShutdown(IWorkbench workbench) {
-               
-               
-       }
-       
-       
-       private void readMemento(){
-               try {
-                       memento = MementoHelper.readMementoFromFile(getStateFileForCurrentDatabase());
-               } catch (FileNotFoundException e) {
-                       // no memento -> no previous state
-                       MessagingUtils.info("No state file for datasource");
-               }
-       }
-       
-       private void createMemento(){
-               
-               if (CdmStore.getActiveCdmSource() != null) {
-                       
-                       try {
-                               String name = CdmStore.getActiveCdmSource().getName();
-                               name = name.trim();
-                               name = name.replace(" ", "_");
-                               memento = XMLMemento.createWriteRoot(name);
-                       
-                               MessagingUtils.info("DataSource found. Memento created.");
-                       } catch (Exception e) {
-                               // The memento could not be created, but a not closable editor is avoided for this case.
-                               MessagingUtils.error(this.getClass(), "The memento could not be created", e);
-                       }
-               } else {
-                       MessagingUtils.info("Not storing state data, because no DataSource present.");
-               }
-               
-       }
-       
-       private boolean saveMemento(){
-               return MementoHelper.saveMementoToFile(memento, getStateFileForCurrentDatabase()) != null;
-       }
-       
-       /**
-        * <p>getStateFileForCurrentDatabase</p>
-        *
-        * @return a {@link java.io.File} object.
-        */
-       protected File getStateFileForCurrentDatabase() {
-               if(CdmStore.getActiveCdmSource() == null){
-                       return null;
-               }
-               
-               IPath path = TaxeditorStorePlugin.getDefault().getStateLocation();
-               if (path == null) {
-                       return null;
-               }
-               path = path.append("editor_state_" + CdmStore.getActiveCdmSource().getName() + ".xml");
-               return path.toFile();
-       }
+
+    private final ListenerList contextListeners = new ListenerList();
+
+    private IMemento memento;
+
+    /**
+     * <p>Constructor for ContextManager.</p>
+     */
+    protected ContextManager() {
+        if(Workbench.getInstance() != null) {
+            PlatformUI.getWorkbench().addWorkbenchListener(this);
+        }
+    }
+
+    /**
+     * <p>addContextListener</p>
+     *
+     * @param listener a {@link eu.etaxonomy.taxeditor.model.IContextListener} object.
+     */
+    public void addContextListener(IContextListener listener){
+        contextListeners.add(listener);
+    }
+
+    /**
+     * <p>removeContextListener</p>
+     *
+     * @param listener a {@link eu.etaxonomy.taxeditor.model.IContextListener} object.
+     */
+    public void removeContextListener(IContextListener listener) {
+        contextListeners.remove(listener);
+    }
+
+    public void notifyContextStartWithoutDialog(IProgressMonitor monitor) {
+        MessagingUtils.info("Notifying context listeners, that the context has started.");
+
+        readMemento();
+
+        for(final Object listener : contextListeners.getListeners()){
+            ((IContextListener) listener).contextStart(memento, monitor);
+        }
+    }
+    /**
+     * <p>notifyContextStart</p>
+     */
+    public void notifyContextStart() {
+        MessagingUtils.info("Notifying context listeners, that the context has started.");
+        ProgressMonitorDialog dialog = new ProgressMonitorDialog(StoreUtil.getShell());
+
+        try {
+            dialog.run(false, false, new IRunnableWithProgress() {
+                /* (non-Javadoc)
+                 * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
+                 */
+                @Override
+                public void run(IProgressMonitor monitor)
+                        throws InvocationTargetException, InterruptedException {
+                    monitor.beginTask("Starting context", contextListeners.size());
+
+
+                    readMemento();
+
+                    for(final Object listener : contextListeners.getListeners()){
+                        ((IContextListener) listener).contextStart(memento, monitor);
+                        monitor.worked(1);
+                    }
+                    monitor.done();
+                }
+            });
+        } catch (InvocationTargetException e) {
+            MessagingUtils.error(getClass(), e);
+        } catch (InterruptedException e) {
+            MessagingUtils.error(getClass(), e);
+        }
+    }
+
+
+    /**
+     *
+     */
+    public void notifyContextRefresh() {
+        MessagingUtils.info("Notifying context listeners, that the context needs to be refreshed.");
+        ProgressMonitorDialog dialog = new ProgressMonitorDialog(StoreUtil.getShell());
+
+        try {
+            dialog.run(false, false, new IRunnableWithProgress() {
+                /* (non-Javadoc)
+                 * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
+                 */
+                @Override
+                public void run(IProgressMonitor monitor)
+                        throws InvocationTargetException, InterruptedException {
+                    monitor.beginTask("Refreshing context", contextListeners.size());
+
+                    for(final Object listener : contextListeners.getListeners()){
+                        ((IContextListener) listener).contextRefresh(monitor);
+                        monitor.worked(1);
+                    }
+                    monitor.done();
+                }
+            });
+        } catch (InvocationTargetException e) {
+            MessagingUtils.error(getClass(), e);
+        } catch (InterruptedException e) {
+            MessagingUtils.error(getClass(), e);
+        }
+    }
+
+    /**
+     * <p>notifyContextAboutToStop</p>
+     *
+     * @param monitor a {@link org.eclipse.core.runtime.IProgressMonitor} object.
+     */
+    public void notifyContextAboutToStop(final IProgressMonitor monitor){
+
+        IProgressMonitor subMonitor = StoreUtil.getSubProgressMonitor(monitor, 1);
+
+        subMonitor.beginTask("Stoping context", contextListeners.size());
+        // we are creating the memento here; even if the context is not stopped
+        createMemento();
+
+        for(final Object listener : contextListeners.getListeners()){
+            ((IContextListener) listener).contextAboutToStop(memento, subMonitor);
+            subMonitor.worked(1);
+        }
+
+        subMonitor.done();
+    }
+
+    /**
+     * <p>notifyContextStop</p>
+     *
+     * @param monitor a {@link org.eclipse.core.runtime.IProgressMonitor} object.
+     */
+    public void notifyContextStop(IProgressMonitor monitor) {
+
+        IProgressMonitor subMonitor = StoreUtil.getSubProgressMonitor(monitor, 1);
+
+        subMonitor.beginTask("Stoping context", contextListeners.size());
+        MessagingUtils.info("Notifying context listeners, that the context has stopped.");
+
+        for(Object listener : contextListeners.getListeners()){
+            ((IContextListener) listener).contextStop(memento, subMonitor);
+            subMonitor.worked(1);
+        }
+
+        saveMemento();
+        subMonitor.done();
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IWorkbenchListener#preShutdown(org.eclipse.ui.IWorkbench, boolean)
+     */
+    /** {@inheritDoc} */
+    @Override
+    public boolean preShutdown(IWorkbench workbench, boolean forced) {
+
+        createMemento();
+
+        IProgressMonitor monitor = null;
+
+        for(Object listener : contextListeners.getListeners()){
+            ((IContextListener) listener).workbenchShutdown(memento, monitor);
+        }
+
+        saveMemento();
+
+        // return true in any case, otherwise the application will not stop
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IWorkbenchListener#postShutdown(org.eclipse.ui.IWorkbench)
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void postShutdown(IWorkbench workbench) {
+
+
+    }
+
+
+    private void readMemento(){
+        try {
+            memento = MementoHelper.readMementoFromFile(getStateFileForCurrentDatabase());
+        } catch (FileNotFoundException e) {
+            // no memento -> no previous state
+            MessagingUtils.info("No state file for datasource");
+        }
+    }
+
+    private void createMemento(){
+
+        if (CdmStore.getActiveCdmSource() != null) {
+
+            try {
+                String name = CdmStore.getActiveCdmSource().getName();
+                name = name.trim();
+                name = name.replace(" ", "_");
+                memento = XMLMemento.createWriteRoot(name);
+
+                MessagingUtils.info("DataSource found. Memento created.");
+            } catch (Exception e) {
+                // The memento could not be created, but a not closable editor is avoided for this case.
+                MessagingUtils.error(this.getClass(), "The memento could not be created", e);
+            }
+        } else {
+            MessagingUtils.info("Not storing state data, because no DataSource present.");
+        }
+
+    }
+
+    private boolean saveMemento(){
+        return MementoHelper.saveMementoToFile(memento, getStateFileForCurrentDatabase()) != null;
+    }
+
+    /**
+     * <p>getStateFileForCurrentDatabase</p>
+     *
+     * @return a {@link java.io.File} object.
+     */
+    protected File getStateFileForCurrentDatabase() {
+        if(CdmStore.getActiveCdmSource() == null){
+            return null;
+        }
+
+        IPath path = TaxeditorStorePlugin.getDefault().getStateLocation();
+        if (path == null) {
+            return null;
+        }
+        path = path.append("editor_state_" + CdmStore.getActiveCdmSource().getName() + ".xml");
+        return path.toFile();
+    }
 
 }
index b01cd9a978f456ed467e020e79a3a4f890d9391e..79f06e52435f2816aad730342610f69f7ee5a336 100644 (file)
@@ -23,6 +23,7 @@ import org.springframework.security.core.Authentication;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.model.common.Group;
@@ -57,55 +58,61 @@ public class LoginManager extends Observable implements IConversationEnabled, IC
         */
        public boolean authenticate(String username, String password){
 
-               // close all open editors
-               if(!AbstractUtility.closeAll()){
-                       return false;
-               }
-
-
-               try{
-                       SecurityContextHolder.clearContext();
-
-                       Authentication lastAuthentication = CdmStore.getCurrentAuthentiation();
-
-                       UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password);
-                       Authentication authentication = CdmStore.getAuthenticationManager().authenticate(token);
+           // close all open editors
+           if(!AbstractUtility.closeAll()){
+               return false;
+           }
 
-                       User user = (User) authentication.getPrincipal();
-                       /* circumventing problem with hibernate not refreshing the transient collection authorities in this case,
-                        * see http://dev.e-taxonomy.eu/trac/ticket/4053 */
-                       user.initAuthorities();
 
-                       if(logger.isDebugEnabled()){
-                               StringBuilder gaText = new StringBuilder();
-                               String indent = "    ";
-                               Set<GrantedAuthority> gaSet = user.getGrantedAuthorities();
-                               _logGrantedAuthotities(gaText, indent, gaSet);
-                               for(Group gr : user.getGroups()){
-                                       gaText.append(indent).append("gr[").append(gr.hashCode()).append("] \"").append(gr.getName()).append("\" ").append(gr.toString()).append("\n");
-                                       _logGrantedAuthotities(gaText, indent + indent, gr.getGrantedAuthorities());
-                               }
-                               logger.debug("User authenticated: " + user.getUsername() + "\n" + gaText.toString());
-                       }
+           try{
+               doAuthenticate(username, password);
+           } catch (CdmAuthenticationException e) {
+               MessagingUtils.warningDialog("Could not authenticate", this, e.getMessage());
+        }
+           return true;
+       }
 
-                       SecurityContextHolder.getContext().setAuthentication(authentication);
+       public void doAuthenticate(String username, String password) throws CdmAuthenticationException {
+           try {
+               SecurityContextHolder.clearContext();
+               Authentication lastAuthentication = CdmStore.getCurrentAuthentiation();
+
+               UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password);
+               Authentication authentication = CdmStore.getAuthenticationManager().authenticate(token);
+
+               User user = (User) authentication.getPrincipal();
+               /* circumventing problem with hibernate not refreshing the transient collection authorities in this case,
+                * see http://dev.e-taxonomy.eu/trac/ticket/4053 */
+               user.initAuthorities();
+
+               if(logger.isDebugEnabled()){
+                   StringBuilder gaText = new StringBuilder();
+                   String indent = "    ";
+                   Set<GrantedAuthority> gaSet = user.getGrantedAuthorities();
+                   _logGrantedAuthotities(gaText, indent, gaSet);
+                   for(Group gr : user.getGroups()){
+                       gaText.append(indent).append("gr[").append(gr.hashCode()).append("] \"").append(gr.getName()).append("\" ").append(gr.toString()).append("\n");
+                       _logGrantedAuthotities(gaText, indent + indent, gr.getGrantedAuthorities());
+                   }
+                   logger.debug("User authenticated: " + user.getUsername() + "\n" + gaText.toString());
+               }
+
+               authentication = new UsernamePasswordAuthenticationToken(user,password, authentication.getAuthorities());
+               SecurityContextHolder.getContext().setAuthentication(authentication);
+               CdmApplicationState.setCurrentSecurityContext(SecurityContextHolder.getContext());
+
+               if(!authentication.equals(lastAuthentication)){
+                   this.setChanged();
+                   this.notifyObservers();
+               }
+           } catch(BadCredentialsException e){
+               throw new CdmAuthenticationException("Login and/or Password incorrect", e);
+           } catch(LockedException e){
+               throw new CdmAuthenticationException("Account is locked", e);
+           } catch(IllegalArgumentException e){
+               throw new CdmAuthenticationException("Login and/or Password empty", e);
+           }
 
-                       if(!authentication.equals(lastAuthentication)){
-                               this.setChanged();
-                               this.notifyObservers();
-                       }
-                       return true;
-               }
-               catch(BadCredentialsException e){
-                       MessagingUtils.warningDialog("Could not authenticate", this, "Could not authenticate. Reason: Bad Credentials.");
-               }
-               catch(LockedException e){
-                       MessagingUtils.warningDialog("Could not authenticate", this, "Could not authenticate. Reason: Account is locked.");
-               }
-               catch(IllegalArgumentException e){
-                       MessagingUtils.warningDialog("Could not authenticate", this, "Could not authenticate. Reason: Username and/or Password empty.");
-               }
-               return false;
        }
 
        private void _logGrantedAuthotities(StringBuilder gaText, String indent,
@@ -121,7 +128,7 @@ public class LoginManager extends Observable implements IConversationEnabled, IC
         * @return a {@link eu.etaxonomy.cdm.model.common.User} object.
         */
        public User getAuthenticatedUser(){
-               Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+               Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
 
                if(authentication != null
                                && authentication.getPrincipal() != null
index cc437488aaf73287944eff9dc011fe589bec495c..847181732677189e6b4284ed319db25991ab02ab 100644 (file)
@@ -170,6 +170,12 @@ public class SearchManager {
                        configurator.setClazz(DerivedUnit.class);
                    }
                }
+               final List<String> OCCURRENCE_INIT_STRATEGY = Arrays.asList(new String[] {
+                       "descriptions",
+                       "identifiers",
+                       "derivationEvents.originals"
+               });
+               configurator.setPropertyPaths(OCCURRENCE_INIT_STRATEGY);
                if(configurator.getClazz().equals(SpecimenOrObservationBase.class)){
                    //get FieldUnits + DerivedUnits
                    configurator.setClazz(DerivedUnit.class);
index dea82de48dabc61da01391b69959dad169b16287..38ae7193bb78ca5a632f2c114595fbd2d8e132e2 100644 (file)
@@ -1,12 +1,12 @@
 // $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.
-*/
+ * 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.ui.bar;
 
@@ -14,14 +14,16 @@ import java.util.Observable;
 import java.util.Observer;
 
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.menus.WorkbenchWindowControlContribution;
 
 import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
 import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.util.ApplicationUtil;
 
 /**
  * Shows the currently logged in user in status bar
@@ -32,54 +34,61 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class AuthenticatedUserBar extends WorkbenchWindowControlContribution implements Observer{
 
-       private Label label_authenticatedUser;
-
-       /**
-        * <p>Constructor for AuthenticatedUserBar.</p>
-        */
-       public AuthenticatedUserBar(){
-               CdmStore.getLoginManager().addObserver(this);
-       }
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected Control createControl(Composite parent) {
-               final Composite composite = new Composite(parent, SWT.NONE);
-               final GridLayout layout = new GridLayout();
-               composite.setLayout(layout);
-               
-               label_authenticatedUser = new Label(composite, SWT.NULL);
-
-               update(null, null);
-                       
-               return composite;
-       }
-
-       /* (non-Javadoc)
-        * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
-        */
-       /** {@inheritDoc} */
-       public void update(Observable o, Object arg) {
-               User authenticatedUser = CdmStore.getLoginManager().getAuthenticatedUser();
-               // TODO find a method to recompute width for parental toolbar item
-               String text = authenticatedUser == null ? "Not logged in              " : 
-                                                                                                 "Logged in as: " + authenticatedUser.getUsername() + "         ";     
-               label_authenticatedUser.setText(text);
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.action.ContributionItem#dispose()
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void dispose() {
-               super.dispose();
-               
-               CdmStore.getLoginManager().deleteObserver(this);
-       }
-       
+    private Label label_authenticatedUser;
+
+    /**
+     * <p>Constructor for AuthenticatedUserBar.</p>
+     */
+    public AuthenticatedUserBar(){
+        CdmStore.getLoginManager().addObserver(this);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    /** {@inheritDoc} */
+    @Override
+    protected Control createControl(Composite parent) {
+
+        label_authenticatedUser = new Label(parent,  SWT.NULL);
+
+        update(null, null);
+
+        return label_authenticatedUser;
+    }
+
+    /* (non-Javadoc)
+     * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void update(Observable o, Object arg) {
+        User authenticatedUser = CdmStore.getLoginManager().getAuthenticatedUser();
+        // TODO find a method to recompute width for parental toolbar item
+        String text = "";
+        if(authenticatedUser == null) {
+            text = "Not logged in              " ;
+        } else {
+            if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                CdmRemoteSource source = (CdmRemoteSource) CdmStore.getActiveCdmSource();
+                String loginInfo = authenticatedUser.getUsername() + "@" + source.getName() + ":" + source.getContextPath();
+                PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setText(ApplicationUtil.getTitle() + " " + loginInfo);
+            }
+            text = "Logged in as: " + authenticatedUser.getUsername() + "         ";
+        }
+
+        label_authenticatedUser.setText(text);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.action.ContributionItem#dispose()
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void dispose() {
+        super.dispose();
+        CdmStore.getLoginManager().deleteObserver(this);
+    }
+
 
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java
new file mode 100644 (file)
index 0000000..9d56c4d
--- /dev/null
@@ -0,0 +1,793 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.ui.dialog;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+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 org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.events.IExpansionListener;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.wb.swt.SWTResourceManager;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.remoting.server.CDMServerException;
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
+import eu.etaxonomy.taxeditor.remoting.source.CdmServerInfo;
+import eu.etaxonomy.taxeditor.remoting.source.CdmServerInfo.CdmInstanceInfo;
+import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author cmathew
+ * @date 20 Jan 2015
+ *
+ */
+public class RemotingLoginDialog extends Dialog {
+
+    protected Object result;
+    protected Shell shlConnect;
+    private Text txtCdmServerStatus;
+    private Text txtCdmInstanceStatus;
+    private Combo comboCdmServer;
+    private Combo comboCdmInstance;
+    private Button btnConnect;
+
+    private final Map<String, CdmServerInfo> csiiMap = new HashMap<String, CdmServerInfo>();
+
+    private final static String STATUS_AVAILABLE = "Available";
+    private final static String STATUS_NOT_AVAILABLE = "Not Available";
+    private final static String STATUS_RETRIEVING = "Retrieving ...";
+    private final static String STATUS_CHECKING_AVAILABILITY = "Checking ...";
+    private final static String STATUS_NO_INSTANCES = "No Instances Found";
+    private final static String STATUS_ERROR = "Error";
+    private final static String STATUS_REMOTING_NOT_ACTIVATED = "Remoting not activated";
+    private final static String STORE_PREFERENCES_NODE = "eu.etaxonomy.taxeditor.store";
+
+    private final static String LOGIN_NODE = "login";
+    private final static String USERNAME_SUFFIX = "_username";
+    private final static String PASSWORD_SUFFIX = "_password";
+
+    private final static String LAST_SERVER_INSTANCE_NODE = "lastServerInstance";
+    private final static String LAST_SERVER_KEY = "lastServerKey";
+    private final static String LAST_INSTANCE_KEY = "lastInstanceKey";
+
+
+    private Composite remotingComposite;
+    private CdmServerInfo selectedCsii;
+    private CdmInstanceInfo selectedCdmInstance;
+    private Button btnCdmServerRefresh;
+    private Composite loginComposite;
+    private Label lblLogin;
+    private Text txtLogin;
+    private Label lblPassword;
+    private Text txtPassword;
+    private Button btnRememberMe;
+    private Composite compAdvanced;
+    private Label lblPort;
+    private Text txtPort;
+    private Label lblServerVersion;
+    private Text txtServerVersion;
+    private ExpandableComposite xpndblcmpstAdvanced;
+    private StyledText styledTxtMessage;
+
+
+    private final int MIN_WIDTH = 530;
+    private final int MIN_HEIGHT = 220;
+    private final int MIN_EXP_HEIGHT = 350;
+    private final int MESSAGE_HEIGHT = 25;
+    private Label lblEditorVersion;
+    private Text txtEditorVersion;
+    private Label lblServerCDMVersion;
+    private Text txtServerCDMVersion;
+    private Label lblEditorCDMVersion;
+    private Text txtEditorCDMVersion;
+
+    private String serverName, instanceName;
+    private boolean autoConnect = false;
+    private boolean loadLoginPrefs = true;
+    private boolean isDevRemoteSource = false;
+
+    /**
+     * Create the dialog.
+     * @param parent
+     * @param style
+     */
+    public RemotingLoginDialog(Shell parent, int style) {
+        super(parent, style);
+        setText("Login");
+    }
+
+    public Object open(CdmRemoteSource source, boolean loadLoginPrefs, boolean autoConnect) {
+        this.loadLoginPrefs = loadLoginPrefs;
+        this.serverName = source.getName();
+        String contextPath = source.getContextPath();
+        this.instanceName = contextPath.substring(contextPath.lastIndexOf("/") + 1);
+        return open(serverName, instanceName, loadLoginPrefs, autoConnect);
+    }
+
+
+    public Object open(String serverName, String instanceName, boolean loadLoginPrefs, boolean autoConnect) {
+        this.serverName = serverName;
+        this.instanceName = instanceName;
+        this.loadLoginPrefs = loadLoginPrefs;
+        this.autoConnect = autoConnect;
+        return open();
+    }
+
+    /**
+     * Open the dialog.
+     * @return the result
+     */
+    public Object open() {
+        //        ICdmRemoteSource devRemoteSource = CdmServerInfo.getDevServerRemoteSource();
+        //        if(devRemoteSource != null) {
+        //            connect(devRemoteSource);
+        //        } else {
+        createContents();
+        if(serverName == null && instanceName == null) {
+            readPrefLastServerInstance();
+        }
+
+        populateCdmServerCombo();
+        shlConnect.open();
+        shlConnect.layout();
+
+        xpndblcmpstAdvanced.setExpanded(false);
+
+        Display display = getParent().getDisplay();
+
+        while (!shlConnect.isDisposed()) {
+            if (!display.readAndDispatch()) {
+                display.sleep();
+            }
+        }
+        //}
+        return result;
+    }
+
+    /**
+     * Create contents of the dialog.
+     */
+    private void createContents() {
+        shlConnect = new Shell(getParent(), SWT.DIALOG_TRIM);
+        shlConnect.setMinimumSize(new Point(MIN_WIDTH, MIN_HEIGHT));
+        shlConnect.setSize(MIN_WIDTH, MIN_HEIGHT);
+        shlConnect.setText("Connect");
+        shlConnect.setLayout(new FillLayout(SWT.HORIZONTAL));
+
+        remotingComposite = new Composite(shlConnect, SWT.NONE);
+        remotingComposite.setLayout(new GridLayout(1, false));
+
+        Composite cdmServerComposite = new Composite(remotingComposite, SWT.NONE);
+        GridData gd_cdmServerComposite = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
+        gd_cdmServerComposite.heightHint = 68;
+        cdmServerComposite.setLayoutData(gd_cdmServerComposite);
+        cdmServerComposite.setLayout(new GridLayout(4, false));
+
+        Label lblCdmServer = new Label(cdmServerComposite, SWT.NONE);
+        lblCdmServer.setText("CDM Server : ");
+        lblCdmServer.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+        lblCdmServer.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+
+        comboCdmServer = new Combo(cdmServerComposite, SWT.READ_ONLY);
+        comboCdmServer.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                refreshCdmServer();
+                updatePort();
+            }
+        });
+        GridData gd_comboCdmServer = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
+        gd_comboCdmServer.widthHint = 150;
+        comboCdmServer.setLayoutData(gd_comboCdmServer);
+        comboCdmServer.select(0);
+
+        txtCdmServerStatus = new Text(cdmServerComposite, SWT.BORDER);
+        txtCdmServerStatus.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
+        txtCdmServerStatus.setEditable(false);
+        GridData gd_txtCdmServerStatus = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
+        gd_txtCdmServerStatus.widthHint = 100;
+        txtCdmServerStatus.setLayoutData(gd_txtCdmServerStatus);
+
+        btnCdmServerRefresh = new Button(cdmServerComposite, SWT.NONE);
+        btnCdmServerRefresh.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                refreshCdmServer();
+            }
+        });
+        btnCdmServerRefresh.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
+        btnCdmServerRefresh.setText("Refresh");
+
+        Label lblCdmInstance = new Label(cdmServerComposite, SWT.NONE);
+        GridData gd_lblCdmInstance = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
+        gd_lblCdmInstance.heightHint = 30;
+        lblCdmInstance.setLayoutData(gd_lblCdmInstance);
+        lblCdmInstance.setText("CDM Instance : ");
+        lblCdmInstance.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+
+        comboCdmInstance = new Combo(cdmServerComposite, SWT.READ_ONLY);
+        comboCdmInstance.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                updateSelectedCdmInstance();
+                checkSelectedCdmInstance();
+            }
+        });
+        GridData gd_comboCdmInstance = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
+        gd_comboCdmInstance.widthHint = 150;
+        comboCdmInstance.setLayoutData(gd_comboCdmInstance);
+        comboCdmInstance.select(0);
+
+        txtCdmInstanceStatus = new Text(cdmServerComposite, SWT.BORDER);
+        txtCdmInstanceStatus.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
+        txtCdmInstanceStatus.setEditable(false);
+        GridData gd_txtCdmInstanceStatus = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
+        gd_txtCdmInstanceStatus.widthHint = 100;
+        txtCdmInstanceStatus.setLayoutData(gd_txtCdmInstanceStatus);
+
+        Button btnCdmInstanceRefresh = new Button(cdmServerComposite, SWT.FLAT);
+        btnCdmInstanceRefresh.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                refreshCdmInstance();
+            }
+        });
+        GridData gd_btnCdmInstanceRefresh = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
+        gd_btnCdmInstanceRefresh.widthHint = 110;
+        gd_btnCdmInstanceRefresh.heightHint = 30;
+        btnCdmInstanceRefresh.setLayoutData(gd_btnCdmInstanceRefresh);
+        btnCdmInstanceRefresh.setText("Refresh");
+
+        loginComposite = new Composite(remotingComposite, SWT.NONE);
+        GridData gd_loginComposite = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
+        gd_loginComposite.widthHint = 487;
+        gd_loginComposite.heightHint = 70;
+        loginComposite.setLayoutData(gd_loginComposite);
+        GridLayout gl_loginComposite = new GridLayout(6, false);
+        gl_loginComposite.marginTop = 5;
+        loginComposite.setLayout(gl_loginComposite);
+
+        lblLogin = new Label(loginComposite, SWT.CENTER);
+        GridData gd_lblLogin = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
+        gd_lblLogin.widthHint = 50;
+        lblLogin.setLayoutData(gd_lblLogin);
+        lblLogin.setText("Login : ");
+        lblLogin.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+
+        txtLogin = new Text(loginComposite, SWT.BORDER);
+        GridData gd_txtLogin = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
+        gd_txtLogin.minimumWidth = 80;
+        gd_txtLogin.widthHint = 80;
+        gd_txtLogin.heightHint = 15;
+        txtLogin.setLayoutData(gd_txtLogin);
+
+        lblPassword = new Label(loginComposite, SWT.CENTER);
+        lblPassword.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        lblPassword.setText("Password : ");
+        lblPassword.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+
+        txtPassword = new Text(loginComposite, SWT.BORDER | SWT.PASSWORD);
+        GridData gd_txtPassword = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
+        gd_txtPassword.minimumWidth = 80;
+        gd_txtPassword.widthHint = 80;
+        gd_txtPassword.heightHint = 15;
+        txtPassword.setLayoutData(gd_txtPassword);
+        new Label(loginComposite, SWT.NONE);
+
+        btnConnect = new Button(loginComposite, SWT.FLAT);
+        btnConnect.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
+        btnConnect.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseUp(MouseEvent e) {
+                connect();
+            }
+        });
+        btnConnect.setText("Connect");
+
+        btnRememberMe = new Button(loginComposite, SWT.CHECK);
+        btnRememberMe.setSelection(true);
+        GridData gd_btnRememberMe = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
+        gd_btnRememberMe.widthHint = 107;
+        btnRememberMe.setLayoutData(gd_btnRememberMe);
+        btnRememberMe.setText("Remember Me");
+        new Label(loginComposite, SWT.NONE);
+        new Label(loginComposite, SWT.NONE);
+        new Label(loginComposite, SWT.NONE);
+        new Label(loginComposite, SWT.NONE);
+
+        styledTxtMessage = new StyledText(remotingComposite, SWT.NONE);
+        styledTxtMessage.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
+        styledTxtMessage.setForeground(SWTResourceManager.getColor(SWT.COLOR_DARK_RED));
+        styledTxtMessage.setFont(SWTResourceManager.getFont("Ubuntu", 12, SWT.BOLD));
+        styledTxtMessage.setSelectionBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_SELECTION_TEXT));
+        styledTxtMessage.setSelectionForeground(SWTResourceManager.getColor(SWT.COLOR_DARK_RED));
+        styledTxtMessage.setDoubleClickEnabled(false);
+        styledTxtMessage.setEditable(false);
+        GridData gd_styledTxtMessage = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
+        gd_styledTxtMessage.exclude = true;
+        gd_styledTxtMessage.minimumHeight = MESSAGE_HEIGHT;
+        gd_styledTxtMessage.heightHint = MESSAGE_HEIGHT;
+        styledTxtMessage.setLayoutData(gd_styledTxtMessage);
+
+        xpndblcmpstAdvanced = new ExpandableComposite(remotingComposite, SWT.NONE, ExpandableComposite.TWISTIE);
+        GridData gd_xpndblcmpstAdvanced = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
+        gd_xpndblcmpstAdvanced.heightHint = 19;
+        xpndblcmpstAdvanced.setLayoutData(gd_xpndblcmpstAdvanced);
+        xpndblcmpstAdvanced.addExpansionListener(new IExpansionListener() {
+            @Override
+            public void expansionStateChanged(ExpansionEvent e) {
+                GridData gridData = (GridData) xpndblcmpstAdvanced.getLayoutData();
+                if(e.getState()) {
+                    shlConnect.setSize(MIN_WIDTH, MIN_EXP_HEIGHT);
+                } else {
+                    shlConnect.setSize(MIN_WIDTH, MIN_HEIGHT);
+                }
+
+            }
+            @Override
+            public void expansionStateChanging(ExpansionEvent e) {
+            }
+        });
+        xpndblcmpstAdvanced.setText("advanced");
+        xpndblcmpstAdvanced.setExpanded(true);
+
+        compAdvanced = new Composite(xpndblcmpstAdvanced, SWT.NONE);
+        xpndblcmpstAdvanced.setClient(compAdvanced);
+        compAdvanced.setLayout(new GridLayout(4, false));
+
+        lblPort = new Label(compAdvanced, SWT.CENTER);
+        lblPort.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        lblPort.setSize(0, 0);
+        lblPort.setText("Port : ");
+        lblPort.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+
+        txtPort = new Text(compAdvanced, SWT.BORDER);
+        GridData gd_txtPort = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
+        gd_txtPort.minimumWidth = 50;
+        gd_txtPort.widthHint = 50;
+        txtPort.setLayoutData(gd_txtPort);
+
+        lblServerVersion = new Label(compAdvanced, SWT.CENTER);
+        lblServerVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        lblServerVersion.setText("Server Version :");
+        lblServerVersion.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+
+        txtServerVersion = new Text(compAdvanced, SWT.BORDER);
+        txtServerVersion.setEnabled(false);
+        txtServerVersion.setEditable(false);
+        txtServerVersion.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
+        new Label(compAdvanced, SWT.NONE);
+        new Label(compAdvanced, SWT.NONE);
+
+        lblEditorVersion = new Label(compAdvanced, SWT.CENTER);
+        lblEditorVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        lblEditorVersion.setText("Editor Version :");
+        lblEditorVersion.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+
+        txtEditorVersion = new Text(compAdvanced, SWT.BORDER);
+        txtEditorVersion.setEnabled(false);
+        txtEditorVersion.setEditable(false);
+        txtEditorVersion.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+        new Label(compAdvanced, SWT.NONE);
+        new Label(compAdvanced, SWT.NONE);
+
+        lblServerCDMVersion = new Label(compAdvanced, SWT.CENTER);
+        lblServerCDMVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        lblServerCDMVersion.setText("Server CDM Version :");
+        lblServerCDMVersion.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+
+        txtServerCDMVersion = new Text(compAdvanced, SWT.BORDER);
+        txtServerCDMVersion.setEnabled(false);
+        txtServerCDMVersion.setEditable(false);
+        txtServerCDMVersion.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+        new Label(compAdvanced, SWT.NONE);
+        new Label(compAdvanced, SWT.NONE);
+
+        lblEditorCDMVersion = new Label(compAdvanced, SWT.CENTER);
+        lblEditorCDMVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        lblEditorCDMVersion.setText("Editor CDM Version :");
+        lblEditorCDMVersion.setFont(SWTResourceManager.getFont("Ubuntu", 9, SWT.NORMAL));
+
+        txtEditorCDMVersion = new Text(compAdvanced, SWT.BORDER);
+        txtEditorCDMVersion.setEnabled(false);
+        txtEditorCDMVersion.setEditable(false);
+        txtEditorCDMVersion.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+
+    }
+
+
+
+    private void populateCdmServerCombo() {
+        Job job = new Job("Retrieve Server Instances") {
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                Display.getDefault().syncExec(new Runnable() {
+                    @Override
+                    public void run() {
+                        for(CdmServerInfo csii : CdmServerInfo.getCdmServers()) {
+                            csiiMap.put(csii.getName(), csii);
+                            comboCdmServer.add(csii.getName());
+                        }
+                        int serverIndex = -1;
+                        if(serverName != null) {
+                            serverIndex = comboCdmServer.indexOf(serverName);
+                        }
+                        if(serverIndex == -1) {
+                            comboCdmServer.select(0);
+                            autoConnect = false;
+                        } else {
+                            comboCdmServer.select(serverIndex);
+                        }
+                        CdmRemoteSource devRemoteSource = CdmServerInfo.getDevServerRemoteSource();
+                        if(devRemoteSource != null) {
+                            isDevRemoteSource = true;
+                        }
+                        refreshCdmServer();
+                        updatePort();
+
+                        if(devRemoteSource != null) {
+                            String username = System.getProperty("cdm.server.dev.username");
+                            String password = System.getProperty("cdm.server.dev.password");
+                            if(username != null && !username.isEmpty() && password != null && !password.isEmpty()) {
+                                txtLogin.setText(username);
+                                txtPassword.setText(password);
+                                CdmStore.connect(devRemoteSource, RemotingLoginDialog.this);
+                            }
+                        }
+                    }
+                });
+                return Status.OK_STATUS;
+            }
+        };
+        job.schedule();
+    }
+
+
+    private void refreshCdmServer() {
+        txtCdmServerStatus.setText(STATUS_CHECKING_AVAILABILITY);
+        updateSelectedCdmServer();
+        checkSelectedCdmServer();
+    }
+
+    private void updateSelectedCdmServer() {
+        int selIndex = comboCdmServer.getSelectionIndex();
+        if(selIndex != -1) {
+            selectedCsii = csiiMap.get(comboCdmServer.getItem(selIndex));
+        }
+    }
+
+    private void updatePort() {
+        txtPort.setText("");
+        if(selectedCsii != null) {
+            txtPort.setText(String.valueOf(selectedCsii.getPort()));
+        }
+    }
+
+    private int getPort() {
+        int port = 0;
+        try {
+            port = Integer.valueOf(txtPort.getText());
+        } catch (NumberFormatException nfe) {
+            setMessage("Port should be an integer");
+        }
+        return port;
+    }
+
+    private void checkSelectedCdmServer() {
+
+        txtCdmInstanceStatus.setText("");
+        txtPort.setEditable(false);
+        txtPort.setEnabled(false);
+        emptyCredentials();
+
+        if(selectedCsii != null) {
+            if(selectedCsii.isLocalhost()) {
+                txtPort.setEditable(true);
+                txtPort.setEnabled(true);
+            }
+            if(selectedCsii.pingServer()) {
+                txtCdmServerStatus.setText(STATUS_AVAILABLE);
+                populateCdmInstanceCombo(true);
+
+            } else {
+                txtCdmServerStatus.setText(STATUS_NOT_AVAILABLE);
+                comboCdmInstance.removeAll();
+            }
+        }
+    }
+
+
+    private void populateCdmInstanceCombo(final boolean forceRefresh) {
+        comboCdmInstance.removeAll();
+        comboCdmInstance.setEnabled(false);
+        btnConnect.setEnabled(false);
+        txtCdmInstanceStatus.setText(STATUS_RETRIEVING);
+
+        Job job = new Job("Retrieve Server Instances") {
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                try {
+                    if(selectedCsii != null) {
+                        if(forceRefresh) {
+                            selectedCsii.refreshInstances();
+                        }
+                        final List<CdmInstanceInfo> instances = selectedCsii.getInstances();
+                        Display.getDefault().asyncExec(new Runnable() {
+                            @Override
+                            public void run() {
+                                if(!instances.isEmpty()) {
+                                    for(CdmInstanceInfo cdmInstance : instances) {
+                                        comboCdmInstance.add(cdmInstance.getName());
+                                    }
+                                    int instanceIndex = -1;
+                                    if(instanceName != null) {
+                                        instanceIndex = comboCdmInstance.indexOf(instanceName);
+                                    }
+                                    if(instanceIndex == -1) {
+                                        comboCdmInstance.select(0);
+                                        autoConnect = false;
+                                    } else {
+                                        comboCdmInstance.select(instanceIndex);
+                                    }
+                                    updateSelectedCdmInstance();
+                                    checkSelectedCdmInstance();
+                                    comboCdmInstance.setEnabled(true);
+                                    if(autoConnect) {
+                                        connect();
+                                    }
+
+                                } else {
+                                    txtCdmInstanceStatus.setText(STATUS_NO_INSTANCES);
+                                    btnConnect.setEnabled(false);
+                                }
+                            }
+                        });
+                    }
+                } catch (CDMServerException e) {
+                    MessagingUtils.warn(getClass(), e);
+                    Display.getDefault().asyncExec(new Runnable() {
+                        @Override
+                        public void run() {
+                            txtCdmInstanceStatus.setText(STATUS_REMOTING_NOT_ACTIVATED);
+                            comboCdmInstance.setEnabled(false);
+                            btnConnect.setEnabled(false);
+                        }
+                    });
+                }
+                return Status.OK_STATUS;
+            }
+        };
+
+        if(txtCdmServerStatus.getText().equals(STATUS_AVAILABLE) && !isDevRemoteSource) {
+            // Start the Job
+            job.schedule();
+        }
+
+    }
+
+    private void refreshCdmInstance() {
+        txtCdmInstanceStatus.setText(STATUS_CHECKING_AVAILABILITY);
+        updateSelectedCdmInstance();
+        checkSelectedCdmInstance();
+    }
+
+    private void updateSelectedCdmInstance() {
+        int selIndex = comboCdmInstance.getSelectionIndex();
+        if(selIndex != -1) {
+            selectedCdmInstance = selectedCsii.getInstanceFromName(comboCdmInstance.getItem(selIndex));
+            if(loadLoginPrefs && !isDevRemoteSource) {
+                readPrefCredentials();
+            }
+        }
+    }
+
+    private void checkSelectedCdmInstance() {
+        if(txtCdmServerStatus.getText().equals(STATUS_AVAILABLE)) {
+            try {
+                if(selectedCsii.pingInstance(selectedCdmInstance, getPort())) {
+                    txtCdmInstanceStatus.setText(STATUS_AVAILABLE);
+                    btnConnect.setEnabled(true);
+                } else {
+                    txtCdmInstanceStatus.setText(STATUS_NOT_AVAILABLE);
+                    btnConnect.setEnabled(false);
+                }
+            } catch (Exception e) {
+                txtCdmInstanceStatus.setText(STATUS_NOT_AVAILABLE);
+                txtCdmInstanceStatus.setToolTipText(e.getMessage());
+            }
+        }
+
+    }
+
+    private void connect() {
+        checkSelectedCdmInstance();
+
+        if(!txtCdmInstanceStatus.getText().equals(STATUS_AVAILABLE)) {
+            return;
+        }
+
+        ICdmRemoteSource source = selectedCsii.getCdmRemoteSource(selectedCdmInstance, getPort());
+
+        if(!validateLogin()) {
+            return;
+        }
+
+        try {
+            CdmStore.connect(source, this);
+        } catch (Exception e) {
+            // Do not expect anything to go wrong at this point, so we throw a runtime exception
+            // if any problems
+            throw new RuntimeException(e);
+        }
+
+    }
+
+
+    public boolean isRememberMe() {
+        return btnRememberMe.getSelection();
+    }
+
+    private void persistPrefLastServerInstance() {
+        IEclipsePreferences preferences = ConfigurationScope.INSTANCE.getNode(STORE_PREFERENCES_NODE);
+        Preferences lastServerInstancePrefs = preferences.node(LAST_SERVER_INSTANCE_NODE);
+
+        lastServerInstancePrefs.put(LAST_SERVER_KEY, selectedCsii.getName());
+        lastServerInstancePrefs.put(LAST_INSTANCE_KEY, selectedCdmInstance.getName());
+
+        flushPreferences(lastServerInstancePrefs);
+    }
+
+    private void persistPrefCredentials() {
+         IEclipsePreferences preferences = ConfigurationScope.INSTANCE.getNode(STORE_PREFERENCES_NODE);
+         Preferences credentialsPrefs = preferences.node(LOGIN_NODE);
+         credentialsPrefs.put(getUsernamePrefKey(), txtLogin.getText());
+         credentialsPrefs.put(getPasswordPrefKey(), txtPassword.getText());
+         flushPreferences(credentialsPrefs);
+    }
+
+    private void flushPreferences(Preferences prefs) {
+        try {
+            prefs.flush();
+        } catch (BackingStoreException bse) {
+            setMessage(bse.getMessage());
+        }
+    }
+
+    private void readPrefCredentials() {
+        String username, password;
+        IEclipsePreferences preferences = ConfigurationScope.INSTANCE.getNode(STORE_PREFERENCES_NODE);
+        Preferences credentialsPrefs = preferences.node(LOGIN_NODE);
+        username = credentialsPrefs.get(getUsernamePrefKey(), "");
+        txtLogin.setText(username);
+        password = credentialsPrefs.get(getPasswordPrefKey(),"");
+        txtPassword.setText(password);
+        if(username.isEmpty() || password.isEmpty()) {
+            autoConnect = false;
+        }
+    }
+
+    private void readPrefLastServerInstance() {
+        IEclipsePreferences preferences = ConfigurationScope.INSTANCE.getNode(STORE_PREFERENCES_NODE);
+        Preferences lastServerInstancePrefs = preferences.node(LAST_SERVER_INSTANCE_NODE);
+
+        serverName = lastServerInstancePrefs.get(LAST_SERVER_KEY, null);
+        instanceName = lastServerInstancePrefs.get(LAST_INSTANCE_KEY, null);
+    }
+
+    private void emptyCredentials() {
+        txtLogin.setText("");
+        txtPassword.setText("");
+    }
+
+    private String getUsernamePrefKey() {
+        return selectedCsii.toString(selectedCdmInstance.getName(), getPort()) + USERNAME_SUFFIX;
+    }
+
+    private String getPasswordPrefKey() {
+        return selectedCsii.toString(selectedCdmInstance.getName(), getPort()) + PASSWORD_SUFFIX;
+    }
+
+    private boolean validateLogin() {
+        if(getUsername() == null || getUsername().isEmpty()) {
+            setMessage("User login cannot be empty");
+            return false;
+        }
+        if(getPassword() == null || getPassword().isEmpty()) {
+            setMessage("Password cannot be empty");
+            return false;
+        }
+        return true;
+    }
+    public String getUsername() {
+        return txtLogin.getText();
+    }
+
+    public String getPassword() {
+        return txtPassword.getText();
+    }
+
+    public void setMessage(String message) {
+        if(message != null && !message.isEmpty()) {
+            if(message.length() > 60) {
+                styledTxtMessage.setToolTipText(message);
+                message = message.substring(0, 60) + "...";
+            }
+            styledTxtMessage.setText(message);
+            styledTxtMessage.setVisible(true);
+            ((GridData)styledTxtMessage.getLayoutData()).exclude = false;
+            shlConnect.setSize(MIN_WIDTH, MIN_HEIGHT+MESSAGE_HEIGHT);
+            shlConnect.setMinimumSize(MIN_WIDTH, MIN_HEIGHT+MESSAGE_HEIGHT);
+        } else {
+            styledTxtMessage.setText("");
+            styledTxtMessage.setVisible(false);
+            ((GridData)styledTxtMessage.getLayoutData()).exclude = true;
+            shlConnect.setSize(MIN_WIDTH, MIN_HEIGHT);
+            shlConnect.setMinimumSize(MIN_WIDTH, MIN_HEIGHT);
+        }
+        remotingComposite.layout();
+    }
+
+
+
+    public void hide(boolean isHidden) {
+        if(shlConnect != null && shlConnect.getDisplay() != null) {
+            shlConnect.setVisible(!isHidden);
+        }
+    }
+    public void dispose() {
+        if(shlConnect != null && shlConnect.getDisplay() != null) {
+            shlConnect.dispose();
+        }
+    }
+
+    public void onComplete() {
+        Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                if(!isDevRemoteSource) {
+                    if(isRememberMe()) {
+                        persistPrefCredentials();
+                    }
+                    persistPrefLastServerInstance();
+                }
+                dispose();
+            }
+        });
+    }
+}
index e714485232cb72cfaf0f9f6cc858ffd1a5f90929..8bfa50dd67f542f256411f7858a241e01b48bfef 100644 (file)
@@ -32,6 +32,7 @@ import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Cursor;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Link;
@@ -71,6 +72,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
 
        protected T cdmBaseToBeFiltered;
 
+
        /**
         * <p>Constructor for AbstractFilteredCdmResourceSelectionDialog.</p>
         *
@@ -90,10 +92,11 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
 
                this.conversation = conversation;
 
+               Cursor cursor = shell.getCursor();
+               shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
                init();
-
                initModel();
-
+               shell.setCursor(cursor);
                String objectTitle = getTitle(cdmObject);
                if (objectTitle != null) {
                        setInitialPattern(objectTitle);
@@ -220,7 +223,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
        /** {@inheritDoc} */
        @Override
        public void refresh() {
-               initModel();
+               //initModel();
                filterExcludedObjects();
                super.refresh();
        }
@@ -484,6 +487,9 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                                        if (status == IStatus.OK) {
 
                                                T entity = (T) wizard.getEntity();
+                                               model.add(new UuidAndTitleCache<T>(entity.getUuid(),
+                                                       entity.getId(),
+                                                       getTitle(entity)));
                                                refresh();
                                                setPattern(entity);
                                                getConversationHolder().bind();
index 54a28eb90e8da393a1672ef28cd52aa29d2a9c58..93f7108d0c31bf32b3640ca560afa2ca676a67ed 100644 (file)
@@ -62,7 +62,7 @@ public class SelectionDialogFactory {
                        return (T) ClassificationSelectionDialog.select(shell, conversation, (Classification) currentSelection);
                }
                if(clazz.equals(TaxonNode.class)){
-                       return (T) TaxonNodeSelectionDialog.select(shell, conversation, null, null, (TaxonNode) currentSelection, null);
+                       return (T) TaxonNodeSelectionDialog.select(shell, conversation, null, null, (TaxonNode) currentSelection, ((TaxonNode) currentSelection).getClassification());
                }
                if(clazz.equals(Reference.class)){
                        return (T) ReferenceSelectionDialog.select(shell, conversation, (Reference) currentSelection);
index 99e5890e83e29da2616fd2f3863ebce081685680..b4901d2d38fb7d3f31d3cd24fb74c49afd642d2d 100644 (file)
@@ -1,12 +1,12 @@
 // $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
+ * 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.ui.dialog.selection;\r
 \r
@@ -31,117 +31,114 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created Sep 21, 2009\r
  * @version 1.0\r
  */\r
-public class TaxonBaseSelectionDialog extends\r
-               AbstractFilteredCdmResourceSelectionDialog<TaxonBase> {\r
-       \r
-               \r
-       /**\r
-        * <p>select</p>\r
-        *\r
-        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
-        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
-        */\r
-       public static TaxonBase selectTaxonBase(Shell shell, ConversationHolder conversation) {\r
-               AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(TaxonBase.class, shell, conversation,\r
-                               "Choose a taxon", false, null, null);\r
-               return getSelectionFromDialog(dialog);\r
-       }\r
-       \r
-       /**\r
-        * <p>select</p>\r
-        *\r
-        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
-        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
-        */\r
-       public static Taxon selectTaxon(Shell shell, ConversationHolder conversation, Taxon taxonToBeFiltered) {\r
-               \r
-\r
-               AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(Taxon.class, shell, conversation,\r
-                               "Choose a taxon", false, null, taxonToBeFiltered);\r
-               return (Taxon) getSelectionFromDialog(dialog);\r
-       }\r
-       \r
-       /**\r
-        * <p>select</p>\r
-        *\r
-        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
-        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
-        */\r
-       public static Synonym selectSynonym(Shell shell, ConversationHolder conversation) {\r
-               AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(Synonym.class, shell, conversation,\r
-                               "Choose a taxon", false, null, null);\r
-               return (Synonym) getSelectionFromDialog(dialog);\r
-       }\r
-\r
-       private final Class<? extends TaxonBase> clazz;\r
-       \r
-       /**\r
-        * <p>Constructor for FilteredTaxonBaseSelectionDialog.</p>\r
-        *\r
-        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
-        * @param title a {@link java.lang.String} object.\r
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
-        * @param multi a boolean.\r
-        * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
-        */\r
-       protected TaxonBaseSelectionDialog(Class<? extends TaxonBase> clazz, Shell shell, ConversationHolder conversation, String title, boolean multi, TaxonBase taxon, TaxonBase taxonToBeFiltered) {\r
-               super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), taxon);\r
-               this.cdmBaseToBeFiltered = taxonToBeFiltered;\r
-\r
-               \r
-               \r
-               this.clazz = clazz;\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)\r
-        */\r
-       /** {@inheritDoc} */\r
-       @Override\r
-       protected Control createExtendedContentArea(Composite parent) {\r
-               return null;\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)\r
-        */\r
-       /** {@inheritDoc} */\r
-       @Override\r
-       protected TaxonBase getPersistentObject(UUID uuid) {\r
-               return CdmStore.getService(ITaxonService.class).load(uuid);\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()\r
-        */\r
-       /** {@inheritDoc} */\r
-       @Override\r
-       protected void initModel() {\r
-               if(clazz == TaxonBase.class){\r
-                       model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCache();\r
-               }\r
-               else if(clazz == Taxon.class){\r
-                                               \r
-                       model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheTaxon();\r
-                       \r
-               }\r
-               else if(clazz == Synonym.class){\r
-                       model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheSynonym();\r
-               }\r
-       }\r
-\r
-       /** {@inheritDoc} */\r
-       @Override\r
-       protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {\r
-               return null;\r
-       }\r
-\r
-       /** {@inheritDoc} */\r
-       @Override\r
-       protected String getNewWizardLinkText() {\r
-               return null;\r
-       }\r
+public class TaxonBaseSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<TaxonBase> {\r
+\r
+\r
+    /**\r
+     * <p>select</p>\r
+     *\r
+     * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+     * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+     */\r
+    public static TaxonBase selectTaxonBase(Shell shell, ConversationHolder conversation) {\r
+        AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(TaxonBase.class, shell, conversation,\r
+                "Choose a taxon", false, null, null);\r
+        return getSelectionFromDialog(dialog);\r
+    }\r
+\r
+    /**\r
+     * <p>select</p>\r
+     *\r
+     * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+     * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+     */\r
+    public static Taxon selectTaxon(Shell shell, ConversationHolder conversation, Taxon taxonToBeFiltered) {\r
+\r
+\r
+        AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(Taxon.class, shell, conversation,\r
+                "Choose a taxon", false, null, taxonToBeFiltered);\r
+        return (Taxon) getSelectionFromDialog(dialog);\r
+    }\r
+\r
+    /**\r
+     * <p>select</p>\r
+     *\r
+     * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+     * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+     */\r
+    public static Synonym selectSynonym(Shell shell, ConversationHolder conversation) {\r
+        AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(Synonym.class, shell, conversation,\r
+                "Choose a taxon", false, null, null);\r
+        return (Synonym) getSelectionFromDialog(dialog);\r
+    }\r
+\r
+    private final Class<? extends TaxonBase> clazz;\r
+\r
+    /**\r
+     * <p>Constructor for FilteredTaxonBaseSelectionDialog.</p>\r
+     *\r
+     * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+     * @param title a {@link java.lang.String} object.\r
+     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+     * @param multi a boolean.\r
+     * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+     */\r
+    protected TaxonBaseSelectionDialog(Class<? extends TaxonBase> clazz, Shell shell, ConversationHolder conversation, String title, boolean multi, TaxonBase taxon, TaxonBase taxonToBeFiltered) {\r
+        super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), taxon);\r
+        this.cdmBaseToBeFiltered = taxonToBeFiltered;\r
+        this.clazz = clazz;\r
+        initModel();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)\r
+     */\r
+    /** {@inheritDoc} */\r
+    @Override\r
+    protected Control createExtendedContentArea(Composite parent) {\r
+        return null;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)\r
+     */\r
+    /** {@inheritDoc} */\r
+    @Override\r
+    protected TaxonBase getPersistentObject(UUID uuid) {\r
+        return CdmStore.getService(ITaxonService.class).load(uuid);\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()\r
+     */\r
+    /** {@inheritDoc} */\r
+    @Override\r
+    protected void initModel() {\r
+        if(clazz == TaxonBase.class){\r
+            model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCache();\r
+        }\r
+        else if(clazz == Taxon.class){\r
+\r
+            model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheTaxon();\r
+\r
+        }\r
+        else if(clazz == Synonym.class){\r
+            model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheSynonym();\r
+        }\r
+    }\r
+\r
+    /** {@inheritDoc} */\r
+    @Override\r
+    protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {\r
+        return null;\r
+    }\r
+\r
+    /** {@inheritDoc} */\r
+    @Override\r
+    protected String getNewWizardLinkText() {\r
+        return null;\r
+    }\r
 }\r
index a5a3ba167148fc74c4b2b8f07fdfc31fc3fcba42..24f6125eb59ee0f239bb50680f3930db4c7b9634 100644 (file)
@@ -3,6 +3,8 @@
  */
 package eu.etaxonomy.taxeditor.ui.dialog.selection;
 
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
 import java.util.UUID;
 
@@ -26,23 +28,11 @@ import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
- * <p>FilteredTaxonNodeSelectionDialog class.</p>
- *
  * @author p.ciardelli
  * @version $Id: $
  */
 public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<TaxonNode> implements SelectionListener{
 
-       /**
-        * <p>select</p>
-        *
-        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param title a {@link java.lang.String} object.
-        * @param excludeTaxa a {@link java.util.List} object.
-        * @param node a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
-        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
-        */
        public static TaxonNode select(Shell shell, ConversationHolder conversation, String title, List<UUID> excludeTaxa, TaxonNode node, Classification classification) {
                TaxonNodeSelectionDialog dialog = new TaxonNodeSelectionDialog(shell,
                                conversation,
@@ -60,16 +50,6 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
 
        private Classification selectedClassification;
 
-       /**
-        * <p>Constructor for FilteredTaxonNodeSelectionDialog.</p>
-        *
-        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
-        * @param title a {@link java.lang.String} object.
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param excludeTaxa a {@link java.util.List} object.
-        * @param multi a boolean.
-        * @param node a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
-        */
        protected TaxonNodeSelectionDialog(Shell shell, ConversationHolder conversation, String title, List<UUID> excludeTaxa, boolean multi, TaxonNode node, Classification classification) {
                super(shell, conversation, title, multi, TaxonNodeSelectionDialog.class.getCanonicalName(), node);
 
@@ -83,10 +63,6 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
                }
        }
 
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
-        */
        /** {@inheritDoc} */
        @Override
        protected Control createExtendedContentArea(Composite parent) {
@@ -136,18 +112,12 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
                return "";
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
-        */
        /** {@inheritDoc} */
        @Override
        protected TaxonNode getPersistentObject(UUID uuid) {
                return CdmStore.getService(IClassificationService.class).getTaxonNodeByUuid(uuid);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()
-        */
        /** {@inheritDoc} */
        @Override
        protected void initModel() {
@@ -157,6 +127,13 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
 
                if(classifications == null){
                        classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, null);
+                       Collections.sort(classifications, new Comparator<Classification>() {
+
+                @Override
+                public int compare(Classification o1, Classification o2) {
+                    return o1.getTitleCache().compareTo(o2.getTitleCache());
+                }
+            });
                        selectedClassification = classifications.iterator().next();
                }
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractUriWithExceptionLabelElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractUriWithExceptionLabelElement.java
new file mode 100644 (file)
index 0000000..78ca149
--- /dev/null
@@ -0,0 +1,81 @@
+// $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.ui.element;
+
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+import eu.etaxonomy.taxeditor.Messages;
+
+/**
+ *
+ * @author pplitzner
+ * @date Sep 21, 2015
+ *
+ */
+public abstract class AbstractUriWithExceptionLabelElement <T> extends TextWithLabelElement {
+
+    protected Label labelException;
+
+       protected AbstractUriWithExceptionLabelElement(CdmFormFactory formFactory,
+                       ICdmFormElement parentElement, String labelString,
+                       T initialObject, Integer textHeight, int style) {
+               super(formFactory, parentElement, false);
+
+        init(formFactory, labelString, initialObject, textHeight, style);
+    }
+
+    protected void init(CdmFormFactory formFactory, String labelString, T initialObject, Integer textHeight, int style) {
+        //label
+        initLabel(formFactory, labelString, false, getLayoutComposite());
+
+        //uri text
+        initText(formFactory, null, textHeight, null, false, style, getLayoutComposite());
+
+        //exceptionLabel
+        initExceptionLabel(getLayoutComposite(), formFactory, initialObject);
+    }
+
+    protected void initExceptionLabel(Composite parent, CdmFormFactory formFactory, T initialObject) {
+        labelException = formFactory.createLabel(parent, "", SWT.WRAP); //$NON-NLS-1$
+               int numColumns = AbstractFormSection.DEFAULT_NUM_COLUMNS;
+               if(parent.getLayout() instanceof TableWrapLayout){
+                   numColumns = ((TableWrapLayout)parent.getLayout()).numColumns;
+               }
+        labelException.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(numColumns, 1));
+               addControl(labelException);
+               setParsedText(initialObject);
+    }
+
+
+    public abstract void setParsedText(T object);
+
+    protected abstract T getParsedText() throws Exception;
+
+    public T parseText(){
+        try {
+            labelException.setFont(JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT));
+            labelException.setForeground(getPersistentBackground());
+            labelException.setText(""); //$NON-NLS-1$
+            return getParsedText();
+        } catch (Exception e) {
+            labelException.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT));
+            labelException.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
+            labelException.setText(Messages.UriWithLabelElement_URL_NOT_SAVED+e.getLocalizedMessage());
+            return null;
+        }
+    }
+
+}
index f44a4373b407d2b2a28714ee2ea585313e60e27a..d0255238423d81458506fe3a027f3c8144f8e86d 100644 (file)
@@ -58,6 +58,7 @@ import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.common.IEnumTerm;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
 import eu.etaxonomy.cdm.model.common.Identifier;
+import eu.etaxonomy.cdm.model.common.LSID;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.common.Marker;
@@ -223,6 +224,7 @@ import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSectio
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GeoScopeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.GeoScopePolyKeyDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.NamedAreaDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.OriginalLabelDataSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.SourceCollectionDetailSection;
@@ -669,6 +671,14 @@ public class CdmFormFactory extends FormToolkit {
         return element;
     }
 
+    public LsidWithExceptionLabelElement createLsidWithExceptionLabelElement(ICdmFormElement parentElement, String labelString,
+            LSID initialLsid, int style) {
+        LsidWithExceptionLabelElement element = new LsidWithExceptionLabelElement(this, parentElement, labelString, initialLsid, null, style);
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
     public UriWithLabelElement createUriWithLabelElement(ICdmFormElement parentElement, String labelString,
             URI initialUri, int style) {
         UriWithLabelElement element = new UriWithLabelElement(this, parentElement, labelString, initialUri, null, style);
@@ -2323,6 +2333,12 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
+    public GeoScopePolyKeyDetailSection createGeoScopePolyKeyDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        GeoScopePolyKeyDetailSection section = new GeoScopePolyKeyDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
     public IdentifierDetailSection createIdentifierDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
         IdentifierDetailSection section = new IdentifierDetailSection(this, conversation, parentElement, style);
         addAndAdaptSection(parentElement, section);
index 608206b020b307da3a07b916cb486e63a8862623..4eadc9c096656f4d409ccb14f51247f91a86352c 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -13,7 +13,18 @@ package eu.etaxonomy.taxeditor.ui.element;
 
 
 /**
- * <p>ISelectableElement interface.</p>
+ * Implementors of this interface provide a {@link SelectionArbitrator}.<br>
+ * The arbitrator allows the element to be selected to show e.g.
+ * supplemental data.<br>
+ * An arbitrator can be added like in the following code example:
+ * <br>
+ * <br>
+ * <pre>
+ * //make element selectable
+ *  if(cdmFormFactory.getSelectionProvider() != null){
+ *     selectionArbitrator = cdmFormFactory.createSelectionArbitrator(this);
+ *  }
+ *  </pre>
  *
  * @author n.hoffmann
  * @created Mar 5, 2010
index 084e57634898a1c62b232015b441ad2413d5b0d7..8c3993f4357b2f06ada76761dcbb605a663d6353 100644 (file)
@@ -75,6 +75,14 @@ public class LanguageStringWithLabelElement extends TextWithLabelElement {
                return languageString;
        }
 
+       public LanguageString updateLanguageString(LanguageString ls) {
+           if(ls == null){
+            ls = LanguageString.NewInstance("", CdmStore.getDefaultLanguage());
+        }
+           ls.setText(text.getText());
+           return ls;
+       }
+
        /** {@inheritDoc} */
        @Override
        public void modifyText(ModifyEvent e) {
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LsidWithExceptionLabelElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LsidWithExceptionLabelElement.java
new file mode 100644 (file)
index 0000000..1bea734
--- /dev/null
@@ -0,0 +1,46 @@
+// $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.ui.element;
+
+import eu.etaxonomy.cdm.model.common.LSID;
+
+/**
+ *
+ * @author pplitzner
+ * @date Sep 21, 2015
+ *
+ */
+public class LsidWithExceptionLabelElement extends AbstractUriWithExceptionLabelElement<LSID> {
+
+    protected LsidWithExceptionLabelElement(CdmFormFactory formFactory, ICdmFormElement parentElement,
+            String labelString, LSID initialObject, Integer textHeight, int style) {
+        super(formFactory, parentElement, labelString, initialObject, textHeight, style);
+    }
+
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public void setParsedText(LSID object) {
+               if(object != null){
+                       super.setText(object.toString());
+               }
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public LSID getParsedText() throws Exception {
+            return new LSID(super.getText());
+       }
+
+}
index b9d6300ecb985131e868427f47e5c4db8bf4a330..f9e8788c101ce1ab5f8950b2994f7866c62e1a7f 100644 (file)
@@ -15,17 +15,13 @@ import java.net.URI;
 
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.widgets.TableWrapLayout;
 
 import eu.etaxonomy.taxeditor.Messages;
 import eu.etaxonomy.taxeditor.model.ImageResources;
@@ -37,17 +33,23 @@ import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
  * @created Dec 20, 2010
  * @version 1.0
  */
-public class UriWithLabelElement extends TextWithLabelElement {
+public class UriWithLabelElement extends AbstractUriWithExceptionLabelElement<URI> {
 
-    private final Label labelException;
-    private final Button btnOpenBrowser;
+    private Button btnOpenBrowser;
 
-       protected UriWithLabelElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       URI initialUri, Integer textHeight, int style) {
-               super(formFactory, parentElement, false);
+    protected UriWithLabelElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString,
+            URI initialObject, Integer textHeight, int style) {
+        super(formFactory, parentElement, labelString, initialObject, textHeight, style);
 
-               //label
+       }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void init(CdmFormFactory formFactory, String labelString, URI initialObject, Integer textHeight, int style) {
+
+        //label
         initLabel(formFactory, labelString, false, getLayoutComposite());
 
         //composite(uri + button)
@@ -60,18 +62,18 @@ public class UriWithLabelElement extends TextWithLabelElement {
         initText(formFactory, null, textHeight, null, false, style, textAndButton);
 
         //button
-               btnOpenBrowser = formFactory.createButton(textAndButton, "", SWT.NONE); //$NON-NLS-1$
-               btnOpenBrowser.setImage(ImageResources.getImage(ImageResources.WEB));
-               btnOpenBrowser.setToolTipText(Messages.UriWithLabelElement_OPEN_EXTERNAL_BROWSER);
-               btnOpenBrowser.addSelectionListener(new SelectionAdapter() {
-                   @Override
-                   public void widgetSelected(SelectionEvent e) {
-                       String errorTitle = Messages.UriWithLabelElement_INVALID_URL;
-                       String errorText = Messages.UriWithLabelElement_COULD_NOT_OPEN_BROWSER;
-
-                       URI uri = getUri();
-                       if(uri!=null){
-                           try {
+        btnOpenBrowser = formFactory.createButton(textAndButton, "", SWT.NONE); //$NON-NLS-1$
+        btnOpenBrowser.setImage(ImageResources.getImage(ImageResources.WEB));
+        btnOpenBrowser.setToolTipText(Messages.UriWithLabelElement_OPEN_EXTERNAL_BROWSER);
+        btnOpenBrowser.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                String errorTitle = Messages.UriWithLabelElement_INVALID_URL;
+                String errorText = Messages.UriWithLabelElement_COULD_NOT_OPEN_BROWSER;
+
+                URI uri = parseText();
+                if(uri!=null){
+                    try {
                         PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(uri.toURL());
                     } catch (PartInitException pie) {
                         MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, pie));
@@ -80,42 +82,35 @@ public class UriWithLabelElement extends TextWithLabelElement {
                     } catch (IllegalArgumentException iae) {
                         MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, iae));
                     }
-                       }
-                       else{
-                           MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, null));
-                       }
-                   }
+                }
+                else{
+                    MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, null));
+                }
+            }
         });
-               btnOpenBrowser.setLayoutData(LayoutConstants.RIGHT());
-
-               labelException = formFactory.createLabel(getLayoutComposite(), "", SWT.WRAP); //$NON-NLS-1$
-               int numColumns = AbstractFormSection.DEFAULT_NUM_COLUMNS;
-               if(getLayoutComposite().getLayout() instanceof TableWrapLayout){
-                   numColumns = ((TableWrapLayout)getLayoutComposite().getLayout()).numColumns;
-               }
-        labelException.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(numColumns, 1));
-               addControl(labelException);
-               setUri(initialUri);
-       }
+        btnOpenBrowser.setLayoutData(LayoutConstants.RIGHT());
+
+        initExceptionLabel(getLayoutComposite(), formFactory, initialObject);
+    }
 
-       public void setUri(URI uri) {
-               if(uri != null){
-                       super.setText(uri.toString());
-               }
-       }
 
-       public URI getUri(){
-        try {
-            labelException.setFont(JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT));
-            labelException.setForeground(getPersistentBackground());
-            labelException.setText(""); //$NON-NLS-1$
-            return new URI(super.getText());
-        } catch (Exception e) {
-            labelException.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT));
-            labelException.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
-            labelException.setText(Messages.UriWithLabelElement_URL_NOT_SAVED+e.getLocalizedMessage());
-            return null;
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setParsedText(URI object) {
+        if(object != null){
+            super.setText(object.toString());
         }
-       }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected URI getParsedText() throws Exception {
+        return new URI(super.getText());
+    }
 
 }
index 8e4dcea681aa717b96cf72ccf715eb49efc4d571..e3021facf203f57fbf358539619f00bdf82624d9 100644 (file)
@@ -19,7 +19,9 @@ import java.util.Map;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Label;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration;
 import eu.etaxonomy.cdm.common.UriUtils;
+import eu.etaxonomy.cdm.ext.geo.IEditGeoService;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
@@ -109,13 +111,13 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<F
 
                List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()});
 
-               String parameter = CdmStore.getGeoService().getDistributionServiceRequestParameterString(
+               IEditGeoService editGeoService = ((CdmApplicationRemoteConfiguration)CdmStore.getCurrentApplicationConfiguration()).getEditGeoService();
+               String parameter = editGeoService.getDistributionServiceRequestParameterString(
                                getTaxonDescriptions(),
-                false, 
-                false, 
-               
+                false,
+                false,
                 null,
-                presenceAbsenceTermColors, 
+                presenceAbsenceTermColors,
                 languages);
 
                String mapUriString = String.format("%s?%s&ms=1000&bbox=-180,-90,180,90&l=earth", accessPoint, parameter);
index e5c8c9fb0b2719bf655f85a6771d2c639177aeac..de294870ebe18393972e29494ad4ee6262be2822 100644 (file)
@@ -3,13 +3,17 @@
  */
 package eu.etaxonomy.taxeditor.ui.section.key;
 
+import org.eclipse.swt.SWT;
+
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.GeoScopePolyKeyDetailSection;
 
 /**
  * @author n.hoffmann
@@ -20,6 +24,8 @@ public class PolytomousKeyDetailElement extends
 
     private TextWithLabelElement textLabel;
     private NumberWithLabelElement numberStartNumber;
+    private TaxonomicScopeSection sectionTaxonomicScope;
+    private GeoScopePolyKeyDetailSection sectionGeoScopes;
 
        public PolytomousKeyDetailElement(CdmFormFactory formFactory,
                        ICdmFormElement formElement) {
@@ -30,20 +36,22 @@ public class PolytomousKeyDetailElement extends
        protected void createControls(ICdmFormElement formElement,
                        PolytomousKey entity, int style) {
            textLabel = formFactory.createTextWithLabelElement(formElement, "Title", entity.getTitleCache(), style);
-            numberStartNumber = formFactory.createNumberTextWithLabelElement(formElement, "Start Number", entity.getStartNumber(), style);
+
+           numberStartNumber = formFactory.createNumberTextWithLabelElement(formElement, "Start Number", entity.getStartNumber(), style);
+
+           sectionTaxonomicScope = formFactory.createTaxonomicScopeSection(getConversationHolder(), formElement, style);
+           sectionTaxonomicScope.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+           sectionTaxonomicScope.setEntity(entity);
+
+           sectionGeoScopes = formFactory.createGeoScopePolyKeyDetailSection(getConversationHolder(), formElement, SWT.NULL);
+           sectionGeoScopes.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+           sectionGeoScopes.setEntity(entity);
        }
 
        public String getText() {
            return textLabel.getText();
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
-        * .lang.Object)
-        */
        @Override
        public void handleEvent(Object eventSource) {
                if(eventSource==textLabel){
index 9d016cb3175be5d881d8eb238c4c495ff5b1410d..7a5618b27e2fa1d5f9f73012d710bc414a6a4a48 100644 (file)
@@ -117,7 +117,7 @@ public class ImageFileElement extends MediaRepresentationPartElement<ImageFile>
        public void handleEvent(Object eventSource) {
                if(eventSource == text_uri){
                        try {
-                           URI uri = text_uri.getUri();
+                           URI uri = text_uri.parseText();
                                getEntity().setUri(uri);
                                if(uri==null){
                                    //buffer URI if parsing error occurred
index 1c27665647713fdd53c267767588114f683fb708..750fc27cef907a0342620fea4c5718d49c8ea6f3 100644 (file)
@@ -70,7 +70,7 @@ public class MediaDetailElement extends AbstractCdmDetailElement<Media>{
     public void handleEvent(Object eventSource){
         if(eventSource==textUri){
             textUri.setBackground(getPersistentBackground());
-            URI uri = textUri.getUri();
+            URI uri = textUri.parseText();
             singleMediaRepresentationPart.setUri(uri);
             if(uri==null){
                 uriBuffer=textUri.getText();
@@ -113,11 +113,11 @@ public class MediaDetailElement extends AbstractCdmDetailElement<Media>{
             }
             textUri = formFactory.createUriWithLabelElement(parentFormElement, "Media URI", null, style);
             URI uri = singleMediaRepresentationPart.getUri();
-            textUri.setUri(uri);
+            textUri.setParsedText(uri);
             //set buffered uri as text if uri had parsing problems in advanced view
             if(uri==null && uriBuffer!=null){
                 textUri.setText(uriBuffer);
-                textUri.getUri();
+                textUri.parseText();
             }
             textUri.getLayoutComposite().layout();
         }
index 517e9cfd36504917d02a711a9d1e9535d3a1b8fb..361f149e2fc1841db317afc6c129e365345edbf5 100644 (file)
@@ -20,7 +20,9 @@ import eu.etaxonomy.taxeditor.ui.dialog.selection.MediaSelectionDialog;
 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
 import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
@@ -30,17 +32,22 @@ import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
  * @created Nov 17, 2009
  * @version 1.0
  */
-public class MediaMetaElement extends AbstractEntityCollectionElement<Media> implements ITogglableMediaElement{
+public class MediaMetaElement extends AbstractEntityCollectionElement<Media> implements ISelectableElement, ITogglableMediaElement{
 
     private EntitySelectionElement<AgentBase> selection_artist;
     private LanguageStringWithLabelElement text_description;
     private LanguageStringWithLabelElement text_title;
     private MediaDetailElement mediaDetailElement;
+    private SelectionArbitrator selectionArbitrator;
 
     public MediaMetaElement(CdmFormFactory cdmFormFactory,
             AbstractFormSection<?> formElement, Media element,
             SelectionListener removeListener, boolean isChoosableEntity, int style) {
         super(cdmFormFactory, formElement, element, removeListener, isChoosableEntity, null, style);
+        //make element selectable
+        if(cdmFormFactory.getSelectionProvider() != null){
+            selectionArbitrator = cdmFormFactory.createSelectionArbitrator(this);
+        }
     }
 
     /** {@inheritDoc} */
@@ -108,4 +115,9 @@ public class MediaMetaElement extends AbstractEntityCollectionElement<Media> imp
         }
     }
 
+    @Override
+    public SelectionArbitrator getSelectionArbitrator() {
+        return selectionArbitrator;
+    }
+
 }
index 663848da419d2bef3ba02e2b78c73f4c0911f147..e89b514bd6c54e6bdc43d83f43ff368ae6a2a16c 100644 (file)
@@ -58,12 +58,12 @@ public class MediaRepresentationPartElement<T extends MediaRepresentationPart> e
                        text_size.setText(FileUtils.byteCountToDisplaySize(entity.getSize()));
                }
                if(entity.getUri() != null){
-                       text_uri.setUri(entity.getUri());
+                       text_uri.setParsedText(entity.getUri());
                } else {
             String uriBuffer = getParentMediaDetailElement().getUriBuffer();
             if(uriBuffer!=null){
                 text_uri.setText(uriBuffer);
-                text_uri.getUri();//just to update the error label
+                text_uri.parseText();//just to update the error label
             }
         }
        }
@@ -71,7 +71,7 @@ public class MediaRepresentationPartElement<T extends MediaRepresentationPart> e
        @Override
        public void handleEvent(Object eventSource) {
                if(eventSource == text_uri){
-                   URI uri = text_uri.getUri();
+                   URI uri = text_uri.parseText();
                    getEntity().setUri(uri);
                    if(uri==null){
                 //buffer URI if parsing error occurred
index e5e0857823c916ad7703f69d202921fab74e5a06..a54f02ab1f00cb40174461aad220ad3a262cf126 100644 (file)
@@ -69,7 +69,7 @@ public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<N
        public NameDetailElement(CdmFormFactory cdmFormFactory, ICdmFormElement formElement,
                        int style) {
                super(cdmFormFactory, formElement);
-               // register as selection listener
+               // make this element selectable
                if(cdmFormFactory.getSelectionProvider() != null){
                        selectionArbitrator = cdmFormFactory.createSelectionArbitrator(this);
                }
index 1213418a592094bbbe9977831a7c19553513e8a0..bbc3a44ab87fb3db18312d94daf1d2313901df55 100644 (file)
@@ -22,6 +22,7 @@ import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.LsidWithExceptionLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
 
@@ -37,6 +38,7 @@ public class NonViralNameDetailElement extends
        private AuthorshipDetailSection section_author;
        private EnumComboElement<NomenclaturalCode> combo_nomenclaturalCode;
        private HybridDetailSection section_hybrid;
+       private LsidWithExceptionLabelElement textLsid;
 
        public NonViralNameDetailElement(CdmFormFactory formFactory,
                        ICdmFormElement formElement) {
@@ -73,6 +75,8 @@ public class NonViralNameDetailElement extends
                addControl(section_hybrid);
                addElement(section_hybrid);
            }
+
+           textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style);
     }
 
        /** {@inheritDoc} */
@@ -146,5 +150,8 @@ public class NonViralNameDetailElement extends
                        section_name.setEntity(getEntity());
                        getLayoutComposite().layout();
                }
+               else if(eventSource==textLsid){
+                   getEntity().setLsid(textLsid.parseText());
+               }
        }
 }
index aa7a3ef6b84a3e12599efb74d08028327ac6d30d..8b38c76dec048e084da08b0e691cae2b97033754 100644 (file)
@@ -110,7 +110,7 @@ public class ProtologueElement extends AbstractEntityCollectionElement<Descripti
        @Override
        public void handleEvent(Object eventSource) {
                if(eventSource == protologueUriText && protologueUriText.getText()!=null){
-                   mediaRepresentationPart.setUri(protologueUriText.getUri());
+                   mediaRepresentationPart.setUri(protologueUriText.parseText());
                }
        }
 
index 69b53eb65dd7dca0e769676ad0a0a94edf4415a4..e7fcb52192ed3d660f88f344e90ba3cf17c5880d 100644 (file)
@@ -24,11 +24,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
  */
 public class DerivedUnitBaseWizardPage extends AbstractCdmEntityWizardPage<DerivedUnitFacade> {
 
-       /**
-        * @param formFactory
-        * @param conversation
-        * @param entity
-        */
        public DerivedUnitBaseWizardPage(CdmFormFactory formFactory,
                        ConversationHolder conversation, DerivedUnitFacade entity) {
                super(formFactory, conversation, entity);
@@ -36,17 +31,11 @@ public class DerivedUnitBaseWizardPage extends AbstractCdmEntityWizardPage<Deriv
                setPageComplete(true);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage#checkComplete()
-        */
        @Override
        protected void checkComplete() {
                setPageComplete(true);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
-        */
        @Override
        public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
                DerivedUnitBaseDetailElement detailElement = formFactory.createDerivedUnitBaseDetailElement(rootElement);
index 1ac5b58dea93b3758db25b287f039bbc055e2c58..e8d77391b6f73202cde719a80bec9820573d98f6 100644 (file)
@@ -45,6 +45,8 @@ public class DerivedUnitGeneralDetailElement extends
                AbstractCdmDetailElement<DerivedUnitFacade> {
 
     boolean showOnlyDerivedUnitData = false;
+    //TODO: flag to disable specimen type dropdown (#5244)
+    boolean showSpecimenType = true;
 
        private ToggleableTextElement toggleableText_titleCache;
        private EnumComboElement<SpecimenOrObservationType> combo_specorobstype;
@@ -71,13 +73,6 @@ public class DerivedUnitGeneralDetailElement extends
            super(formFactory, formElement);
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
-        * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, java.lang.Object, int)
-        */
        @Override
        protected void createControls(ICdmFormElement formElement,
                        DerivedUnitFacade entity, int style) {
@@ -91,6 +86,7 @@ public class DerivedUnitGeneralDetailElement extends
                else{
                    combo_specorobstype = formFactory.createEnumComboElement(SpecimenOrObservationType.class, formElement, style);
                    combo_specorobstype.setSelection(entity.getType());
+                   combo_specorobstype.setEnabled(showSpecimenType);
                    selection_country = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(),
                            formElement, "Country",
                            entity.getCountry(), EntitySelectionElement.NOTHING, style);
@@ -130,13 +126,6 @@ public class DerivedUnitGeneralDetailElement extends
 
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
-        * .lang.Object)
-        */
        @Override
        public void handleEvent(Object eventSource) {
                if (eventSource == toggleableText_titleCache) {
@@ -177,4 +166,8 @@ public class DerivedUnitGeneralDetailElement extends
         this.showOnlyDerivedUnitData = showOnlyDerivedUnitData;
     }
 
+    public void setShowSpecimenType(boolean showSpecimenType) {
+        this.showSpecimenType = showSpecimenType;
+    }
+
 }
index 88a722ca4f72a562db97e5b5771c9760c09b78e2..8db53cebc21711e2530cfb045da61c3885cd4240 100644 (file)
@@ -24,31 +24,21 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
  */
 public class DerivedUnitGeneralWizardPage extends AbstractCdmEntityWizardPage<DerivedUnitFacade> {
 
-       /**
-        * @param formFactory
-        * @param conversation
-        * @param entity
-        */
        public DerivedUnitGeneralWizardPage(CdmFormFactory formFactory,
                        ConversationHolder conversation, DerivedUnitFacade entity) {
                super(formFactory, conversation, entity);
                setTitle("General Specimen Data");
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage#checkComplete()
-        */
        @Override
        protected void checkComplete() {
                setPageComplete(true);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
-        */
        @Override
        public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
                DerivedUnitGeneralDetailElement detailElement = formFactory.createDerivedUnitGeneralDetailElement(rootElement);
+               detailElement.setShowSpecimenType(false);
                detailElement.setEntity(getEntity());
                checkComplete();
                return detailElement;
index e511bf6eb6af14dead8e3e255d3fbf3685a16c34..b26451ff9268ef6d64e29a66bd3fdf02a9cc1dd6 100644 (file)
@@ -112,7 +112,7 @@ public class FieldUnitGeneralDetailElement extends AbstractCdmDetailElement<Deri
         } else if (eventSource == selection_country) {
             getEntity().setCountry(selection_country.getSelection());
         } else if (eventSource == languageText_locality) {
-            LanguageString locality = languageText_locality.getLanguageString();
+            LanguageString locality = languageText_locality.updateLanguageString(getEntity().getLocality());
             getEntity().setLocality(locality);
         } else if (eventSource == element_point) {
             getEntity().setExactLocation(element_point.getPoint());
index 5d2624b7a1dcd82cb6dd201ff6033200ee001e8b..2eac4598dd2777d96e21419a8c2848069773f51a 100644 (file)
@@ -24,11 +24,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
  */
 public class FieldUnitWizardPage extends AbstractCdmEntityWizardPage<DerivedUnitFacade> {
 
-       /**
-        * @param formFactory
-        * @param conversation
-        * @param entity
-        */
        public FieldUnitWizardPage(CdmFormFactory formFactory,
                        ConversationHolder conversation, DerivedUnitFacade entity) {
                super(formFactory, conversation, entity);
@@ -36,17 +31,11 @@ public class FieldUnitWizardPage extends AbstractCdmEntityWizardPage<DerivedUnit
                setPageComplete(true);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage#checkComplete()
-        */
        @Override
        protected void checkComplete() {
                setPageComplete(true);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
-        */
        @Override
        public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
                FieldUnitDetailElement detailElement = formFactory.createFieldUnitDetailElement(rootElement);
index bcfd178d4cc87a5e45145517faa9731f304a8efd..3343ce7d658cfbd936907525808958fd998bcdaa 100644 (file)
@@ -24,11 +24,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
  */
 public class GatheringEventWizardPage extends AbstractCdmEntityWizardPage<DerivedUnitFacade> {
 
-       /**
-        * @param formFactory
-        * @param conversation
-        * @param entity
-        */
        public GatheringEventWizardPage(CdmFormFactory formFactory,
                        ConversationHolder conversation, DerivedUnitFacade entity) {
                super(formFactory, conversation, entity);
@@ -36,17 +31,11 @@ public class GatheringEventWizardPage extends AbstractCdmEntityWizardPage<Derive
                setPageComplete(true);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage#checkComplete()
-        */
        @Override
        protected void checkComplete() {
                setPageComplete(true);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
-        */
        @Override
        public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
                GatheringEventDetailElement detailElement = formFactory.createGatheringEventDetailElement(rootElement);
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GeoScopePolyKeyDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GeoScopePolyKeyDetailSection.java
new file mode 100644 (file)
index 0000000..2c5cdc6
--- /dev/null
@@ -0,0 +1,74 @@
+// $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.ui.section.occurrence;
+
+import java.util.Collection;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.NamedAreaSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
+
+/**
+ *
+ * @author pplitzner
+ * @date Sep 21, 2015
+ *
+ */
+public class GeoScopePolyKeyDetailSection extends AbstractEntityCollectionSection<PolytomousKey, NamedArea> {
+
+    public GeoScopePolyKeyDetailSection(CdmFormFactory formFactory,
+                       ConversationHolder conversation, ICdmFormElement parentElement, int style) {
+               super(formFactory, conversation, parentElement, "Geo Scopes", style);
+       }
+
+       /** {@inheritDoc} */
+       @Override
+       public Collection<NamedArea> getCollection(PolytomousKey entity) {
+               return entity.getGeographicalScope();
+       }
+
+       /** {@inheritDoc} */
+       @Override
+       public NamedArea createNewElement() {
+               NamedArea selection = NamedAreaSelectionDialog.select(getLayoutComposite().getShell(), getConversationHolder(), null);
+
+               return selection;
+       }
+
+       /** {@inheritDoc} */
+       @Override
+       public void addElement(NamedArea element) {
+               getEntity().addGeographicalScope(element);
+       }
+
+       /** {@inheritDoc} */
+       @Override
+       public void removeElement(NamedArea element) {
+               getEntity().removeGeographicalScope(element);
+       }
+
+       /** {@inheritDoc} */
+       @Override
+       public String getEmptyString() {
+               return "No geo scopes yet.";
+       }
+
+       /** {@inheritDoc} */
+       @Override
+       protected String getTooltipString() {
+               return "Add a geo scope";
+       }
+
+}
index b6d5775dbeb533802fe582525aab5252d08a2099..ad27ecee85c49cef357128213384d198b08287b1 100644 (file)
@@ -113,9 +113,9 @@ public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Seque
             getEntity().setGeneticAccessionNumber(textGeneticAccessNo.getText());
             if(textGeneticAccessNo.getText()!=null && !textGeneticAccessNo.getText().isEmpty()){
                 try {
-                    textNCBIUri.setUri(getEntity().getGenBankUri());
-                    textENAUri.setUri(getEntity().getEmblUri());
-                    textDDBJUri.setUri(getEntity().getDdbjUri());
+                    textNCBIUri.setParsedText(getEntity().getGenBankUri());
+                    textENAUri.setParsedText(getEntity().getEmblUri());
+                    textDDBJUri.setParsedText(getEntity().getDdbjUri());
                 } catch (URISyntaxException e) {
                     textGeneticAccessNo.setBackground(getColor(Resources.COLOR_PARSE_ERROR));
                 }
@@ -131,7 +131,7 @@ public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Seque
             getEntity().setBoldProcessId(textBoldProcessID.getText());
             if(textBoldProcessID.getText()!=null && !textBoldProcessID.getText().isEmpty()){
                 try {
-                    textBoldUri.setUri(getEntity().getBoldUri());
+                    textBoldUri.setParsedText(getEntity().getBoldUri());
                 } catch (URISyntaxException e) {
                     textBoldProcessID.setBackground(getColor(Resources.COLOR_PARSE_ERROR));
                 }
index bdbab1697900c68af8eed7c30ee18368aee0f574..4ca0bef9c70b7024293e25857af7227afd027b82 100644 (file)
@@ -441,7 +441,7 @@ public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElem
                    getEntity().setAbbrevTitle(text_abbrevTitle.getText());
                    toggleableAbbrevCache.setText(text_abbrevTitle.getText());
                } else if (eventSource == text_uri) {
-                       getEntity().setUri(text_uri.getUri());
+                       getEntity().setUri(text_uri.parseText());
                } else if (eventSource == text_volume) {
                        getEntity().setVolume(text_volume.getText());
                }
index b84e3534d809c90838a13e5fcdc053d82910e558..d9187ccdd07671540650ea57fb7233aca7ce0cf3 100644 (file)
@@ -55,7 +55,7 @@ public abstract class AbstractOriginalSourceElement<T extends OriginalSourceBase
                                .createEnumComboElement(OriginalSourceType.class,
                                                formElement, style);
                super.createControls(formElement, style);
-               text_idInSource = formFactory.createTextWithLabelElement(formElement, "Id In Source", null, style);
+               text_idInSource = formFactory.createTextWithLabelElement(formElement, "ID in Source", null, style);
                text_idNamespace = formFactory.createTextWithLabelElement(formElement, "ID Namespace", null, style);
                text_originaleNameString = formFactory.createTextWithLabelElement(
                        formElement, "Original Name", null, SWT.NULL);
index 0a5a6ad37156c72fc0099fe986efc2ba1e0ebb02..f2621ebd217500019e58521035fefab3f9856c2c 100644 (file)
@@ -66,7 +66,7 @@ public class NamedAreaDetailElement extends DefinedTermDetailElement<NamedArea>
                } else if (eventSource == text_description) {\r
                        getEntity().getRepresentation(Language.getDefaultLanguage()).setText(text_description.getText());\r
                } else if (eventSource == uri_uri) {\r
-                       getEntity().setUri(uri_uri.getUri());\r
+                       getEntity().setUri(uri_uri.parseText());\r
                } else if (eventSource == text_abbreviatedLabel) {\r
                        getEntity().getRepresentation(Language.getDefaultLanguage()).setAbbreviatedLabel(text_abbreviatedLabel.getText());\r
                } else if (eventSource == timePeriod_validPeriod) {\r
index 5f62d2417e571a62672f1a149a741c17bd13c39a..281b383e86be43be5d765258aba8012ed6cda478 100644 (file)
@@ -51,9 +51,9 @@ public class TermVocabularyDetailElement extends AbstractTermBaseDetailElement<T
                handleRepresentation(eventSource);\r
 \r
                if (eventSource == uri_uri) {\r
-                       getEntity().setUri(uri_uri.getUri());\r
+                       getEntity().setUri(uri_uri.parseText());\r
                } else if (eventSource == uri_uriTermSource) {\r
-                       getEntity().setTermSourceUri(uri_uriTermSource.getUri());\r
+                       getEntity().setTermSourceUri(uri_uriTermSource.parseText());\r
                }\r
        }\r
 \r
similarity index 84%
rename from eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationUtil.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/util/ApplicationUtil.java
index e3eacfd685dc6e07503a3821867913c05bc1960e..8f3025067dabff93477c171c39023a49be7bf67f 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor;
+package eu.etaxonomy.taxeditor.util;
 
 import org.eclipse.core.runtime.Platform;
 import org.osgi.framework.Bundle;
@@ -28,8 +28,11 @@ public class ApplicationUtil extends AbstractUtility {
     /**
      * Prefix to declare the version as beta
      */
-    private static final String BETA_PREFIX = "[Beta]";
+    private static final String BETA_PREFIX = "[REMOTING]";
 
+    public static String getTitle() {
+        return "EDIT Taxonomic Editor " + ApplicationUtil.getVersion();
+    }
     /**
      * @return
      */
@@ -56,15 +59,6 @@ public class ApplicationUtil extends AbstractUtility {
     public static boolean isStable() {
         return !getVersion().startsWith("[");
     }
-       /**
-        * <p>getPluginId</p>
-        *
-        * @return a {@link java.lang.String} object.
-        */
-       public static String getPluginId(){
-               return TaxonomicEditorPlugin.PLUGIN_ID;
-       }
-
 
 
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/util/OperationsUtil.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/util/OperationsUtil.java
new file mode 100644 (file)
index 0000000..6ba148a
--- /dev/null
@@ -0,0 +1,36 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.util;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+/**
+ * @author cmathew
+ * @date 29 Jun 2015
+ *
+ */
+public class OperationsUtil {
+
+    public static List<UUID> convertToUuidList(List<CdmBase> cdmBaseList) {
+        List<UUID> uuids = new ArrayList<UUID>();
+        for(CdmBase cdmBase : cdmBaseList) {
+            if(cdmBase == null) {
+                uuids.add(null);
+            } else {
+                uuids.add(cdmBase.getUuid());
+            }
+        }
+        return uuids;
+    }
+}
index 2fbde5c73421208ea61890ec953ca7125ecf693b..27be236e307398262fb4612ca8fef58a28b159ef 100644 (file)
@@ -1,15 +1,19 @@
 // $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.
-*/
+ * 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.view;
 
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
@@ -31,6 +35,8 @@ import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 
 /**
  * <p>Abstract AbstractCdmViewPart class.</p>
@@ -39,59 +45,59 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  * @created Jun 15, 2010
  * @version 1.0
  */
-public abstract class AbstractCdmViewPart extends ViewPart implements ISelectionListener, IPostOperationEnabled, IConversationEnabled, IDirtyMarkable{
+public abstract class AbstractCdmViewPart extends ViewPart implements ISelectionListener, IPostOperationEnabled, IConversationEnabled, ICdmEntitySessionEnabled, IDirtyMarkable{
 
-       protected ISelectionService selectionService;
+    protected ISelectionService selectionService;
 
-       public static IStructuredSelection EMPTY_SELECTION = new StructuredSelection();
+    public static IStructuredSelection EMPTY_SELECTION = new StructuredSelection();
 
-       protected IWorkbenchPart part;
+    protected IWorkbenchPart part;
 
     private PageBook pageBook;
 
-       private Label emptySelectionLabel;
+    private Label emptySelectionLabel;
 
-       private Composite viewerComposite;
+    private Composite viewerComposite;
 
-       /** {@inheritDoc} */
-       @Override
-       public void createPartControl(Composite parent) {
-               selectionService = getSite().getWorkbenchWindow().getSelectionService();
-               selectionService.addSelectionListener(this);
+    /** {@inheritDoc} */
+    @Override
+    public void createPartControl(Composite parent) {
+        selectionService = getSite().getWorkbenchWindow().getSelectionService();
+        selectionService.addSelectionListener(this);
 
-               pageBook = new PageBook(parent, SWT.NULL);
-               //create viewerComposite
-               viewerComposite = new SashForm(pageBook, SWT.HORIZONTAL);
-               createViewer(viewerComposite);
+        pageBook = new PageBook(parent, SWT.NULL);
+        //create viewerComposite
+        viewerComposite = new SashForm(pageBook, SWT.HORIZONTAL);
+        createViewer(viewerComposite);
 
-               // Page 2: Nothing selected
+        // Page 2: Nothing selected
         emptySelectionLabel = new Label(pageBook, SWT.TOP + SWT.LEFT + SWT.WRAP);
 
         setInitialSelection();
-       }
-
-       /**
-        *
-        */
-       private void setInitialSelection() {
-               selectionChanged(AbstractUtility.getActivePart(), getInitialSelection());
-       }
-
-       /**
-        * <p>getInitialSelection</p>
-        *
-        * @return a {@link org.eclipse.jface.viewers.ISelection} object.
-        */
-       protected ISelection getInitialSelection() {
-               return selectionService.getSelection();
-       }
-
-       /**
-        * <p>showEmptyPage</p>
-        */
-       public void showEmptyPage(){
-               pageBook.showPage(emptySelectionLabel);
-       }
+    }
+
+    /**
+     *
+     */
+    private void setInitialSelection() {
+        selectionChanged(AbstractUtility.getActivePart(), getInitialSelection());
+    }
+
+    /**
+     * <p>getInitialSelection</p>
+     *
+     * @return a {@link org.eclipse.jface.viewers.ISelection} object.
+     */
+    protected ISelection getInitialSelection() {
+        return selectionService.getSelection();
+    }
+
+    /**
+     * <p>showEmptyPage</p>
+     */
+    public void showEmptyPage(){
+        pageBook.showPage(emptySelectionLabel);
+    }
 
     /**
      * <p>showViewer</p>
@@ -100,13 +106,13 @@ public abstract class AbstractCdmViewPart extends ViewPart implements ISelection
      * @param selection a {@link org.eclipse.jface.viewers.ISelection} object.
      */
     public void showViewer(IWorkbenchPart part, IStructuredSelection selection){
-       this.part = part;
+        this.part = part;
 
-               Object element = selection.getFirstElement();
+        Object element = selection.getFirstElement();
 
-               getViewer().setInput(element);
+        getViewer().setInput(element);
 
-               showViewer();
+        showViewer();
     }
 
     /**
@@ -116,76 +122,102 @@ public abstract class AbstractCdmViewPart extends ViewPart implements ISelection
      */
     public abstract Viewer getViewer();
 
-       /**
-        * <p>showViewer</p>
-        */
-       public void showViewer(){
-               pageBook.showPage(viewerComposite);
-    }
-
-       public void setEnabled(boolean enabled){
-               pageBook.setEnabled(enabled);
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void setFocus() {
-               if(getConversationHolder() != null){
-                       getConversationHolder().bind();
-               }
-               getViewer().getControl().setFocus();
-       }
-
-       /**
-        * <p>createViewer</p>
-        *
-        * @param parent a {@link org.eclipse.swt.widgets.Composite} object.
-        */
-       public abstract void createViewer(Composite parent);
-
-       /** {@inheritDoc} */
-       @Override
+    /**
+     * <p>showViewer</p>
+     */
+    public void showViewer(){
+        pageBook.showPage(viewerComposite);
+    }
+
+    public void setEnabled(boolean enabled){
+        pageBook.setEnabled(enabled);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void setFocus() {
+        if(getConversationHolder() != null){
+            getConversationHolder().bind();
+        }
+        if(getCdmEntitySession() != null){
+            getCdmEntitySession().bind();
+        }
+        getViewer().getControl().setFocus();
+    }
+
+    /**
+     * <p>createViewer</p>
+     *
+     * @param parent a {@link org.eclipse.swt.widgets.Composite} object.
+     */
+    public abstract void createViewer(Composite parent);
+
+    /** {@inheritDoc} */
+    @Override
     public boolean postOperation(CdmBase objectAffectedByOperation) {
-               changed(objectAffectedByOperation);
-               return true;
-       }
+        changed(objectAffectedByOperation);
+        return true;
+    }
 
-       /** {@inheritDoc} */
-       @Override
+    /** {@inheritDoc} */
+    @Override
     public abstract void changed(Object object);
 
-       /**
-        * <p>getConversationHolder</p>
-        *
-        * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        */
-       @Override
+    /**
+     * <p>getConversationHolder</p>
+     *
+     * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+     */
+    @Override
     public ConversationHolder getConversationHolder() {
-               if(part != null && part instanceof IConversationEnabled) {
+        if(part != null && part instanceof IConversationEnabled) {
             return ((IConversationEnabled) part).getConversationHolder();
         }
 
-               return null;
-       }
+        return null;
+    }
+
+    @Override
+    public ICdmEntitySession getCdmEntitySession() {
+        if(part != null && part instanceof ICdmEntitySessionEnabled) {
+            return ((ICdmEntitySessionEnabled) part).getCdmEntitySession();
+        }
+        return null;
+    }
+
+    @Override
+    public  List<CdmBase> getRootEntities() {
+        return Arrays.asList((CdmBase)getViewer().getInput());
+    }
 
-       /** {@inheritDoc} */
-       @Override
+    /** {@inheritDoc} */
+    @Override
     public void update(CdmDataChangeMap changeEvents) {
 
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void dispose() {
-               selectionService.removeSelectionListener(this);
-               super.dispose();
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider#forceDirty()
-        */
-       @Override
-       public void forceDirty() {
-           changed(null);
-       }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void dispose() {
+        selectionService.removeSelectionListener(this);
+        super.dispose();
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider#forceDirty()
+     */
+    @Override
+    public void forceDirty() {
+        changed(null);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }
index 7c3c5e282c54d7469f27ebbc3597448b5731d0c8..d1ad70eac4ed661f35769d54f51e9bafeb4ad82e 100644 (file)
@@ -4,13 +4,11 @@ import java.util.ArrayList;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
-import java.util.UUID;
 
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.TreeNode;
 import org.eclipse.jface.viewers.Viewer;
 
-import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.model.molecular.DnaSample;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
 import eu.etaxonomy.cdm.model.molecular.SingleRead;
@@ -18,35 +16,46 @@ import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
-import eu.etaxonomy.taxeditor.store.CdmStore;
 
 public class DerivateContentProvider implements ITreeContentProvider {
 
+    List<TreeNode> rootNodes;
+
        @Override
        public void dispose() {
                // TODO Auto-generated method stub
 
        }
 
+       public List<SpecimenOrObservationBase> getRootElements() {
+           List<SpecimenOrObservationBase> elements = new ArrayList<SpecimenOrObservationBase>();
+
+           if(rootNodes != null) {
+               for(TreeNode node : rootNodes) {
+                   elements.add((SpecimenOrObservationBase)node.getValue());
+               }
+           }
+           return elements;
+       }
+
        @Override
        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
        }
 
        @Override
        public Object[] getElements(Object inputElement) {
-           List<TreeNode> rootElements = new ArrayList<TreeNode>();
+           rootNodes = new ArrayList<TreeNode>();
            if(inputElement instanceof Set){
                for (Object o: (Set)inputElement) {
-                   if(o instanceof UUID){
-                       UUID uuid = (UUID)o;
-                       SpecimenOrObservationBase<?> rootElement = CdmStore.getService(IOccurrenceService.class).load(uuid);
+                   if(o instanceof SpecimenOrObservationBase){
+                       SpecimenOrObservationBase<?> rootElement = (SpecimenOrObservationBase<?>)o;
                        if(rootElement!=null){
-                           rootElements.add(new TreeNode(rootElement));
+                           rootNodes.add(new TreeNode(rootElement));
                        }
                    }
             }
            }
-           return rootElements.toArray();
+           return rootNodes.toArray();
        }
 
        @Override
index 1b47155dba9396fce2fbdfb417b72105c024208c..98bf707de264f74204bc3354cc7d25c6e33f030c 100644 (file)
@@ -19,7 +19,6 @@ import org.eclipse.swt.graphics.Image;
 import org.hibernate.LazyInitializationException;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
@@ -164,10 +163,6 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
             FieldUnit fieldUnit = (FieldUnit)derivate;
             if(fieldUnit.getGatheringEvent()!=null){
                 GatheringEvent gatheringEvent = fieldUnit.getGatheringEvent();
-                if(CdmStore.getService(IOccurrenceService.class).exists(fieldUnit.getUuid()) && !conversation.getSession().contains(gatheringEvent)){
-                    fieldUnit = (FieldUnit) CdmStore.getService(IOccurrenceService.class).load(fieldUnit.getUuid());
-                    gatheringEvent = fieldUnit.getGatheringEvent();
-                }
                 label += gatheringEvent.getCountry()!=null?gatheringEvent.getCountry().getLabel()+separator:emptyString;
                 label += gatheringEvent.getLocality()!=null?gatheringEvent.getLocality().getText()+separator:emptyString;
                 label += gatheringEvent.getGatheringDate()!=null?gatheringEvent.getGatheringDate()+separator:emptyString;
@@ -220,21 +215,26 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
         else if(derivate instanceof DerivedUnit){
             DerivedUnit derivedUnit = (DerivedUnit)derivate;
             if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.PreservedSpecimen){
-                java.util.Collection<FieldUnit> fieldUnits = CdmStore.getService(IOccurrenceService.class).getFieldUnits(derivedUnit.getUuid());
-                if(fieldUnits!=null && !fieldUnits.isEmpty()){
-                    FieldUnit fieldUnit = fieldUnits.iterator().next();
-                    GatheringEvent gatheringEvent = fieldUnit.getGatheringEvent();
-//                  gatheringEvent = HibernateProxyHelper.deproxy(gatheringEvent, GatheringEvent.class);
-                    if(gatheringEvent!=null){
-                        label += gatheringEvent.getCollector()!=null?gatheringEvent.getCollector()+separator:emptyString;
+                //java.util.Collection<FieldUnit> fieldUnits = CdmStore.getService(IOccurrenceService.class).getFieldUnits(derivedUnit.getUuid());
+                //TODO : This is not generic anymore for performance reasons
+                Set<SpecimenOrObservationBase> originals = derivedUnit.getOriginals();
+                if(originals.size() ==1) {
+                    SpecimenOrObservationBase specimen = originals.iterator().next();
+                    if(specimen instanceof FieldUnit) {
+                        FieldUnit fieldUnit = (FieldUnit)specimen;
+                        GatheringEvent gatheringEvent = fieldUnit.getGatheringEvent();
+                        if(gatheringEvent!=null){
+                            label += gatheringEvent.getCollector()!=null?gatheringEvent.getCollector()+separator:emptyString;
+                        }
+                        label += fieldUnit.getFieldNumber()!=null?fieldUnit.getFieldNumber()+separator:emptyString;
                     }
-                    label += fieldUnit.getFieldNumber()!=null?fieldUnit.getFieldNumber()+separator:emptyString;
                 }
+
                 eu.etaxonomy.cdm.model.occurrence.Collection collection = derivedUnit.getCollection();
                 if(collection!=null){
                     label += collection.getCode()!=null?"("+collection.getCode()+")"+separator:emptyString;
                 }
-                String mostSignificantIdentifier = CdmStore.getService(IOccurrenceService.class).getMostSignificantIdentifier(derivedUnit);
+                String mostSignificantIdentifier = derivedUnit.getMostSignificantIdentifier();
                 label += mostSignificantIdentifier!=null?mostSignificantIdentifier+separator:emptyString;
             }
             else if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.TissueSample){
@@ -305,7 +305,7 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
             boolean hasCharacterData = false;
             if(cdmBase.isInstanceOf(SpecimenOrObservationBase.class)){
                 SpecimenOrObservationBase<?> specimen = HibernateProxyHelper.deproxy(cdmBase, SpecimenOrObservationBase.class);
-                if(!CdmStore.getService(IOccurrenceService.class).getCharacterDataForSpecimen(specimen).isEmpty()){
+                if(specimen.hasCharacterData()){
                     hasCharacterData = true;
                 }
             }
index 93c229adfd2e2cfda5114ab9c7f341b36b3aa86b..8a14a5a73030305a3b687c1dfed1dc7feb7ccab6 100644 (file)
@@ -9,6 +9,10 @@
  */
 package eu.etaxonomy.taxeditor.view.derivateSearch;
 
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.swt.widgets.Composite;
@@ -18,19 +22,23 @@ import org.eclipse.ui.IMemento;
 import org.eclipse.ui.part.ViewPart;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.taxeditor.model.IContextListener;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * This view allows to search for and filter {@link SpecimenOrObservationBase}s and display
  * the results in a list. The results can be selected and opened in an editor.
  */
-public class DerivateSearchView extends ViewPart implements IContextListener {
+public class DerivateSearchView extends ViewPart implements IContextListener, ICdmEntitySessionEnabled {
 
     public static final String ID = "eu.etaxonomy.taxeditor.view.derivateSearch.DerivateSearchView";
     private DerivateSearchCompositeController derivateSearchCompositeController;
     private ConversationHolder conversationHolder;
+    private ICdmEntitySession cdmEntitySession;
 
     /**
      * Constructs a new DerivateSearchView and registers it to listen to context changes
@@ -41,6 +49,7 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
 
     @Override
     public void createPartControl(Composite parent) {
+
         derivateSearchCompositeController = new DerivateSearchCompositeController(parent, this);
         getSite().setSelectionProvider(derivateSearchCompositeController.getResultViewer());
         derivateSearchCompositeController.setEnabled(CdmStore.isActive());
@@ -60,6 +69,9 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
         if(getConversationHolder()!=null && !getConversationHolder().isClosed() && !getConversationHolder().isBound()){
             getConversationHolder().bind();
         }
+        if(getCdmEntitySession() != null) {
+            getCdmEntitySession().bind();
+        }
     }
 
     @Override
@@ -80,6 +92,13 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
     @Override
     public void contextRefresh(IProgressMonitor monitor) {
         initConversation();
+        initSession();
+    }
+
+    private void initSession() {
+        if(CdmStore.isActive()) {
+            cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
+        }
     }
 
     private void initConversation(){
@@ -100,13 +119,44 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
         return conversationHolder;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+
     @Override
     public void dispose() {
         if(conversationHolder!=null){
             conversationHolder.close();
         }
+
+        if(cdmEntitySession != null) {
+            cdmEntitySession.dispose();
+        }
+        super.dispose();
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()
+     */
+    @Override
+    public ICdmEntitySession getCdmEntitySession() {
+        initSession();
+        return cdmEntitySession;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public <T extends CdmBase> Collection<T> getRootEntities() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        // TODO Auto-generated method stub
+        return null;
     }
 }
index 4856e3ff7f3ef99b55c64f1914f782c6273d5368..479adcaac20bca6e62c4c7d0820b2fd6959703e7 100644 (file)
@@ -78,7 +78,6 @@ import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.identifier.IdentifierDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.key.TaxonomicScopeSection;
 import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
 import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
@@ -131,17 +130,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
     private ISelection selection;
 
-    /**
-     * <p>
-     * Constructor for DetailsViewer.
-     * </p>
-     *
-     * @param parent
-     *            a {@link org.eclipse.swt.widgets.Composite} object.
-     * @param viewPart
-     *            a {@link eu.etaxonomy.taxeditor.view.AbstractCdmViewPart}
-     *            object.
-     */
     public DetailsViewer(Composite parent, AbstractCdmViewPart viewPart) {
         super(parent, viewPart);
     }
@@ -334,9 +322,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     }
 
 
-    /**
-     * @param rootElement
-     */
     private void createEmptySection(RootElement parent) {
         destroySections();
 
@@ -345,9 +330,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(emptySection);
     }
 
-    /**
-     * @param rootElement
-     */
     private void createGroupSection(RootElement parent) {
         destroySections();
 
@@ -360,11 +342,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(grantedAuthorityDetailSection);
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.eclipse.jface.viewers.Viewer#getSelection()
-     */
     /** {@inheritDoc} */
     @Override
     public ISelection getSelection() {
@@ -381,11 +358,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         }
     }
 
-    /**
-     * createTaxonSections(RootElement parent)
-     *
-     * @param parent
-     */
     private void createTaxonSections(RootElement parent) {
         destroySections();
 
@@ -424,7 +396,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                        addPart(nameRelationshipSection);
         }
 
-
         addPart(parsingMessagesSection);
         addPart(taxonBaseDetailSection);
         addPart(nonViralNameSection);
@@ -432,11 +403,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(referenceDetailSection);
     }
 
-    /**
-     * createNameSections
-     *
-     * @param parent
-     */
     private void createNameSections(RootElement parent) {
         destroySections();
         NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(getConversationHolder(), parent, this,
@@ -470,11 +436,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         }
     }
 
-    /**
-     * createReferenceSections
-     *
-     * @param parent
-     */
     private void createReferenceSections(RootElement parent) {
         destroySections();
 
@@ -484,11 +445,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(referenceDetailSection);
     }
 
-    /**
-     * createTeamOrPersonBaseDetailSection
-     *
-     * @param parent
-     */
     private void createTeamOrPersonBaseDetailSection(RootElement parent) {
         destroySections();
         TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
@@ -496,11 +452,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(teamOrPersonBaseDetailSection);
     }
 
-    /**
-     * createTeamDetailSection
-     *
-     * @param parent
-     */
     private void createTeamDetailSection(RootElement parent) {
         destroySections();
         TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
@@ -508,22 +459,12 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(teamDetailSection);
     }
 
-    /**
-     * createPersonDetailSection
-     *
-     * @param parent
-     */
     private void createPersonDetailSection(RootElement parent) {
         destroySections();
         PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         addPart(personDetailSection);
     }
 
-    /**
-     * createDescriptionElementSection
-     *
-     * @param parent
-     */
     private void createDescriptionElementSection(RootElement parent) {
         destroySections();
 
@@ -544,11 +485,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(descriptionElementMediaSection);
     }
 
-    /**
-     * createDescriptionSection
-     *
-     * @param parent
-     */
     private void createDescriptionSection(RootElement parent) {
         destroySections();
         DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
@@ -580,22 +516,12 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(scopeSection);
     }
 
-    /**
-     * createDescriptionSection
-     *
-     * @param parent
-     */
     private void createSpecimenDescriptionSection(RootElement parent) {
         destroySections();
         DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         addPart(descriptionDetailSection);
     }
 
-    /**
-     * Creates the use Description section
-     *
-     * @param parent
-     */
     private void createUseDescriptionSection(RootElement parent) {
         destroySections();
         DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
@@ -611,10 +537,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
     }
 
-
-    /**
-     * @param rootElement
-     */
     private void createImageGallerySection(RootElement parent) {
         destroySections();
         DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
@@ -622,12 +544,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(descriptionDetailSection);
     }
 
-    /**
-     * createMediaElementSection
-     *
-     * @param parent
-     */
-
     private void createMediaElementSection(RootElement parent) {
         destroySections();
 
@@ -636,11 +552,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(mediaDetailSection);
     }
 
-    /**
-     * createDerivedUnitBaseElementSection
-     *
-     * @param parent
-     */
     private void createDerivedUnitBaseElementSection(RootElement parent) {
         destroySections();
 
@@ -789,11 +700,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
     }
 
-
-
-    /**
-     * @param rootElement
-     */
     private void createFeatureDistributionSection(RootElement parent) {
         destroySections();
 
@@ -802,35 +708,20 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(featureDistributionSection);
     }
 
-    /**
-     * createPolytomousKeyNodeSection
-     *
-     * @param parent
-     */
     private void createPolytomousKeyNodeSection(RootElement parent) {
         destroySections();
 
-        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
+        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        TaxonomicScopeSection taxonomicScopeSection = formFactory.createTaxonomicScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
-
         addPart(polytomousKeyDetailSection);
         addPart(polytomousKeyNodeDetailSection);
-        addPart(taxonomicScopeSection);
 
     }
 
-    /**
-     * create the UseRecordSection
-     *
-     * @param parent
-     */
     private void createUseRecordSection(RootElement parent) {
         destroySections();
 
@@ -843,11 +734,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
     }
 
-    /**
-     * createUserSection
-     *
-     * @param parent
-     */
     private void createUserSection(RootElement parent) {
         destroySections();
 
@@ -859,11 +745,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(groupByUserDetailSection);
     }
 
-    /**
-     * createTaxonRelationshipSection
-     *
-     * @param parent
-     */
     private void createTaxonRelationshipSection(RootElement parent) {
         destroySections();
 
@@ -874,9 +755,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(referencedEntityBaseDetailSection);
     }
 
-    /**
-     * @param rootElement
-     */
     private void createTermVocabularySection(RootElement parent) {
         destroySections();
 
@@ -884,11 +762,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(termVocabularyDetailSection);
     }
 
-    /**
-     * createDefinedTermSection
-     *
-     * @param parent
-     */
     private void createDefinedTermSection(RootElement parent) {
         destroySections();
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/InspectSessionsDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/InspectSessionsDialog.java
new file mode 100644 (file)
index 0000000..003ecb2
--- /dev/null
@@ -0,0 +1,265 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.view.sessions;
+
+import java.util.List;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.Element;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.StyledCellLabelProvider;
+import org.eclipse.jface.viewers.StyledString;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.FilteredTree;
+import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.wb.swt.SWTResourceManager;
+
+import eu.etaxonomy.taxeditor.remoting.cache.CdmModelFieldPropertyFromClass;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmRemoteCacheManager;
+import eu.etaxonomy.taxeditor.remoting.cache.EntityCacherDebugResult;
+import eu.etaxonomy.taxeditor.remoting.cache.EntityCacherDebugResult.CdmEntityInfo;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author cmathew
+ * @date 17 Feb 2015
+ *
+ */
+public class InspectSessionsDialog extends Dialog {
+
+    protected Object result;
+    protected Shell shlInspectSessions;
+    private Text txtDebugInfo;
+    private Label lblDebugInformation;
+
+    private final Cache cdmlibModelCache;
+
+    private final ICdmEntitySession activeSession;
+
+    private TreeViewer treeViewer;
+    private Button btnClose;
+    EntityCacherDebugResult ecdr;
+    private SashForm sashForm;
+    private Composite compositeDebug;
+    /**
+     * Create the dialog.
+     * @param parent
+     * @param style
+     */
+    public InspectSessionsDialog(Shell parent, int style) {
+        super(parent, style);
+        setText("Inspect Active Session");
+        cdmlibModelCache = CdmRemoteCacheManager.getInstance().getCdmModelGetMethodsCache();
+        activeSession = CdmStore.getCurrentSessionManager().getActiveSession();
+        ecdr = activeSession.debug();
+    }
+
+    /**
+     * Open the dialog.
+     * @return the result
+     */
+    public Object open() {
+
+        createContents();
+        setDebugInfoText();
+        treeViewer.setContentProvider(new SessionsTreeContentProvider());
+        treeViewer.setLabelProvider(new SessionsTreeLabelProvider());
+        treeViewer.setInput(getRootElements());
+        shlInspectSessions.open();
+        shlInspectSessions.layout();
+        Display display = getParent().getDisplay();
+        while (!shlInspectSessions.isDisposed()) {
+            if (!display.readAndDispatch()) {
+                display.sleep();
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Create contents of the dialog.
+     */
+    private void createContents() {
+        shlInspectSessions = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE);
+        shlInspectSessions.setSize(641, 631);
+        shlInspectSessions.setText("Inspect Sessions");
+        shlInspectSessions.setLayout(new GridLayout(1, false));
+
+        sashForm = new SashForm(shlInspectSessions, SWT.VERTICAL);
+        sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+
+        PatternFilter filter = new PatternFilter();
+        FilteredTree tree = new FilteredTree(sashForm, SWT.MULTI | SWT.H_SCROLL | SWT.BORDER
+                | SWT.V_SCROLL, filter, true);
+        treeViewer = tree.getViewer();
+        //treeViewer = new TreeViewer(sashForm, SWT.BORDER);
+        //Tree tree = treeViewer.getTree();
+
+        compositeDebug = new Composite(sashForm, SWT.NONE);
+        compositeDebug.setLayout(new GridLayout(1, false));
+
+        lblDebugInformation = new Label(compositeDebug, SWT.NONE);
+        lblDebugInformation.setAlignment(SWT.CENTER);
+        lblDebugInformation.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));
+        lblDebugInformation.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
+        lblDebugInformation.setText("Debug Information");
+
+        txtDebugInfo = new Text(compositeDebug, SWT.BORDER | SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI);
+        txtDebugInfo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+        sashForm.setWeights(new int[] {338, 184});
+
+        btnClose = new Button(shlInspectSessions, SWT.NONE);
+        btnClose.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                shlInspectSessions.dispose();
+            }
+        });
+        GridData gd_btnClose = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
+        gd_btnClose.widthHint = 70;
+        btnClose.setLayoutData(gd_btnClose);
+        btnClose.setText("Close");
+
+    }
+
+    private void setDebugInfoText() {
+        txtDebugInfo.setText(ecdr.toString());
+    }
+    private CdmEntityInfo[] getRootElements() {
+
+        List<CdmEntityInfo> rootElemnts = ecdr.getRootElements();
+        return rootElemnts.toArray(new CdmEntityInfo[rootElemnts.size()]);
+    }
+
+    class SessionsTreeContentProvider implements ITreeContentProvider {
+
+
+
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+         */
+        @Override
+        public void dispose() {
+
+        }
+
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+         */
+        @Override
+        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+
+        }
+
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
+         */
+        @Override
+        public Object[] getElements(Object inputElement) {
+            return (CdmEntityInfo[])inputElement;
+        }
+
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+         */
+        @Override
+        public Object[] getChildren(Object parentElement) {
+            List<CdmEntityInfo> children = ((CdmEntityInfo)parentElement).getChildren();
+            return children.toArray();
+        }
+
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+         */
+        @Override
+        public Object getParent(Object element) {
+            CdmEntityInfo cei = (CdmEntityInfo)element;
+            return cei.getParent();
+        }
+
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+         */
+        @Override
+        public boolean hasChildren(Object element) {
+            List<CdmEntityInfo> children = ((CdmEntityInfo)element).getChildren();
+            if(children != null && !children.isEmpty()) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+
+        public CdmModelFieldPropertyFromClass getFromCdmlibModelCache(String className) {
+            Element e = cdmlibModelCache.get(className);
+            if (e == null) {
+                return null;
+            } else {
+                return (CdmModelFieldPropertyFromClass) e.getObjectValue();
+            }
+        }
+
+    }
+
+    class SessionsTreeLabelProvider extends StyledCellLabelProvider implements ILabelProvider {
+
+        @Override
+        public void update(ViewerCell cell) {
+            CdmEntityInfo cei = (CdmEntityInfo)cell.getElement();
+            StyledString text = new StyledString();
+            if(cei != null) {
+                text.append(cei.getLabel());
+            }
+            cell.setText(text.toString());
+            cell.setStyleRanges(text.getStyleRanges());
+            super.update(cell);
+        }
+
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+         */
+        @Override
+        public Image getImage(Object element) {
+            // TODO Auto-generated method stub
+            return null;
+        }
+
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+         */
+        @Override
+        public String getText(Object element) {
+            CdmEntityInfo cei = (CdmEntityInfo)element;
+            return cei.getLabel();
+        }
+    }
+}
+
+
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/SessionsViewPart.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/SessionsViewPart.java
new file mode 100644 (file)
index 0000000..07c94bb
--- /dev/null
@@ -0,0 +1,347 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.view.sessions;
+
+import java.text.DecimalFormat;
+import java.util.Collection;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.statistics.LiveCacheStatistics;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.swt.SWT;
+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.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.wb.swt.SWTResourceManager;
+
+import eu.etaxonomy.cdm.api.cache.CdmCacher;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmRemoteCacheManager;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author cmathew
+ * @date 16 Feb 2015
+ *
+ */
+public class SessionsViewPart extends ViewPart implements ICdmEntitySessionManagerObserver {
+
+    public static final String ID = "eu.etaxonomy.taxeditor.view.sessions.SessionsViewPart"; //$NON-NLS-1$
+    public static final String OPEN_INSPECT_SESSIONS_DIALOG_ID =  "eu.etaxonomy.taxeditor.store.open.InspectSessionsDialog";
+    private Table tableSessions;
+
+    private final String[] titles = { "Owner", "In Memory", "On Disk"};
+
+    private final ICdmEntitySessionManager cdmEntitySessionManager;
+    private Text txtNoOfSessions;
+    private Text txtNoOfCaches;
+    private Text txtDefaultInMemory;
+    private Text txtCdmModelInMemory;
+    private Text txtCdmModelOnDisk;
+    private Text txtDefaultOnDisk;
+
+    public SessionsViewPart() {
+        this.cdmEntitySessionManager = CdmStore.getCurrentSessionManager();
+        if(cdmEntitySessionManager != null) {
+            cdmEntitySessionManager.addSessionObserver(this);
+        }
+    }
+
+    /**
+     * Create contents of the view part.
+     * @param parent
+     */
+    @Override
+    public void createPartControl(Composite parent) {
+        Composite container = new Composite(parent, SWT.NONE);
+        container.setLayout(new GridLayout(5, false));
+        {
+            Label lblNoOfSessions = new Label(container, SWT.NONE);
+            lblNoOfSessions.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
+            lblNoOfSessions.setAlignment(SWT.RIGHT);
+            GridData gd_lblNoOfSessions = new GridData(SWT.RIGHT, SWT.FILL, false, false, 1, 1);
+            gd_lblNoOfSessions.widthHint = 115;
+            gd_lblNoOfSessions.minimumHeight = 30;
+            lblNoOfSessions.setLayoutData(gd_lblNoOfSessions);
+            lblNoOfSessions.setText("No. of Sessions : ");
+        }
+        {
+            txtNoOfSessions = new Text(container, SWT.BORDER);
+            txtNoOfSessions.setEditable(false);
+            txtNoOfSessions.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
+            GridData gd_txtNoOfSessions = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
+            gd_txtNoOfSessions.widthHint = 50;
+            txtNoOfSessions.setLayoutData(gd_txtNoOfSessions);
+        }
+        new Label(container, SWT.NONE);
+        new Label(container, SWT.NONE);
+        new Label(container, SWT.NONE);
+        {
+            Label lblNoOfCaches = new Label(container, SWT.CENTER);
+            lblNoOfCaches.setAlignment(SWT.RIGHT);
+            lblNoOfCaches.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
+            GridData gd_lblNoOfCaches = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
+            gd_lblNoOfCaches.widthHint = 150;
+            lblNoOfCaches.setLayoutData(gd_lblNoOfCaches);
+            lblNoOfCaches.setText("No. of entity caches : ");
+        }
+        {
+            txtNoOfCaches = new Text(container, SWT.BORDER);
+            txtNoOfCaches.setEditable(false);
+            GridData gd_txtNoOfCaches = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
+            gd_txtNoOfCaches.widthHint = 50;
+            txtNoOfCaches.setLayoutData(gd_txtNoOfCaches);
+        }
+        new Label(container, SWT.NONE);
+        new Label(container, SWT.NONE);
+        new Label(container, SWT.NONE);
+
+        {
+            Label lblDefaultCache = new Label(container, SWT.CENTER);
+            lblDefaultCache.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+            lblDefaultCache.setText("Default Cache, ");
+            lblDefaultCache.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
+            lblDefaultCache.setAlignment(SWT.RIGHT);
+        }
+        {
+            Label lblDefaultInMemory = new Label(container, SWT.CENTER);
+            lblDefaultInMemory.setText("in Memory : ");
+            lblDefaultInMemory.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
+            lblDefaultInMemory.setAlignment(SWT.RIGHT);
+            lblDefaultInMemory.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        }
+        {
+            txtDefaultInMemory = new Text(container, SWT.BORDER);
+            txtDefaultInMemory.setEditable(false);
+            GridData gd_txtDefaultInMemory = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
+            gd_txtDefaultInMemory.widthHint = 130;
+            txtDefaultInMemory.setLayoutData(gd_txtDefaultInMemory);
+        }
+        {
+            Label lblDefaultOnDisk = new Label(container, SWT.CENTER);
+            lblDefaultOnDisk.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+            lblDefaultOnDisk.setText("on Disk : ");
+            lblDefaultOnDisk.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
+            lblDefaultOnDisk.setAlignment(SWT.RIGHT);
+        }
+        {
+            txtDefaultOnDisk = new Text(container, SWT.BORDER);
+            txtDefaultOnDisk.setEditable(false);
+            txtDefaultOnDisk.setText("");
+            GridData gd_txtDefaultOnDisk = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
+            gd_txtDefaultOnDisk.widthHint = 130;
+            txtDefaultOnDisk.setLayoutData(gd_txtDefaultOnDisk);
+        }
+        {
+            Label lblCdmModelCache = new Label(container, SWT.CENTER);
+            lblCdmModelCache.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+            lblCdmModelCache.setText("CDM Model Cache, ");
+            lblCdmModelCache.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
+            lblCdmModelCache.setAlignment(SWT.RIGHT);
+        }
+        {
+            Label lblCdmModelInMemory = new Label(container, SWT.CENTER);
+            lblCdmModelInMemory.setText("in Memory : ");
+            lblCdmModelInMemory.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
+            lblCdmModelInMemory.setAlignment(SWT.RIGHT);
+            GridData gd_lblCdmModelInMemory = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
+            gd_lblCdmModelInMemory.widthHint = 86;
+            lblCdmModelInMemory.setLayoutData(gd_lblCdmModelInMemory);
+        }
+        {
+            txtCdmModelInMemory = new Text(container, SWT.BORDER);
+            txtCdmModelInMemory.setEditable(false);
+            GridData gd_txtCdmModelInMemory = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
+            gd_txtCdmModelInMemory.widthHint = 130;
+            txtCdmModelInMemory.setLayoutData(gd_txtCdmModelInMemory);
+        }
+        {
+            Label lblCdmModelOnDisk = new Label(container, SWT.CENTER);
+            lblCdmModelOnDisk.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+            lblCdmModelOnDisk.setText("on Disk : ");
+            lblCdmModelOnDisk.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
+            lblCdmModelOnDisk.setAlignment(SWT.RIGHT);
+        }
+        {
+            txtCdmModelOnDisk = new Text(container, SWT.BORDER);
+            txtCdmModelOnDisk.setEditable(false);
+            txtCdmModelOnDisk.setText("");
+            GridData gd_txtCdmModelOnDisk = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
+            gd_txtCdmModelOnDisk.widthHint = 130;
+            txtCdmModelOnDisk.setLayoutData(gd_txtCdmModelOnDisk);
+        }
+        {
+            Button btnRefresh = new Button(container, SWT.NONE);
+            btnRefresh.addSelectionListener(new SelectionAdapter() {
+                @Override
+                public void widgetSelected(SelectionEvent e) {
+                    changed();
+                }
+            });
+            GridData gd_btnRefresh = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
+            gd_btnRefresh.widthHint = 100;
+            btnRefresh.setLayoutData(gd_btnRefresh);
+            btnRefresh.setText("Refresh");
+        }
+        {
+            Button btnInspectActiveSession = new Button(container, SWT.NONE);
+            btnInspectActiveSession.addSelectionListener(new SelectionAdapter() {
+                @Override
+                public void widgetSelected(SelectionEvent e) {
+                    AbstractUtility.executeCommand(OPEN_INSPECT_SESSIONS_DIALOG_ID, this, null);
+                }
+            });
+            btnInspectActiveSession.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 2, 1));
+            btnInspectActiveSession.setText("Inspect Active Session");
+        }
+        new Label(container, SWT.NONE);
+        new Label(container, SWT.NONE);
+
+        {
+            tableSessions = new Table(container, SWT.BORDER | SWT.FULL_SELECTION);
+            GridData gd_tableSessions = new GridData(SWT.FILL, SWT.FILL, true, true, 5, 1);
+            gd_tableSessions.widthHint = 769;
+            tableSessions.setLayoutData(gd_tableSessions);
+            tableSessions.setHeaderVisible(true);
+            tableSessions.setLinesVisible(true);
+        }
+
+        createActions();
+        initializeToolBar();
+        initializeMenu();
+    }
+
+    /**
+     * Create the actions.
+     */
+    private void createActions() {
+
+
+        for (String title : titles) {
+            TableColumn column = new TableColumn(tableSessions, SWT.NULL);
+            column.setWidth(200);
+            column.setText(title);
+        }
+        changed();
+
+    }
+
+
+    @Override
+    public void changed() {
+        if(tableSessions.isDisposed()) {
+            return;
+        }
+        tableSessions.removeAll();
+        if(cdmEntitySessionManager != null) {
+            Collection<ICdmEntitySession> sessions = cdmEntitySessionManager.getSessions();
+            txtNoOfSessions.setText(String.valueOf(sessions.size()));
+            for(ICdmEntitySession session : sessions) {
+                if(session.getOwner() != null) {
+                    TableItem item = new TableItem(tableSessions, SWT.NULL);
+                    item.setText(session.getOwner().toString());
+                    String activePrefix = "";
+                    if(session.isActive()) {
+                        activePrefix = "*";
+                    }
+                    item.setText(0, activePrefix + session.getOwner().toString());
+                    LiveCacheStatistics cacheStatistics = session.getCacheStatistics();
+                    item.setText(1, getInMemoryStats(cacheStatistics));
+                    item.setText(2, getOnDiskStats(cacheStatistics));
+                }
+            }
+            for (int i=0; i<titles.length; i++) {
+                tableSessions.getColumn (i).pack ();
+            }
+        }
+
+        CdmRemoteCacheManager instance = CdmRemoteCacheManager.getInstance();
+        int cdmEnityCacheSize = CacheManager.create().getCacheNames().length;
+        txtNoOfCaches.setText(String.valueOf(cdmEnityCacheSize));
+
+        Cache defaultCache = CacheManager.create().getCache(CdmCacher.DEFAULT_CACHE_NAME);
+        txtDefaultInMemory.setText("");
+        txtDefaultOnDisk.setText("");
+        if(defaultCache != null) {
+            LiveCacheStatistics liveCacheStatistics = defaultCache.getLiveCacheStatistics();
+            txtDefaultInMemory.setText(getInMemoryStats(liveCacheStatistics));
+            txtDefaultOnDisk.setText(getOnDiskStats(liveCacheStatistics));
+        }
+
+        Cache cdmModelGetMethodsCache = instance.getCdmModelGetMethodsCache();
+        txtCdmModelInMemory.setText("");
+        txtCdmModelOnDisk.setText("");
+        if(cdmModelGetMethodsCache != null) {
+            LiveCacheStatistics liveCacheStatistics = cdmModelGetMethodsCache.getLiveCacheStatistics();
+            txtCdmModelInMemory.setText(getInMemoryStats(liveCacheStatistics));
+            txtCdmModelOnDisk.setText(getOnDiskStats(liveCacheStatistics));
+        }
+
+    }
+
+    private String getInMemoryStats(LiveCacheStatistics statistics) {
+        if(statistics != null) {
+            long localHeapSize = statistics.getLocalHeapSize();
+
+            long localHeapSizeInBytes = statistics.getLocalHeapSizeInBytes();
+            String localHeapSizeInBytesStr =
+                    (new DecimalFormat("#.##")).format(localHeapSizeInBytes/1048576.0);
+            return String.valueOf(localHeapSize) + " objects / " + localHeapSizeInBytesStr + " Mb";
+        }
+        return "";
+    }
+
+    private String getOnDiskStats(LiveCacheStatistics statistics) {
+        if(statistics != null) {
+            long localDiskSize = statistics.getLocalDiskSize();
+
+            long localDiskSizeInBytes = statistics.getLocalDiskSizeInBytes();
+            String localDiskSizeInBytesStr =
+                    (new DecimalFormat("#.##")).format(localDiskSizeInBytes/1048576.0);
+            return String.valueOf(localDiskSize) + " objects / " + localDiskSizeInBytesStr + " Mb";
+        }
+        return "";
+    }
+
+    /**
+     * Initialize the toolbar.
+     */
+    private void initializeToolBar() {
+        IToolBarManager toolbarManager = getViewSite().getActionBars().getToolBarManager();
+    }
+
+    /**
+     * Initialize the menu.
+     */
+    private void initializeMenu() {
+        IMenuManager menuManager = getViewSite().getActionBars().getMenuManager();
+    }
+
+    @Override
+    public void setFocus() {
+        // Set the focus
+    }
+
+}
index e11d053243353024fb75d2553ecdf44d767c6193..984c3c6f206199c1cc44e0afb2b28bdc8adff4e4 100644 (file)
@@ -123,6 +123,4 @@ public class SupplementalDataViewPart extends AbstractCdmEditorViewPart {
                // TODO Auto-generated method stub
                return false;
        }
-
-
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/resources/log4j.properties b/eu.etaxonomy.taxeditor.store/src/main/resources/log4j.properties
deleted file mode 100644 (file)
index 0c30678..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-### ************ APPENDER ***********************************###
-
-### direct log messages to stdout ###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-### direct messages to file hibernate.log ###
-log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.File=taxeditor.log
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-### ************* LOG LEVELS *********************************###
-
-### set log levels - for more verbose logging change 'info' to 'debug' ###
-### levels: error, warn, debug, info
-log4j.rootLogger=INFO, stdout
-
-### set directory-specific levels below
-
-### basic level for editor directory
-log4j.logger.eu.etaxonomy.taxeditor = WARN, stdout 
-
-log4j.logger.eu.etaxonomy.taxeditor.store = DEBUG, stdout
-
-### log level for conversation handler
-#log4j.logger.eu.etaxonomy.cdm.api.application = DEBUG, stdout
index 0bef7f3e843bd7ff8e6f4341284f069a8d0523d4..8e6ea37042e3beb3d7c0b50b2eada98879ca17f4 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 
 /**
  * @author n.hoffmann
@@ -24,13 +25,14 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  * @version 1.0
  */
 public abstract class AbstractTaxeditorOperationTestBase {
-       
+
        public static final IUndoContext undoContext = null;
-       
+
        public static final IProgressMonitor monitor = null;
-       public static final IAdaptable info = null;     
+       public static final IAdaptable info = null;
        public static final IPostOperationEnabled postOperation = null;
-       
+       public static final ICdmEntitySessionEnabled cdmEntitySessionEnabled = null;
+
        protected static AbstractPostOperation operation;
        protected static Taxon taxon;
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/RemotingTestUpdateOperation.java b/eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/RemotingTestUpdateOperation.java
new file mode 100644 (file)
index 0000000..727460c
--- /dev/null
@@ -0,0 +1,79 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.store.operations;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.service.ITestService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.api.service.dto.CdmEntityIdentifier;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
+
+/**
+ * @author cmathew
+ * @date 26 Jun 2015
+ *
+ */
+public class RemotingTestUpdateOperation extends RemotingCdmUpdateOperation {
+
+    private static String LABEL = "Test Operation";
+
+    private UpdateResult result;
+    private Exception exception;
+    private CdmEntityIdentifier cei;
+
+
+    /**
+     * @param label
+     * @param action
+     * @param source
+     * @param async
+     */
+    public RemotingTestUpdateOperation(UpdateResult result,
+            Object source,
+            boolean async) {
+        super(LABEL, Action.Update, source, async);
+        this.result = result;
+    }
+
+    public RemotingTestUpdateOperation(Exception exception,
+            Object source,
+            boolean async) {
+        super(LABEL, Action.Update, source, async);
+        this.exception = exception;
+    }
+
+    public RemotingTestUpdateOperation(CdmEntityIdentifier cei,
+            Object source,
+            boolean async) {
+        super(LABEL, Action.Update, source, async);
+        this.cei = cei;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+     */
+    @Override
+    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
+        ITestService testService = CdmApplicationState.getTestService();
+        if(result != null) {
+            return testService.returnResult(result);
+        } else if(exception != null) {
+            return testService.throwException(exception);
+        } else if(cei != null) {
+            return testService.addChild(cei);
+        }
+        return null;
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/test/resources/log4j.properties b/eu.etaxonomy.taxeditor.store/src/test/resources/log4j.properties
deleted file mode 100644 (file)
index e083605..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-### ************ APPENDER ***********************************###
-
-### direct log messages to stdout ###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-### direct messages to file hibernate.log ###
-log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.File=hibernate.log
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-
-### ************* LOG LEVELS *********************************###
-
-### set log levels - for more verbose logging change 'info' to 'debug' ###
-
-log4j.rootLogger=info, stdout, file
-
-       ### *** CDM *** ###
-
-log4j.logger.eu.etaxonomy.cdm = info
-log4j.logger.eu.etaxonomy.cdm.database.init = warn
-#
-log4j.logger.eu.etaxonomy.cdm.model.common.init = warn
-#
-log4j.logger.eu.etaxonomy.cdm.test.integration = info
-log4j.logger.eu.etaxonomy.cdm.api.application = warn
-log4j.logger.eu.etaxonomy.cdm.api.service = info
-#log4j.logger.eu.etaxonomy.cdm.database.VocabularyStoreImpl = warn
-#
-log4j.logger.eu.etaxonomy.cdm.database = warn
-log4j.logger.eu.etaxonomy.cdm.persistence.dao.hibernate.common = warn
-               
-
-
-       ### *** SPRING ************ ###
-log4j.logger.org.springframework.transaction = warn
-log4j.logger.org.hibernate.engine.LoadContexts = warn
-log4j.logger.org.springframework.orm.hibernate3.SessionFactoryUtils = warn
-log4j.logger.org.springframework.orm.hibernate3 = warn
-log4j.logger.org.springframework.FileSystemXmlApplicationContext = warn;
-log4j.logger.org.springframework.core.io.support = warn
-
-
-       ### ***HIBERNATE ************ ###
-
-log4j.logger.org.hibernate=warn
-
-### No warnings as thrown by SQLServer
-###log4j.logger.org.hibernate.cfg = warn
-
-### No warnings as thrown by SQLServer
-log4j.logger.org.hibernate.util.JDBCExceptionReporter = error
-
-### log HQL query parser activity
-#log4j.logger.org.hibernate.hql.ast.AST=debug
-
-### log just the SQL
-log4j.logger.org.hibernate.SQL=warn
-
-### log JDBC bind parameters ###
-log4j.logger.org.hibernate.type=warn
-
-### log schema export/update ###
-log4j.logger.org.hibernate.tool.hbm2ddl=warn
-
-### log HQL parse trees
-log4j.logger.org.hibernate.hql=debug
-log4j.logger.org.hibernate.hql.ast=warn
-
-### log cache activity ###
-#log4j.logger.org.hibernate.cache=debug
-
-### log transaction activity
-#log4j.logger.org.hibernate.transaction=debug
-
-### log JDBC resource acquisition
-log4j.logger.org.hibernate.jdbc=info
-
-### enable the following line if you want to track down connection ###
-### leakages when using DriverManagerConnectionProvider ###
-#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace
-
-
-   ### *** Profiling Logger ************ ###
-   
-#log4j.logger.org.springframework.aop.interceptor.PerformanceMonitorInterceptor=TRACE, profiling
-### Profiling output
-#log4j.appender.profiling=org.apache.log4j.RollingFileAppender
-#log4j.appender.profiling.File=profiling.log
-#log4j.appender.profiling.MaxFileSize=1024KB
-#log4j.appender.profiling.MaxBackupIndex=1
-#log4j.appender.profiling.layout=org.apache.log4j.PatternLayout
-#log4j.appender.profiling.layout.conversionPattern=%d,%p,%m%n
-
index 12d3a7cdd6d733338f1e108848d412f566620e95..c2021ac9d2966d7e2c3985f75a249a8e070a5681 100644 (file)
@@ -2,7 +2,15 @@
 <classpath>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src/test/java"/>
-       <classpathentry kind="src" path="src/main/resources"/>
+       <classpathentry including="**/*.java" kind="src" path="src/test/java"/>
+       <classpathentry excluding="**/*.java" kind="src" path="src/test/resources"/>
+       <classpathentry exported="true" kind="lib" path="lib/byte-buddy-0.5.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.context-3.2.2.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-core-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-database-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-dbmaintainer-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-dbunit-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-spring-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dbunit-2.4.9.jar"/>
        <classpathentry kind="output" path="target/classes"/>
 </classpath>
index ef718ade6b0c7f00647ffb2b6e4f424464b39af6..e6a059049f4b543619e656d42155314bdc99824a 100644 (file)
@@ -1,28 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-       <name>eu.etaxonomy.taxeditor.test</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-       </natures>
-</projectDescription>
+  <name>eu.etaxonomy.taxeditor.test</name>
+  <comment>Holds all UI tests for the Taxonomic Editor. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+    <nature>org.eclipse.pde.PluginNature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file
index e392ea141b999f93e258045433f826bbc6ca0b3b..c537b63063ce6052bdc49c5fd0745b078f162c90 100644 (file)
@@ -1,4 +1,3 @@
-#Wed Oct 05 13:31:15 CEST 2011
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
index dd55c822551cf19c70da92cb4b1f3e0c86ff48c9..65c904cfdbdbaf0332b9b94e50913b75b74a7d9a 100644 (file)
@@ -2,23 +2,32 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: eu.etaxonomy.taxeditor.test
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.test;singleton:=true
-Bundle-Version: 3.6.1.qualifier
+Bundle-Version: 3.12.0.qualifier
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: EDIT
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.apache.log4j,
- org.eclipse.ui,
+Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
- org.eclipse.swtbot.eclipse.core,
- org.eclipse.swtbot.eclipse.finder,
- org.eclipse.swtbot.junit4_x,
  org.eclipse.ui.ide,
- eu.etaxonomy.taxeditor.application,
- eu.etaxonomy.taxeditor.bulkeditor,
+ org.junit;bundle-version="4.8.2",
  eu.etaxonomy.taxeditor.cdmlib,
+ eu.etaxonomy.taxeditor.bulkeditor,
  eu.etaxonomy.taxeditor.editor,
  eu.etaxonomy.taxeditor.help,
  eu.etaxonomy.taxeditor.navigation,
  eu.etaxonomy.taxeditor.printpublisher,
- eu.etaxonomy.taxeditor.store
-Eclipse-RegisterBuddy: org.apache.log4j
+ eu.etaxonomy.taxeditor.store,
+ org.apache.log4j,
+ org.hamcrest,
+ org.eclipse.swtbot.eclipse.core,
+ org.eclipse.swtbot.eclipse.finder
+Eclipse-RegisterBuddy: org.apache.log4j, org.eclipse.swtbot.swt.finder
+Bundle-ClassPath: .,
+ lib/byte-buddy-0.5.1.jar,
+ lib/org.springframework.context-3.2.2.RELEASE.jar,
+ lib/unitils-core-3.4.2.jar,
+ lib/unitils-database-3.4.2.jar,
+ lib/unitils-dbmaintainer-3.4.2.jar,
+ lib/unitils-dbunit-3.4.2.jar,
+ lib/unitils-spring-3.4.2.jar,
+ lib/dbunit-2.4.9.jar
\ No newline at end of file
index 137d6a59ccc7ed4073b31469643cef499bfe3f0a..4c13ab916d9839335483e9c9a32e81deebf28172 100644 (file)
@@ -1,3 +1,14 @@
-source.. = src/test/java/
+source.. = src/test/java/,\
+           src/test/resources/
 bin.includes = META-INF/,\
-               .
+               .,\
+               lib/byte-buddy-0.5.1.jar,\
+               lib/org.springframework.context-3.2.2.RELEASE.jar,\
+               lib/unitils-core-3.4.2.jar,\
+               lib/unitils-database-3.4.2.jar,\
+               lib/unitils-dbmaintainer-3.4.2.jar,\
+               lib/unitils-dbunit-3.4.2.jar,\
+               lib/unitils-spring-3.4.2.jar,\
+               lib/dbunit-2.4.9.jar,\               
+               src/test/resources/
+output.. = target/classes
diff --git a/eu.etaxonomy.taxeditor.test/lib/byte-buddy-0.5.1.jar b/eu.etaxonomy.taxeditor.test/lib/byte-buddy-0.5.1.jar
new file mode 100644 (file)
index 0000000..2b1447a
Binary files /dev/null and b/eu.etaxonomy.taxeditor.test/lib/byte-buddy-0.5.1.jar differ
diff --git a/eu.etaxonomy.taxeditor.test/lib/dbunit-2.4.9.jar b/eu.etaxonomy.taxeditor.test/lib/dbunit-2.4.9.jar
new file mode 100644 (file)
index 0000000..130921b
Binary files /dev/null and b/eu.etaxonomy.taxeditor.test/lib/dbunit-2.4.9.jar differ
diff --git a/eu.etaxonomy.taxeditor.test/lib/org.springframework.context-3.2.2.RELEASE.jar b/eu.etaxonomy.taxeditor.test/lib/org.springframework.context-3.2.2.RELEASE.jar
new file mode 100644 (file)
index 0000000..e285a21
Binary files /dev/null and b/eu.etaxonomy.taxeditor.test/lib/org.springframework.context-3.2.2.RELEASE.jar differ
diff --git a/eu.etaxonomy.taxeditor.test/lib/unitils-core-3.4.2.jar b/eu.etaxonomy.taxeditor.test/lib/unitils-core-3.4.2.jar
new file mode 100644 (file)
index 0000000..ab4c22e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.test/lib/unitils-core-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.test/lib/unitils-database-3.4.2.jar b/eu.etaxonomy.taxeditor.test/lib/unitils-database-3.4.2.jar
new file mode 100644 (file)
index 0000000..dfcb6ae
Binary files /dev/null and b/eu.etaxonomy.taxeditor.test/lib/unitils-database-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.test/lib/unitils-dbmaintainer-3.4.2.jar b/eu.etaxonomy.taxeditor.test/lib/unitils-dbmaintainer-3.4.2.jar
new file mode 100644 (file)
index 0000000..01f8994
Binary files /dev/null and b/eu.etaxonomy.taxeditor.test/lib/unitils-dbmaintainer-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.test/lib/unitils-dbunit-3.4.2.jar b/eu.etaxonomy.taxeditor.test/lib/unitils-dbunit-3.4.2.jar
new file mode 100644 (file)
index 0000000..778274e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.test/lib/unitils-dbunit-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.test/lib/unitils-spring-3.4.2.jar b/eu.etaxonomy.taxeditor.test/lib/unitils-spring-3.4.2.jar
new file mode 100644 (file)
index 0000000..f30810b
Binary files /dev/null and b/eu.etaxonomy.taxeditor.test/lib/unitils-spring-3.4.2.jar differ
index 2fdee3be14e73bed09e76914a8c237047b16dcce..ab19000d4ae914f01168b0fabda861231929473a 100644 (file)
 <?xml version="1.0" encoding="UTF-8"?>\r
 <project>\r
 \r
-       <parent>\r
-               <groupId>eu.etaxonomy</groupId>\r
-               <artifactId>taxeditor-parent</artifactId>\r
-               <version>3.4.0-SNAPSHOT</version>\r
-       </parent>\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <artifactId>eu.etaxonomy.taxeditor.test</artifactId>\r
-       <packaging>eclipse-test-plugin</packaging>\r
-       <name>UI Test Bundle</name>\r
-       <description>Holds all UI tests for the Taxonomic Editor</description>\r
-       <!-- <repositories> -->\r
-       <!-- <repository> -->\r
-       <!-- <id>ganymede</id> -->\r
-       <!-- <layout>p2</layout> -->\r
-       <!-- <url>http://download.eclipse.org/releases/galileo</url> -->\r
-       <!-- </repository> -->\r
-       <!-- <repository> -->\r
-       <!-- <id>swtbot</id> -->\r
-       <!-- <layout>p2</layout> -->\r
-       <!-- <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site</url> -->\r
-       <!-- </repository> -->\r
-       <!-- </repositories> -->\r
-\r
-       <build>\r
-               <plugins>\r
-                       <plugin>\r
-                               <groupId>org.eclipse.tycho</groupId>\r
-                               <artifactId>tycho-maven-plugin</artifactId>\r
-                               <version>${tycho.version}</version>\r
-                               <extensions>true</extensions>\r
-                       </plugin>\r
-                       <plugin>\r
-                               <groupId>org.eclipse.tycho</groupId>\r
-                               <artifactId>target-platform-configuration</artifactId>\r
-                               <version>${tycho.version}</version>\r
-                               <configuration>\r
-                                       <resolver>p2</resolver>\r
-                               </configuration>\r
-                       </plugin>\r
-                       <plugin>\r
-                               <groupId>org.eclipse.tycho</groupId>\r
-                               <artifactId>tycho-surefire-plugin</artifactId>\r
-                               <version>${tycho.version}</version>\r
-                               <configuration>\r
-                                       <useUIHarness>true</useUIHarness>\r
-                                       <useUIThread>false</useUIThread>\r
-                                       <includes>\r
-                                               <include>**/*Test.java</include>\r
-                                       </includes>\r
-                                       <product>eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product</product>\r
-                       <application>eu.etaxonomy.taxeditor.application.application</application>\r
-                                       <!-- <dependency>
-                                               <type>p2-installable-unit</type>
-                                               <artifactId>eu.etaxonomy.taxeditor.product</artifactId>
-                                               <version>0.0.0</version>
-                                       </dependency> -->\r
-                               </configuration>\r
-                       </plugin>\r
-                       <!-- <plugin>
-                       <groupId>org.eclipse.tycho</groupId>
-                       <artifactId>maven-osgi-test-plugin</artifactId>
-                       <version>${tycho.version}</version>
-                       <configuration>
-                       <useUIHarness>true</useUIHarness>
-                       <useUIThread>false</useUIThread>
-                       <product>eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product</product>
-                       <application>org.eclipse.ui.ide.workbench</application>
-                       <dependencies>
-                       <dependency>
-                       <type>p2-installable-unit</type>
-                       <artifactId>eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product</artifactId>
-                       <version>0.0.0</version>
-                       </dependency>
-                       </dependencies>
-                       </configuration>
-                       </plugin> -->\r
-               </plugins>\r
-       </build>\r
+  <parent>\r
+    <groupId>eu.etaxonomy</groupId>\r
+    <artifactId>taxeditor-parent</artifactId>\r
+    <version>3.12.0-SNAPSHOT</version>\r
+  </parent>\r
+  <modelVersion>4.0.0</modelVersion>\r
+  <artifactId>eu.etaxonomy.taxeditor.test</artifactId>\r
+  <packaging>eclipse-test-plugin</packaging>\r
+  <name>UI Test Bundle</name>\r
+  <description>Holds all Tests for the Taxonomic Editor</description>\r
+  <build>\r
+    <plugins>\r
+      <plugin>\r
+        <groupId>org.eclipse.tycho</groupId>\r
+        <artifactId>target-platform-configuration</artifactId>\r
+        <version>${tycho.version}</version>\r
+        <configuration>\r
+          <filters>\r
+            <!-- Work around for https://bugs.eclipse.org/bugs/show_bug.cgi?id=348045 -->\r
+            <!-- taken from https://wiki.eclipse.org/index.php?title=Tycho/Target_Platform#Filtering -->\r
+            <filter>\r
+              <type>p2-installable-unit</type>\r
+              <id>org.eclipse.equinox.servletbridge.extensionbundle</id>\r
+              <removeAll />\r
+            </filter>\r
+          </filters>\r
+        </configuration>\r
+      </plugin>\r
+      <plugin>\r
+        <groupId>org.eclipse.tycho</groupId>\r
+        <artifactId>tycho-surefire-plugin</artifactId>\r
+        <version>${tycho.version}</version>\r
+        <configuration>\r
+          <!-- currently we run only the non-ui unit tests so we don't the \r
+            harness -->\r
+          <!-- <useUIHarness>true</useUIHarness> -->\r
+          <dependencies>\r
+            <!-- This will pull the feature and its dependent plugins into \r
+              the classpath for the tests. Note that this requires ALL taxeditor projects \r
+              to be installed. -->\r
+            <dependency>\r
+              <type>eclipse-feature</type>\r
+              <artifactId>eu.etaxonomy.taxeditor.feature</artifactId>\r
+              <!-- This is the minimum required version -->\r
+              <version>1.0.0</version>\r
+            </dependency>\r
+          </dependencies>\r
+        </configuration>\r
+      </plugin>\r
+      <plugin>\r
+        <groupId>org.eclipse.jetty</groupId>\r
+        <artifactId>jetty-maven-plugin</artifactId>\r
+        <version>9.2.9.v20150224</version>\r
+        <configuration>\r
+          <jvmArgs>-Xmx512m -XX:MaxPermSize=512m</jvmArgs>\r
+          <systemProperties>\r
+            <systemProperty>\r
+              <name>spring.profiles.active</name>\r
+              <value>remoting</value>\r
+            </systemProperty>\r
+            <systemProperty>\r
+              <name>cdm.beanDefinitionFile</name>\r
+              <value>${basedir}/src/test/resources/datasources.xml</value>\r
+            </systemProperty>\r
+            <systemProperty>\r
+              <name>cdm.datasource</name>\r
+              <value>cdmTest</value>\r
+            </systemProperty>\r
+          </systemProperties>\r
+          <stopPort>9191</stopPort>\r
+          <stopKey>jetty-cdm-server</stopKey>\r
+          <stopWait>10</stopWait>\r
+          <httpConnector>\r
+            <port>9090</port>\r
+          </httpConnector>\r
+          <war>${project.parent.basedir}/eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/cdmlib-remote-webapp.war</war>\r
+          <daemon>true</daemon>\r
+        </configuration>\r
+        <executions>\r
+          <execution>\r
+            <id>start-jetty</id>\r
+            <phase>pre-integration-test</phase>\r
+            <goals>\r
+              <goal>deploy-war</goal>\r
+            </goals>\r
+            <configuration>\r
+              <scanIntervalSeconds>0</scanIntervalSeconds>\r
+            </configuration>\r
+          </execution>\r
+          <execution>\r
+            <id>stop-jetty</id>\r
+            <phase>post-integration-test</phase>\r
+            <goals>\r
+              <goal>stop</goal>\r
+            </goals>\r
+          </execution>\r
+        </executions>\r
+      </plugin>\r
+    </plugins>\r
+  </build>\r
 </project>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.test/server.properties b/eu.etaxonomy.taxeditor.test/server.properties
new file mode 100644 (file)
index 0000000..daf19cd
--- /dev/null
@@ -0,0 +1,6 @@
+httpPort=9090
+stopPort=9191
+stopKey=jetty-cdm-server
+user=admin
+password=00000
+
diff --git a/eu.etaxonomy.taxeditor.test/src/main/resources/log4j.xml b/eu.etaxonomy.taxeditor.test/src/main/resources/log4j.xml
deleted file mode 100644 (file)
index ea16d13..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
-       debug="false">
-
-       <appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
-               <param name="Target" value="System.out" />
-               <layout class="org.apache.log4j.PatternLayout">
-                       <param name="ConversionPattern"
-                               value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) - %m%n" />
-               </layout>
-       </appender>
-
-       <appender name="fileAppender" class="org.apache.log4j.FileAppender">
-               <param name="File" value="/tmp/debug.log" />
-               <param name="Append" value="false" />
-               <layout class="org.apache.log4j.PatternLayout">
-                       <param name="ConversionPattern"
-                               value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) - %m%n" />
-               </layout>
-       </appender>
-
-       <appender name="asyncAppender" class="org.apache.log4j.AsyncAppender">
-               <!-- appender-ref ref="consoleAppender" / -->
-               <appender-ref ref="fileAppender" />
-       </appender>
-
-       <!-- don't log matchers, this is very high amount of chatter -->
-       <category name="org.eclipse.swtbot.swt.finder.matchers">
-               <priority value="OFF" />
-       </category>
-
-       <!--
-               don't log widget notification events, this is moderately high chatter
-       -->
-       <category name="org.eclipse.swtbot.swt.finder.widgets">
-               <priority value="OFF" />
-       </category>
-
-       <!-- don't log finders, this is moderate chatter -->
-       <category name="org.eclipse.swtbot.swt.finder.finders">
-               <priority value="DEBUG" />
-       </category>
-
-       <category name="org.eclipse.swtbot.swt.finder.keyboard">
-               <!-- set to a value higher than debug to turn on. -->
-               <priority value="DEBUG" />
-       </category>
-
-       <category name="org.eclipse.swtbot">
-               <priority value="ALL" />
-       </category>
-
-       <root>
-               <priority value="INFO" />
-               <appender-ref ref="consoleAppender" />
-               <appender-ref ref="fileAppender" />
-       </root>
-
-</log4j:configuration>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.java
new file mode 100644 (file)
index 0000000..43f4be9
--- /dev/null
@@ -0,0 +1,416 @@
+// $Id$
+/**
+* Copyright (C) 2014 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.cdm.api.cache;
+
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.unitils.dbunit.annotation.DataSet;
+
+import eu.etaxonomy.cdm.api.service.ICommonService;
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
+import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.common.LanguageString;
+import eu.etaxonomy.cdm.model.description.KeyStatement;
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.httpinvoker.RemotingSessionAwareTest;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher;
+
+/**
+ * @author cmathew
+ * @date 7 Oct 2014
+ *
+ */
+@DataSet
+public class CdmClientCachingTest extends RemotingSessionAwareTest {
+
+    private static final Logger logger = Logger.getLogger(CdmClientCachingTest.class);
+
+    private final UUID polytomousKeyUuid = UUID.fromString("0d53ba20-7de4-4baa-bd8a-401048447d66");
+    private final UUID taxon1Uuid = UUID.fromString("2b336df7-29e8-4f79-985f-66502739d22f");
+    private final UUID polytomousKeyNodeUuid1 = UUID.fromString("75e4c924-ff58-4ee7-a59d-fd9173517d08");
+    private final UUID polytomousKeyNodeUuid2 = UUID.fromString("b775c027-13c0-4b87-8aa9-712faeaafbdc");
+
+
+    private final IPolytomousKeyService polytomousKeyService = getRemoteApplicationController().getPolytomousKeyService();
+    private final IPolytomousKeyNodeService polytomousKeyNodeService = getRemoteApplicationController().getPolytomousKeyNodeService();
+    private final ICommonService commonService = getRemoteApplicationController().getCommonService();
+    private final ITaxonService taxonService = getRemoteApplicationController().getTaxonService();
+
+
+    private static final List<String> PKEY_DEPTH1_INIT_STRATEGY = Arrays.asList(new String[] {
+                       });
+
+    private static final List<String> PKEY_DEPTH2_INIT_STRATEGY = Arrays.asList(new String[] {
+               "root"});
+
+    private static final List<String> PKEY_DEPTH3_INIT_STRATEGY = Arrays.asList(new String[] {
+               "root.statement"});
+
+
+    @BeforeClass
+    public static void initializePolytomousKeyTest() {
+
+    }
+
+
+
+
+    @Test
+    public void recursiveLoadSubGraphDepth1Test() {
+
+       // this call will load into the session cache the graph
+       // polytomous key
+       //      |- root : polytomous key node
+       // in a recursive call
+        PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH1_INIT_STRATEGY),PolytomousKey.class);
+
+
+        // checking to make sure the root object is in the session cache
+        Assert.assertSame(pkey1.getRoot(), cacher.getFromCache(pkey1.getRoot()));
+
+    }
+
+
+    @Test
+    public void recursiveLoadSubGraphDepth2Test() {
+
+       // this call will load into the session cache the graph
+       // polytomous key
+       //      |- root : polytomous key node
+       //              |- question : KeyStatement
+       //              |- statement : KeyStatement
+       // in a recursive call
+        PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
+        CdmTransientEntityCacher cacher = getCacher(sessionOwner);
+        // checking to make sure the root object is in the session cache
+        Assert.assertSame(pkey.getRoot(), cacher.getFromCache(pkey.getRoot()));
+        Assert.assertSame(pkey.getRoot().getStatement(), cacher.getFromCache(pkey.getRoot().getStatement()));
+        Assert.assertSame(pkey.getRoot().getQuestion(), cacher.getFromCache(pkey.getRoot().getQuestion()));
+
+    }
+
+    /**
+     * when : retrieving objects using recursive caching of object graphs with different depths
+     * then : the objects in the sub-graph having the same persistence id should be the same
+     */
+    @Test
+    public void lazyLoadRecursiveTest() {
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+       //              |- question : KeyStatement
+       //              |- statement : KeyStatement
+        PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+        CdmTransientEntityCacher cacher = getCacher(sessionOwner);
+
+    }
+
+
+    /**
+     * when : retrieving objects using recursive caching of object graphs with different depths
+     * then : the objects in the sub-graph having the same persistence id should be the same
+     */
+    @Test
+    public void differentSubGraphDepthTest1() {
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+       // in a recursive call
+        PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH1_INIT_STRATEGY),PolytomousKey.class);
+        KeyStatement ks1 = CdmBase.deproxy(pkey1.getRoot().getStatement(), KeyStatement.class);
+
+        CdmTransientEntityCacher cacher = getCacher(sessionOwner);
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+       //              |- question : KeyStatement
+       //              |- statement : KeyStatement
+        PolytomousKey pkey2 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH3_INIT_STRATEGY),PolytomousKey.class);
+
+        KeyStatement ks2 = CdmBase.deproxy(pkey2.getRoot().getStatement(), KeyStatement.class);
+
+        Assert.assertSame(ks2, cacher.getFromCache(ks2));
+        Assert.assertSame(cacher.getFromCache(KeyStatement.class, ks1.getId()), cacher.getFromCache(ks2));
+
+    }
+
+    /**
+     * when : retrieving objects using recursive caching of object graphs with different depths
+     * then : the objects in the sub-graph having the same persistence id should be the same
+     */
+    @Test
+    public void differentSubGraphDepthTest2() {
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+       //              |- question : KeyStatement
+       //              |- statement : KeyStatement
+        PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
+        KeyStatement ks1 = pkey1.getRoot().getStatement();
+        Assert.assertSame(cacher.getFromCache(pkey1.getRoot().getStatement()), pkey1.getRoot().getStatement());
+        CdmTransientEntityCacher cacher = getCacher(sessionOwner);
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+        PolytomousKey pkey2 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH1_INIT_STRATEGY),PolytomousKey.class);
+
+        Assert.assertSame(pkey1.getRoot().getStatement(), pkey2.getRoot().getStatement());
+        pkey2.getRoot().getStatement().getCreatedBy();
+        Assert.assertSame(cacher.getFromCache(ks1), cacher.getFromCache(pkey2.getRoot().getStatement()));
+    }
+
+    /**
+     * when : retrieving objects using (first) recursive load directly and (second) lazy loading in the same session
+     * then : the objects in the sub-graph having the same persistence id should be the same
+     */
+    @Test
+    public void recursiveLoadAndLazyLoadTest() {
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+       //              |- question : KeyStatement
+       //              |- statement : KeyStatement
+        PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
+
+
+        CdmTransientEntityCacher cacher = getCacher(sessionOwner);
+
+        // checking that the root is not null and
+        // that it exists in the cache and
+        // that both the original object and the
+        // cached object are the same
+        Assert.assertNotNull(pkey1.getRoot().getStatement());
+        Assert.assertNotNull(cacher.getFromCache(pkey1.getRoot().getStatement()));
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+        PolytomousKey pkey2 = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+        KeyStatement ks2 =  CdmBase.deproxy(pkey2.getRoot().getStatement(), KeyStatement.class);
+        Assert.assertSame(ks2, cacher.getFromCache(pkey2.getRoot().getStatement()));
+
+        Assert.assertSame(pkey1.getRoot().getStatement(), pkey2.getRoot().getStatement());
+        Assert.assertSame(cacher.getFromCache(pkey1.getRoot().getStatement()), cacher.getFromCache(pkey2.getRoot().getStatement()));
+    }
+
+    /**
+     * when : retrieving objects using (first) lazy loading  and (second) recursive load directly in the same session
+     * then : the objects in the sub-graph having the same persistence id should be the same
+     */
+    @Test
+    public void lazyLoadAndRecursiveLoadTest() {
+
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+
+       PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+
+        // lazy initialising root.statement
+        KeyStatement st = CdmBase.deproxy(pkey1.getRoot().getStatement(), KeyStatement.class);
+        st.getLabel();
+
+        // checking that the root is not null and
+        // that it exists in the cache and
+        // that both the original object and the
+        // cached object are the same
+       Assert.assertNotNull(pkey1.getRoot().getStatement());
+       Assert.assertSame(CdmBase.deproxy(pkey1.getRoot().getStatement(), KeyStatement.class),
+                       cacher.getFromCache(pkey1.getRoot().getStatement(), KeyStatement.class));
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+       //              |- question : KeyStatement
+       //              |- statement : KeyStatement
+
+       PolytomousKey pkey2 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
+
+
+       Assert.assertSame(pkey2.getRoot().getStatement(), cacher.getFromCache(pkey2.getRoot().getStatement(), KeyStatement.class));
+       Assert.assertSame(st, pkey2.getRoot().getStatement());
+       Assert.assertSame(cacher.getFromCache(st), cacher.getFromCache(pkey2.getRoot().getStatement(), KeyStatement.class));
+    }
+
+
+
+
+
+    /**
+     * when : loading an object (first) and then (second) loading a graph the object is contained in, in the same session
+     * then : the object should be the same
+     */
+    @Test
+    public void subGraphObjectLoadTest1() {
+
+       // this call will load into the session cache a polytomous key node object
+       PolytomousKeyNode rootPKNode = CdmBase.deproxy(polytomousKeyNodeService.find(polytomousKeyNodeUuid1),PolytomousKeyNode.class);
+
+
+       Assert.assertNotNull(rootPKNode);
+       Assert.assertSame(rootPKNode, cacher.getFromCache(rootPKNode));
+
+       PolytomousKeyNode childOfRootPKNode = CdmBase.deproxy(polytomousKeyNodeService.find(polytomousKeyNodeUuid2),PolytomousKeyNode.class);
+
+
+       Assert.assertNotNull(childOfRootPKNode);
+       Assert.assertSame(childOfRootPKNode, cacher.getFromCache(childOfRootPKNode));
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+       //              |- question : KeyStatement
+       //              |- statement : KeyStatement
+
+       PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
+
+
+       Assert.assertSame(childOfRootPKNode, cacher.getFromCache(childOfRootPKNode));
+       Assert.assertSame(pkey.getRoot().getChildAt(1), childOfRootPKNode);
+    }
+
+    /**
+     * when : loading a graph (first) and then (second) loading an object contained in in the graph, in the same session
+     * then : the object should be the same
+     */
+    @Test
+    public void subGraphObjectLoadTest2() {
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+       //              |- question : KeyStatement
+       //              |- statement : KeyStatement
+
+       PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
+
+
+       // this call will load into the session cache a polytomous key node object
+       PolytomousKeyNode rootPKNode = CdmBase.deproxy(polytomousKeyNodeService.find(polytomousKeyNodeUuid1),PolytomousKeyNode.class);
+
+
+       Assert.assertNotNull(rootPKNode);
+       Assert.assertSame(rootPKNode, cacher.getFromCache(rootPKNode));
+
+       PolytomousKeyNode childOfRootPKNode = CdmBase.deproxy(polytomousKeyNodeService.find(polytomousKeyNodeUuid2),PolytomousKeyNode.class);
+
+
+       Assert.assertNotNull(childOfRootPKNode);
+       Assert.assertSame(childOfRootPKNode, cacher.getFromCache(childOfRootPKNode));
+
+       Assert.assertSame(childOfRootPKNode, cacher.getFromCache(childOfRootPKNode));
+       Assert.assertSame(pkey.getRoot().getChildAt(1), childOfRootPKNode);
+    }
+
+
+    /**
+     * when : loading objects from a collection
+     * then : the object stored in the cache should be the same
+     */
+    @Test
+    public void subGraphCollectionLoadTest() {
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+       //              |- question : KeyStatement
+       //              |- statement : KeyStatement
+
+       PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
+
+
+       PolytomousKeyNode childOfRootPKNode = pkey.getRoot().getChildAt(1);
+
+       Assert.assertSame(childOfRootPKNode, cacher.getFromCache(childOfRootPKNode));
+       Assert.assertSame(pkey.getRoot().getChildAt(1), childOfRootPKNode);
+
+    }
+
+    /**
+     * when : loading a non-lazy collection in a subgraph and loading the collection directly
+     * then : the object stored in the cache should be the same as the object in the sub-graph collection and
+     *        the object in the directly loaded collection
+     */
+    @Test
+    public void nonLazyCollectionLoadTest() {
+       // need to find an example of this
+    }
+
+    /**
+     * when : loading objects from a map
+     * then : the object stored in the cache should be the same
+     */
+    @Test
+    public void subGraphMapLoadTest() {
+
+       Language english = Language.getLanguageFromUuid(Language.uuidEnglish);
+        Language hindi = Language.getLanguageFromUuid(UUID.fromString("0a1d9d1d-135d-4575-b172-669b51673c39"));
+
+
+       // this call will load into the session cache the graph and update the objects in the sub-graph for a
+       // polytomous key
+       //      |- root : polytomous key node
+       //              |- question : KeyStatement
+       //              |- statement : KeyStatement
+
+       PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH3_INIT_STRATEGY),PolytomousKey.class);
+
+
+       Map<Language, LanguageString> labelMap = pkey.getRoot().getStatement().getLabel();
+       Set<Language> languages = labelMap.keySet();
+       Iterator<Language> languagesItr = languages.iterator();
+       while(languagesItr.hasNext()) {
+               Language lang = languagesItr.next();
+               if(lang.equals(english)) {
+                       Assert.assertSame(lang, english);
+               }
+               if(lang.equals(hindi)) {
+                       Assert.assertSame(lang, hindi);
+               }
+               Assert.assertSame(lang, cacher.getFromCache(lang));
+       }
+    }
+
+    /**
+     * when : loading a non-lazy map in a subgraph and loading the map directly
+     * then : the object stored in the cache should be the same as the object in the sub-graph map and
+     *        the object in the directly loaded map
+     */
+    @Test
+    public void nonLazyMapLoadTest() {
+       // need to find an example of this
+    }
+
+
+
+}
index 0dc9065267426971ed1f9a6f79b42a9dd61050a6..982e8cee3ba46fccd7e8aae66cf70deebfb23b62 100644 (file)
@@ -1,16 +1,18 @@
 package eu.etaxonomy.taxeditor.application.menu.general;\r
 \r
 import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Ignore;\r
 import org.junit.Test;\r
 \r
 import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
 \r
 /**\r
  * Open all "General -> New" menus\r
- * \r
+ *\r
  * @author n.hoffmann\r
  *\r
  */\r
+@Ignore\r
 public class NewMenuTest extends AbstractEditorTest {\r
 \r
        @Test\r
@@ -18,42 +20,42 @@ public class NewMenuTest extends AbstractEditorTest {
                openNewWizardFor("Taxon");\r
                utils.cancel();\r
        }\r
-       \r
+\r
 \r
        @Test\r
        public void canOpenNewWizardForReference(){\r
                openNewWizardFor("Reference");\r
                utils.cancel();\r
        }\r
-       \r
-       \r
+\r
+\r
        @Test\r
        public void canOpenNewWizardForName(){\r
                openNewWizardFor("Name");\r
                utils.cancel();\r
        }\r
-       \r
-       \r
+\r
+\r
        @Test\r
        public void canOpenNewWizardForTeam(){\r
                openNewWizardFor("Team");\r
                utils.cancel();\r
        }\r
-       \r
-       \r
+\r
+\r
        @Test\r
        public void canOpenNewWizardForPerson(){\r
                openNewWizardFor("Person");\r
                utils.cancel();\r
        }\r
-       \r
+\r
        @Test\r
        public void canOpenNewWizardForSpecimen(){\r
                openNewWizardFor("Specimen");\r
                utils.cancel();\r
        }\r
-       \r
-       \r
+\r
+\r
        @Test\r
        public void canOpenNewWizardForClassification(){\r
                openNewWizardFor("Classification");\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/BaseRemotingTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/BaseRemotingTest.java
new file mode 100644 (file)
index 0000000..694d80e
--- /dev/null
@@ -0,0 +1,243 @@
+/**
+ * Copyright (C) 2014 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.httpinvoker;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
+
+import net.sf.ehcache.CacheManager;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.osgi.framework.Bundle;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.context.SecurityContextImpl;
+import org.unitils.UnitilsJUnit4;
+import org.unitils.database.DatabaseUnitils;
+import org.unitils.database.annotations.Transactional;
+import org.unitils.database.util.TransactionMode;
+import org.unitils.spring.annotation.SpringApplicationContext;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmDataChangeService;
+import eu.etaxonomy.cdm.api.cache.CdmServiceCacher;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmRemoteCacheManager;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher;
+import eu.etaxonomy.taxeditor.remoting.source.CdmPersistentRemoteSource;
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSourceException;
+import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
+import eu.etaxonomy.taxeditor.session.CdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
+
+
+/**
+ * Base class for remoting tests, responsible for
+ * - starting / stop the cdm server
+ * - running some basic connection tests
+ * - setting up the remote configuration.
+ *
+ */
+@Transactional(TransactionMode.DISABLED)
+@SpringApplicationContext("file:./target/classes/eu/etaxonomy/cdm/testRemotingApplicationContext.xml")
+public abstract class BaseRemotingTest extends UnitilsJUnit4 {
+    private static final Logger logger = Logger.getLogger(BaseRemotingTest.class);
+
+
+    public static final Resource SERVER_PROPERTIES_FILE =
+            new ClassPathResource("server.properties");
+
+    private static ICdmRemoteSource cdmRemoteSource;
+    private static CdmPersistentRemoteSource remotePersistentSource;
+
+    public static boolean useManagedServer = true;
+
+
+    protected static ICdmEntitySessionManager cdmEntitySessionManager;
+
+    private final static String DEFAULT_USER = "admin";
+    private final static String DEFAULT_PASSWORD = "00000";
+
+    private static String userHomeKey = "user.home";
+
+    private static String user = DEFAULT_USER;
+    private static String password = DEFAULT_PASSWORD;
+
+    protected static CDMServer cdmServer;
+
+    @BeforeClass
+    public static void initializeBaseRemotingTest() {
+
+        DatabaseUnitils.disableConstraints();
+
+        try {
+            String userHomeDirPath;
+            Bundle bundle = Platform.getBundle("eu.etaxonomy.taxeditor.test");
+
+            URL userHomeDirURL = bundle.getEntry("src/test/resources");
+            File userHomeDir = new File(FileLocator.resolve(userHomeDirURL).toURI());
+            userHomeDirPath = userHomeDir.getAbsolutePath();
+
+            URL serverPropertiesURL = bundle.getEntry("src/test/resources/server.properties");
+            File serverPropertiesFile = new File(FileLocator.resolve(serverPropertiesURL).toURI());
+            InputStream inputStream = new FileInputStream(serverPropertiesFile);
+
+            Properties prop = new Properties();
+            if (inputStream != null) {
+                prop.load(inputStream);
+                inputStream.close();
+            }
+
+            logger.info("Setting user.home to " + userHomeDirPath);
+            System.setProperty(userHomeKey, userHomeDirPath);
+
+
+            cdmServer = new CDMServer("cdmTest", serverPropertiesURL);
+
+
+            if(prop.getProperty("user") != null) {
+                user = prop.getProperty("user");
+            }
+
+            if(prop.getProperty("password") != null) {
+                password = prop.getProperty("password");
+            }
+
+            initializeController(cdmServer.getName(),
+                    cdmServer.getHost(),
+                    cdmServer.getPort(),
+                    cdmServer.getContextPath(),
+                    NomenclaturalCode.ICNAFP,
+                    user,
+                    password);
+        } catch (Exception e) {
+            e.printStackTrace();
+           // Assert.fail("Server failed to start. Reason : " + e.getMessage());
+        }
+
+        logger.info("Emptying all caches (except model cache) ");
+        //emptyAllCachesExceptModelCache();
+    }
+
+    public static void emptyAllCachesExceptModelCache() {
+        CacheManager cm = CacheManager.create();
+        String[] cacheNames = CacheManager.create().getCacheNames();
+        for(String cacheName : cacheNames) {
+            if(!cacheName.equals(CdmRemoteCacheManager.CDM_MODEL_CACHE_NAME)) {
+                cm.removeCache(cacheName);
+            }
+        }
+    }
+
+
+    public static void initializeController(String sourceName, String host, int port, String contextPath, NomenclaturalCode ncode, String username, String password) {
+
+        if(CdmApplicationState.getCurrentAppConfig() != null) {
+            return;
+        }
+        cdmRemoteSource = CdmRemoteSource.NewInstance(sourceName, host, port, contextPath, ncode);
+        CdmApplicationRemoteController remoteApplicationController =
+                CdmApplicationRemoteController.NewInstance(cdmRemoteSource,
+                        null,
+                        null);
+        CdmApplicationState.setCurrentAppConfig(remoteApplicationController);
+        CdmApplicationState.setCdmServiceCacher(new CdmServiceCacher());
+        try {
+            remotePersistentSource = CdmPersistentRemoteSource.NewInstance(sourceName);
+        } catch (CdmRemoteSourceException e) {
+            Assert.fail("Default Remote Persistent Source failed to load. Reason : " + e.getMessage());
+        }
+        cdmEntitySessionManager = getRemoteApplicationController().getCdmEntitySessionManager();
+
+        CdmApplicationState.setCurrentDataChangeService(new CdmDataChangeService());
+
+        //FIXME:Remoting the authentication code should be replaced by a method call which actually
+        // does the authentication in the editor code so that the 'real' authentication can be tested
+        SecurityContextHolder.clearContext();
+        SecurityContextImpl sc = new SecurityContextImpl();
+        Authentication token = new UsernamePasswordAuthenticationToken(username,password);
+        Authentication authentication = getRemoteApplicationController().getAuthenticationManager().authenticate(token);
+        authentication = new UsernamePasswordAuthenticationToken(username,password, authentication.getAuthorities());
+        sc.setAuthentication(authentication);
+
+        SecurityContextHolder.setContext(sc);
+        CdmApplicationState.setCurrentSecurityContext(SecurityContextHolder.getContext());
+    }
+
+
+
+    protected static CdmApplicationRemoteController getRemoteApplicationController() {
+        return (CdmApplicationRemoteController) CdmApplicationState.getCurrentAppConfig();
+    }
+
+    protected static ICdmRemoteSource getCdmRemoteSource() {
+        return cdmRemoteSource;
+    }
+
+    protected static CdmPersistentRemoteSource getCdmPersistentRemoteSource() {
+        return remotePersistentSource;
+    }
+
+    protected static ICdmEntitySessionManager getCdmEntitySessionManager() {
+        return cdmEntitySessionManager;
+    }
+
+
+    protected static CdmEntitySession getSession(ICdmEntitySessionEnabled sessionOwner) {
+        Map<ICdmEntitySessionEnabled, CdmEntitySession> ownerSessionMap =
+                (Map<ICdmEntitySessionEnabled, CdmEntitySession>) getFieldValueViaReflection(cdmEntitySessionManager, "ownerSessionMap");
+        return ownerSessionMap.get(sessionOwner);
+    }
+
+    protected static CdmEntitySession getActiveSession() {
+        return (CdmEntitySession) getFieldValueViaReflection(cdmEntitySessionManager, "activeSession");
+    }
+
+    protected static CdmTransientEntityCacher getCacher(ICdmEntitySessionEnabled sessionOwner) {
+        return (CdmTransientEntityCacher) getFieldValueViaReflection(getSession(sessionOwner), "cdmTransientEntityCacher");
+    }
+
+
+    protected static Object getFieldValueViaReflection(Object object, String fieldName) {
+        Class<?> clazz = object.getClass();
+        try {
+            Field field = clazz.getDeclaredField(fieldName);
+            field.setAccessible(true);
+            return field.get(object);
+        } catch (NoSuchFieldException e) {
+            e.printStackTrace();
+        } catch (SecurityException e) {
+            e.printStackTrace();
+        } catch (IllegalArgumentException e) {
+            e.printStackTrace();
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CDMServer.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CDMServer.java
new file mode 100644 (file)
index 0000000..2453912
--- /dev/null
@@ -0,0 +1,401 @@
+// $Id$
+/**
+ * Copyright (C) 2014 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.httpinvoker;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Properties;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+import javax.sql.DataSource;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.FileLocator;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.unitils.database.annotations.TestDataSource;
+
+import eu.etaxonomy.cdm.database.CdmPersistentDataSource;
+import eu.etaxonomy.cdm.database.ICdmDataSource;
+import eu.etaxonomy.taxeditor.remoting.server.CDMServerException;
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSourceBase;
+
+/**
+ *
+ * (Singleton) Server instance which manages a compatible cdmlib-webapp-war.
+ * This is done by launching a jetty instance (using jetty-runner) as an
+ * executed process. The choice of the external process over a more
+ * preferable 'embedded jetty' instance is due to problems arising from the
+ * class loading of classes (e.g. from hibernate core) which are needed
+ * for both the webapp as well as the remoting client.
+ *
+ * @author cmathew
+ * @date 23 Sep 2014
+ *
+ */
+
+public class CDMServer {
+
+    public static final Logger logger = Logger.getLogger(CDMServer.class);
+
+    @TestDataSource
+    protected DataSource dataSource;
+
+    private final String name = "default";
+    private final String host = "127.0.0.1";
+    private int httpPort = 9090;
+    private int stopPort = 9191;
+    private String stopKey = "jetty-cdm-server";
+    private final String contextPath = "";
+
+    public static final Resource DEFAULT_CDM_WEBAPP_RESOURCE =
+            new ClassPathResource("/etc/jetty/cdmlib-remote-webapp.war");
+
+    public static final Resource DEFAULT_DATASOURCE_FILE =
+            new ClassPathResource("datasources.xml");
+
+    public static final Resource DEFAULT_JETTY_RUNNER_RESOURCE =
+            new ClassPathResource("/etc/jetty/jetty-runner-9.2.3.v20140905.jar");
+
+    public static final Resource DEFAULT_JETTY_RESOURCE =
+            new ClassPathResource("/etc/jetty/start-9.2.3.v20140905.jar");
+
+    private static CDMServer cdmServer = null;
+    private static CDMServerException cdmse = null;
+
+    private boolean serverAlreadyRunning = false;
+
+    private File dataSourcesFile;
+    private final String dataSourceName;
+
+    public CDMServer(String dataSourceName, URL serverPropertiesURL) throws CDMServerException {
+        this.dataSourceName = dataSourceName;
+        Properties prop = new Properties();
+
+        try {
+            File serverPropertiesFile = new File(FileLocator.resolve(serverPropertiesURL).toURI());
+            InputStream inputStream = new FileInputStream(serverPropertiesFile);
+
+            prop.load(inputStream);
+            inputStream.close();
+
+        } catch (FileNotFoundException e) {
+            throw new CDMServerException(e);
+        } catch (URISyntaxException e) {
+            throw new CDMServerException(e);
+        } catch (IOException e) {
+            throw new CDMServerException(e);
+        }
+
+
+
+        if(prop.getProperty("httpPort") != null) {
+            setHttpPort(Integer.valueOf(prop.getProperty("httpPort")));
+        }
+
+        if(prop.getProperty("stopPort") != null) {
+            setStopPort(Integer.valueOf(prop.getProperty("stopPort")));
+        }
+
+        if(prop.getProperty("stopKey") != null) {
+            setStopKey(prop.getProperty("stopKey"));
+        }
+
+    }
+
+
+
+    public String getName() {
+        return name;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public int getPort() {
+        return httpPort;
+    }
+
+    public String getContextPath() {
+        return contextPath;
+    }
+
+    public void setHttpPort(int port) {
+        this.httpPort = port;
+    }
+
+    public void setStopPort(int stopPort) {
+        this.stopPort = stopPort;
+    }
+
+    public void setStopKey(String stopKey) {
+        this.stopKey = stopKey;
+    }
+
+
+    public static boolean isRunningInEclipse() {
+        return (System.getProperty("sun.java.command") != null &&
+                System.getProperty("sun.java.command").startsWith("org.eclipse.jdt.internal.junit.runner.RemoteTestRunner"));
+    }
+
+    private String getVMArgs() throws IOException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(" -Dspring.profiles.active=remoting");
+        sb.append(" -Dcdm.beanDefinitionFile=" + DEFAULT_DATASOURCE_FILE.getFile().getAbsolutePath());
+        sb.append(" -Dcdm.datasource=cdmTest");
+        return sb.toString();
+    }
+
+    private String getStartServerArgs() throws IOException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(" --port " + httpPort);
+        return sb.toString();
+    }
+
+    private String getStopServerSettings() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(" --stop-port ");
+        sb.append(stopPort);
+        sb.append(" --stop-key ");
+        sb.append(stopKey);
+        return sb.toString();
+    }
+
+    private String getStopServerArgs() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(" STOP.PORT=");
+        sb.append(stopPort);
+        sb.append(" STOP.KEY=");
+        sb.append(stopKey);
+        return sb.toString();
+    }
+
+
+    public void start() throws CDMServerException {
+
+        /**
+         * First check if the CDM server responds to a service request, which implies that
+         * the server has started properly. If no response is received then check if the
+         * server is listening on specific host / port, which implies that the server
+         * has started but incorrectly, in which case we try to force stop it (if we can)
+         * and start a new server.
+         */
+        if(isStarted(1)) {
+            logger.info("[CDM-Server] Server already running @ " + host + ":" + httpPort );
+            serverAlreadyRunning = true;
+            return;
+        }
+
+        Thread t = new Thread() {
+            @Override
+            public void run() {
+
+                StringBuffer output = new StringBuffer();
+                try{
+                    Process p;
+                    String command = "java "
+                            + getVMArgs()
+                            + " -jar "
+                            + DEFAULT_JETTY_RUNNER_RESOURCE.getFile().getAbsolutePath()
+                            + getStartServerArgs()
+                            + getStopServerSettings()
+                            + " "
+                            + DEFAULT_CDM_WEBAPP_RESOURCE.getFile().getAbsolutePath();
+                    logger.info("[CDM-Server] Starting server with Command : " + command);
+                    p = Runtime.getRuntime().exec(command);
+
+                    BufferedReader inpReader =
+                            new BufferedReader(new InputStreamReader(p.getInputStream()));
+
+                    BufferedReader errReader =
+                            new BufferedReader(new InputStreamReader(p.getErrorStream()));
+
+                    String line = "";
+                    while ((line = inpReader.readLine())!= null) {
+                        logger.info("[CDM-Server Start] : " + line);
+                    }
+
+                    while ((line = errReader.readLine())!= null) {
+                        logger.info("[CDM-Server Start] : " + line);
+                    }
+
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    cdmse = new CDMServerException(e);
+                }
+            }
+        };
+
+        t.setDaemon(true);
+        cdmse = null;
+        t.start();
+
+        if(isStarted(50)) {
+            logger.info("[CDM-Server] Server running @ " + host + ":" + httpPort );
+        } else {
+            logger.info("[CDM-Server] Server not started within given interval");
+            // making sure to kill server if it is not started correctly
+            try {
+                stop(true);
+            } catch (Exception e) {
+                throw new CDMServerException("CDM Server could not be stopped : " + e.getMessage());
+            }
+            throw new CDMServerException("CDM Server not started : ");
+        }
+
+    }
+
+
+    public boolean isStarted(int checkingIntervals) throws CDMServerException  {
+        CdmRemoteSourceBase crsb = new CdmRemoteSourceBase("local-cdm-server",
+                host,
+                httpPort,
+                contextPath,
+                null);
+        int intervalsCount = 0;
+        do {
+            try {
+                if(cdmse != null) {
+                    return false;
+                }
+                boolean check = crsb.checkConnection();
+                if(check) {
+                    logger.info("[CDM-Server] Running @ " + host + ":" + httpPort );
+                    return true;
+                }
+            } catch (Exception e) {
+
+            }
+            try {
+                Thread.sleep(1000);
+            } catch (InterruptedException ie) {
+                throw new CDMServerException("Error checking CDM Server status", ie);
+            }
+            intervalsCount++;
+        } while (intervalsCount < checkingIntervals);
+        return false;
+    }
+
+    public void stop() throws Exception {
+        stop(false);
+    }
+
+    public void stop(boolean force) throws Exception {
+
+        if(!force) {
+            if(!cdmServer.isStarted(1)) {
+                logger.info("[CDM-Server] Server already stopped @ " + host + ":" + httpPort );
+                return;
+            }
+        }
+
+        if(serverAlreadyRunning) {
+            return;
+        }
+        Thread t = new Thread() {
+            @Override
+            public void run() {
+                StringBuffer output = new StringBuffer();
+                try{
+                    Process p;
+                    String command = "java -jar " + DEFAULT_JETTY_RESOURCE.getFile().getAbsolutePath()
+                            + getStopServerArgs() + " --stop ";
+                    logger.info("[CDM-Server] Stop Command : " + command);
+                    p = Runtime.getRuntime().exec(command);
+
+                    BufferedReader inpReader =
+                            new BufferedReader(new InputStreamReader(p.getInputStream()));
+
+                    BufferedReader errReader =
+                            new BufferedReader(new InputStreamReader(p.getErrorStream()));
+
+                    String line = "";
+                    while ((line = inpReader.readLine())!= null) {
+                        logger.info("[CDM-Server Stop] : " + line);
+                    }
+
+                    while ((line = errReader.readLine())!= null) {
+                        logger.info("[CDM-Server Stop] : " + line);
+                    }
+                    logger.info("CDM-Server Stopped : ");
+                } catch (Exception e) {
+                    logger.info("[CDM-Server] Could not stop @ " + host + ":" + httpPort + ". Please kill it manually");
+
+                }
+
+            }
+        };
+
+        t.setDaemon(true);
+        t.start();
+
+    }
+
+    public static void stopServerViaJMX(int jmxPort) throws CDMServerException  {
+        String JMX_URL = "service:jmx:rmi:///jndi/rmi://localhost:" + jmxPort + "/jmxrmi";
+        logger.warn("Shutting down Jetty instance ... ");
+
+        try {
+            JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(JMX_URL), null);
+            connector.connect(null);
+            MBeanServerConnection connection = connector.getMBeanServerConnection();
+            ObjectName objectName = new ObjectName("org.eclipse.jetty.server:type=server,id=0");
+            connection.invoke(objectName, "stop", null, null);
+            logger.warn("Shutdown command sent");
+        } catch (InstanceNotFoundException e) {
+            throw new CDMServerException(e);
+        } catch (MBeanException e) {
+            throw new CDMServerException(e);
+        } catch (ReflectionException e) {
+            throw new CDMServerException(e);
+        } catch (IOException e) {
+            throw new CDMServerException(e);
+        } catch (MalformedObjectNameException e) {
+            throw new CDMServerException(e);
+        }
+    }
+
+    public void convertEditorToServerConfig() {
+        String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> " + System.lineSeparator() +
+                "<beans xmlns=\"http://www.springframework.org/schema/beans\"" + System.lineSeparator() +
+                "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + System.lineSeparator() +
+                "xmlns:tx=\"http://www.springframework.org/schema/tx\"" + System.lineSeparator() +
+                "xmlns:context=\"http://www.springframework.org/schema/context\"" + System.lineSeparator() +
+                "xsi:schemaLocation=\"http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" + System.lineSeparator() +
+                "http://www.springframework.org/schema/context   http://www.springframework.org/schema/context/spring-context-2.5.xsd" + System.lineSeparator() +
+                "http://www.springframework.org/schema/tx   http://www.springframework.org/schema/tx/spring-tx-2.5.xsd" + System.lineSeparator() +
+                ">" + System.lineSeparator() +
+                "<bean id=\"dataSourceProperties\" class=\"eu.etaxonomy.cdm.remote.config.DataSourceProperties\">" + System.lineSeparator() +
+                "   <property name=\"propsMap\">" + System.lineSeparator() +
+                "       <map/>" + System.lineSeparator() +
+                "   </property>" + System.lineSeparator() +
+                "</bean>";
+
+        for(ICdmDataSource dataSource : CdmPersistentDataSource.getAllDataSources()) {
+
+        }
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmPersistentRemoteSourceTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmPersistentRemoteSourceTest.java
new file mode 100644 (file)
index 0000000..97ec1d2
--- /dev/null
@@ -0,0 +1,216 @@
+/**
+ * Copyright (C) 2014 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.httpinvoker;
+
+
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import eu.etaxonomy.cdm.config.CdmPersistentSourceUtils;
+import eu.etaxonomy.cdm.config.CdmSourceException;
+import eu.etaxonomy.cdm.model.metadata.CdmMetaData.MetaDataPropertyName;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.taxeditor.remoting.source.CdmPersistentRemoteSource;
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSourceException;
+import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
+
+/**
+ * Class to test the cdm persistent source functionality, including
+ * initialising / saving / updating and deleting
+ *
+ * Corresponding test sources settings can be found at
+ * /src/text/resources/eu.etaxonomy.cdm/cdm.datasources.xml
+ *
+ */
+public class CdmPersistentRemoteSourceTest extends BaseRemotingTest {
+    private static final Logger logger = Logger.getLogger(CdmPersistentRemoteSourceTest.class);
+
+    private CdmPersistentRemoteSource remotePersistentSource;
+
+    @BeforeClass
+    public static void initialize() {
+    }
+
+    @Test
+    public void whenLoadingExistingCompleteRemoteSourceThenLoadIsSuccessful() {
+
+        remotePersistentSource = getCdmPersistentRemoteSource();
+
+        String expectedServer = "127.0.0.1";
+        String expectedPort = "9090";
+        String expectedContextPath = "";
+        logger.info("Default remote source server : " + remotePersistentSource.getServer());
+        Assert.assertTrue("Default server should be " + expectedServer,
+                expectedServer.equals(remotePersistentSource.getServer()));
+
+        logger.info("Default remote source port : " + remotePersistentSource.getPort());
+        Assert.assertTrue("Default port should be 9090",
+                expectedPort.equals(String.valueOf(remotePersistentSource.getPort())));
+
+        logger.info("Default remote source context path : " + remotePersistentSource.getContextPath());
+        Assert.assertTrue("Default remote source context path should be " + expectedContextPath,
+                expectedContextPath.equals(remotePersistentSource.getContextPath()));
+
+        logger.info("Default remote source nomenclatural code : " + remotePersistentSource.getNomenclaturalCode().toString());
+        Assert.assertTrue("Default NomenclaturalCode should be ICNAFP",
+                NomenclaturalCode.ICNAFP.equals(remotePersistentSource.getNomenclaturalCode()));
+    }
+
+
+
+
+    @Test
+    public void whenConnectingToAnActiveServerThenConnectSuccessfully() {
+        // check if active server throws the right exception
+
+        remotePersistentSource = getCdmPersistentRemoteSource();
+
+        String dbSchemaVersion = "";
+        try {
+            dbSchemaVersion = remotePersistentSource.getDbSchemaVersion();
+        } catch (CdmSourceException e) {
+            Assert.fail("getDbSchemaVersion() on active cdm server should not have thrown CdmSourceException");
+        }
+        logger.info("dbSchemaVersion is " + dbSchemaVersion);
+
+
+        boolean isDbEmpty = false;
+        try {
+            isDbEmpty = remotePersistentSource.isDbEmpty();
+        } catch (CdmSourceException e) {
+            Assert.fail("isDbEmpty() on active cdm server should not have thrown CdmSourceException");
+        }
+        Assert.assertFalse(isDbEmpty);
+
+
+        boolean check = false;
+        try {
+            check = remotePersistentSource.checkConnection();
+        } catch (CdmSourceException e) {
+            Assert.fail("checkConnection() on active cdm server should not have thrown CdmSourceException");
+        }
+        Assert.assertTrue(check);
+
+
+    }
+
+    @Test
+    public void whenRequestingMetadatFromRemoteSourceThenMetaDataIsRetrieved() {
+        try {
+            remotePersistentSource = getCdmPersistentRemoteSource();
+            Map<MetaDataPropertyName, String> cdmMetaDataMap = remotePersistentSource.getMetaDataMap();
+            for(MetaDataPropertyName mdpn : cdmMetaDataMap.keySet()) {
+                String value = cdmMetaDataMap.get(mdpn);
+                logger.info("MetaData Property " + mdpn.name() + " has value " + value);
+                Assert.assertNotNull("Meta Data Value for property for " + mdpn.name() + " should not be null", value);
+            }
+        } catch (CdmSourceException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+    @Test
+    public void whenLoadingNonExistingRemoteSourceThenThrowException() {
+        try {
+            remotePersistentSource = CdmPersistentRemoteSource.NewInstance("nonExistingSource");
+            Assert.fail("Initialising a non-existing remote source should throw an exception");
+        } catch (CdmRemoteSourceException e) {
+            logger.info(e.getMessage());
+        }
+    }
+
+    @Test
+    public void whenLoadingExistingIncompleteRemoteSourceThenThrowException() {
+        try {
+            remotePersistentSource = CdmPersistentRemoteSource.NewInstance("incomplete");
+            Assert.fail("Initialising an incomplete remote source should throw an exception");
+        } catch (CdmRemoteSourceException e) {
+            //Assert.assertThat(e.getMessage(), containsString("Required property '" + CdmSourceProperties.SERVER.toString() + "' is missing"));
+        }
+    }
+
+    @Test
+    public void whenSavingUpdatingDeletingNewCompleteRemoteSourceThenSaveUpdateDeleteIsSuccessful() {
+        String strRemoteSource = "local";
+        Assert.assertFalse("New remote source '" + strRemoteSource + "' should not yet exist in source settings file",
+                CdmPersistentRemoteSource.exists(strRemoteSource));
+        try {
+            ICdmRemoteSource remoteSource =
+                    CdmRemoteSource.NewInstance(strRemoteSource,
+                            "127.0.0.1",
+                            8080,
+                            "col",
+                            NomenclaturalCode.ICNAFP);
+            remotePersistentSource = CdmPersistentRemoteSource.save(strRemoteSource,remoteSource);
+
+            logger.info("Server : " + remotePersistentSource.getServer());
+            Assert.assertTrue("Server value should be equal",
+                    remoteSource.getServer().equals(remotePersistentSource.getServer()));
+
+            logger.info("Port : " + remotePersistentSource.getPort());
+            Assert.assertTrue("Port value should be equal",
+                    remoteSource.getPort() == remotePersistentSource.getPort());
+
+            logger.info("Context Path : " + remotePersistentSource.getContextPath());
+            Assert.assertTrue("Context Path value should be equal",
+                    remoteSource.getContextPath().equals(remotePersistentSource.getContextPath()));
+
+            logger.info("Nomenclatural Code : " + remotePersistentSource.getNomenclaturalCode().name());
+            Assert.assertTrue("Nomenclatural Code value should be equal",
+                    remoteSource.getNomenclaturalCode().name().equals(remotePersistentSource.getNomenclaturalCode().name()));
+
+            Assert.assertTrue("New remote source '" + strRemoteSource + "' should be saved in source settings file",
+                    CdmPersistentRemoteSource.exists(strRemoteSource));
+
+            remoteSource = CdmRemoteSource.NewInstance(strRemoteSource,
+                    "127.0.0.55",
+                    9090,
+                    "cyprus",
+                    NomenclaturalCode.ICNB);
+            remotePersistentSource = CdmPersistentRemoteSource.update(strRemoteSource,remoteSource);
+
+            logger.info("Server : " + remotePersistentSource.getServer());
+            Assert.assertTrue("Server value should be equal",
+                    remoteSource.getServer().equals(remotePersistentSource.getServer()));
+
+            logger.info("Port : " + remotePersistentSource.getPort());
+            Assert.assertTrue("Port value should be equal",
+                    remoteSource.getPort() == remotePersistentSource.getPort());
+
+            logger.info("Context Path : " + remotePersistentSource.getContextPath());
+            Assert.assertTrue("Context Path value should be equal",
+                    remoteSource.getContextPath().equals(remotePersistentSource.getContextPath()));
+
+            logger.info("Nomenclatural Code : " + remotePersistentSource.getNomenclaturalCode().name());
+            Assert.assertTrue("Nomenclatural Code value should be equal",
+                    remoteSource.getNomenclaturalCode().name().equals(remotePersistentSource.getNomenclaturalCode().name()));
+
+            Assert.assertTrue("New remote source '" + strRemoteSource + "' should be saved in source settings file",
+                    CdmPersistentRemoteSource.exists(strRemoteSource));
+
+            CdmPersistentSourceUtils.delete(remotePersistentSource);
+
+            Assert.assertFalse("New remote source '" + strRemoteSource + "' should no longer exist in source settings file",
+                    CdmPersistentRemoteSource.exists(strRemoteSource));
+
+        } catch (CdmRemoteSourceException e) {
+            Assert.fail("Saving a new complete remote source should not throw an exception");
+            logger.info(e.getMessage());
+        }
+    }
+
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmRemoteSourceTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmRemoteSourceTest.java
new file mode 100644 (file)
index 0000000..bf45575
--- /dev/null
@@ -0,0 +1,104 @@
+/**
+* Copyright (C) 2014 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.httpinvoker;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.remoting.RemoteAccessException;
+
+import eu.etaxonomy.cdm.config.CdmSourceException;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.taxeditor.lazyloading.RemotePersistentCollectionTest;
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
+
+public class CdmRemoteSourceTest extends BaseRemotingTest {
+       private static final Logger logger = Logger.getLogger(RemotePersistentCollectionTest.class);
+
+
+       @Test
+       public void whenConnectingToInactiveServerThenFailToConnect() {
+
+               // check if non-active server throws the right exception
+               CdmRemoteSource inactiveCrs = CdmRemoteSource.NewInstance(cdmServer.getName(),
+                       cdmServer.getHost(),
+                       808080,
+                       cdmServer.getContextPath(),
+                       NomenclaturalCode.ICNAFP);
+               try {
+                       inactiveCrs.getDbSchemaVersion();
+                       Assert.fail("getDbSchemaVersion() on inactive cdm server should have thrown RemoteAccessException");
+               } catch(CdmSourceException cse) {
+                       Assert.fail("getDbSchemaVersion() on inactive cdm server should have thrown RemoteAccessException and not CdmSourceException");
+               } catch(RemoteAccessException rae){
+
+               }
+
+               try {
+                       inactiveCrs.isDbEmpty();
+                       Assert.fail("isDbEmpty() on inactive cdm server should have thrown RemoteAccessException");
+               } catch(CdmSourceException cse) {
+                       Assert.fail("isDbEmpty() on inactive cdm server should have thrown RemoteAccessException and not CdmSourceException");
+               } catch(RemoteAccessException rae){
+
+               }
+
+               try {
+                       inactiveCrs.checkConnection();
+                       Assert.fail("checkConnection() on inactive cdm server should have thrown RemoteAccessException");
+               } catch(CdmSourceException cse) {
+                       Assert.fail("checkConnection() on inactive cdm server should have thrown RemoteAccessException and not CdmSourceException");
+               } catch(RemoteAccessException rae){
+
+               }
+
+       }
+
+       @Test
+       public void whenConnectingToAnActiveServerWithServicesBlockedThenFailToAccessServices() {
+
+       }
+
+       @Test
+       public void whenConnectingToAnActiveServerThenConnectSuccessfully() {
+               // check if active server throws the right exception
+               CdmRemoteSource activeCrs = CdmRemoteSource.NewInstance(cdmServer.getName(),
+                       cdmServer.getHost(),
+                       cdmServer.getPort(),
+                       cdmServer.getContextPath(),
+                NomenclaturalCode.ICNAFP);
+               String dbSchemaVersion = "";
+               try {
+                       dbSchemaVersion = activeCrs.getDbSchemaVersion();
+               } catch (CdmSourceException e) {
+                       Assert.fail("getDbSchemaVersion() on active cdm server should not have thrown CdmSourceException");
+               }
+               logger.info("dbSchemaVersion is " + dbSchemaVersion);
+
+
+               boolean isDbEmpty = false;
+               try {
+                       isDbEmpty = activeCrs.isDbEmpty();
+               } catch (CdmSourceException e) {
+                       Assert.fail("isDbEmpty() on active cdm server should not have thrown CdmSourceException");
+               }
+               Assert.assertFalse(isDbEmpty);
+
+
+               boolean check = true;
+               try {
+                       isDbEmpty = activeCrs.checkConnection();
+               } catch (CdmSourceException e) {
+                       Assert.fail("checkConnection() on active cdm server should not have thrown CdmSourceException");
+               }
+               Assert.assertTrue(check);
+
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmServerTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmServerTest.java
new file mode 100644 (file)
index 0000000..81f9dda
--- /dev/null
@@ -0,0 +1,47 @@
+// $Id$
+/**
+* Copyright (C) 2014 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.httpinvoker;
+
+import java.net.URL;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.Platform;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.unitils.UnitilsJUnit4;
+
+import eu.etaxonomy.taxeditor.remoting.server.CDMServerException;
+
+/**
+ * @author cmathew
+ * @date 6 Oct 2014
+ *
+ */
+public class CdmServerTest extends UnitilsJUnit4 {
+    private static final Logger logger = Logger.getLogger(CdmServerTest.class);
+
+    @Ignore // this should be targetting integration or production
+    @Test
+    public void startCdmServer() throws CDMServerException {
+        Bundle bundle = Platform.getBundle("eu.etaxonomy.taxeditor.test");
+        URL serverPropertiesURL = bundle.getEntry("src/test/resources/server.properties");
+        CDMServer cdmServer = new CDMServer("cdmTest", serverPropertiesURL);
+        cdmServer .start();
+        try {
+            cdmServer.stop(true);
+        } catch (Exception e) {
+            e.printStackTrace();
+            Assert.fail("Server could not be stopped. Reason : " + e.getMessage());
+        }
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/HttpInvokerServicesTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/HttpInvokerServicesTest.java
new file mode 100644 (file)
index 0000000..8338a27
--- /dev/null
@@ -0,0 +1,76 @@
+/**
+ * Copyright (C) 2014 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.httpinvoker;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.springframework.remoting.RemoteAccessException;
+import org.springframework.security.core.context.SecurityContext;
+import org.springframework.security.core.context.SecurityContextHolder;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.service.ITestService;
+import eu.etaxonomy.cdm.config.CdmSourceException;
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
+
+/**
+ * Class to test the HttpInvoker services exposed by the CDM Sever
+ *
+ */
+public class HttpInvokerServicesTest extends BaseRemotingTest {
+    private static final Logger logger = Logger.getLogger(HttpInvokerServicesTest.class);
+
+    ITestService testService =  getRemoteApplicationController().getTestService();
+
+    @Test
+    public void whenCallingMethodsOnRemoteServicesThenSucceed() {
+        try {
+
+            //getRemoteApplicationController().getDatabaseService();
+            String dbSchemaVersion = getRemoteApplicationController().getDatabaseService().getDbSchemaVersion();
+            logger.info("dbSchemaVersion is " + dbSchemaVersion);
+
+
+        } catch (CdmSourceException e) {
+            Assert.fail("pinging database service on active cdm server should not have thrown CdmSourceException");
+        }
+
+        getRemoteApplicationController().getPolytomousKeyService().list(PolytomousKey.class, null, null, null, null);
+
+    }
+
+    @Ignore
+    @Test
+    public void whenCallingMethodsOnRemoteServicesThenFailIfNotAuthenticated() {
+
+        SecurityContext context = SecurityContextHolder.getContext();
+
+        CdmApplicationState.setCurrentSecurityContext(null);
+        try {
+            getRemoteApplicationController().getPolytomousKeyService().list(PolytomousKey.class, null, null, null, null);
+            Assert.fail("service call should fail as it is not authenticated");
+        }catch (RemoteAccessException rae) {
+
+        }
+
+        CdmApplicationState.setCurrentSecurityContext(context);
+
+    }
+
+    // should be kept at ignore and only used for manual testing
+    // otherwise tests will take too much time
+    @Ignore
+    @Test
+    public void testDisableReadTimeout() throws InterruptedException  {
+        testService.waitFor((long) 120000.0);
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/RemotingSessionAwareTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/RemotingSessionAwareTest.java
new file mode 100644 (file)
index 0000000..2ef07d2
--- /dev/null
@@ -0,0 +1,51 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.httpinvoker;
+
+import org.apache.log4j.Logger;
+import org.junit.After;
+import org.junit.Before;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.MockSessionOwner;
+
+/**
+ * @author cmathew
+ * @date 12 Jun 2015
+ *
+ */
+public abstract class RemotingSessionAwareTest extends BaseRemotingTest {
+
+    private static final Logger logger = Logger.getLogger(RemotingSessionAwareTest.class);
+
+    protected CdmTransientEntityCacher cacher;
+    protected MockSessionOwner sessionOwner;
+
+
+    @Before
+    public void initializeSession() {
+
+        sessionOwner = new MockSessionOwner();
+        logger.info("created mock session owner : " + sessionOwner);
+        ICdmEntitySession cdmEntitySession = cdmEntitySessionManager.newSession(sessionOwner, true);
+        CdmApplicationState.getCurrentDataChangeService().register(sessionOwner);
+        sessionOwner.setCdmEntitySession(cdmEntitySession);
+        cacher = getCacher(sessionOwner);
+    }
+
+    @After
+    public void postSessionAwareTest() {
+        sessionOwner.dispose();
+        CdmApplicationState.getCurrentDataChangeService().unregister(sessionOwner);
+        logger.info("disposed of mock session owner : " + sessionOwner);
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.java
new file mode 100644 (file)
index 0000000..ee948ee
--- /dev/null
@@ -0,0 +1,215 @@
+/**
+ * Copyright (C) 2014 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.lazyloading;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.unitils.dbunit.annotation.DataSet;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
+import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.agent.Person;
+import eu.etaxonomy.cdm.model.agent.Team;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.name.BotanicalName;
+import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.taxon.Classification;
+import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.httpinvoker.BaseRemotingTest;
+
+
+
+
+/**
+ * Class to test the {@link CdmApplicationRemoteController}
+ *
+ */
+// FIXME:Remoting need to create a proper dataset for this test
+//       Could be combined with RemotePersistentCollectionTest
+@Ignore
+@DataSet
+public class AbstractLazyInitializerTest extends BaseRemotingTest {
+    private static final Logger logger = Logger.getLogger(AbstractLazyInitializerTest.class);
+
+    private static IClassificationService classificationService;
+    private static ITaxonService taxonService;
+
+    private static List<TaxonNode> taxonNodes;
+
+    private final UUID taxonUuid1 = UUID.fromString("8217ef77-2ab1-4318-bd67-ccd0cdef07c4");
+    private final UUID taxonUuid2 = UUID.fromString("ef96fafa-7750-4141-b31b-1ad1daab3e76");
+
+
+    @BeforeClass
+    public static void initializeRemoteLazyLoading() {
+
+        taxonService = getRemoteApplicationController().getTaxonService();
+        classificationService= getRemoteApplicationController().getClassificationService();
+        List<Classification> classifications = classificationService.listClassifications(1,0,null,null);
+        Assert.assertFalse(classifications.isEmpty());
+
+        Classification classification = classifications.get(0);
+        Assert.assertNotNull(classification);
+        taxonNodes = classificationService.getAllNodes();
+        Assert.assertFalse(taxonNodes.isEmpty());
+
+    }
+
+
+
+    @Test
+    public void testCDMEntityGet() {
+        //ITaxonService taxonService = getRemoteApplicationController().getTaxonService();
+        Iterator<TaxonNode> taxonNodeItr = taxonNodes.iterator();
+        int maxcount = 30;
+        int count = 0;
+        while(taxonNodeItr.hasNext() && count <= maxcount) {
+            TaxonNode taxonNode = taxonNodeItr.next();
+            Assert.assertNotNull(taxonNode);
+
+            Taxon taxon = taxonNode.getTaxon();
+            Assert.assertNotNull(taxon);
+
+            String taxonTitle = taxon.getTitleCache();
+            logger.info("Taxon : " + taxonTitle);
+
+            TaxonNameBase name = taxon.getName();
+            Assert.assertNotNull(name);
+
+            String nameTitle = name.getTitleCache();
+            logger.info("Taxon Name : " + nameTitle);
+
+            count++;
+        }
+    }
+
+    @Test
+    public void taxonReadTest() {
+        Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
+
+    }
+
+
+    @Test
+    public void testCDMEntitySave() {
+        Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
+        String oldTitleCache = taxon.getTitleCache();
+
+        System.out.println("Taxon title : " + oldTitleCache);
+
+        taxon.setTitleCache(oldTitleCache + ":updated", true);
+        taxonService.merge(taxon);
+
+        Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);
+        System.out.println("New Taxon Title : " + taxonNew.getTitleCache());
+
+        Assert.assertTrue("Title caches should not be equal",oldTitleCache.equals(taxonNew.getTitleCache()));
+
+
+        taxonNew.setTitleCache(oldTitleCache, true);
+        taxonService.merge(taxonNew);
+
+        Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
+        System.out.println("Old Taxon Title : " + taxonOld.getTitleCache());
+
+        Assert.assertEquals("Title caches should be equal",oldTitleCache,taxonOld.getTitleCache());
+
+    }
+
+
+        @Test
+        public void testCDMEntitySaveLazyNew() {
+            Team combAuthor = Team.NewInstance();
+            combAuthor.addTeamMember(Person.NewTitledInstance("test member"));
+            BotanicalName name = BotanicalName.NewInstance(null, "Test1", null, null, null, null, null, null, null);
+            name.setCombinationAuthorship(combAuthor);
+            Taxon tax1 = Taxon.NewInstance(name, null);
+            UUID taxonUuid1 = taxonService.save(tax1).getUuid();
+
+            Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
+
+            NonViralName nvn = CdmBase.deproxy(taxon.getName(),NonViralName.class);
+            String oldTitleCache = nvn.getTitleCache();
+            logger.info("Taxon Name Title : " + oldTitleCache);
+            nvn.setTitleCache(oldTitleCache + ":updated",false);
+            taxonService.update(taxon);
+
+            Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);
+            NonViralName nvnNew = CdmBase.deproxy(taxon.getName(),NonViralName.class);
+            logger.info("New Taxon Name Title : " + nvnNew.getTitleCache());
+
+            Assert.assertTrue("Title caches should not be equal",oldTitleCache.equals(nvnNew.getTitleCache()));
+
+            nvnNew.setTitleCache(oldTitleCache, true);
+            taxonService.update(taxon);
+
+            Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
+            NonViralName nvnOld = CdmBase.deproxy(taxon.getName(),NonViralName.class);
+            logger.info("Old Taxon Name Title : " + nvnNew.getTitleCache());
+
+            Assert.assertEquals("Title caches should be equal",oldTitleCache,nvnOld.getTitleCache());
+        }
+
+        @Ignore
+        @Test
+        public void testCDMEntitySaveCollection() {
+            Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
+
+            Set<SynonymRelationship> synRelations = taxon.getSynonymRelations();
+            Set<String> relToTitles = new HashSet<String>();
+            Iterator<SynonymRelationship> srItr = synRelations.iterator();
+            while(srItr.hasNext()) {
+                SynonymRelationship sr = srItr.next();
+                System.out.println("Synonym Title Cache : " + sr.getSynonym().getTitleCache());
+                relToTitles.add(sr.getSynonym().getTitleCache());
+                sr.getSynonym().setTitleCache(sr.getSynonym().getTitleCache() + ":updated");
+
+            }
+            taxonService.merge(taxon);
+
+            Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);
+            Set<SynonymRelationship> synRelationsNew = taxonNew.getSynonymRelations();
+
+            Iterator<SynonymRelationship> srItrNew = synRelationsNew.iterator();
+            Iterator<String> relToTitlesItr = relToTitles.iterator();
+            while(srItrNew.hasNext() && relToTitlesItr.hasNext()) {
+                SynonymRelationship srNew = srItrNew.next();
+                String relToTitle = relToTitlesItr.next();
+                System.out.println("New Synonym Title Cache: " + srNew.getSynonym().getTitleCache());
+                Assert.assertTrue("Synonym Title caches should not be equal", srNew.getSynonym().getTitleCache().equals(relToTitle));
+                srNew.getSynonym().setTitleCache(relToTitle);
+            }
+
+            Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
+
+            Set<SynonymRelationship> synRelationsOld = taxonNew.getSynonymRelations();
+            Iterator<SynonymRelationship> srItrOld = synRelationsOld.iterator();
+            relToTitlesItr = relToTitles.iterator();
+            while(srItrOld.hasNext() && relToTitlesItr.hasNext()) {
+                SynonymRelationship srOld = srItrOld.next();
+                String relToTitle = relToTitlesItr.next();
+                System.out.println("New Synonym Title Cache: " + srOld.getSynonym().getTitleCache());
+                Assert.assertEquals("Synonym Title caches should be equal", srOld.getSynonym().getTitleCache(), relToTitle);
+
+            }
+        }
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/CdmServiceCacherTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/CdmServiceCacherTest.java
new file mode 100644 (file)
index 0000000..b81692e
--- /dev/null
@@ -0,0 +1,32 @@
+package eu.etaxonomy.taxeditor.lazyloading;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+import org.junit.Test;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.cache.CdmServiceCacher;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.taxeditor.httpinvoker.RemotingSessionAwareTest;
+
+
+public class CdmServiceCacherTest extends RemotingSessionAwareTest {
+       private static final Logger logger = Logger.getLogger(CdmServiceCacherTest.class);
+
+
+       private static CdmServiceCacher cdmServiceCacher = CdmApplicationState.getCdmServiceCacher();
+
+       @Test
+       public void testLanguageCache() {
+               Language defaultLanguage = Language.getDefaultLanguage();
+
+               Language defaultLanguageInCache = (Language)cdmServiceCacher.getFromCache(defaultLanguage.getUuid());
+               Assert.assertEquals("Loaded Language Term should match Language Term in Cache",defaultLanguage,defaultLanguageInCache);
+
+               Language language = Language.getLanguageFromUuid(Language.uuidFrench);
+               Language languageInCache = (Language)cdmServiceCacher.getFromCache(language.getUuid());
+               Assert.assertEquals("Loaded Language Term should match Language Term in Cache",language,languageInCache);
+
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/PropertyPathsTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/PropertyPathsTest.java
new file mode 100644 (file)
index 0000000..6cdb5c3
--- /dev/null
@@ -0,0 +1,78 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.lazyloading;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.taxon.Synonym;
+import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.taxeditor.httpinvoker.BaseRemotingTest;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * This test class is primarily for performance testing.
+ * It should be used to make read-only calls to the target cdm-server.
+ *
+ * @author cmathew
+ * @date 26 Aug 2015
+ *
+ */
+//FIXME:Remoting ignoring until we can target integration servers
+@Ignore
+public class PropertyPathsTest extends BaseRemotingTest {
+
+    @Test
+    public void taxonLoadTest() {
+        // load taxon Crepis from cichorieae
+        UUID taxonBaseUuid = UUID.fromString("d0ae2121-1c32-4737-8c49-f871d429fd90");
+        List<String> taxonBasePropertyPaths = Arrays.asList(new String[] {
+                "synonymRelations.synonym.name.status.type",
+                "name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.relatedFrom.name.status"
+        });
+        TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).load(taxonBaseUuid, taxonBasePropertyPaths);
+        Taxon taxon = CdmBase.deproxy(taxonBase, Taxon.class);
+        Set<SynonymRelationship> synonymRelations = taxon.getSynonymRelations();
+        for(SynonymRelationship rel : synonymRelations) {
+            rel.getSynonym().getName().getStatus().size();
+        }
+        Set<TaxonNameBase> typifiedNames = taxon.getName().getHomotypicalGroup().getTypifiedNames();
+        for(TaxonNameBase name : typifiedNames) {
+            Set<TaxonBase> taxonBases = name.getTaxonBases();
+            for(TaxonBase tb : taxonBases) {
+                if(tb instanceof Synonym) {
+                    Synonym syn = CdmBase.deproxy(tb, Synonym.class);
+                    Set<SynonymRelationship> rels = syn.getSynonymRelations();
+                    for(SynonymRelationship rel : rels) {
+                        rel.getSynonym().getName().getStatus().size();
+                    }
+                }
+                if(tb instanceof Taxon) {
+                    Taxon syn = CdmBase.deproxy(tb, Taxon.class);
+                    Set<SynonymRelationship> rels = syn.getSynonymRelations();
+                    for(SynonymRelationship rel : rels) {
+                        rel.getSynonym().getName().getStatus().size();
+                    }
+                }
+            }
+        }
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemoteLazyLoadingTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemoteLazyLoadingTest.java
new file mode 100644 (file)
index 0000000..5a63680
--- /dev/null
@@ -0,0 +1,276 @@
+/**
+ * Copyright (C) 2014 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.lazyloading;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.agent.Person;
+import eu.etaxonomy.cdm.model.agent.Team;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.name.BotanicalName;
+import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.httpinvoker.BaseRemotingTest;
+
+
+
+/**
+ * Test class which tests remoting for persistent cdm entities.
+ *
+ * FIXME:Remoting saving tests are ignored until the merge development is underway
+ * @author c.mathew
+ *
+ */
+//FIXME:Remoting need to create a proper dataset for this test
+//Could be combined with AbstractLazyInitializerTest
+@Ignore
+public class RemoteLazyLoadingTest extends BaseRemotingTest {
+
+    private static final Logger logger = Logger.getLogger(RemoteLazyLoadingTest.class);
+
+    private static IClassificationService classificationService;
+    private static ITaxonService taxonService;
+
+    private static List<TaxonNode> taxonNodes;
+
+    private final UUID taxonUuid1 = UUID.fromString("8217ef77-2ab1-4318-bd67-ccd0cdef07c4");
+    private final UUID taxonUuid2 = UUID.fromString("ef96fafa-7750-4141-b31b-1ad1daab3e76");
+
+
+    @BeforeClass
+    public static void initializeRemoteLazyLoading() {
+        taxonService = getRemoteApplicationController().getTaxonService();
+
+        classificationService= getRemoteApplicationController().getClassificationService();
+        //List<Classification> classifications = classificationService.listClassifications(1,0,null,null);
+//        Assert.assertFalse(classifications.isEmpty());
+//
+//        Classification classification = classifications.get(0);
+//        Assert.assertNotNull(classification);
+        taxonNodes = classificationService.getAllNodes();
+        Assert.assertFalse(taxonNodes.isEmpty());
+
+    }
+
+
+
+    @Test
+    public void testCDMEntityGet() {
+        Iterator<TaxonNode> taxonNodeItr = taxonNodes.iterator();
+        int maxcount = 30;
+        int count = 0;
+        while(taxonNodeItr.hasNext() && count <= maxcount) {
+            TaxonNode taxonNode = taxonNodeItr.next();
+            Assert.assertNotNull(taxonNode);
+
+            Taxon taxon = taxonNode.getTaxon();
+            Assert.assertNotNull(taxon);
+
+            String taxonTitle = taxon.getTitleCache();
+            logger.info("Taxon : " + taxonTitle);
+
+            TaxonNameBase name = taxon.getName();
+            Assert.assertNotNull(name);
+
+            String nameTitle = name.getTitleCache();
+            logger.info("Taxon Name : " + nameTitle);
+
+            count++;
+        }
+
+
+    }
+
+    @Test
+    public void test() {
+
+    }
+
+    @Test
+    public void testCDMEntitySaveEager() {
+        Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
+        String oldTitleCache = taxon.getTitleCache();
+
+        System.out.println("Taxon title : " + oldTitleCache);
+
+        taxon.setTitleCache(oldTitleCache + ":updated");
+        taxonService.merge(taxon);
+
+        Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);
+        System.out.println("New Taxon Title : " + taxonNew.getTitleCache());
+
+        Assert.assertTrue("Title caches should not be equal",oldTitleCache.equals(taxonNew.getTitleCache()));
+
+        taxonNew.setTitleCache(oldTitleCache);
+        taxonService.merge(taxonNew);
+
+        Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
+        System.out.println("Old Taxon Title : " + taxonOld.getTitleCache());
+
+        Assert.assertEquals("Title caches should be equal",oldTitleCache,taxonOld.getTitleCache());
+
+    }
+
+
+    @Test
+    public void testCDMEntityUpdate() {
+
+        Team combAuthor = Team.NewInstance();
+        combAuthor.addTeamMember(Person.NewTitledInstance("test member"));
+        BotanicalName name = BotanicalName.NewInstance(null, "Test1", null, null, null, null, null, null, null);
+        name.setCombinationAuthorship(combAuthor);
+        Taxon taxon = Taxon.NewInstance(name, null);
+        UUID taxonUuid = taxonService.save(taxon).getUuid();
+
+        //        Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
+        //        NonViralName nvn = CdmBase.deproxy(taxon.getName(),NonViralName.class);
+        //        String oldTitleCache = nvn.getTitleCache();
+        //        System.out.println("Taxon Name Title : " + oldTitleCache);
+        //        nvn.setTitleCache(oldTitleCache + ":updated", true);
+        //
+        //        taxon.setTitleCache(oldTitleCache + ":updated",true);
+        //        try {
+        //            taxonService.update(taxon);
+        //        } catch (LazyInitializationException lie) {
+        //            lie.printStackTrace();
+        //        }
+
+        List<String> TAXON_INIT_STRATEGY = Arrays.asList(new String[] {
+                "name"
+        });
+        Taxon taxonNew = (Taxon)taxonService.findTaxonByUuid(taxonUuid,TAXON_INIT_STRATEGY);
+        NonViralName nvn = CdmBase.deproxy(taxonNew.getName(),NonViralName.class);
+        Team team = CdmBase.deproxy(nvn.getCombinationAuthorship(),Team.class);
+        String oldTitleCache = nvn.getTitleCache();
+        System.out.println("Taxon Name Title : " + oldTitleCache);
+        nvn.setTitleCache(oldTitleCache + ":updated", true);
+        taxonService.update(taxonNew);
+
+    }
+
+
+    @Test
+    public void testCDMEntitySaveLazy() {
+        Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
+
+        NonViralName nvn = CdmBase.deproxy(taxon.getName(),NonViralName.class);
+        String oldTitleCache = nvn.getTitleCache();
+        System.out.println("Taxon Name Title : " + oldTitleCache);
+        nvn.setTitleCache(oldTitleCache + ":updated", true);
+        taxonService.update(taxon);
+
+        //             Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);
+        //             NonViralName nvnNew = CdmBase.deproxy(taxon.getName(),NonViralName.class);
+        //             System.out.println("New Taxon Name Title : " + nvnNew.getTitleCache());
+        //
+        //             Assert.assertNotEquals("Title caches should not be equal",oldTitleCache,nvnNew.getTitleCache());
+        //
+        //             nvnNew.setTitleCache(oldTitleCache, true);
+        //             taxonService.update(taxon);
+        //
+        //             Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
+        //             NonViralName nvnOld = CdmBase.deproxy(taxon.getName(),NonViralName.class);
+        //             System.out.println("Old Taxon Name Title : " + nvnNew.getTitleCache());
+        //
+        //             Assert.assertEquals("Title caches should be equal",oldTitleCache,nvnOld.getTitleCache());
+    }
+
+    @Test
+    public void testCDMEntitySaveLazyNew() {
+        Team combAuthor = Team.NewInstance();
+        combAuthor.addTeamMember(Person.NewTitledInstance("test member"));
+        BotanicalName name = BotanicalName.NewInstance(null, "Test1", null, null, null, null, null, null, null);
+        name.setCombinationAuthorship(combAuthor);
+        Taxon tax1 = Taxon.NewInstance(name, null);
+        UUID taxonUuid1 = taxonService.save(tax1).getUuid();
+
+        Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
+
+        NonViralName nvn = CdmBase.deproxy(taxon.getName(),NonViralName.class);
+        String oldTitleCache = nvn.getTitleCache();
+        logger.info("Taxon Name Title : " + oldTitleCache);
+        nvn.setTitleCache(oldTitleCache + ":updated",false);
+        taxonService.update(taxon);
+
+        Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);
+        NonViralName nvnNew = CdmBase.deproxy(taxon.getName(),NonViralName.class);
+        logger.info("New Taxon Name Title : " + nvnNew.getTitleCache());
+
+        Assert.assertTrue("Title caches should not be equal",oldTitleCache.equals(nvnNew.getTitleCache()));
+
+        nvnNew.setTitleCache(oldTitleCache, true);
+        taxonService.update(taxon);
+
+        Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
+        NonViralName nvnOld = CdmBase.deproxy(taxon.getName(),NonViralName.class);
+        logger.info("Old Taxon Name Title : " + nvnNew.getTitleCache());
+
+        Assert.assertEquals("Title caches should be equal",oldTitleCache,nvnOld.getTitleCache());
+    }
+    @Ignore
+    @Test
+    public void testCDMEntitySaveCollection() {
+        Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
+
+        Set<SynonymRelationship> synRelations = taxon.getSynonymRelations();
+        Set<String> relToTitles = new HashSet<String>();
+        Iterator<SynonymRelationship> srItr = synRelations.iterator();
+        while(srItr.hasNext()) {
+            SynonymRelationship sr = srItr.next();
+            System.out.println("Synonym Title Cache : " + sr.getSynonym().getTitleCache());
+            relToTitles.add(sr.getSynonym().getTitleCache());
+            sr.getSynonym().setTitleCache(sr.getSynonym().getTitleCache() + ":updated");
+
+        }
+        taxonService.merge(taxon);
+
+        Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);
+        Set<SynonymRelationship> synRelationsNew = taxonNew.getSynonymRelations();
+
+        Iterator<SynonymRelationship> srItrNew = synRelationsNew.iterator();
+        Iterator<String> relToTitlesItr = relToTitles.iterator();
+        while(srItrNew.hasNext() && relToTitlesItr.hasNext()) {
+            SynonymRelationship srNew = srItrNew.next();
+            String relToTitle = relToTitlesItr.next();
+            System.out.println("New Synonym Title Cache: " + srNew.getSynonym().getTitleCache());
+            Assert.assertTrue("Synonym Title caches should not be equal", srNew.getSynonym().getTitleCache().equals(relToTitle));
+            srNew.getSynonym().setTitleCache(relToTitle);
+        }
+
+        Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
+
+        Set<SynonymRelationship> synRelationsOld = taxonNew.getSynonymRelations();
+        Iterator<SynonymRelationship> srItrOld = synRelationsOld.iterator();
+        relToTitlesItr = relToTitles.iterator();
+        while(srItrOld.hasNext() && relToTitlesItr.hasNext()) {
+            SynonymRelationship srOld = srItrOld.next();
+            String relToTitle = relToTitlesItr.next();
+            System.out.println("New Synonym Title Cache: " + srOld.getSynonym().getTitleCache());
+            Assert.assertEquals("Synonym Title caches should be equal", srOld.getSynonym().getTitleCache(), relToTitle);
+
+        }
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemotePersistentCollectionTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemotePersistentCollectionTest.java
new file mode 100644 (file)
index 0000000..d1871f0
--- /dev/null
@@ -0,0 +1,224 @@
+/**
+* Copyright (C) 2014 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.lazyloading;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.cdm.api.service.ICommonService;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.common.LanguageString;
+import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
+import eu.etaxonomy.cdm.model.description.TaxonDescription;
+import eu.etaxonomy.cdm.model.description.TextData;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.httpinvoker.BaseRemotingTest;
+
+/**
+ * Test class which tests remoting for persistent collections.
+ *
+ * @author c.mathew
+ * @created 13.03.2014
+ */
+//FIXME:Remoting need to create a proper dataset for this test
+//Could be combined with AbstractLazyInitializerTest
+@Ignore
+public class RemotePersistentCollectionTest extends BaseRemotingTest {
+       private static final Logger logger = Logger.getLogger(RemotePersistentCollectionTest.class);
+
+       private static IClassificationService classificationService;
+       private static ICommonService commonService;
+
+       @BeforeClass
+       public static void initializeServices() {
+               classificationService = getRemoteApplicationController().getClassificationService();
+               commonService = getRemoteApplicationController().getCommonService();
+       }
+
+       /**
+        * Test method which checks remoting for persistent lists.
+        *
+        */
+       @Test
+       public void persistentListTest() {
+
+               List<TaxonNode> taxonNodes = classificationService.getAllNodes();
+               int size = taxonNodes.size();
+               logger.debug("classificationService.getAllNodes() size : " + size);
+               TaxonNode taxonNode = null;
+               if(size > 0) {
+                       Assert.assertFalse(taxonNodes.isEmpty());
+
+                       taxonNode = taxonNodes.get(0);
+                       Assert.assertNotNull(taxonNode);
+                       Assert.assertTrue(taxonNodes.contains(taxonNode));
+
+                       // get the list of child nodes, which will give a
+                       // proxy list which is not yet initialised
+                       List<TaxonNode> childNodes = taxonNode.getChildNodes();
+                       // this size call will first initialise the list locally by internally
+                       // calling the ICommonService.initializeCollection method and then
+                       // call size on the initialised list
+                       int childCount = childNodes.size();
+
+                       // this size call will initialise the list remotely and only return the
+                       // size of the list
+                       int remoteChildCount = commonService.size(taxonNode.getUuid(), "childNodes");
+                       Assert.assertEquals(childCount, remoteChildCount);
+
+                       String firstNodeTaxonTitle = taxonNode.getTaxon().getTitleCache();
+                       Assert.assertNotNull(firstNodeTaxonTitle);
+
+                       if(childCount > 0) {
+                               Assert.assertFalse(childNodes.isEmpty());
+                               // this get call will use the already initialised list to get the
+                               // 0th element
+                               TaxonNode localTaxonNode = childNodes.get(0);
+
+                               // this get call will initialise the list remotely and only return the
+                               // 0th element from the list
+                               TaxonNode remoteTaxonNode = (TaxonNode)commonService.get(taxonNode.getUuid(), "childNodes",0);
+
+                               // the locally and remotely retrieved taxon node should exist in the
+                               // (local and remote) child nodes list, should be not-null and should be equal to each other
+                               Assert.assertTrue(taxonNode.getChildNodes().contains(localTaxonNode));
+                               Assert.assertTrue(taxonNode.getChildNodes().contains(remoteTaxonNode));
+                               Assert.assertTrue(commonService.contains(taxonNode.getUuid(), "childNodes", localTaxonNode));
+                               Assert.assertTrue(commonService.contains(taxonNode.getUuid(), "childNodes", remoteTaxonNode));
+                               Assert.assertNotNull(remoteTaxonNode);
+                               Assert.assertNotNull(localTaxonNode);
+                               Assert.assertEquals(remoteTaxonNode,localTaxonNode);
+                       }
+               }
+       }
+
+//     @Test
+//     public void persistentSetTest() {
+//             List<Classification> classifications = classificationService.listClassifications(1,0,null,null);
+//             int size = classifications.size();
+//             if(size > 0) {
+//                     Assert.assertFalse(classifications.isEmpty());
+//
+//                     Classification classification = classifications.get(0);
+//                     Assert.assertNotNull(classification);
+//                     Assert.assertTrue(classifications.contains(classification));
+//
+//                     TaxonNode rootTaxonNode = classification.getRootNode();
+//                     // get the list of child nodes, which will give a
+//                     // proxy list which is not yet initialised
+//                     List<TaxonNode> childNodes = rootTaxonNode.getChildNodes();
+//
+//                     // this size call will initialise the list locally by internally
+//                     // calling the ICommonService.initializeCollection method
+//                     int childCount = childNodes.size();
+//
+//                     if(childCount > 0) {
+//                             Assert.assertFalse(childNodes.isEmpty());
+//
+//                             // this get call will use the already initialised list to get the
+//                             // 0th element
+//                             Taxon localTaxon = childNodes.get(0).getTaxon();
+//                             Assert.assertNotNull(localTaxon);
+//
+//                             TaxonNameBase taxonName = localTaxon.getName();
+//                             Assert.assertNotNull(taxonName);
+//
+//                             // get the list of taxa, which will give a
+//                             // proxy set which is not yet initialised
+//                             Set<Taxon> taxa = taxonName.getTaxonBases();
+//
+//                             // this size call will initialise the list locally by internally
+//                             // calling the ICommonService.initializeCollection method
+//                             int taxaCount = taxa.size();
+//                             Assert.assertNotEquals(taxaCount,-1);
+//
+//                             if(taxaCount > 0) {
+//                                     Assert.assertFalse(taxa.isEmpty());
+//                                     // the locally retrieved taxon should exist in the
+//                                     // (local and remote) taxon list and should be not-null
+//                                     Assert.assertTrue(taxa.contains(localTaxon));
+//                                     Assert.assertNotNull(localTaxon);
+//                                     Assert.assertTrue(commonService.contains((PersistentCollection)taxa, localTaxon));
+//                             }
+//                     }
+//             }
+//     }
+
+       @Test
+       public void persistentMapTest() {
+               List<TaxonNode> taxonNodes = classificationService.getAllNodes();
+               // calling iterator will initialise the collection
+               Iterator<TaxonNode> taxonNodesItr = taxonNodes.iterator();
+               while(taxonNodesItr.hasNext()) {
+                       TaxonNode taxonNode = taxonNodesItr.next();
+                       Taxon taxon = taxonNode.getTaxon();
+
+                       if(taxon != null) {
+                               Set<TaxonDescription> descriptions = taxon.getDescriptions();
+                               Iterator<TaxonDescription> descriptionsItr = descriptions.iterator();
+                               while(descriptionsItr.hasNext()) {
+                                       TaxonDescription desc = descriptionsItr.next();
+                                       if(desc != null) {
+                                               for (DescriptionElementBase element : desc.getElements()){
+                                                       if (element.isInstanceOf(TextData.class)){
+                                                               // usually a call to 'get' collections should not initialise the collection,
+                                                               // but the 'getMultilanguageText' call internally calls readSize on the collection
+                                                               // which triggers the initialisation
+                                                               Map<Language, LanguageString> multilanguagetextMap = ((TextData)element).getMultilanguageText();
+                                                               //boolean init = AbstractPersistentCollection.isInitialized(multilanguagetextMap);
+                                                               //Assert.assertTrue(init);
+
+                                                               if(!multilanguagetextMap.isEmpty()) {
+                                                                       // found a map whcih we can test!
+                                                                       logger.info("Found Non-empty multilanguagetextMap");
+                                                                       boolean empty = commonService.isEmpty(element.getUuid(), "multilanguageText");
+                                                                       Assert.assertFalse(empty);
+                                                                       // test retrieval of key set, which should already by initialised
+                                                                       Set<Language> langKeySet = multilanguagetextMap.keySet();
+                                                                       Iterator<Language> langKeySetItr = langKeySet.iterator();
+                                                                       while(langKeySetItr.hasNext()) {
+                                                                               Language key = langKeySetItr.next();
+                                                                               // testing 'containsKey' on locally initialised collection
+                                                                               boolean localContainsKey = multilanguagetextMap.containsKey(key);
+                                                                               Assert.assertTrue(localContainsKey);
+                                                                               // testing 'containsKey' on remotely initialised collection
+                                                                               boolean remoteContainsKey =
+                                                                                               commonService.containsKey(element.getUuid(), "multilanguageText", key);
+                                                                               Assert.assertTrue(remoteContainsKey);
+
+                                                                               LanguageString value = multilanguagetextMap.get(key);
+                                                                               // testing 'containsValue' on locally initialised collection
+                                                                               boolean localContainsValue = multilanguagetextMap.containsValue(value);
+                                                                               Assert.assertTrue(localContainsValue);
+                                                                               // testing 'containsValue' on remotely initialised collection
+                                                                               boolean remoteContainsValue =
+                                                                                               commonService.containsValue(element.getUuid(), "multilanguageText", value);
+                                                                               Assert.assertTrue(remoteContainsValue);
+
+                                                                       }
+                                                                       return;
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+}
index 6d4dac58c945cd11c6a03da2b499e8f444c74bdd..30894688668fbbf03557a7a9c2adc44bc2a75c85 100644 (file)
@@ -1,5 +1,5 @@
 /**\r
- * \r
+ *\r
  */\r
 package eu.etaxonomy.taxeditor.navigation.navigator.contextmenu;\r
 \r
@@ -7,6 +7,7 @@ import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;\r
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;\r
 import org.junit.Before;\r
+import org.junit.Ignore;\r
 import org.junit.Test;\r
 \r
 import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
@@ -16,18 +17,20 @@ import eu.etaxonomy.taxeditor.test.ContextMenuHelper;
  * @author n.hoffmann\r
  *\r
  */\r
+@Ignore\r
 public class ClassificationTest extends AbstractEditorTest {\r
 \r
        private SWTBotView navigatorView;\r
        private SWTBotTree tree;\r
 \r
-       @Before\r
+       @Override\r
+    @Before\r
        public void setup() {\r
                super.setup();\r
                navigatorView = utils.view("Taxon Navigator");\r
                tree = utils.tree(navigatorView.getWidget());\r
        }\r
-       \r
+\r
        @Test\r
        public void canDeleteClassification() throws Exception {\r
                tree.select(0);\r
@@ -35,7 +38,7 @@ public class ClassificationTest extends AbstractEditorTest {
                bot.waitUntil(Conditions.shellIsActive("Confirm Deletion"));\r
                utils.ok();\r
        }\r
-       \r
+\r
        @Test\r
        public void canCreateClassification() throws Exception {\r
                tree.setFocus();\r
index 1c09585e59be2c4430efb79702a1dacb86a46923..a1ac7615f6ef58f582b6190a36fea3275e0a797c 100644 (file)
@@ -1,5 +1,5 @@
 /**\r
- * \r
+ *\r
  */\r
 package eu.etaxonomy.taxeditor.newWizard;\r
 \r
@@ -7,6 +7,7 @@ import junit.framework.Assert;
 \r
 import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;\r
+import org.junit.Ignore;\r
 import org.junit.Test;\r
 \r
 import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
@@ -15,6 +16,7 @@ import eu.etaxonomy.taxeditor.test.AbstractEditorTest;
  * @author n.hoffmann\r
  *\r
  */\r
+@Ignore\r
 public class NewTaxonWizardTest extends AbstractEditorTest {\r
 \r
        @Override\r
@@ -23,14 +25,14 @@ public class NewTaxonWizardTest extends AbstractEditorTest {
                bot.menu("General").menu("New").menu("Taxon").click();\r
                bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
        }\r
-       \r
+\r
        @Test\r
        public void unalteredDialogCanNotBefinished() {\r
                boolean finishIsEnabled = bot.button("Finish").isEnabled();\r
                Assert.assertEquals(false, finishIsEnabled);\r
                utils.cancel();\r
        }\r
-       \r
+\r
        @Test\r
        public void canCreateNewTaxonMinimal(){\r
                utils.openFilteredSelection(0, "Choose a Classification");\r
@@ -44,12 +46,12 @@ public class NewTaxonWizardTest extends AbstractEditorTest {
                bot.textWithLabel("New Taxon").setText(newTaxonName);\r
                bot.waitUntil(Conditions.widgetIsEnabled(bot.button("Finish")));\r
                utils.finish();\r
-               \r
+\r
 //             bot.waitUntil(Conditions.waitForEditor(WithPartId.withPartId(MultiPageTaxonEditor.ID)));\r
 //             Assert.assertEquals(newTaxonName, bot.activeEditor().getTitle());\r
        }\r
-       \r
-       \r
 \r
-       \r
+\r
+\r
+\r
 }\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/BaseOperationTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/BaseOperationTest.java
new file mode 100644 (file)
index 0000000..ed284ab
--- /dev/null
@@ -0,0 +1,49 @@
+// $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.operation;
+
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.junit.Before;
+
+import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
+import eu.etaxonomy.taxeditor.httpinvoker.RemotingSessionAwareTest;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
+import eu.etaxonomy.taxeditor.test.MockConversationEnabled;
+
+/**
+ * @author n.hoffmann
+ * @created 15.04.2009
+ * @version 1.0
+ */
+public abstract class BaseOperationTest extends RemotingSessionAwareTest {
+
+       public static final IUndoContext undoContext = null;
+
+       public static final IProgressMonitor monitor = new NullProgressMonitor();
+       public static final IAdaptable info = null;
+       public static final IPostOperationEnabled postOperation = null;
+       public static final IConversationEnabled conversationEnabled = new MockConversationEnabled();
+       public static final ICdmEntitySessionEnabled cdmEntitySessionEnabled = null;
+
+       protected static AbstractOperation operation;
+
+       @Before
+       public void initializeOperations() {
+           RemotingCdmUpdateOperation.throwExceptions = true;
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/PolytomousKeyViewPartTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/PolytomousKeyViewPartTest.java
new file mode 100644 (file)
index 0000000..a44f3ab
--- /dev/null
@@ -0,0 +1,78 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.operation;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.unitils.dbunit.annotation.DataSet;
+
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.taxeditor.navigation.key.polytomous.operation.RemotingDeletePolytomousKeyOperation;
+import eu.etaxonomy.taxeditor.navigation.key.polytomous.operation.RemotingUpdatePolytomousKeyAllNodesOperation;
+
+/**
+ * @author cmathew
+ * @date 25 Jun 2015
+ *
+ */
+@DataSet
+public class PolytomousKeyViewPartTest extends BaseOperationTest {
+
+    IPolytomousKeyService polytomousKeyService = getRemoteApplicationController().getPolytomousKeyService();
+    private static UUID pkey1Uuid = UUID.fromString("f82cef88-5a9e-4917-9938-d08bda40836f");
+    private static UUID pkey2Uuid = UUID.fromString("a00ca7ec-b660-433c-bd14-596826ab2243");
+    private static UUID pkey3Uuid = UUID.fromString("197bc542-bf5b-4a52-aa66-c65df32c196b");
+
+    @Ignore // waiting for #3998 to be fixed
+    @Test
+    public void testDeletePolytomousKey() throws ExecutionException {
+        List<PolytomousKey> pKeysBeforeDelete = polytomousKeyService.list(PolytomousKey.class, null, null, null, null);
+        int initialCount = pKeysBeforeDelete.size();
+
+        List<PolytomousKey> keysToDelete = new ArrayList<PolytomousKey>();
+        keysToDelete.add(polytomousKeyService.load(pkey1Uuid));
+        keysToDelete.add(polytomousKeyService.load(pkey2Uuid));
+        keysToDelete.add(polytomousKeyService.load(pkey3Uuid));
+
+        List<UUID> uuids = new ArrayList<UUID>();
+        uuids.add(pkey1Uuid);
+        uuids.add(pkey2Uuid);
+        uuids.add(pkey3Uuid);
+
+        int keysToDeleteCount = keysToDelete.size();
+        operation = new RemotingDeletePolytomousKeyOperation(sessionOwner,
+                false,
+                uuids);
+        operation.execute(monitor, info);
+
+        List<PolytomousKey> pKeysAfterDelete = polytomousKeyService.list(PolytomousKey.class, null, null, null, null);
+        Assert.assertEquals(initialCount - keysToDeleteCount, pKeysAfterDelete.size());
+        for(PolytomousKey key : keysToDelete) {
+            Assert.assertFalse(pKeysAfterDelete.contains(key));
+        }
+
+    }
+
+    @Test
+    public void testUpdateAllNodes() throws ExecutionException {
+        operation = new RemotingUpdatePolytomousKeyAllNodesOperation(sessionOwner,
+                false,
+                pkey1Uuid);
+        operation.execute(monitor, info);
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperationTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperationTest.java
new file mode 100644 (file)
index 0000000..b583aa0
--- /dev/null
@@ -0,0 +1,177 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.operation;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.ExecutionException;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.unitils.dbunit.annotation.DataSet;
+
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.api.service.UpdateResult.Status;
+import eu.etaxonomy.cdm.api.service.dto.CdmEntityIdentifier;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.remoting.cache.ProxyUtils;
+import eu.etaxonomy.taxeditor.store.operations.RemotingTestUpdateOperation;
+
+/**
+ * @author cmathew
+ * @date 26 Jun 2015
+ *
+ */
+@DataSet
+public class RemotingCdmUpdateOperationTest extends BaseOperationTest {
+
+    private static final Logger logger = Logger.getLogger(RemotingCdmUpdateOperationTest.class);
+
+    private static ITaxonNodeService taxonNodeService = getRemoteApplicationController().getTaxonNodeService();
+
+    private static UUID taxonNodeUuid1;
+    private static UUID taxonNodeUuid2;
+    private static UUID taxonNodeUuid3;
+    private static UUID taxonNodeUuid4;
+    private static UUID taxonNodeUuid5;
+
+
+    private static Set<TaxonNode> taxonNodes;
+    private static Set<CdmEntityIdentifier> ceis;
+
+    @BeforeClass
+    public static void initializeUpdatedObjects() {
+        taxonNodeUuid1 = UUID.fromString("b85b5b78-6760-409f-ac91-bb89e95ff2a1");
+        taxonNodeUuid2 = UUID.fromString("6ad8e9e2-f5f6-41ad-aa30-f62a903650db");
+        taxonNodeUuid3 = UUID.fromString("91698cec-615f-4472-9002-feda1a6acded");
+        taxonNodeUuid4 = UUID.fromString("b8439f51-6b96-445a-b401-7a836ba1cf58");
+        taxonNodeUuid5 = UUID.fromString("629b3fd3f-29b4-4011-ab12-9c1ad1607dbd");
+
+    }
+
+    @Test
+    public void testUpdateResultWithCdmEntities() throws ExecutionException {
+        TaxonNode taxonNode1 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid1));
+        TaxonNode taxonNode2 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid2));
+        TaxonNode taxonNode3 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid3));
+        TaxonNode taxonNode4 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid4));
+        TaxonNode taxonNode5 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid5));
+
+        taxonNodes = new HashSet<TaxonNode>();
+        taxonNodes.add(taxonNode1);
+        taxonNodes.add(taxonNode2);
+        taxonNodes.add(taxonNode3);
+        taxonNodes.add(taxonNode4);
+        taxonNodes.add(taxonNode5);
+
+        UpdateResult result = new UpdateResult();
+        result.addUpdatedObjects(taxonNodes);
+        result.setStatus(Status.OK);
+
+        sessionOwner.setExpectedUpdatedObjects(taxonNodes);
+
+        operation = new RemotingTestUpdateOperation(result, sessionOwner, false);
+        operation.execute(monitor, info);
+
+        Assert.assertEquals(taxonNodes, sessionOwner.getEventUpdatedObjects());
+    }
+
+    @Test
+    public void testUpdateResultWithCdmIdentities() throws ExecutionException {
+        TaxonNode taxonNode1 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid1));
+        TaxonNode taxonNode2 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid2));
+        TaxonNode taxonNode3 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid3));
+        TaxonNode taxonNode4 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid4));
+        TaxonNode taxonNode5 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid5));
+
+        taxonNodes = new HashSet<TaxonNode>();
+        taxonNodes.add(taxonNode1);
+        taxonNodes.add(taxonNode2);
+        taxonNodes.add(taxonNode3);
+        taxonNodes.add(taxonNode4);
+        taxonNodes.add(taxonNode5);
+
+        ceis = new HashSet<CdmEntityIdentifier>();
+        ceis.add(new CdmEntityIdentifier(taxonNode3.getId(),TaxonNode.class));
+        ceis.add(new CdmEntityIdentifier(taxonNode4.getId(),TaxonNode.class));
+        ceis.add(new CdmEntityIdentifier(taxonNode5.getId(),TaxonNode.class));
+
+        UpdateResult result = new UpdateResult();
+        result.addUpdatedObject(taxonNode1);
+        result.addUpdatedObject(taxonNode2);
+        result.addUpdatedCdmIds(ceis);
+
+        result.setStatus(Status.OK);
+        sessionOwner.setExpectedUpdatedObjects(taxonNodes);
+        operation = new RemotingTestUpdateOperation(result, sessionOwner, false);
+        operation.execute(monitor, info);
+
+        Assert.assertEquals(taxonNodes, sessionOwner.getEventUpdatedObjects());
+    }
+
+    @Test
+    public void testUpdateResultWithLoadedCdmIdentities() throws ExecutionException {
+        TaxonNode taxonNode1 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid1));
+        TaxonNode taxonNode2 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid2));
+        TaxonNode taxonNode3 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid3));
+        TaxonNode taxonNode4 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid4));
+        TaxonNode taxonNode5 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid5));
+
+        taxonNodes = new HashSet<TaxonNode>();
+        taxonNodes.add(taxonNode1);
+        taxonNodes.add(taxonNode2);
+        taxonNodes.add(taxonNode3);
+        taxonNodes.add(taxonNode4);
+        taxonNodes.add(taxonNode5);
+
+        ceis = new HashSet<CdmEntityIdentifier>();
+        ceis.add(new CdmEntityIdentifier(taxonNode3.getId(),TaxonNode.class));
+        ceis.add(new CdmEntityIdentifier(taxonNode4.getId(),TaxonNode.class));
+        ceis.add(new CdmEntityIdentifier(taxonNode5.getId(),TaxonNode.class));
+
+
+        UpdateResult result = new UpdateResult();
+        result.addUpdatedObject(taxonNode1);
+        result.addUpdatedObject(taxonNode2);
+        result.addUpdatedCdmIds(ceis);
+        result.addUpdatedCdmId(new CdmEntityIdentifier(46,TaxonNode.class));
+
+        result.setStatus(Status.OK);
+        sessionOwner.setExpectedUpdatedObjects(taxonNodes);
+        operation = new RemotingTestUpdateOperation(result, sessionOwner, false);
+        operation.execute(monitor, info);
+
+        Assert.assertEquals(taxonNodes, sessionOwner.getEventUpdatedObjects());
+    }
+
+    @Test
+    public void testDataChange() throws ExecutionException {
+        TaxonNode taxonNode = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid1));
+        CdmEntityIdentifier cei = new CdmEntityIdentifier(taxonNode.getId(), TaxonNode.class);
+
+        taxonNodes = new HashSet<TaxonNode>();
+        taxonNodes.add(taxonNode);
+
+        int taxonNodeCountChildren = taxonNode.getCountChildren();
+        sessionOwner.setExpectedUpdatedObjects(taxonNodes);
+
+        operation = new RemotingTestUpdateOperation(cei, sessionOwner, false);
+        operation.execute(monitor, info);
+
+        Set eventUpdatedObjects = sessionOwner.getEventUpdatedObjects();
+        Assert.assertEquals(taxonNodes, eventUpdatedObjects);
+        Assert.assertEquals(taxonNodeCountChildren + 1, ((TaxonNode)eventUpdatedObjects.iterator().next()).getCountChildren());
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNameEditorTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNameEditorTest.java
new file mode 100644 (file)
index 0000000..76e9242
--- /dev/null
@@ -0,0 +1,155 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.operation;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.ExecutionException;
+import org.junit.Assert;
+import org.junit.Test;
+import org.unitils.dbunit.annotation.DataSet;
+
+import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.name.BotanicalName;
+import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
+import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.taxon.Synonym;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInExistingHomotypicalGroupOperation;
+
+/**
+ * @author cmathew
+ * @date 3 Feb 2015
+ *
+ */
+
+@DataSet
+public class TaxonNameEditorTest extends BaseOperationTest {
+
+    private static final Logger logger = Logger.getLogger(TaxonNameEditorTest.class);
+
+    ITaxonNodeService taxonNodeService = getRemoteApplicationController().getTaxonNodeService();
+    ITaxonService taxonService = getRemoteApplicationController().getTaxonService();
+    IClassificationService classificationService = getRemoteApplicationController().getClassificationService();
+
+    Language english = Language.getLanguageFromUuid(Language.uuidEnglish);
+
+
+    @Test
+    public void testAddHomotypicSynonym() throws ExecutionException {
+        UUID taxonNodeUuid = UUID.fromString("ce54c396-3694-47f2-abb0-1d7b7e057985");
+
+        TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
+        Taxon taxon = taxonNode.getTaxon();
+        HomotypicalGroup group = taxon.getHomotypicGroup();
+        BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+        newSynonymName.setTitleCache("New Synonym", true);
+        operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
+                undoContext, taxon, group, newSynonymName, postOperation);
+
+        operation.execute(monitor, info);
+        taxonNodeService.merge(taxonNode);
+        Assert.assertEquals(taxon.getHomotypicGroup().getTypifiedNames().size(), 2);
+        Assert.assertEquals(taxon.getSynonyms().size(), 1);
+        Iterator<Synonym> synonymItr = taxon.getSynonyms().iterator();
+        Synonym synonym = synonymItr.next();
+        Assert.assertTrue(taxon.getHomotypicGroup().getTypifiedNames().contains(synonym.getName()));
+    }
+
+    @Test
+    public void addHeterotypicSynonym() throws ExecutionException {
+        UUID taxonNodeUuid = UUID.fromString("ce54c396-3694-47f2-abb0-1d7b7e057985");
+
+        TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
+        Taxon taxon = taxonNode.getTaxon();
+        HomotypicalGroup group = taxon.getHomotypicGroup();
+        BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+        newSynonymName.setTitleCache("New Synonym", true);
+        operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
+                undoContext, taxon, group, newSynonymName, postOperation);
+
+        operation.execute(monitor, info);
+        taxonNodeService.merge(taxonNode);
+
+
+    }
+
+    @Test
+    public void addDeleteAddHomotypicSynonym() throws ExecutionException {
+        UUID taxonNodeUuid = UUID.fromString("ce54c396-3694-47f2-abb0-1d7b7e057985");
+
+        TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
+        Taxon taxon = taxonNode.getTaxon();
+        HomotypicalGroup group = taxon.getHomotypicGroup();
+        BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+        newSynonymName.setTitleCache("New Synonym", true);
+        operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
+                undoContext, taxon, group, newSynonymName, postOperation);
+
+        operation.execute(monitor, info);
+        taxonNodeService.merge(taxonNode);
+        Assert.assertEquals(taxon.getHomotypicGroup().getTypifiedNames().size(), 2);
+
+        Set<Synonym> synonyms = taxon.getSynonyms();
+        for(Synonym synonym : synonyms) {
+            taxonService.deleteSynonym(synonym.getUuid(), taxon.getUuid(), null);
+        }
+
+        taxonNodeService.merge(taxonNode);
+
+        newSynonymName = BotanicalName.NewInstance(null);
+        newSynonymName.setTitleCache("Another New Synonym", true);
+        operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
+                undoContext, taxon, group, newSynonymName, postOperation);
+
+        operation.execute(monitor, info);
+        taxonNodeService.merge(taxonNode);
+    }
+
+    @Test
+    public void swapSynonymWithAcceptedTaxon() throws ExecutionException {
+        List<TaxonNode> rootEntities = new ArrayList<TaxonNode>();
+        UUID taxonNodeUuid = UUID.fromString("d425a971-1abe-4895-9e1f-1e5c8ff1c84c");
+        TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
+        rootEntities.add(taxonNode);
+
+        UUID taxonUuid = UUID.fromString("9763e5f0-6cd4-4d96-b8a4-4420854f7727");
+        Taxon taxon = (Taxon)taxonService.load(taxonUuid);
+        TaxonNameBase taxonName = taxon.getName();
+
+        UUID synonymUuid = UUID.fromString("1eb173bd-b174-4162-8ff5-5136d8f1e746");
+        Synonym synonym = (Synonym)taxonService.load(synonymUuid);
+        TaxonNameBase synonymName = synonym.getName();
+
+        taxonService.swapSynonymAndAcceptedTaxon(synonym.getUuid(), taxon.getUuid());
+
+        Assert.assertEquals(taxonName, synonym.getName());
+        Assert.assertEquals(synonymName, taxon.getName());
+    }
+
+    @Test
+    public void addTaxon() {
+        NonViralName taxonName = NonViralName.NewInstance(null);
+        Taxon taxon = Taxon.NewInstance(taxonName, null);
+        taxonService.merge(taxon);
+    }
+
+}
+
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.java
new file mode 100644 (file)
index 0000000..b9d3cf6
--- /dev/null
@@ -0,0 +1,272 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.operation;
+
+import java.util.ArrayList;
+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.commands.ExecutionException;
+import org.junit.Assert;
+import org.junit.Test;
+import org.unitils.dbunit.annotation.DataSet;
+
+import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
+import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator;
+import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator.ChildHandling;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.description.TaxonDescription;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.taxon.Classification;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingChangeAcceptedTaxonToSynonymOperation;
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingDeleteTaxonNodeOperation;
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveFactualDataOperation;
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveTaxonOperation;
+
+/**
+ * @author cmathew
+ * @date 9 Mar 2015
+ *
+ */
+@DataSet
+public class TaxonNavigatorTest extends BaseOperationTest {
+
+    private static final Logger logger = Logger.getLogger(TaxonNameEditorTest.class);
+
+    ITaxonNodeService taxonNodeService = getRemoteApplicationController().getTaxonNodeService();
+    ITaxonService taxonService = getRemoteApplicationController().getTaxonService();
+    IClassificationService classificationService = getRemoteApplicationController().getClassificationService();
+
+    Language english = Language.getLanguageFromUuid(Language.uuidEnglish);
+
+
+
+    @Test
+    public void testChangeAcceptedTaxonToSynonym() throws ExecutionException {
+
+
+        UUID oldTaxonNodeNodeUuid = UUID.fromString("b85b5b78-6760-409f-ac91-bb89e95ff2a1");
+        UUID newAcceptedTaxonNodeUuid = UUID.fromString("6ad8e9e2-f5f6-41ad-aa30-f62a903650db");
+
+        TaxonNode oldTaxonNode = taxonNodeService.load(oldTaxonNodeNodeUuid);
+        TaxonNameBase name = oldTaxonNode.getTaxon().getName();
+
+
+        TaxonNode newAcceptedTaxonNode = taxonNodeService.load(newAcceptedTaxonNodeUuid);
+        int countTargetSynonyms = newAcceptedTaxonNode.getTaxon().getSynonyms().size();
+        sessionOwner.addExpectedUpdatedObject(oldTaxonNode.getParent());
+        sessionOwner.addExpectedUpdatedObject(newAcceptedTaxonNode);
+
+        operation =  new RemotingChangeAcceptedTaxonToSynonymOperation(sessionOwner,
+                false,
+                oldTaxonNode.getUuid(),
+                newAcceptedTaxonNode.getUuid());
+        operation.execute(monitor, info);
+        newAcceptedTaxonNode = taxonNodeService.load(newAcceptedTaxonNodeUuid);
+        oldTaxonNode = taxonNodeService.load(oldTaxonNodeNodeUuid);
+        Assert.assertNull(oldTaxonNode);
+        Assert.assertEquals(countTargetSynonyms + 1,newAcceptedTaxonNode.getTaxon().getSynonyms().size());
+        Assert.assertEquals(name, newAcceptedTaxonNode.getTaxon().getSynonyms().iterator().next().getName());
+
+
+    }
+
+    @Test
+    public void testMoveTaxon() throws ExecutionException {
+
+        UUID taxonNodeToMoveUuid = UUID.fromString("b8439f51-6b96-445a-b401-7a836ba1cf58");
+        UUID newParentTreeNodeUuid = UUID.fromString("2f05d429-632d-4230-b9cb-70299360b470");
+        boolean moveToParentNode = true;
+
+        TaxonNode taxonNodeToMove = taxonNodeService.load(taxonNodeToMoveUuid);
+        TaxonNode oldParent = taxonNodeToMove.getParent();
+        sessionOwner.addExpectedUpdatedObject(oldParent);
+        int childCount = oldParent.getCountChildren();
+        TaxonNode newParentTreeNode = taxonNodeService.load(newParentTreeNodeUuid);
+        sessionOwner.addExpectedUpdatedObject(newParentTreeNode);
+        operation = new RemotingMoveTaxonOperation(sessionOwner,
+                false,
+                taxonNodeToMove.getUuid(),
+                newParentTreeNode.getUuid(),
+                moveToParentNode);
+        operation.execute(monitor, info);
+        Assert.assertEquals(childCount-1, oldParent.getCountChildren());
+        Assert.assertTrue(!oldParent.getChildNodes().contains(taxonNodeToMove));
+        Assert.assertTrue(newParentTreeNode.getChildNodes().contains(taxonNodeToMove));
+    }
+
+    @Test
+    public void testMoveFactualData() throws ExecutionException {
+        UUID sourceTaxonUuid = UUID.fromString("e40854d7-143f-4054-b229-6ed4cedb4bff");
+        UUID targetTaxonUuid = UUID.fromString("b8402dc4-5050-4882-a147-01b71e0e47d6");
+
+        Taxon sourceTaxon = CdmBase.deproxy(taxonService.load(sourceTaxonUuid), Taxon.class);
+        Set<TaxonDescription> sourceDescriptions = new HashSet(sourceTaxon.getDescriptions());
+        sessionOwner.addExpectedUpdatedObject(sourceTaxon);
+
+        Taxon targetTaxon = CdmBase.deproxy(taxonService.load(targetTaxonUuid), Taxon.class);
+        int countTargetDescriptions = targetTaxon.getDescriptions().size();
+        sessionOwner.addExpectedUpdatedObject(targetTaxon);
+
+        operation = new RemotingMoveFactualDataOperation(sessionOwner,
+                false,
+                sourceTaxonUuid,
+                targetTaxonUuid);
+        operation.execute(monitor, info);
+        Assert.assertEquals(0, sourceTaxon.getDescriptions().size());
+        Assert.assertEquals(sourceDescriptions.size() + countTargetDescriptions, targetTaxon.getDescriptions().size());
+        Assert.assertTrue(targetTaxon.getDescriptions().containsAll(sourceDescriptions));
+    }
+
+    @Test
+    public void testDeleteTaxonNodeWithDeleteChildren() throws ExecutionException {
+        UUID taxonNodeUuid = UUID.fromString("2f05d429-632d-4230-b9cb-70299360b470");
+        TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
+        List<TaxonNode> childNodes = taxonNode.getChildNodes();
+        List<UUID> childNodeUuids = new ArrayList<UUID>();
+        for(TaxonNode childNode : childNodes) {
+            childNodeUuids.add(childNode.getUuid());
+        }
+        Assert.assertTrue(taxonNode.getCountChildren() > 0);
+
+        Set<ITaxonTreeNode> nodes = new HashSet<ITaxonTreeNode>();
+        nodes.add(taxonNode);
+
+        TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator();
+        configNodes.setChildHandling(ChildHandling.DELETE);
+        TaxonDeletionConfigurator config = new TaxonDeletionConfigurator();
+        config.setTaxonNodeConfig(configNodes);
+
+        sessionOwner.addExpectedUpdatedObject(taxonNode.getParent());
+
+        operation = new RemotingDeleteTaxonNodeOperation(sessionOwner,
+                false,
+                nodes,
+                config);
+        operation.execute(monitor, info);
+        TaxonNode reloadedNode = taxonNodeService.load(taxonNode.getUuid());
+        Assert.assertNull(reloadedNode);
+        for(UUID childNodeUuid : childNodeUuids) {
+            TaxonNode reloadedChildNode = taxonNodeService.load(childNodeUuid);
+            Assert.assertNull(reloadedChildNode);
+        }
+    }
+
+    @Test
+    public void testDeleteTaxonNodes() throws ExecutionException {
+        UUID taxonNode1Uuid = UUID.fromString("99f03b56-67cd-4e01-9ceb-2362d48f9d07");
+        UUID taxonNode2Uuid = UUID.fromString("91698cec-615f-4472-9002-feda1a6acded");
+        UUID taxonNode3Uuid = UUID.fromString("4fe03763-b966-4361-8334-352f6f777588");
+
+        TaxonNode taxonNode1 = taxonNodeService.load(taxonNode1Uuid);
+        TaxonNode taxonNode2 = taxonNodeService.load(taxonNode2Uuid);
+        TaxonNode taxonNode3 = taxonNodeService.load(taxonNode3Uuid);
+
+        Set<ITaxonTreeNode> nodes = new HashSet<ITaxonTreeNode>();
+        nodes.add(taxonNode1);
+        nodes.add(taxonNode2);
+        nodes.add(taxonNode3);
+
+        TaxonDeletionConfigurator config = new TaxonDeletionConfigurator();
+
+
+        sessionOwner.addExpectedUpdatedObject(taxonNode1.getParent());
+        sessionOwner.addExpectedUpdatedObject(taxonNode2.getParent());
+        sessionOwner.addExpectedUpdatedObject(taxonNode3.getParent());
+        operation = new RemotingDeleteTaxonNodeOperation(sessionOwner,
+                false,
+                nodes,
+                config);
+        operation.execute(monitor, info);
+        TaxonNode reloadedNode1 = taxonNodeService.load(taxonNode1.getUuid());
+        TaxonNode reloadedNode2 = taxonNodeService.load(taxonNode2.getUuid());
+        TaxonNode reloadedNode3 = taxonNodeService.load(taxonNode3.getUuid());
+        Assert.assertNull(reloadedNode1);
+        Assert.assertNull(reloadedNode2);
+        Assert.assertNull(reloadedNode3);
+
+    }
+
+    @Test
+    public void testDeleteTaxonNodeWithMovingChildrenToParentNode() throws ExecutionException {
+        UUID taxonNodeUuid = UUID.fromString("2f05d429-632d-4230-b9cb-70299360b470");
+        TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
+        TaxonNode parentTaxonNode = taxonNode.getParent();
+        List<TaxonNode> childNodes = taxonNode.getChildNodes();
+        List<UUID> childNodeUuids = new ArrayList<UUID>();
+        for(TaxonNode childNode : childNodes) {
+            childNodeUuids.add(childNode.getUuid());
+        }
+        Assert.assertTrue(taxonNode.getCountChildren() > 0);
+
+        Set<ITaxonTreeNode> nodes = new HashSet<ITaxonTreeNode>();
+        nodes.add(taxonNode);
+
+        TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator();
+        configNodes.setChildHandling(ChildHandling.MOVE_TO_PARENT);
+        TaxonDeletionConfigurator config = new TaxonDeletionConfigurator();
+        config.setTaxonNodeConfig(configNodes);
+
+        sessionOwner.addExpectedUpdatedObject(taxonNode.getParent());
+        operation = new RemotingDeleteTaxonNodeOperation(sessionOwner,
+                false,
+                nodes,
+                config);
+        operation.execute(monitor, info);
+        TaxonNode reloadedNode = taxonNodeService.load(taxonNode.getUuid());
+        Assert.assertNull(reloadedNode);
+        List<TaxonNode> parentChildNodes = parentTaxonNode.getChildNodes();
+        List<UUID> parentChildNodeUuids = new ArrayList<UUID>();
+        for(TaxonNode parentChildNode : parentChildNodes) {
+            parentChildNodeUuids.add(parentChildNode.getUuid());
+        }
+        parentChildNodeUuids.containsAll(childNodeUuids);
+
+    }
+
+    @Test
+    @DataSet("TaxonNavigatorTest.testDeleteClassificationWithDeleteChildren.xml")
+    public void testDeleteClassificationWithDeleteChildren() throws ExecutionException {
+        UUID classificationUuid = UUID.fromString("0c2b5d25-7b15-4401-8b51-dd4be0ee5cab");
+        Classification classification = classificationService.load(classificationUuid);
+        TaxonNode rootNode = classification.getRootNode();
+        Set<ITaxonTreeNode> nodes = new HashSet<ITaxonTreeNode>();
+        nodes.add(classification);
+
+        TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator();
+        configNodes.setChildHandling(ChildHandling.DELETE);
+        TaxonDeletionConfigurator config = new TaxonDeletionConfigurator();
+        config.setTaxonNodeConfig(configNodes);
+
+        operation = new RemotingDeleteTaxonNodeOperation(sessionOwner,
+                false,
+                nodes,
+                config);
+        operation.execute(monitor, info);
+
+        Classification reloadedClassification = classificationService.load(classification.getUuid());
+        Assert.assertNull(reloadedClassification);
+        TaxonNode reloadedRootNode = taxonNodeService.load(rootNode.getUuid());
+        Assert.assertNull(reloadedRootNode);
+
+    }
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/IOServiceExportTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/IOServiceExportTest.java
new file mode 100644 (file)
index 0000000..bf48ebd
--- /dev/null
@@ -0,0 +1,126 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.service;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.List;
+import java.util.UUID;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.unitils.dbunit.annotation.DataSet;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.service.INameService;
+import eu.etaxonomy.cdm.io.common.ExportResult;
+import eu.etaxonomy.cdm.io.csv.caryophyllales.out.CsvNameExportConfigurator;
+import eu.etaxonomy.cdm.io.csv.redlist.demo.CsvDemoExportConfigurator;
+import eu.etaxonomy.cdm.io.jaxb.JaxbExportConfigurator;
+import eu.etaxonomy.cdm.io.sdd.out.SDDExportConfigurator;
+import eu.etaxonomy.cdm.io.service.IIOService;
+import eu.etaxonomy.taxeditor.httpinvoker.BaseRemotingTest;
+
+/**
+ * @author cmathew
+ * @date 31 Jul 2015
+ *
+ */
+@DataSet
+public class IOServiceExportTest extends BaseRemotingTest {
+
+    private final IIOService ioService = CdmApplicationState.getIOService();
+    private final INameService nameService = CdmApplicationState.getCurrentAppConfig().getNameService();
+
+    @Test
+    public void exportJaxbTest() throws IOException {
+        JaxbExportConfigurator config = JaxbExportConfigurator.NewInstance(null, null);
+        ExportResult result = ioService.export(config);
+        List<byte[]> dataList = result.getExportData();
+        Assert.assertEquals(1, dataList.size());
+        byte[] exportData = dataList.get(0);
+        String savePath = "target/exportjaxb.xml";
+        FileOutputStream stream = null;
+
+        stream = new FileOutputStream(savePath);
+        stream.write(exportData);
+        stream.close();
+    }
+
+    @Test
+    public void exportSDDTest() throws IOException {
+        SDDExportConfigurator config = SDDExportConfigurator.NewInstance(null, null, null);
+        ExportResult result = ioService.export(config);
+        List<byte[]> dataList = result.getExportData();
+        Assert.assertEquals(1, dataList.size());
+        byte[] exportData = dataList.get(0);
+        String savePath = "target/exportsdd.xml";
+        FileOutputStream stream = null;
+
+        stream = new FileOutputStream(savePath);
+        stream.write(exportData);
+        stream.close();
+
+    }
+
+    @Test
+    public void exportCSVTest() throws IOException {
+        HashSet<UUID> set = new HashSet<UUID>();
+        set.add(UUID.fromString("0c2b5d25-7b15-4401-8b51-dd4be0ee5cab"));
+        CsvDemoExportConfigurator config = CsvDemoExportConfigurator.NewInstance(null, null);
+        config.setClassificationUuids(set);
+        config.setDoTaxa(true);
+        config.setHasHeaderLines(true);
+        config.setClassification(true);
+        config.setTaxonName(true);
+        config.setAuthor(true);
+        config.setRank(true);
+        config.setLastChange(true);
+
+        ExportResult result = ioService.export(config);
+        List<byte[]> dataList = result.getExportData();
+        Assert.assertEquals(1, dataList.size());
+        byte[] exportData = dataList.get(0);
+        String savePath = "target/exportcsv.xml";
+        saveToFile(savePath, exportData);
+    }
+
+    @Test
+    public void exportCSVNameTest() throws IOException {
+        CsvNameExportConfigurator config = CsvNameExportConfigurator.NewInstance(null,null);
+        ExportResult result = ioService.export(config);
+        List<byte[]> dataList = result.getExportData();
+        Assert.assertEquals(1, dataList.size());
+        byte[] exportData = dataList.get(0);
+        String savePath = "target/exportcsvname.xml";
+        saveToFile(savePath, exportData);
+    }
+
+    @Test
+    public void exportCSVPrintTest() throws IOException {
+        CsvNameExportConfigurator config = CsvNameExportConfigurator.NewInstance(null,null);
+        config.setNamesOnly(false);
+        config.setClassificationUUID(UUID.fromString("0c2b5d25-7b15-4401-8b51-dd4be0ee5cab"));
+        ExportResult result = ioService.export(config);
+        List<byte[]> dataList = result.getExportData();
+        Assert.assertEquals(1, dataList.size());
+        byte[] exportData = dataList.get(0);
+        String savePath = "target/exportcsvprint.xml";
+        saveToFile(savePath, exportData);
+    }
+
+    private static void saveToFile(String filePath, byte[] data) throws IOException {
+        FileOutputStream stream = null;
+        stream = new FileOutputStream(filePath);
+        stream.write(data);
+        stream.close();
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/IOServiceImportTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/IOServiceImportTest.java
new file mode 100644 (file)
index 0000000..965304b
--- /dev/null
@@ -0,0 +1,149 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.service;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.unitils.dbunit.annotation.DataSet;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.service.INameService;
+import eu.etaxonomy.cdm.api.service.IOccurrenceService;
+import eu.etaxonomy.cdm.database.DbSchemaValidation;
+import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
+import eu.etaxonomy.cdm.io.common.ImportResult;
+import eu.etaxonomy.cdm.io.excel.taxa.NormalExplicitImportConfigurator;
+import eu.etaxonomy.cdm.io.sdd.in.SDDImportConfigurator;
+import eu.etaxonomy.cdm.io.service.IIOService;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
+import eu.etaxonomy.cdm.io.specimen.excel.in.SpecimenCdmExcelImportConfigurator;
+import eu.etaxonomy.cdm.io.tcsxml.in.TcsXmlImportConfigurator;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.taxeditor.httpinvoker.BaseRemotingTest;
+
+/**
+ *
+ * Note : One issue with this test class is that when the tests are run a second time
+ * against the same server there are errors due to the fact that not all the imported data is deleted.
+ * This needs to be fixed
+ * @author cmathew
+ * @date 5 Aug 2015
+ *
+ */
+@Ignore // seems to cause problems with other tests due to data not deleted
+@DataSet
+public class IOServiceImportTest extends BaseRemotingTest {
+
+    private final IIOService ioService = CdmApplicationState.getIOService();
+    private final INameService nameService = CdmApplicationState.getCurrentAppConfig().getNameService();
+    private final IOccurrenceService occurrenceService = CdmApplicationState.getCurrentAppConfig().getOccurrenceService();
+
+    @Test
+    public void importNormalExplicit() throws IOException {
+        String importFilePath = "src/test/resources/imports/NormalExplicitImport.xls";
+        NormalExplicitImportConfigurator config =
+                NormalExplicitImportConfigurator.NewInstance(null, null, null, null);
+        config.setNomenclaturalCode(NomenclaturalCode.ICNB);
+        config.setDbSchemaValidation(DbSchemaValidation.CREATE);
+        ImportResult result = ioService.importData(config, fileToByteArray(importFilePath), SOURCE_TYPE.URI);
+        Assert.assertTrue(result.isSuccess());
+        List<TaxonNameBase> list = nameService.list(TaxonNameBase.class, null, null, null, null);
+        Assert.assertEquals(9,list.size());
+    }
+
+
+    @Test
+    public void importAbcd() throws IOException {
+        String importFilePath = "src/test/resources/imports/ABCDImport.xml";
+        Abcd206ImportConfigurator config =
+                Abcd206ImportConfigurator.NewInstance(null, null);
+        config.setNomenclaturalCode(NomenclaturalCode.ICNB);
+        config.setDbSchemaValidation(DbSchemaValidation.CREATE);
+        ImportResult result = ioService.importData(config, fileToByteArray(importFilePath), SOURCE_TYPE.INPUTSTREAM);
+        Assert.assertTrue(result.isSuccess());
+        Assert.assertTrue(!result.getReports().isEmpty());
+        saveToFile("target/importAbcdReport.txt", result.getReports().get(0));
+        List<TaxonNameBase> list = nameService.list(TaxonNameBase.class, null, null, null, null);
+        Assert.assertEquals(2,list.size());
+    }
+
+    @Test
+    public void importSDD() throws IOException {
+        String importFilePath = "src/test/resources/imports/SDD.xml";
+        SDDImportConfigurator config =
+                SDDImportConfigurator.NewInstance(null, null);
+        config.setNomenclaturalCode(NomenclaturalCode.ICNB);
+        config.setDbSchemaValidation(DbSchemaValidation.CREATE);
+        ImportResult result = ioService.importData(config, fileToByteArray(importFilePath), SOURCE_TYPE.URI);
+        Assert.assertTrue(result.isSuccess());
+        List<TaxonNameBase> list = nameService.list(TaxonNameBase.class, null, null, null, null);
+        Assert.assertEquals(9,list.size());
+    }
+
+    @Test
+    public void importSpecimenExcel() throws IOException {
+        String importFilePath = "src/test/resources/imports/SpecimenExcelImport.xls";
+        SpecimenCdmExcelImportConfigurator config = SpecimenCdmExcelImportConfigurator.NewInstance(null, null);
+        config.setNomenclaturalCode(NomenclaturalCode.ICNB);
+        config.setDbSchemaValidation(DbSchemaValidation.CREATE);
+        ImportResult result = ioService.importData(config, fileToByteArray(importFilePath), SOURCE_TYPE.URI);
+        Assert.assertTrue(result.isSuccess());
+//        List<SpecimenOrObservationBase> occurrences = occurrenceService.list(SpecimenOrObservationBase.class, null, null, null, null);
+//        Assert.assertEquals(3,occurrences.size());
+    }
+
+    @Test
+    public void importTCS() throws IOException {
+        String importFilePath = "src/test/resources/imports/TcsImport.xml";
+        TcsXmlImportConfigurator config = TcsXmlImportConfigurator.NewInstance(null, null);
+        config.setNomenclaturalCode(NomenclaturalCode.ICNB);
+        config.setDbSchemaValidation(DbSchemaValidation.CREATE);
+        ImportResult result = ioService.importData(config, fileToByteArray(importFilePath), SOURCE_TYPE.URI);
+        Assert.assertTrue(result.isSuccess());
+        List<TaxonNameBase> list = nameService.list(TaxonNameBase.class, null, null, null, null);
+        Assert.assertEquals(16,list.size());
+    }
+
+    private byte[] fileToByteArray(String filePath) throws IOException {
+        Path path = Paths.get(filePath);
+        return Files.readAllBytes(path);
+    }
+
+    private static void saveToFile(String filePath, byte[] data) {
+        FileOutputStream stream = null;
+        try {
+            stream = new FileOutputStream(filePath);
+            stream.write(data);
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if(stream != null) {
+                    stream.close();
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ServiceInterceptorTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ServiceInterceptorTest.java
new file mode 100644 (file)
index 0000000..9eaee83
--- /dev/null
@@ -0,0 +1,38 @@
+package eu.etaxonomy.taxeditor.service;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+import org.junit.Test;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.cache.CdmServiceCacher;
+import eu.etaxonomy.cdm.api.service.ITermService;
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.common.TermType;
+import eu.etaxonomy.taxeditor.httpinvoker.RemotingSessionAwareTest;
+
+public class ServiceInterceptorTest extends RemotingSessionAwareTest {
+
+        private static final Logger logger = Logger.getLogger(ServiceInterceptorTest.class);
+        private final ITermService termService = getRemoteApplicationController().getTermService();
+        private static CdmServiceCacher cdmServiceCacher = CdmApplicationState.getCdmServiceCacher();
+
+
+           @Test
+           public void termServiceInterceptorTest() {
+               List<DefinedTermBase<?>> terms = termService.listByTermType(TermType.Language, null, null, null, null);
+               int cacheLanguageSize = 0;
+               List<UUID> keys = cdmServiceCacher.getDefaultCache().getKeys();
+               for(UUID key : keys) {
+                   if(cdmServiceCacher.getFromCache(key).getClass().equals(Language.class)) {
+                       cacheLanguageSize++;
+                   }
+               }
+               Assert.assertEquals(terms.size(), cacheLanguageSize);
+               // TO DO : get the static termTypeMap from TermServiceRequestExecutor and check the size
+           }
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.java
new file mode 100644 (file)
index 0000000..29a52b8
--- /dev/null
@@ -0,0 +1,487 @@
+// $Id$
+/**
+ * Copyright (C) 2014 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.session;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.hibernate.collection.spi.PersistentCollection;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.unitils.dbunit.annotation.DataSet;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.service.ICommonService;
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
+import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.api.service.ITermService;
+import eu.etaxonomy.cdm.api.service.IUserService;
+import eu.etaxonomy.cdm.api.service.IVocabularyService;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
+import eu.etaxonomy.cdm.model.agent.Person;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.Credit;
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.cdm.model.common.Extension;
+import eu.etaxonomy.cdm.model.common.IdentifiableSource;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.common.LanguageString;
+import eu.etaxonomy.cdm.model.common.TermType;
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
+import eu.etaxonomy.cdm.model.description.KeyStatement;
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.cdm.model.media.Rights;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.httpinvoker.RemotingSessionAwareTest;
+
+/**
+ * @author cmathew
+ * @date 7 Oct 2014
+ *
+ */
+@DataSet
+public class CdmEntitySessionAwareTest extends RemotingSessionAwareTest {
+
+    private static final Logger logger = Logger.getLogger(CdmEntitySessionAwareTest.class);
+
+    UUID polytomousKeyUuid = UUID.fromString("0d53ba20-7de4-4baa-bd8a-401048447d66");
+    UUID subKeyUuid = UUID.fromString("9d8bf4f6-a70a-4b80-8556-2ccfb436ff01");
+    //UUID polytomousKeyUuid = UUID.fromString("bab66772-2c83-428a-bb6d-655d12ac6097");
+    UUID taxon1Uuid = UUID.fromString("2b336df7-29e8-4f79-985f-66502739d22f");
+    UUID personUuid = UUID.fromString("945d08f2-eb92-45b6-9252-6275ea6d338b");
+
+
+
+    IPolytomousKeyService polytomousKeyService = getRemoteApplicationController().getPolytomousKeyService();
+    IPolytomousKeyNodeService polytomousKeyNodeService = getRemoteApplicationController().getPolytomousKeyNodeService();
+    ICommonService commonService = getRemoteApplicationController().getCommonService();
+    ITaxonService taxonService = getRemoteApplicationController().getTaxonService();
+    IVocabularyService vocabularyService = getRemoteApplicationController().getVocabularyService();
+    ITermService termService = getRemoteApplicationController().getTermService();
+    IUserService userService = getRemoteApplicationController().getUserService();
+
+    //Language english = Language.getLanguageFromUuid(Language.uuidEnglish);
+
+
+
+    @BeforeClass
+    public static void initializePolytomousKeyTest() {
+    }
+
+
+    @Test
+    public void readAllPolytomousKeys() {
+        List<PolytomousKey> pKeys = polytomousKeyService.list(PolytomousKey.class, null, null, null, null);
+        Iterator<PolytomousKey> pKeysItr = pKeys.iterator();
+        Assert.assertEquals(pKeysItr.next().getUuid(),UUID.fromString("9d8bf4f6-a70a-4b80-8556-2ccfb436ff01"));
+        Assert.assertEquals(pKeysItr.next().getUuid(),UUID.fromString("0d53ba20-7de4-4baa-bd8a-401048447d66"));
+    }
+
+
+    @Test
+    //@DataSet("PolytomousKeyTest.readPolytmousKeyData.xml")
+    public void readPolytmousKeyData() {
+        PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+        Set<Taxon> taxonomicScope = pKey.getTaxonomicScope();
+        Iterator<Taxon> tsItr = taxonomicScope.iterator();
+        Taxon taxon = tsItr.next();
+
+        Assert.assertEquals("Achillea sec. Cyprus", taxon.getTitleCache());
+        Assert.assertEquals(tsItr.hasNext(), false);
+
+        List<Credit> credits = pKey.getCredits();
+        AgentBase agent = credits.get(0).getAgent();
+        Assert.assertEquals(agent.getId(),4809);
+        Assert.assertEquals(agent.getTitleCache(),"R. A. Graham");
+        Assert.assertEquals(credits.get(0).getText(),"Credits Text Test");
+
+        Set<Extension> exts = pKey.getExtensions();
+        Iterator<Extension> extItr = exts.iterator();
+        Extension ext = extItr.next();
+        Assert.assertEquals(ext.getValue(), "http://test.com");
+
+        Set<Rights> rights = pKey.getRights();
+        Iterator<Rights> rightsItr = rights.iterator();
+        Rights right = rightsItr.next();
+        Assert.assertEquals(right.getText(),"Rights Text Test");
+
+        Set<IdentifiableSource> sources = pKey.getSources();
+        Iterator<IdentifiableSource> sourcesItr = sources.iterator();
+        IdentifiableSource source = sourcesItr.next();
+        Assert.assertEquals(source.getId(), 23710);
+        source = sourcesItr.next();
+        Assert.assertEquals(source.getId(), 23711);
+
+        // TO DO : Added tests for Annotations , Markers
+    }
+
+
+
+    @Test
+    public void readPolytomousKeyDataFromNodes() {
+        PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+        PolytomousKeyNode rootNode = pKey.getRoot();
+
+
+        Assert.assertEquals(rootNode.getId(), 2750);
+
+        Assert.assertEquals(rootNode.getChildAt(0).getId(), 2751);
+        Assert.assertEquals(rootNode.getChildAt(0).getParent().getId(), rootNode.getId());
+        Assert.assertEquals(rootNode.getKey().getId(), pKey.getId());
+        Integer sortIndex = (Integer)getFieldValueViaReflection(rootNode.getChildAt(0), "sortIndex");
+        Assert.assertEquals(sortIndex, new Integer(0));
+        String statement = "Capitula without ligulate ray-florets; leaves entire or subentire";
+        Assert.assertEquals(rootNode.getChildAt(0).getStatement().getLabelText(Language.ENGLISH()), statement);
+
+        Assert.assertEquals(rootNode.getChildAt(1).getId(), 2753);
+        Assert.assertEquals(rootNode.getChildAt(1).getParent().getId(), rootNode.getId());
+        Assert.assertEquals(rootNode.getChildAt(1).getKey().getId(), pKey.getId());
+        sortIndex = (Integer)getFieldValueViaReflection(rootNode.getChildAt(1), "sortIndex");
+        Assert.assertEquals(sortIndex, new Integer(1));
+        statement = "Capitula with ligulate ray-florets; leaves pinnatisect";
+        Assert.assertEquals(rootNode.getChildAt(1).getStatement().getLabelText(Language.ENGLISH()), statement);
+
+        Assert.assertEquals(rootNode.getChildAt(1).getChildAt(0).getId(), 2754);
+        Assert.assertEquals(rootNode.getChildAt(1).getChildAt(0).getParent().getId(), rootNode.getChildAt(1).getId());
+        Assert.assertEquals(rootNode.getChildAt(1).getChildAt(0).getKey().getId(), pKey.getId());
+        sortIndex = (Integer)getFieldValueViaReflection(rootNode.getChildAt(1).getChildAt(0), "sortIndex");
+        Assert.assertEquals(sortIndex, new Integer(0));
+        statement = "Ray-florets yellow";
+        Assert.assertEquals(rootNode.getChildAt(1).getChildAt(0).getStatement().getLabelText(Language.ENGLISH()), statement);
+        Assert.assertEquals(rootNode.getChildAt(1).getChildAt(0).getChildAt(0).getTaxon().getTitleCache(), "Achillea arabica Kotschy sec. Cyprus");
+    }
+
+    @Test
+    public void addGreatGrandChildPolytomousKeyNode() {
+
+        PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+        PolytomousKeyNode rootChildNode = pKey.getRoot().getChildAt(0);
+        PolytomousKeyNode grandChildNode = PolytomousKeyNode.NewInstance();
+        rootChildNode.addChild(grandChildNode);
+
+        grandChildNode = polytomousKeyNodeService.merge(grandChildNode);
+
+        PolytomousKeyNode greatGrandChildNode = PolytomousKeyNode.NewInstance();
+        grandChildNode.addChild(greatGrandChildNode);
+
+        Assert.assertFalse(pKey.getRoot().getChildAt(0).getChildAt(0).getId() == 0);
+    }
+
+    @Test
+    public void savePolytomousKeyNodeData() {
+        PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+        PolytomousKeyNode pkeynode = pkey.getRoot();
+        String newQuestion = "New Question";
+        String newStatement = "New Statement";
+
+        Assert.assertEquals("Question 1",pkeynode.getQuestion().getLabel().get(Language.ENGLISH()).getText());
+        for(PolytomousKeyNode node : pkeynode.getChildren()) {
+
+            node.setQuestion(null);
+            node.setStatement(null);
+        }
+        //FIXME:Remoting Add tests for feature after fixing problem
+
+        //Feature feature = pkeynode.getFeature();
+        //Assert.assertEquals(feature.getTitleCache(),"Systematics");
+        //pkeynode.setFeature(null);
+
+        Assert.assertEquals(pkeynode.getChildAt(0).getModifyingText().get(Language.ENGLISH()).getText(),"Modifying Text 1a");
+        String modifyingText = "Modifying Text 1a updated";
+
+        //pkeynode.getChildAt(0).putModifyingText(Language.ENGLISH(), modifyingText);
+
+        Assert.assertEquals(pkeynode.getChildAt(0).getSubkey().getId(),751);
+        Assert.assertEquals("Asphodeline", pkeynode.getChildAt(0).getSubkey().getTitleCache());
+        Assert.assertNull(pkeynode.getChildAt(1).getTaxon());
+        Taxon taxon = CdmBase.deproxy(taxonService.find(taxon1Uuid),Taxon.class);
+        pkeynode.getChildAt(1).setTaxon(taxon);
+
+        polytomousKeyService.merge(pkey);
+
+        pkey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+
+        pkeynode = pkey.getRoot();
+        for(PolytomousKeyNode node : pkeynode.getChildren()) {
+            Assert.assertNull(node.getQuestion());
+            node.setQuestion(KeyStatement.NewInstance(Language.ENGLISH(),newQuestion));
+            Assert.assertNull(node.getStatement());
+            node.setStatement(KeyStatement.NewInstance(Language.ENGLISH(),newStatement));
+        }
+
+        Assert.assertEquals(pkeynode.getChildAt(1).getTaxon(), taxon);
+
+        polytomousKeyService.merge(pkey);
+
+        pkey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+        pkeynode = pkey.getRoot();
+        for(PolytomousKeyNode node : pkeynode.getChildren()) {
+            Assert.assertNotNull(node.getQuestion());
+            Map<Language, LanguageString> label = node.getQuestion().getLabel();
+            Assert.assertEquals(newQuestion, label.get(Language.ENGLISH()).getText());
+            Assert.assertNotNull(node.getStatement());
+            Assert.assertEquals(newStatement, node.getStatement().getLabel(Language.ENGLISH()).getText());
+        }
+        //Assert.assertEquals(pkeynode.getFeature().getId(), feature.getId());
+
+    }
+
+
+    @Test
+    public void savePolytomousKeyNodeDataWithSameSubKey() {
+
+        PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+
+        PolytomousKeyNode pkeynode = pkey.getRoot();
+
+        PolytomousKey subkey1 = CdmBase.deproxy(pkeynode.getChildAt(0).getSubkey(), PolytomousKey.class);
+        String subkey1title = subkey1.getTitleCache();
+        subkey1.setTitleCache(subkey1title + "test", true);
+
+
+        PolytomousKey subkey2 = CdmBase.deproxy(pkeynode.getChildAt(1).getChildAt(0).getSubkey(), PolytomousKey.class);
+        String subkey2title = subkey2.getTitleCache();
+        subkey2.setTitleCache(subkey2title + "test", true);
+
+        Assert.assertSame(subkey1, subkey2);
+
+        polytomousKeyService.merge(pkey);
+    }
+
+    @Test
+    public void savePolytomousKeyNodeDataWithSameSubKeyUsingService() {
+
+        PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+
+        PolytomousKeyNode pkeynode = pkey.getRoot();
+
+        PersistentCollection children = (PersistentCollection) pkeynode.getChildren();
+        PolytomousKeyNode childNode0 = (PolytomousKeyNode)commonService.get(pkeynode.getUuid(), "children", 0);
+        PolytomousKey subkey1 = CdmBase.deproxy(childNode0.getSubkey(),PolytomousKey.class);
+        String subkey1title = subkey1.getTitleCache();
+        subkey1.setTitleCache(subkey1title + "test", true);
+
+        PolytomousKeyNode childNode1 = (PolytomousKeyNode)commonService.get(pkeynode.getUuid(), "children", 1);
+        PolytomousKey subkey2 = CdmBase.deproxy(childNode1.getSubkey(),PolytomousKey.class);
+        String subkey2title = subkey2.getTitleCache();
+        subkey2.setTitleCache(subkey2title + "test", true);
+
+        Assert.assertNotSame(childNode0, childNode1);
+
+        Assert.assertSame(subkey1, subkey2);
+
+        polytomousKeyService.merge(pkey);
+    }
+
+
+
+    @Test
+    public void savePolytomousKeyNodeDataWithSameLanguageInLabel() {
+
+        PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+        PolytomousKeyNode pkeynode = pkey.getRoot();
+
+        Map<Language, LanguageString> label1 = pkeynode.getQuestion().getLabel();
+        label1.size();
+
+
+        Map<Language, LanguageString> label2 = pkeynode.getChildAt(0).getStatement().getLabel();
+        label2.size();
+
+
+        polytomousKeyService.merge(pkey);
+    }
+
+    @Test
+    public void deleteSubKeyInPolytomousSubKeyWithoutInitializing() {
+        PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+
+        PolytomousKeyNode rootNode = pKey.getRoot();
+        PolytomousKeyNode child = rootNode.getChildAt(0);
+        PolytomousKey subKey = child.getSubkey();
+
+        polytomousKeyService.delete(subKey.getUuid());
+
+        // retrieving subkey shows its null
+        subKey = CdmBase.deproxy(polytomousKeyService.find(subKeyUuid),PolytomousKey.class);
+        Assert.assertNull(subKey);
+
+        pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+
+        rootNode = pKey.getRoot();
+        child = rootNode.getChildAt(0);
+        subKey = child.getSubkey();
+        // subkey will not be null, because the delete functionality of the subkey
+        // does not currently delete it from a polytomous key node
+
+        // FIXME: With the new delete functionality this should be null, shouldn't it ?
+        Assert.assertNotNull(subKey);
+    }
+
+
+    @Test
+    public void deleteSubKeyInPolytomousNode() {
+        PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+
+        PolytomousKeyNode rootNode = pKey.getRoot();
+        List<PolytomousKeyNode> children = rootNode.getChildren();
+        PolytomousKeyNode child = rootNode.getChildAt(0);
+        polytomousKeyNodeService.delete(child.getUuid(), true);
+
+        pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+        rootNode = pKey.getRoot();
+        children = rootNode.getChildren();
+        Assert.assertFalse(children.contains(child));
+    }
+
+    @Test
+    public void deleteSubKeyInPolytomousSubKeyAfterInitializing() {
+        PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+
+        PolytomousKeyNode rootNode = pKey.getRoot();
+        PolytomousKeyNode child = rootNode.getChildAt(0);
+        PolytomousKey subKey = child.getSubkey();
+        // this call initializes the subkey
+        subKey.getRoot();
+
+        polytomousKeyService.delete(subKey);
+
+        // since subKey was initialized before the delete, it will be
+        // accesible even after the delete. This behaviour is similar
+        // to hibernate session delete where the deleted object is
+        // made transient, but not deleted from the object graph
+
+        PolytomousKeyNode subKeyRootNode = subKey.getRoot();
+        Assert.assertNotNull(subKey);
+    }
+
+    @Test
+    public void saveNewTermVocabulary() {
+        TermVocabulary termVocabulary =
+                TermVocabulary.NewInstance(TermType.Feature,
+                        null,
+                        "Untitled",
+                        null,
+                        null);
+        try {
+            List<TermVocabulary<DefinedTermBase>> vocabularies = vocabularyService.findByTermType(TermType.Feature);
+
+            for(TermVocabulary vocab : vocabularies) {
+                vocab.getTermsOrderedByLabels(Language.ENGLISH());
+            }
+
+            termVocabulary = vocabularyService.merge(termVocabulary);
+            vocabularies.add(termVocabulary);
+            termVocabulary.setLabel("Test");
+            vocabularyService.merge(new ArrayList<TermVocabulary>(vocabularies));
+        } finally {
+            vocabularyService.delete(termVocabulary);
+        }
+    }
+
+    @Ignore // should be enabled once resolution of #5066 is merged into cdmlib main branch
+    @Test
+    public void saveNewTerm() {
+        UUID vocNameFeatureUuid = UUID.fromString("fa7ca3eef-4092-49e1-beec-ed5096193e5e");
+        UUID vocFeatureUuid = UUID.fromString("b187d555-f06f-4d65-9e53-da7c93f8eaa8");
+        DefinedTermBase newTerm = TermType.Feature.getEmptyDefinedTermBase();
+        newTerm.setLabel("CreateTest");
+
+        try {
+
+            Assert.assertNotNull(newTerm);
+            TermVocabulary vocNameFeature = vocabularyService.find(vocNameFeatureUuid);
+            TermVocabulary vocFeature = vocabularyService.find(vocFeatureUuid);
+
+            List<TermVocabulary> vocs = new ArrayList<TermVocabulary>();
+
+            vocs.add(vocNameFeature);
+            vocs.add(vocFeature);
+
+            vocNameFeature.addTerm(newTerm);
+
+            vocs = vocabularyService.merge(vocs);
+            for(TermVocabulary voc : vocs) {
+                if(voc.getUuid().equals(vocNameFeatureUuid)) {
+                    vocNameFeature = voc;
+                }
+            }
+
+            Assert.assertTrue(vocNameFeature.getTerms().contains(newTerm));
+
+            for(Object obj : vocNameFeature.getTerms()) {
+                DefinedTermBase dtb = (DefinedTermBase)obj;
+                if("CreateTest".equals(dtb.getLabel())) {
+                    newTerm = dtb;
+                    Assert.assertNotNull(dtb.getCreatedBy());
+                    Assert.assertNotNull(dtb.getCreated());
+                } else {
+                    Assert.assertNull(dtb.getCreatedBy());
+                }
+            }
+            newTerm.setLabel("UpdateTest");
+            newTerm = termService.merge(newTerm);
+            Assert.assertNotNull(newTerm.getUpdatedBy());
+            Assert.assertNotNull(newTerm.getUpdated());
+
+            Assert.assertNull(vocNameFeature.getCreatedBy());
+            Assert.assertNull(vocFeature.getCreatedBy());
+        } finally {
+            if(termService.find(newTerm.getUuid()) != null) {
+                termService.delete(newTerm.getUuid());
+            }
+        }
+    }
+
+    @Ignore // activate after fixing #5138
+    @Test
+    public void updatePerson() {
+        Person person = (Person) CdmApplicationState.getCurrentAppConfig().getAgentService().load(personUuid);
+        // Note : at this point the contact field in Person (AgentBase) is initialized even though no
+        //        data related to the Contact class exists in the database.
+        person.setFirstname("Me");
+        CdmApplicationState.getCurrentAppConfig().getAgentService().merge(person);
+
+    }
+
+    @Ignore // activate after fixing #5138
+    @Test
+    public void createPerson() {
+
+        Person person = Person.NewInstance();
+        //person.setTitleCache("New Person", true);
+        person = (Person) CdmApplicationState.getCurrentAppConfig().getAgentService().merge(person);
+        //Note : at this point the contact field in Person (AgentBase) is set to null which is
+        //       different behaviour as compared to a load call on an existing Person entity.
+        //       The fact that the contact is null will lead to the all-delete-orphan error.
+        person = (Person) CdmApplicationState.getCurrentAppConfig().getAgentService().load(person.getUuid());
+        person.setFirstname("Some");
+        CdmApplicationState.getCurrentAppConfig().getAgentService().merge(person);
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManagerTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManagerTest.java
new file mode 100644 (file)
index 0000000..06cf961
--- /dev/null
@@ -0,0 +1,99 @@
+package eu.etaxonomy.taxeditor.session;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.unitils.dbunit.annotation.DataSet;
+
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.taxeditor.httpinvoker.RemotingSessionAwareTest;
+
+//FIXME:Remoting fix data issue : User#30
+//@Ignore
+@DataSet
+public class CdmEntitySessionManagerTest extends RemotingSessionAwareTest {
+
+       private static final Logger logger = Logger.getLogger(CdmEntitySessionManagerTest.class);
+
+
+       IPolytomousKeyService polytomousKeyService = getRemoteApplicationController().getPolytomousKeyService();
+
+       private final UUID polytomousKeyUuid = UUID.fromString("0d53ba20-7de4-4baa-bd8a-401048447d66");
+       private final Language english = Language.getLanguageFromUuid(Language.uuidEnglish);
+
+
+       @BeforeClass
+       public static void initializeCdmEntitySessionManagerTest() {
+       }
+
+
+       @Test
+       public void manageNullSessionTest() {
+
+               PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+               cdmEntitySessionManager.bind(null);
+               Assert.assertSame(pKey, pKey);
+               Assert.assertNull(getActiveSession());
+       }
+
+       @Test
+       public void manageSessionWithObjectTest() {
+               PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+               Assert.assertNotNull(getActiveSession());
+
+
+               // FIXME:Remoting fix test of setting root entities
+               //Assert.assertEquals(rootEntities.size(),1);
+               //Assert.assertSame(rootEntities.get(0), pKey);
+
+               String upTitleCache = "Updated Title Cache";
+               String upStatement = "Updated Statement";
+               pKey.setTitleCache(upTitleCache, true);
+
+               pKey.getRoot().getChildAt(0).getStatement().getLabel(english).setText(upStatement);
+               polytomousKeyService.merge(pKey);
+
+               pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
+
+
+               Assert.assertEquals(pKey.getTitleCache(), upTitleCache);
+               Assert.assertEquals(pKey.getRoot().getChildAt(0).getStatement().getLabel(english).getText(), upStatement);
+       }
+
+       @Test
+       public void manageSessionWithListTest() {
+               List<PolytomousKey> pKeys = polytomousKeyService.list(PolytomousKey.class, null, null, null, null);
+               Assert.assertNotNull(getActiveSession());
+
+
+               // FIXME:Remoting fix test of setting root entities
+               //Assert.assertEquals(rootEntities.size(),2);
+               //Assert.assertSame(rootEntities.get(0),pKeys.get(0));
+               //Assert.assertEquals(rootEntities.get(0).getUuid(),UUID.fromString("9d8bf4f6-a70a-4b80-8556-2ccfb436ff01"));
+               //Assert.assertSame(rootEntities.get(1),pKeys.get(1));
+               //Assert.assertEquals(rootEntities.get(1).getUuid(),UUID.fromString("0d53ba20-7de4-4baa-bd8a-401048447d66"));
+
+               String upTitleCache = "Updated Title Cache";
+               String upStatement = "Updated Statement";
+               pKeys.get(0).setTitleCache(upTitleCache, true);
+               polytomousKeyService.merge(pKeys.get(0));
+               pKeys.get(1).getRoot().getChildAt(0).getStatement().getLabel(english).setText(upStatement);
+               polytomousKeyService.merge(pKeys.get(1));
+
+
+               pKeys = polytomousKeyService.list(PolytomousKey.class, null, null, null, null);
+
+               Assert.assertEquals(pKeys.get(0).getTitleCache(), upTitleCache);
+               Assert.assertEquals(pKeys.get(1).getRoot().getChildAt(0).getStatement().getLabel(english).getText(), upStatement);
+
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/MockSessionOwner.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/MockSessionOwner.java
new file mode 100644 (file)
index 0000000..d04c17f
--- /dev/null
@@ -0,0 +1,100 @@
+package eu.etaxonomy.taxeditor.session;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent;
+import eu.etaxonomy.cdm.api.application.ICdmChangeListener;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+public class MockSessionOwner<T extends CdmBase> implements ICdmEntitySessionEnabled, ICdmChangeListener {
+
+    private static final Logger logger = Logger.getLogger(MockSessionOwner.class);
+
+    private final List<T> rootEntities;
+    private Set<T> expectedUpdatedObjects;
+    private Set<? extends CdmBase> eventUpdatedObjects;
+
+    private ICdmEntitySession session;
+
+    public MockSessionOwner() {
+        this.rootEntities = null;
+        this.expectedUpdatedObjects = new HashSet<T>();
+    }
+
+//    public MockSessionOwner(Set<T> updatedObjects) {
+//        this.rootEntities = null;
+//        this.updatedObjects = updatedObjects;
+//    }
+//
+//    public MockSessionOwner(List<T> rootEntities) {
+//        this.rootEntities = rootEntities;
+//    }
+
+    public void setExpectedUpdatedObjects(Set<T> updatedObjects) {
+        this.expectedUpdatedObjects = updatedObjects;
+    }
+
+    public void addExpectedUpdatedObject(T updatedObject) {
+        this.expectedUpdatedObjects.add(updatedObject);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()
+     */
+    @Override
+    public ICdmEntitySession getCdmEntitySession() {
+        return session;
+    }
+
+    public void setCdmEntitySession(ICdmEntitySession session) {
+        this.session = session;;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public  List<T> getRootEntities() {
+        return rootEntities;
+    }
+
+    public void dispose() {
+        if(session != null) {
+            session.dispose();
+            logger.info("disposed of session from session owner : " + this);
+        }
+    }
+
+    public Set<? extends CdmBase> getEventUpdatedObjects() {
+        return eventUpdatedObjects;
+    }
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.application.ICdmChangeListener#onChange(eu.etaxonomy.cdm.api.application.CdmChangeEvent)
+     */
+    @Override
+    public void onChange(CdmChangeEvent event) {
+        eventUpdatedObjects = event.getChangedObjects();
+        if(expectedUpdatedObjects != null && !expectedUpdatedObjects.isEmpty()) {
+            for(CdmBase cb : expectedUpdatedObjects) {
+                Assert.assertTrue(event.getChangedObjects().contains(cb));
+            }
+        }
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/MockConversationEnabled.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/MockConversationEnabled.java
new file mode 100644 (file)
index 0000000..089a3e0
--- /dev/null
@@ -0,0 +1,41 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.test;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
+import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
+import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+
+/**
+ * @author cmathew
+ * @date 15 Jun 2015
+ *
+ */
+public class MockConversationEnabled implements IConversationEnabled {
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
+     */
+    @Override
+    public void update(CdmDataChangeMap arg0) {
+        // TODO Auto-generated method stub
+
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
+     */
+    @Override
+    public ConversationHolder getConversationHolder() {
+        return new ConversationHolderMock();
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/CdmServerInfoTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/CdmServerInfoTest.java
new file mode 100644 (file)
index 0000000..f950b04
--- /dev/null
@@ -0,0 +1,81 @@
+// $Id$
+/**
+ * Copyright (C) 2015 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.ui.dialogs;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.unitils.UnitilsJUnit4;
+
+import eu.etaxonomy.taxeditor.remoting.server.CDMServerException;
+import eu.etaxonomy.taxeditor.remoting.source.CdmServerInfo;
+import eu.etaxonomy.taxeditor.remoting.source.CdmServerInfo.CdmInstanceInfo;
+
+/**
+ * @author cmathew
+ * @date 26 Jan 2015
+ *
+ */
+
+public class CdmServerInfoTest extends UnitilsJUnit4 {
+
+    @Test
+    public void pingServersTest() {
+        List<CdmServerInfo> servers = CdmServerInfo.getCdmServers();
+        for(CdmServerInfo server : servers) {
+            server.pingServer();
+        }
+    }
+
+
+    @Ignore // this should be targetting integration or production
+    @Test
+    public void pingInstancesTest() {
+        CdmServerInfo csii = new CdmServerInfo("edit-test", "test.e-taxonomy.eu", 8080);
+        try {
+            csii.refreshInstances();
+            List<CdmInstanceInfo> instances = csii.getInstances();
+            for(CdmInstanceInfo instance : instances) {
+                Assert.assertTrue(csii.pingInstance(instance, 8080));
+            }
+        } catch (CDMServerException e) {
+            Assert.fail("Execption should not be thrown here");
+        }
+    }
+
+    @Test
+    public void refreshWrongInstancesTest() {
+        CdmServerInfo wrongCsii = new CdmServerInfo("local", "local", 8080);
+        try {
+            wrongCsii.refreshInstances();
+            List<CdmInstanceInfo> instances = wrongCsii.getInstances();
+            Assert.fail("Execption should be thrown here");
+        } catch (CDMServerException e) {
+
+        }
+    }
+
+    @Ignore // this should be targetting integration or production
+    @Test
+    public void refreshInstancesTest() throws CDMServerException {
+        CdmServerInfo cdmServerInfo = new CdmServerInfo("edit-test", "test.e-taxonomy.eu", 8080);
+        cdmServerInfo.refreshInstances();
+        List<CdmInstanceInfo> instances = cdmServerInfo.getInstances();
+        Assert.assertTrue(instances != null && !instances.isEmpty());
+    }
+
+    @Test
+    public void convertToServerConfigTest() {
+
+
+    }
+}
index 2905ba58ba38a88f2a32a1ddd41ec7459080f8b7..786f1fd2490e62896f91f0694ac10d05705b1416 100644 (file)
@@ -1,13 +1,14 @@
 package eu.etaxonomy.taxeditor.ui.dialogs;\r
 \r
 import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Ignore;\r
 import org.junit.Test;\r
 \r
 import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
 \r
-\r
+@Ignore\r
 public class LoginDialogTest extends AbstractEditorTest{\r
-               \r
+\r
        @Test\r
        public void canLoginAsAdmin() throws Exception {\r
                bot.menu("General").menu("Login").click();\r
@@ -16,12 +17,12 @@ public class LoginDialogTest extends AbstractEditorTest{
                bot.textWithLabel("Password").setText("00000");\r
                utils.ok();\r
        }\r
-       \r
+\r
        @Test\r
        public void canCancelLogin() throws Exception {\r
                bot.menu("General").menu("Login").click();\r
                bot.waitUntil(Conditions.shellIsActive("Login"));\r
                utils.cancel();\r
        }\r
-       \r
+\r
 }\r
index 245f93498c619b926cf4124710aa5026ab182868..233cd8127bf2f25099f3e8adc86d0004cfbc2a59 100644 (file)
@@ -1,19 +1,21 @@
 /**\r
- * \r
+ *\r
  */\r
 package eu.etaxonomy.taxeditor.ui.selection;\r
 \r
 import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Ignore;\r
 import org.junit.Test;\r
 \r
 /**\r
- * This test will only test the selection element itself. The test may have to start other \r
- * dialogs open windows before to get at the selection element. Any errors on the way \r
+ * This test will only test the selection element itself. The test may have to start other\r
+ * dialogs open windows before to get at the selection element. Any errors on the way\r
  * should be handled by different tests.\r
- * \r
+ *\r
  * @author n.hoffmann\r
  *\r
  */\r
+@Ignore\r
 public class ClassificationSelectionElementTest extends AbstractSelectionElementTest{\r
        @Override\r
        public void setup() {\r
@@ -21,7 +23,7 @@ public class ClassificationSelectionElementTest extends AbstractSelectionElement
                bot.menu("General").menu("New").menu("Taxon").click();\r
                bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
        }\r
-       \r
+\r
        @Test\r
        public void canSelectClassification() {\r
                utils.openFilteredSelection(0, "Choose a Classification");\r
index a8b653ca5c32cafd94f7fe9ebc313024ff076511..1f1badc2c7e28f91f3d2e228ef38a8cfd175b1fd 100644 (file)
@@ -1,15 +1,17 @@
 /**\r
- * \r
+ *\r
  */\r
 package eu.etaxonomy.taxeditor.ui.selection;\r
 \r
 import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Ignore;\r
 import org.junit.Test;\r
 \r
 /**\r
  * @author n.hoffmann\r
  *\r
  */\r
+@Ignore\r
 public class NameSelectionElementTest extends AbstractSelectionElementTest {\r
        @Override\r
        public void setup() {\r
@@ -17,7 +19,7 @@ public class NameSelectionElementTest extends AbstractSelectionElementTest {
                bot.menu("General").menu("New").menu("Taxon").click();\r
                bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
        }\r
-       \r
+\r
        @Test\r
        public void canSelectName() {\r
                utils.openFilteredSelection(3, "Choose a name");\r
index 2b29c873906e4a5a1a951daef1a3a6c82d8cca10..16697a4857268e186a3407d59b5dc259216e67b3 100644 (file)
@@ -1,15 +1,17 @@
 /**\r
- * \r
+ *\r
  */\r
 package eu.etaxonomy.taxeditor.ui.selection;\r
 \r
 import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Ignore;\r
 import org.junit.Test;\r
 \r
 /**\r
  * @author n.hoffmann\r
  *\r
  */\r
+@Ignore\r
 public class TaxonNodeSelectionElementTest extends AbstractSelectionElementTest {\r
        @Override\r
        public void setup() {\r
@@ -17,11 +19,11 @@ public class TaxonNodeSelectionElementTest extends AbstractSelectionElementTest
                bot.menu("General").menu("New").menu("Taxon").click();\r
                bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
        }\r
-       \r
+\r
        @Test\r
        public void canSelectTaxon() {\r
                utils.openFilteredSelection(1, "Select parent taxon");\r
                utils.cancel();\r
        }\r
-       \r
+\r
 }\r
index af84076b888edb7f4d49549cdc01ad657d2ca6c4..fef3859f671d184031b2fee83fc7c9882e015722 100644 (file)
@@ -1,19 +1,21 @@
 /**\r
- * \r
+ *\r
  */\r
 package eu.etaxonomy.taxeditor.ui.selection;\r
 \r
 import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Ignore;\r
 import org.junit.Test;\r
 \r
 /**\r
- * This test will only test the selection element itself. The test may have to start other \r
- * dialogs open windows before to get at the selection element. Any errors on the way \r
+ * This test will only test the selection element itself. The test may have to start other\r
+ * dialogs open windows before to get at the selection element. Any errors on the way\r
  * should be handled by different tests.\r
- * \r
+ *\r
  * @author n.hoffmann\r
  *\r
  */\r
+@Ignore\r
 public class TaxonSelectionElementTest extends AbstractSelectionElementTest {\r
        @Override\r
        public void setup() {\r
@@ -21,7 +23,7 @@ public class TaxonSelectionElementTest extends AbstractSelectionElementTest {
                bot.menu("General").menu("New").menu("Taxon").click();\r
                bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
        }\r
-       \r
+\r
        @Test\r
        public void canSelectTaxon() {\r
                utils.openFilteredSelection(2, "Choose a taxon");\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/util/H2DbSupport.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/util/H2DbSupport.java
new file mode 100644 (file)
index 0000000..2dddbf5
--- /dev/null
@@ -0,0 +1,166 @@
+package eu.etaxonomy.taxeditor.util;
+
+/**
+ * based on from http://code.google.com/p/java-tester/source/browse/trunk/src/main/java/org/jtester/unitils/database/H2DbSupport.java
+ */
+
+
+import java.util.Set;
+
+import org.unitils.core.dbsupport.DbSupport;
+
+public class H2DbSupport extends DbSupport {
+        /**
+         * Creates support for HsqlDb databases.
+         */
+        public H2DbSupport() {
+                super("h2");
+        }
+
+        @Override
+        public Set<String> getColumnNames(String tableName) {
+                return getSQLHandler().getItemsAsStringSet(
+                                "select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = '" + tableName
+                                                + "' AND TABLE_SCHEMA = '" + getSchemaName() + "'");
+        }
+
+        @Override
+        public Set<String> getTableNames() {
+                return getSQLHandler().getItemsAsStringSet(
+                                "select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_TYPE = 'TABLE' AND TABLE_SCHEMA = '"
+                                                + getSchemaName() + "'");
+        }
+
+        @Override
+        public Set<String> getViewNames() {
+                return getSQLHandler().getItemsAsStringSet(
+                                "select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_TYPE = 'VIEW' AND TABLE_SCHEMA = '"
+                                                + getSchemaName() + "'");
+        }
+
+        @Override
+        public Set<String> getSequenceNames() {
+                return getSQLHandler().getItemsAsStringSet(
+                                "select SEQUENCE_NAME from INFORMATION_SCHEMA.SEQUENCES where SEQUENCE_SCHEMA = '"
+                                                + getSchemaName() + "'");
+        }
+
+        @Override
+        public Set<String> getTriggerNames() {
+                return getSQLHandler().getItemsAsStringSet(
+                                "select TRIGGER_NAME from INFORMATION_SCHEMA.TRIGGERS where TRIGGER_SCHEMA = '" + getSchemaName()
+                                                + "'");
+        }
+
+        @Override
+        public long getSequenceValue(String sequenceName) {
+                return getSQLHandler().getItemAsLong(
+                                "select CURRENT_VALUE from INFORMATION_SCHEMA.SEQUENCES where SEQUENCE_SCHEMA = '"
+                                                + getSchemaName() + "' and SEQUENCE_NAME = '" + sequenceName + "'");
+        }
+
+        @Override
+        public boolean supportsSequences() {
+                return true;
+        }
+
+        @Override
+        public boolean supportsTriggers() {
+                return true;
+        }
+
+        @Override
+        public boolean supportsIdentityColumns() {
+                return true;
+        }
+
+        @Override
+        public void incrementSequenceToValue(String sequenceName, long newSequenceValue) {
+                getSQLHandler().executeUpdate(
+                       "alter sequence " + qualified(sequenceName) + " restart with " + newSequenceValue);
+        }
+
+        @Override
+        public void incrementIdentityColumnToValue(String tableName, String identityColumnName, long identityValue) {
+                getSQLHandler().executeUpdate(
+                      "alter table " + qualified(tableName) + " alter column " + quoted(identityColumnName)
+                           + " RESTART WITH " + identityValue);
+        }
+
+        @Override
+        public void disableReferentialConstraints() {
+                Set<String> tableNames = getTableNames();
+                for (String tableName : tableNames) {
+                       disableReferentialConstraints(tableName);
+                }
+        }
+
+        @Override
+        public void disableValueConstraints() {
+                Set<String> tableNames = getTableNames();
+                for (String tableName : tableNames) {
+                        disableValueConstraints(tableName);
+                }
+        }
+
+        private void disableReferentialConstraints(String tableName) {
+                Set<String> constraintNames = this.getForeignKeyConstraintNames(tableName);
+                for (String constraintName : constraintNames) {
+                       this.removeForeignKeyConstraint(tableName, constraintName);
+                }
+        }
+
+        private void disableValueConstraints(String tableName) {
+                Set<String> primaryKeyColumnNames = this.getPrimaryKeyColumnNames(tableName);
+
+                Set<String> notNullColumnNames = this.getNotNullColummnNames(tableName);
+                for (String notNullColumnName : notNullColumnNames) {
+                    if (primaryKeyColumnNames.contains(notNullColumnName)) {
+                            continue;
+                    }
+                    this.removeNotNullConstraint(tableName, notNullColumnName);
+                }
+        }
+
+        /**
+         * Gets the names of all identity columns of the given table.
+         * <p/>
+         * todo check, at this moment the PK columns are returned
+         *
+         * @param tableName The table, not null
+         * @return The names of the identity columns of the table with the given name
+         */
+        @Override
+        public Set<String> getIdentityColumnNames(String tableName) {
+            return getPrimaryKeyColumnNames(tableName);
+        }
+
+        private Set<String> getPrimaryKeyColumnNames(String tableName) {
+                return getSQLHandler().getItemsAsStringSet(
+                                "select COLUMN_NAME from INFORMATION_SCHEMA.INDEXES where PRIMARY_KEY=TRUE AND TABLE_NAME = '"
+                                                + tableName + "' AND TABLE_SCHEMA = '" + getSchemaName() + "'");
+        }
+
+        private Set<String> getNotNullColummnNames(String tableName) {
+                return getSQLHandler().getItemsAsStringSet(
+                                "select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where IS_NULLABLE = 'NO' AND TABLE_NAME = '"
+                                                + tableName + "' AND TABLE_SCHEMA = '" + getSchemaName() + "'");
+        }
+
+        private Set<String> getForeignKeyConstraintNames(String tableName) {
+                return getSQLHandler().getItemsAsStringSet(
+                                "select CONSTRAINT_NAME from INFORMATION_SCHEMA.CONSTRAINTS "
+                                                + "where CONSTRAINT_TYPE = 'REFERENTIAL' AND TABLE_NAME = '" + tableName
+                                                + "' AND CONSTRAINT_SCHEMA = '" + getSchemaName() + "'");
+        }
+
+        private void removeForeignKeyConstraint(String tableName, String constraintName) {
+                getSQLHandler().executeUpdate(
+                                "alter table " + qualified(tableName) + " drop constraint " + quoted(constraintName));
+        }
+
+        private void removeNotNullConstraint(String tableName, String columnName) {
+                getSQLHandler().executeUpdate(
+                                "alter table " + qualified(tableName) + " alter column " + quoted(columnName) + " set null");
+        }
+}
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/.cdmLibrary/writableResources/cdm.datasources.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/.cdmLibrary/writableResources/cdm.datasources.xml
new file mode 100644 (file)
index 0000000..7cb8fa8
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans       http://www.springframework.org/schema/beans/spring-beans-3.1.xsd      http://www.springframework.org/schema/context      http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+  <bean id="defaultRemoteSource">
+    <property name="server" value="127.0.0.1" />
+    <property name="port" value="9090" />
+    <property name="contextPath" value="" />
+  </bean>
+  <bean id="incompleteRemoteSource">
+    <property name="port" value="9090" />
+    <property name="contextPath" value="" />
+  </bean>
+</beans>
+
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/datasources.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/datasources.xml
new file mode 100644 (file)
index 0000000..7f9b665
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:tx="http://www.springframework.org/schema/tx"
+    xmlns:context="http://www.springframework.org/schema/context"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+    http://www.springframework.org/schema/context   http://www.springframework.org/schema/context/spring-context-2.5.xsd
+    http://www.springframework.org/schema/tx   http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+    ">
+
+    <!--
+      DataSourceProperties allow configuring specific properties of the datasources
+
+       * cdmlib-remote.xslBasePath:
+            alternative base path for REST services to retrieve XSL style sheets from.
+            the base path must be on the same domain since cross domain xsl loading is
+            not permitted
+      -->
+      <bean id="dataSourceProperties" class="eu.etaxonomy.cdm.remote.config.DataSourceProperties">
+        <property name="propsMap">
+          <map>
+            <!--
+            <entry key="dataSourceBeanID">
+                <props>
+                    <prop key="cdmlib-remote.xslBasePath">/xsl</prop>
+                </props>
+            </entry>
+             -->
+            </map>
+        </property>
+      </bean>
+
+    <bean id="cdmTest"  lazy-init="true" class="com.mchange.v2.c3p0.ComboPooledDataSource">
+        <property name="driverClass" value="eu.etaxonomy.cdm.database.LocalH2"/>
+        <property name="user" value="sa" />
+        <property name="password" value="" />
+        <property name="jdbcUrl" value="jdbc:h2:file:./target/classes/h2/cdmTest;AUTO_SERVER=TRUE"/>
+    </bean>
+</beans>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.xml
new file mode 100644 (file)
index 0000000..6346576
--- /dev/null
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+  generated by Jailer 4.3, Thu Oct 09 18:00:09 CEST 2014 from cmathew@cmbgbm-t530
+  
+  Extraction Model:  PolytomousKey where uuid like '0d53ba20-7de4-4baa-bd8a-401048447d66' (extractionmodel/by-example/SbE-PolytomousKey-17-59-56-907.csv)
+  Database URL:      jdbc:mysql://127.0.0.1:3306/local-cyprus
+  Database User:     root
+  
+  Exported Rows:     79
+      AgentBase                      1
+      Credit                         1
+      Extension                      1
+      KeyStatement                   10
+      KeyStatement_LanguageString    10
+      LanguageString                 19
+      OriginalSourceBase             2
+      PolytomousKey                  2
+      PolytomousKeyNode              10
+      PolytomousKeyNode_LanguageString 9
+      PolytomousKey_Credit           1
+      PolytomousKey_Extension        1
+      PolytomousKey_OriginalSourceBase 2
+      PolytomousKey_RightsInfo       1
+      PolytomousKey_Taxon            1
+      RightsInfo                     1
+      TaxonBase                      6
+  
+--><dataset>
+  <PolytomousKey_Extension PolytomousKey_id="1550" extensions_id="10"/>
+
+  <PolytomousKey_Credit PolytomousKey_id="1550" credits_id="20" sortIndex="0"/>
+
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2751" modifyingtext_id="13780" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2752" modifyingtext_id="13781" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2753" modifyingtext_id="13795" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2754" modifyingtext_id="13788" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2755" modifyingtext_id="13785" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2756" modifyingtext_id="13787" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2757" modifyingtext_id="13794" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2758" modifyingtext_id="13791" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2759" modifyingtext_id="13793" modifyingtext_mapkey_id="124"/>
+
+  <LanguageString id="13780" created="2014-03-10 10:03:09.0" uuid="cceaa60b-61f4-4c8a-bb0e-d45f0fa3e2dc" text="Modifying Text 1a" language_id="124"/>
+  <LanguageString id="13781" created="2014-03-10 10:03:17.0" uuid="01a0ace4-de49-4725-9909-e881fb13035d" text="Modifying Text 1b" language_id="124"/>
+  <LanguageString id="13782" created="2014-03-10 10:03:48.0" uuid="ec0fea40-69dd-4c3e-ab7a-34948037a069" updated="2014-03-10 10:06:32.0" text="Capitula with ligulate ray-florets; leaves pinnatisect" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13783" created="2014-03-10 10:04:03.0" uuid="82f8a3a0-567f-4d89-ba10-3f3699111d55" updated="2014-03-10 10:06:32.0" text="Ray-florets yellow" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13784" created="2014-03-10 10:04:21.0" uuid="4270501f-1efc-45c2-9e8f-c65f120e8f4c" updated="2014-03-10 10:06:32.0" text="Stem thinly pilose; leaves 10-15 mm wide, with spreading linear-subulate segments; perennial herb" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13785" created="2014-03-10 10:04:07.0" uuid="813f5fd6-c8f6-43e8-9a2b-1464f3ba052a" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13786" created="2014-03-10 10:04:53.0" uuid="ba17ac94-632f-4d69-ac89-a882e19ff1c5" updated="2014-03-10 10:06:32.0" text="Stem white-tomentose; leaves 1-3 mm wide, with minute overlapping, transverse segments; small subshrubs with a woody base" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13787" created="2014-03-10 10:04:34.0" uuid="ab219a5d-e0c4-45fd-8405-6693c3fb8abf" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13788" created="2014-03-10 10:03:53.0" uuid="2baec690-422d-4f85-bcfd-24f5718cbecf" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13789" created="2014-03-10 10:05:16.0" uuid="7c6a7984-8e6f-48b1-86b2-d5d643199bf3" updated="2014-03-10 10:06:32.0" text="Ray-florets white" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13790" created="2014-03-10 10:05:34.0" uuid="72bd8bc9-1904-47ab-8bec-b9296a98b244" updated="2014-03-10 10:06:32.0" text="Perennial herb; stem pilose, hairy or glabrescent, but not tomentose; ligules 1-2 mm diam." createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13791" created="2014-03-10 10:05:20.0" uuid="c917e3fb-e48b-4207-b77d-c1c108e37906" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13792" created="2014-03-10 10:06:15.0" uuid="c5dd35d8-da6a-4d05-b30c-6b55220bd989" updated="2014-03-10 10:06:32.0" text="Shrub with a woody base; stem white-tomentose or woolly; ligules 4-5 mm diam." createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13793" created="2014-03-10 10:06:03.0" uuid="227a17f6-1ca1-4d06-8480-25711b614863" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13794" created="2014-03-10 10:05:07.0" uuid="2c434ab1-8ca7-4464-b5cd-4cee40db41ed" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13795" created="2014-03-10 10:03:38.0" uuid="27190d54-f53b-401e-820c-edfb36d4bcbf" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13796" created="2014-03-10 10:03:25.0" uuid="69cffb28-8a85-478f-bcae-533e20938ccd" updated="2014-03-10 10:06:32.0" text="Capitula without ligulate ray-florets; leaves entire or subentire" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="14570" created="2014-10-09 15:42:33.0" uuid="84967760-6dbe-4af4-8e0c-309f1af6ce20" updated="2014-10-09 15:42:44.0" text="Question 1" createdby_id="10" updatedby_id="10" language_id="124"/>
+  <LanguageString id="14571" created="2014-10-09 15:42:55.0" uuid="d82f37b1-f51d-42c1-a291-0c7820db155e" updated="2014-10-09 15:43:03.0" text="Question 2" createdby_id="10" updatedby_id="10" language_id="124"/>
+  <LanguageString id="14572" created="2014-10-09 15:42:55.0" uuid="d82f37b1-f51d-42c1-a291-0c7820db155f" updated="2014-10-09 15:43:03.0" text="Koi Sach Ya Sawal" createdby_id="30" updatedby_id="30" language_id="125"/>
+
+  <TaxonBase DTYPE="Taxon" id="32" created="2011-03-01 20:11:26.0" uuid="8217ef77-2ab1-4318-bd67-ccd0cdef07c4" protectedtitlecache="false" titleCache="Achillea arabica Kotschy sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="35" created="2010-12-21 15:09:43.0" uuid="fade44fd-34b2-455f-861a-d1372b866f06" protectedtitlecache="false" titleCache="Achillea sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="36" created="2011-03-01 20:11:26.0" uuid="05f0a2e1-e3c3-4e74-8fec-8a0ae89236c3" protectedtitlecache="false" titleCache="Achillea cretica L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="37" created="2011-03-01 20:11:26.0" uuid="0f8d18a9-e861-48e8-bfab-83e01a379bc0" protectedtitlecache="false" titleCache="Achillea maritima (L.)Ehrend. &amp; Y.-P. Guo subsp. maritima sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="40" created="2010-12-21 15:09:43.0" uuid="2b336df7-29e8-4f79-985f-66502739d22f" protectedtitlecache="false" titleCache="Achillea millefolium L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="41" created="2011-03-01 20:11:26.0" uuid="094e1af8-efd8-4605-b037-b4f715379562" protectedtitlecache="false" titleCache="Achillea santolinoides subsp. wilhelmsii (K. Koch) Greuter sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11" sec_id="10" publish="true"/>
+
+  <PolytomousKey_Taxon polytomousKey_id="1550" taxon_id="35"/>
+
+  <RightsInfo id="10" created="2014-10-09 15:45:53.0" uuid="bdfb572b-be25-45e7-9349-22a9da43531f" updated="2014-10-09 15:48:01.0" text="Rights Text Test" createdby_id="10" updatedby_id="10" agent_id="4808" type_id="2056"/>
+
+  <PolytomousKeyNode id="2750" created="2014-03-10 10:02:35.0" uuid="75e4c924-ff58-4ee7-a59d-fd9173517d08" updated="2014-03-10 10:02:42.0" nodenumber="1" createdby_id="30" updatedby_id="30" key_id="1550" question_id="2760" statement_id="2460"/>
+  <PolytomousKeyNode id="2751" created="2014-03-10 10:02:52.0" uuid="23e51ff7-11b1-443b-aff2-3fe8b5ace9fe" sortindex="0" key_id="1550" statement_id="2467" subkey_id="1550" taxon_id="37" parent_id="2750"/>
+  <PolytomousKeyNode id="2752" created="2014-03-10 10:03:16.0" uuid="dcf326f7-c0ad-4e76-b64e-43aea11f767c" key_id="1550"/>
+  <PolytomousKeyNode id="2753" created="2014-03-10 10:03:38.0" uuid="b775c027-13c0-4b87-8aa9-712faeaafbdc" updated="2014-03-10 10:06:32.0" nodenumber="2" sortindex="1" createdby_id="30" updatedby_id="30" key_id="1550" question_id="2761" statement_id="2460"  subkey_id="1550" parent_id="2750"/>
+  <PolytomousKeyNode id="2754" created="2014-03-10 10:03:52.0" uuid="df5d5922-35de-43d5-9d46-7730ae28eeb3" updated="2014-03-10 10:06:32.0" nodenumber="3" sortindex="0" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2461" subkey_id="1550" parent_id="2753"/>
+  <PolytomousKeyNode id="2755" created="2014-03-10 10:04:07.0" uuid="0c8583ee-399e-433c-b76b-272c54dbd9f5" updated="2014-03-10 10:06:32.0" sortindex="0" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2462" taxon_id="32" parent_id="2754"/>
+  <PolytomousKeyNode id="2756" created="2014-03-10 10:04:34.0" uuid="a10e1e61-82c0-470e-a245-10a927b80c9a" updated="2014-03-10 10:06:32.0" sortindex="1" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2463" taxon_id="41" parent_id="2754"/>
+  <PolytomousKeyNode id="2757" created="2014-03-10 10:05:07.0" uuid="19f7a6a2-4c55-49cb-8b92-d68a9fd9074c" updated="2014-03-10 10:06:32.0" nodenumber="4" sortindex="1" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2464" parent_id="2753"/>
+  <PolytomousKeyNode id="2758" created="2014-03-10 10:05:20.0" uuid="0a4d86d1-fba5-4088-8dcc-6f0e7268ca5b" updated="2014-03-10 10:06:32.0" sortindex="0" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2465" taxon_id="40" parent_id="2757"/>
+  <PolytomousKeyNode id="2759" created="2014-03-10 10:06:03.0" uuid="827c9df4-ac15-4163-95ab-616d51f62803" updated="2014-03-10 10:06:32.0" sortindex="1" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2466" taxon_id="36" parent_id="2757"/>
+
+  <Credit id="20" created="2014-10-09 15:45:22.0" uuid="aa412b15-ee6c-4834-b14e-a66969cb398d" updated="2014-10-09 15:48:01.0" text="Credits Text Test" createdby_id="10" updatedby_id="10" language_id="124" agent_id="4809"/>
+
+  <KeyStatement id="2460" created="2014-03-10 10:03:48.0" uuid="66da6df7-784c-4d5a-9378-58b2cf92ba13" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2461" created="2014-03-10 10:04:03.0" uuid="f9cfd498-de47-48fd-b38c-43cf57b63750" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2462" created="2014-03-10 10:04:21.0" uuid="817fb39e-91d4-4d8c-a942-6acab47575d1" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2463" created="2014-03-10 10:04:53.0" uuid="6b571b86-7764-4f27-925c-ae5e2653f7ad" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2464" created="2014-03-10 10:05:16.0" uuid="91bbb534-abdf-4915-9f6f-a0cb41f8cf58" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2465" created="2014-03-10 10:05:34.0" uuid="1991ca31-2630-4917-8db3-eb67cec8f231" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2466" created="2014-03-10 10:06:15.0" uuid="3e1bbc59-b098-4533-ac35-245e1140a0ae" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2467" created="2014-03-10 10:03:24.0" uuid="68fd99f6-64ce-4bb8-a6af-d2cf2c046e2c" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2760" created="2014-10-09 15:42:33.0" uuid="b9702653-f620-4208-bda9-a6fe082004d1" updated="2014-10-09 15:42:44.0" createdby_id="10" updatedby_id="10"/>
+  <KeyStatement id="2761" created="2014-10-09 15:42:55.0" uuid="688a432f-4b57-4c6f-a8f6-0c468a28cb7c" updated="2014-10-09 15:43:03.0" createdby_id="10" updatedby_id="10"/>
+
+  <AgentBase DTYPE="Person" id="4809" created="2010-12-21 15:09:59.0" uuid="945d08f2-eb92-45b6-9252-6275ea6d338b" protectedtitlecache="false" titleCache="R. A. Graham" nomenclaturaltitle="R. A. Graham" createdby_id="11"/>
+
+  <Extension id="10" created="2014-10-09 15:45:41.0" uuid="0d6f35d7-7e76-446a-a017-7e8355ee1b4c" updated="2014-10-09 15:48:01.0" extendedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" extendedObj_id="1550" value="http://test.com" createdby_id="10" updatedby_id="10" type_id="2075"/>
+
+  <PolytomousKey_OriginalSourceBase PolytomousKey_id="1550" sources_id="23710"/>
+  <PolytomousKey_OriginalSourceBase PolytomousKey_id="1550" sources_id="23711"/>
+
+  <PolytomousKey_RightsInfo PolytomousKey_id="1550" rights_id="10"/>
+
+  <KeyStatement_LanguageString KeyStatement_id="2460" label_id="13782" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2461" label_id="13783" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2462" label_id="13784" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2463" label_id="13786" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2464" label_id="13789" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2465" label_id="13790" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2466" label_id="13792" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2467" label_id="13796" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2760" label_id="14570" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2761" label_id="14571" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2460" label_id="14572" label_mapkey_id="125"/>  
+
+  <PolytomousKey id="751" created="2013-03-24 11:17:08.0" uuid="9d8bf4f6-a70a-4b80-8556-2ccfb436ff01" protectedtitlecache="true" titleCache="Asphodeline" createdby_id="30"  startNumber="1"/>
+  <PolytomousKey id="1550" created="2014-03-10 10:02:35.0" uuid="0d53ba20-7de4-4baa-bd8a-401048447d66" updated="2014-03-10 10:02:42.0" protectedtitlecache="true" titleCache="Achillea" createdby_id="30" updatedby_id="30" root_id="2750" startNumber="1"/>
+
+  <OriginalSourceBase DTYPE="IdentifiableSource" id="23710" created="2014-03-10 10:06:57.0" uuid="95e05e82-499d-4b8a-ad6b-1085f74a7496" updated="2014-03-10 10:07:33.0" sourcedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" sourcedObj_id="1550" createdby_id="30" updatedby_id="30" citation_id="1730" sourceType="PTS"/>
+  <OriginalSourceBase DTYPE="IdentifiableSource" id="23711" created="2014-03-10 10:06:48.0" uuid="f77555fe-0d98-4c9f-98ed-a5bca6b1e342" updated="2014-03-10 10:07:33.0" sourcedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" sourcedObj_id="1550" createdby_id="30" updatedby_id="30" citation_id="50" sourceType="PTS"/>
+
+  
+</dataset>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/cdm/testRemotingApplicationContext.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/cdm/testRemotingApplicationContext.xml
new file mode 100644 (file)
index 0000000..dda9952
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:context="http://www.springframework.org/schema/context"
+  xmlns:tx="http://www.springframework.org/schema/tx"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans
+    http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+    http://www.springframework.org/schema/context
+    http://www.springframework.org/schema/context/spring-context-2.5.xsd
+    http://www.springframework.org/schema/tx
+    http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
+
+    <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>          
+
+</beans>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.xml
new file mode 100644 (file)
index 0000000..babf19b
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+  generated by Jailer 4.3, Mon Oct 06 13:11:21 CEST 2014 from cmathew@cmbgbm-t530
+  
+  Extraction Model:  TaxonBase where uuid like '8217ef77-2ab1-4318-bd67-ccd0cdef07c4' (extractionmodel/by-example/SbE-TaxonBase-13-09-59-049.csv)
+  Database URL:      jdbc:mysql://127.0.0.1:3306/local-cyprus
+  Database User:     root
+  
+  Exported Rows:     2
+      TaxonBase                      1
+      TaxonNameBase                  1
+  
+--><dataset>
+  <TaxonNameBase DTYPE="BotanicalName" id="32" created="2010-12-21 15:09:43.0" uuid="f8be96d0-9af9-4e19-b9f1-52a4c0ecc580" protectedtitlecache="true" titleCache="Achillea arabica Kotschy" fullTitleCache="Achillea arabica Kotschy" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="Kotschy" binomhybrid="false" genusoruninomial="Achillea" hybridformula="false" monomhybrid="false" namecache="Achillea arabica" protectedauthorshipcache="false" protectednamecache="false" specificepithet="arabica" trinomhybrid="false" anamorphic="false" createdby_id="11" homotypicalgroup_id="32" rank_id="778" />
+
+  <TaxonBase DTYPE="Taxon" id="32" created="2011-03-01 20:11:26.0" uuid="8217ef77-2ab1-4318-bd67-ccd0cdef07c4" updated="2014-09-17 09:27:47.0" protectedtitlecache="true" titleCache="Achillea arabica Kotschy sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11" name_id="32" sec_id="10" publish="true"/>
+
+  
+</dataset>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/lazyloading/CdmEntityCacherTest.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/lazyloading/CdmEntityCacherTest.xml
new file mode 100644 (file)
index 0000000..c814154
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+  generated by Jailer 4.3, Thu Oct 09 18:00:09 CEST 2014 from cmathew@cmbgbm-t530
+  
+  Extraction Model:  PolytomousKey where uuid like '0d53ba20-7de4-4baa-bd8a-401048447d66' (extractionmodel/by-example/SbE-PolytomousKey-17-59-56-907.csv)
+  Database URL:      jdbc:mysql://127.0.0.1:3306/local-cyprus
+  Database User:     root
+  
+  Exported Rows:     79
+      AgentBase                      1
+      Credit                         1
+      Extension                      1
+      KeyStatement                   10
+      KeyStatement_LanguageString    10
+      LanguageString                 19
+      OriginalSourceBase             2
+      PolytomousKey                  2
+      PolytomousKeyNode              10
+      PolytomousKeyNode_LanguageString 9
+      PolytomousKey_Credit           1
+      PolytomousKey_Extension        1
+      PolytomousKey_OriginalSourceBase 2
+      PolytomousKey_RightsInfo       1
+      PolytomousKey_Taxon            1
+      RightsInfo                     1
+      TaxonBase                      6
+  
+--><dataset>
+  <PolytomousKey_Extension PolytomousKey_id="1550" extensions_id="10"/>
+
+  <PolytomousKey_Credit PolytomousKey_id="1550" credits_id="20" sortIndex="0"/>
+
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2751" modifyingtext_id="13780" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2752" modifyingtext_id="13781" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2753" modifyingtext_id="13795" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2754" modifyingtext_id="13788" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2755" modifyingtext_id="13785" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2756" modifyingtext_id="13787" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2757" modifyingtext_id="13794" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2758" modifyingtext_id="13791" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2759" modifyingtext_id="13793" modifyingtext_mapkey_id="124"/>
+
+  <LanguageString id="13780" created="2014-03-10 10:03:09.0" uuid="cceaa60b-61f4-4c8a-bb0e-d45f0fa3e2dc" text="Modifying Text 1a" language_id="124"/>
+  <LanguageString id="13781" created="2014-03-10 10:03:17.0" uuid="01a0ace4-de49-4725-9909-e881fb13035d" text="" language_id="124"/>
+  <LanguageString id="13782" created="2014-03-10 10:03:48.0" uuid="ec0fea40-69dd-4c3e-ab7a-34948037a069" updated="2014-03-10 10:06:32.0" text="Capitula with ligulate ray-florets; leaves pinnatisect" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13783" created="2014-03-10 10:04:03.0" uuid="82f8a3a0-567f-4d89-ba10-3f3699111d55" updated="2014-03-10 10:06:32.0" text="Ray-florets yellow" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13784" created="2014-03-10 10:04:21.0" uuid="4270501f-1efc-45c2-9e8f-c65f120e8f4c" updated="2014-03-10 10:06:32.0" text="Stem thinly pilose; leaves 10-15 mm wide, with spreading linear-subulate segments; perennial herb" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13785" created="2014-03-10 10:04:07.0" uuid="813f5fd6-c8f6-43e8-9a2b-1464f3ba052a" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13786" created="2014-03-10 10:04:53.0" uuid="ba17ac94-632f-4d69-ac89-a882e19ff1c5" updated="2014-03-10 10:06:32.0" text="Stem white-tomentose; leaves 1-3 mm wide, with minute overlapping, transverse segments; small subshrubs with a woody base" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13787" created="2014-03-10 10:04:34.0" uuid="ab219a5d-e0c4-45fd-8405-6693c3fb8abf" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13788" created="2014-03-10 10:03:53.0" uuid="2baec690-422d-4f85-bcfd-24f5718cbecf" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13789" created="2014-03-10 10:05:16.0" uuid="7c6a7984-8e6f-48b1-86b2-d5d643199bf3" updated="2014-03-10 10:06:32.0" text="Ray-florets white" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13790" created="2014-03-10 10:05:34.0" uuid="72bd8bc9-1904-47ab-8bec-b9296a98b244" updated="2014-03-10 10:06:32.0" text="Perennial herb; stem pilose, hairy or glabrescent, but not tomentose; ligules 1-2 mm diam." createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13791" created="2014-03-10 10:05:20.0" uuid="c917e3fb-e48b-4207-b77d-c1c108e37906" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13792" created="2014-03-10 10:06:15.0" uuid="c5dd35d8-da6a-4d05-b30c-6b55220bd989" updated="2014-03-10 10:06:32.0" text="Shrub with a woody base; stem white-tomentose or woolly; ligules 4-5 mm diam." createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13793" created="2014-03-10 10:06:03.0" uuid="227a17f6-1ca1-4d06-8480-25711b614863" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13794" created="2014-03-10 10:05:07.0" uuid="2c434ab1-8ca7-4464-b5cd-4cee40db41ed" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13795" created="2014-03-10 10:03:38.0" uuid="27190d54-f53b-401e-820c-edfb36d4bcbf" updated="2014-03-10 10:06:32.0" text="" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="13796" created="2014-03-10 10:03:25.0" uuid="69cffb28-8a85-478f-bcae-533e20938ccd" updated="2014-03-10 10:06:32.0" text="Capitula without ligulate ray-florets; leaves entire or subentire" createdby_id="30" updatedby_id="30" language_id="124"/>
+  <LanguageString id="14570" created="2014-10-09 15:42:33.0" uuid="84967760-6dbe-4af4-8e0c-309f1af6ce20" updated="2014-10-09 15:42:44.0" text="Question 1" createdby_id="10" updatedby_id="10" language_id="124"/>
+  <LanguageString id="14571" created="2014-10-09 15:42:55.0" uuid="d82f37b1-f51d-42c1-a291-0c7820db155e" updated="2014-10-09 15:43:03.0" text="Question 2" createdby_id="10" updatedby_id="10" language_id="124"/>
+
+  <TaxonBase DTYPE="Taxon" id="32" created="2011-03-01 20:11:26.0" uuid="8217ef77-2ab1-4318-bd67-ccd0cdef07c4" protectedtitlecache="false" titleCache="Achillea arabica Kotschy sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="35" created="2010-12-21 15:09:43.0" uuid="fade44fd-34b2-455f-861a-d1372b866f06" protectedtitlecache="false" titleCache="Achillea sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="36" created="2011-03-01 20:11:26.0" uuid="05f0a2e1-e3c3-4e74-8fec-8a0ae89236c3" protectedtitlecache="false" titleCache="Achillea cretica L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="37" created="2011-03-01 20:11:26.0" uuid="0f8d18a9-e861-48e8-bfab-83e01a379bc0" protectedtitlecache="false" titleCache="Achillea maritima (L.)Ehrend. &amp; Y.-P. Guo subsp. maritima sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="40" created="2010-12-21 15:09:43.0" uuid="2b336df7-29e8-4f79-985f-66502739d22f" protectedtitlecache="false" titleCache="Achillea millefolium L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="41" created="2011-03-01 20:11:26.0" uuid="094e1af8-efd8-4605-b037-b4f715379562" protectedtitlecache="false" titleCache="Achillea santolinoides subsp. wilhelmsii (K. Koch) Greuter sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11" sec_id="10" publish="true"/>
+
+  <PolytomousKey_Taxon polytomousKey_id="1550" taxon_id="35"/>
+
+  <RightsInfo id="10" created="2014-10-09 15:45:53.0" uuid="bdfb572b-be25-45e7-9349-22a9da43531f" updated="2014-10-09 15:48:01.0" text="Rights Text Test" createdby_id="10" updatedby_id="10" agent_id="4808" type_id="2056"/>
+
+  <PolytomousKeyNode id="2750" created="2014-03-10 10:02:35.0" uuid="75e4c924-ff58-4ee7-a59d-fd9173517d08" updated="2014-03-10 10:02:42.0" nodenumber="1" createdby_id="30" updatedby_id="30" key_id="1550" question_id="2760"/>
+  <PolytomousKeyNode id="2751" created="2014-03-10 10:02:52.0" uuid="23e51ff7-11b1-443b-aff2-3fe8b5ace9fe" sortindex="0" key_id="1550" statement_id="2467" subkey_id="751" taxon_id="37" parent_id="2750"/>
+  <PolytomousKeyNode id="2752" created="2014-03-10 10:03:16.0" uuid="dcf326f7-c0ad-4e76-b64e-43aea11f767c" key_id="1550"/>
+  <PolytomousKeyNode id="2753" created="2014-03-10 10:03:38.0" uuid="b775c027-13c0-4b87-8aa9-712faeaafbdc" updated="2014-03-10 10:06:32.0" nodenumber="2" sortindex="1" createdby_id="30" updatedby_id="30" key_id="1550" question_id="2761" statement_id="2460"  subkey_id="751" parent_id="2750"/>
+  <PolytomousKeyNode id="2754" created="2014-03-10 10:03:52.0" uuid="df5d5922-35de-43d5-9d46-7730ae28eeb3" updated="2014-03-10 10:06:32.0" nodenumber="3" sortindex="0" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2461" subkey_id="751" parent_id="2753"/>
+  <PolytomousKeyNode id="2755" created="2014-03-10 10:04:07.0" uuid="0c8583ee-399e-433c-b76b-272c54dbd9f5" updated="2014-03-10 10:06:32.0" sortindex="0" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2462" taxon_id="32" parent_id="2754"/>
+  <PolytomousKeyNode id="2756" created="2014-03-10 10:04:34.0" uuid="a10e1e61-82c0-470e-a245-10a927b80c9a" updated="2014-03-10 10:06:32.0" sortindex="1" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2463" taxon_id="41" parent_id="2754"/>
+  <PolytomousKeyNode id="2757" created="2014-03-10 10:05:07.0" uuid="19f7a6a2-4c55-49cb-8b92-d68a9fd9074c" updated="2014-03-10 10:06:32.0" nodenumber="4" sortindex="1" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2464" parent_id="2753"/>
+  <PolytomousKeyNode id="2758" created="2014-03-10 10:05:20.0" uuid="0a4d86d1-fba5-4088-8dcc-6f0e7268ca5b" updated="2014-03-10 10:06:32.0" sortindex="0" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2465" taxon_id="40" parent_id="2757"/>
+  <PolytomousKeyNode id="2759" created="2014-03-10 10:06:03.0" uuid="827c9df4-ac15-4163-95ab-616d51f62803" updated="2014-03-10 10:06:32.0" sortindex="1" createdby_id="30" updatedby_id="30" key_id="1550" statement_id="2466" taxon_id="36" parent_id="2757"/>
+
+  <Credit id="20" created="2014-10-09 15:45:22.0" uuid="aa412b15-ee6c-4834-b14e-a66969cb398d" updated="2014-10-09 15:48:01.0" text="Credits Text Test" createdby_id="10" updatedby_id="10" language_id="124" agent_id="4809"/>
+
+  <KeyStatement id="2460" created="2014-03-10 10:03:48.0" uuid="66da6df7-784c-4d5a-9378-58b2cf92ba13" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2461" created="2014-03-10 10:04:03.0" uuid="f9cfd498-de47-48fd-b38c-43cf57b63750" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2462" created="2014-03-10 10:04:21.0" uuid="817fb39e-91d4-4d8c-a942-6acab47575d1" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2463" created="2014-03-10 10:04:53.0" uuid="6b571b86-7764-4f27-925c-ae5e2653f7ad" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2464" created="2014-03-10 10:05:16.0" uuid="91bbb534-abdf-4915-9f6f-a0cb41f8cf58" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2465" created="2014-03-10 10:05:34.0" uuid="1991ca31-2630-4917-8db3-eb67cec8f231" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2466" created="2014-03-10 10:06:15.0" uuid="3e1bbc59-b098-4533-ac35-245e1140a0ae" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2467" created="2014-03-10 10:03:24.0" uuid="68fd99f6-64ce-4bb8-a6af-d2cf2c046e2c" updated="2014-03-10 10:06:32.0" createdby_id="30" updatedby_id="30"/>
+  <KeyStatement id="2760" created="2014-10-09 15:42:33.0" uuid="b9702653-f620-4208-bda9-a6fe082004d1" updated="2014-10-09 15:42:44.0" createdby_id="10" updatedby_id="10"/>
+  <KeyStatement id="2761" created="2014-10-09 15:42:55.0" uuid="688a432f-4b57-4c6f-a8f6-0c468a28cb7c" updated="2014-10-09 15:43:03.0" createdby_id="10" updatedby_id="10"/>
+
+  <AgentBase DTYPE="Person" id="4809" created="2010-12-21 15:09:59.0" uuid="945d08f2-eb92-45b6-9252-6275ea6d338b" protectedtitlecache="false" titleCache="R. A. Graham" nomenclaturaltitle="R. A. Graham" createdby_id="11"/>
+
+  <Extension id="10" created="2014-10-09 15:45:41.0" uuid="0d6f35d7-7e76-446a-a017-7e8355ee1b4c" updated="2014-10-09 15:48:01.0" extendedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" extendedObj_id="1550" value="http://test.com" createdby_id="10" updatedby_id="10" type_id="2075"/>
+
+  <PolytomousKey_OriginalSourceBase PolytomousKey_id="1550" sources_id="23710"/>
+  <PolytomousKey_OriginalSourceBase PolytomousKey_id="1550" sources_id="23711"/>
+
+  <PolytomousKey_RightsInfo PolytomousKey_id="1550" rights_id="10"/>
+
+  <KeyStatement_LanguageString KeyStatement_id="2460" label_id="13782" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2461" label_id="13783" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2462" label_id="13784" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2463" label_id="13786" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2464" label_id="13789" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2465" label_id="13790" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2466" label_id="13792" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2467" label_id="13796" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2760" label_id="14570" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2761" label_id="14571" label_mapkey_id="124"/>
+
+  <PolytomousKey id="751" created="2013-03-24 11:17:08.0" uuid="9d8bf4f6-a70a-4b80-8556-2ccfb436ff01" protectedtitlecache="true" titleCache="Asphodeline" createdby_id="30"  startNumber="1"/>
+  <PolytomousKey id="1550" created="2014-03-10 10:02:35.0" uuid="0d53ba20-7de4-4baa-bd8a-401048447d66" updated="2014-03-10 10:02:42.0" protectedtitlecache="true" titleCache="Achillea" createdby_id="30" updatedby_id="30" root_id="2750" startNumber="1"/>
+
+  <OriginalSourceBase DTYPE="IdentifiableSource" id="23710" created="2014-03-10 10:06:57.0" uuid="95e05e82-499d-4b8a-ad6b-1085f74a7496" updated="2014-03-10 10:07:33.0" sourcedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" sourcedObj_id="1550" createdby_id="30" updatedby_id="30" citation_id="1730" sourceType="PTS"/>
+  <OriginalSourceBase DTYPE="IdentifiableSource" id="23711" created="2014-03-10 10:06:48.0" uuid="f77555fe-0d98-4c9f-98ed-a5bca6b1e342" updated="2014-03-10 10:07:33.0" sourcedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" sourcedObj_id="1550" createdby_id="30" updatedby_id="30" citation_id="50" sourceType="PTS"/>
+
+  <LanguageString id="10"/>
+</dataset>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/PolytomousKeyViewPartTest.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/PolytomousKeyViewPartTest.xml
new file mode 100644 (file)
index 0000000..ec6b580
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+  generated by Jailer 4.3, Mon Jun 29 14:15:44 CEST 2015 from cmathew@cmbgbm-t530
+  
+  Extraction Model:  PolytomousKey where id = 90 or id = 111 or id = 112 or id = 113 or id = 114 or id = 115 or id = 116 (extractionmodel/by-example/SbE-PolytomousKey-14-15-18-725.csv)
+  Database URL:      jdbc:mysql://127.0.0.1:3306/local-cyprus
+  Database User:     root
+  
+  Exported Rows:     10
+      PolytomousKey                  7
+      PolytomousKeyNode              3
+  
+--><dataset>
+  <PolytomousKeyNode id="100" created="2012-11-23 19:53:37.0" uuid="c8e296da-441d-403b-9647-d729c00b2aa4" updated="2014-01-24 13:21:03.0" nodenumber="1"   key_id="90"/>
+  <PolytomousKeyNode id="101" created="2012-11-23 19:53:54.0" uuid="588754cd-6098-40d3-bb37-05d0a6676336" sortindex="0"  key_id="90"   parent_id="100"/>
+  <PolytomousKeyNode id="102" created="2012-11-23 19:54:42.0" uuid="52ea0b19-f29e-49fc-8326-02292fda4e43" sortindex="1"  key_id="90"   parent_id="100"/>
+
+  <PolytomousKey id="90" created="2012-11-23 19:53:37.0" uuid="f82cef88-5a9e-4917-9938-d08bda40836f" protectedtitlecache="true" titleCache="Cleome"  root_id="100" startNumber="1"/>
+  <PolytomousKey id="111" created="2013-02-15 16:26:38.0" uuid="a00ca7ec-b660-433c-bd14-596826ab2243" protectedtitlecache="true" titleCache="Ammi"   startNumber="1"/>
+  <PolytomousKey id="112" created="2013-02-15 16:31:54.0" uuid="197bc542-bf5b-4a52-aa66-c65df32c196b" protectedtitlecache="true" titleCache="Adonis"   startNumber="1"/>
+  <PolytomousKey id="113" created="2013-02-15 16:50:59.0" uuid="2ebacbb0-13f4-4407-8579-d5968e09a905" protectedtitlecache="true" titleCache="Enarthrocarpus"   startNumber="1"/>
+  <PolytomousKey id="114" created="2013-02-15 16:54:31.0" uuid="0426418c-5b76-4c19-8177-6bebb4d37329" protectedtitlecache="true" titleCache="Glaucium"  startNumber="1"/>
+  <PolytomousKey id="115" created="2013-02-15 17:05:42.0" uuid="6aa69b73-6242-4d3d-85c9-485aab9b1975" protectedtitlecache="true" titleCache="Sagina"   startNumber="1"/>
+  <PolytomousKey id="116" created="2013-02-15 17:09:43.0" uuid="cfe7626d-49cc-4dac-acbc-601825deb44a" protectedtitlecache="true" titleCache="Dianthus"   startNumber="1"/>
+
+  
+</dataset>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperationTest.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperationTest.xml
new file mode 100644 (file)
index 0000000..b0afec0
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+  generated by Jailer 4.3, Fri Jun 19 09:13:03 CEST 2015 from cmathew@cmbgbm-t530
+  
+  Extraction Model:  all rows from Classification (extractionmodel/by-example/SbE-Classification-09-10-20-259.csv)
+  Database URL:      jdbc:mysql://127.0.0.1:3306/local-cyprus
+  Database User:     root
+  
+  Exported Rows:     67
+      Classification                 1
+      DescriptionBase                22
+      TaxonBase                      14
+      TaxonNameBase                  14
+      TaxonNode                      16
+  
+--><dataset>
+  <TaxonNode id="46" created="2010-12-21 15:09:43.0" uuid="168a4d09-a2b0-4206-b4cc-5d13199f9306" countchildren="0"   classification_id="10" parent_id="47" taxon_id="48" treeIndex="#t10#4032#49#48#47#46#" sortIndex="0"/>
+  <TaxonNode id="47" created="2010-12-21 15:09:43.0" uuid="2f05d429-632d-4230-b9cb-70299360b470" countchildren="1"   classification_id="10" parent_id="48" taxon_id="51" treeIndex="#t10#4032#49#48#47#" sortIndex="0"/>
+  <TaxonNode id="48" created="2010-12-21 15:09:43.0" uuid="24773d3b-8f11-4400-99de-71658982b245" countchildren="6"   classification_id="10" parent_id="49"  treeIndex="#t10#4032#49#48#" sortIndex="0"/>
+  <TaxonNode id="49" created="2010-12-21 15:09:43.0" uuid="572290a9-7535-48c8-9f68-25ddbc9869ee" countchildren="10"   classification_id="10" parent_id="4032" taxon_id="49" treeIndex="#t10#4032#49#" sortIndex="0"/>
+  <TaxonNode id="236" created="2010-12-21 15:09:45.0" uuid="f5d97f8b-c673-4050-af06-bbfab33baaec" countchildren="0"   classification_id="10" parent_id="237" taxon_id="264" treeIndex="#t10#4032#49#48#237#236#" sortIndex="0"/>
+  <TaxonNode id="237" created="2010-12-21 15:09:45.0" uuid="4998de90-d0be-433b-a62f-0d57a1e399b0" countchildren="1"   classification_id="10" parent_id="48" taxon_id="265" treeIndex="#t10#4032#49#48#237#" sortIndex="1"/>
+  <TaxonNode id="714" created="2010-12-21 15:09:48.0" uuid="b85b5b78-6760-409f-ac91-bb89e95ff2a1" countchildren="0"   classification_id="10" parent_id="715" taxon_id="812" treeIndex="#t10#4032#49#48#715#714#" sortIndex="0"/>
+  <TaxonNode id="715" created="2010-12-21 15:09:48.0" uuid="91698cec-615f-4472-9002-feda1a6acded" countchildren="2"   classification_id="10" parent_id="48" taxon_id="814" treeIndex="#t10#4032#49#48#715#" sortIndex="2"/>
+  <TaxonNode id="716" created="2010-12-21 15:09:48.0" uuid="6ad8e9e2-f5f6-41ad-aa30-f62a903650db" countchildren="0"   classification_id="10" parent_id="715" taxon_id="815" treeIndex="#t10#4032#49#48#715#716#" sortIndex="1"/>
+  <TaxonNode id="828" created="2010-12-21 15:09:49.0" uuid="786622ba-cb2c-47f4-9eeb-65a6ebb7122b" countchildren="0"   classification_id="10" parent_id="829" taxon_id="946" treeIndex="#t10#4032#49#48#829#828#" sortIndex="0"/>
+  <TaxonNode id="829" created="2010-12-21 15:09:49.0" uuid="4fe03763-b966-4361-8334-352f6f777588" countchildren="1"   classification_id="10" parent_id="48" taxon_id="948" treeIndex="#t10#4032#49#48#829#" sortIndex="3"/>
+  <TaxonNode id="1915" created="2010-12-21 15:09:57.0" uuid="99f03b56-67cd-4e01-9ceb-2362d48f9d07" countchildren="0"   classification_id="10" parent_id="1916" taxon_id="2203" treeIndex="#t10#4032#49#48#1916#1915#" sortIndex="0"/>
+  <TaxonNode id="1916" created="2010-12-21 15:09:57.0" uuid="d8998200-500f-4312-90f4-2b60e6fd3a78" countchildren="1"   classification_id="10" parent_id="48" taxon_id="2205" treeIndex="#t10#4032#49#48#1916#" sortIndex="4"/>
+  <TaxonNode id="2354" created="2010-12-21 15:10:00.0" uuid="b8439f51-6b96-445a-b401-7a836ba1cf58" countchildren="0"   classification_id="10" parent_id="2355" taxon_id="2737" treeIndex="#t10#4032#49#48#2355#2354#" sortIndex="0"/>
+  <TaxonNode id="2355" created="2010-12-21 15:10:00.0" uuid="6da4e5b6-ebc3-4c46-bdce-24161b7bd0e2" countchildren="1"   classification_id="10" parent_id="48" taxon_id="2738" treeIndex="#t10#4032#49#48#2355#" sortIndex="5"/>
+  <TaxonNode id="4032" created="2014-01-16 10:24:29.0" uuid="29b3fd3f-29b4-4011-ab12-9c1ad1607dbd" countchildren="1" classification_id="10" treeIndex="#t10#4032#"/>
+
+  <TaxonNameBase DTYPE="BotanicalName" id="48" created="2010-12-21 15:09:43.0" uuid="7aceb517-2b91-46b9-a5a2-88b7e0fb3230" protectedtitlecache="false" titleCache="Adiantum capillus-veneris L." fullTitleCache="Adiantum capillus-veneris L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Adiantum" hybridformula="false" monomhybrid="false" namecache="Adiantum capillus-veneris" protectedauthorshipcache="false" protectednamecache="false" specificepithet="capillus-veneris" trinomhybrid="false" anamorphic="false"    rank_id="778" />
+  <TaxonNameBase DTYPE="BotanicalName" id="49" created="2010-12-21 15:09:43.0" uuid="079fff38-ff2d-426b-a49e-70b0f1db6c31" protectedtitlecache="false" titleCache="Pteridophyta" fullTitleCache="Pteridophyta" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Pteridophyta" hybridformula="false" monomhybrid="false" namecache="Pteridophyta" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="810"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="51" created="2010-12-21 15:09:43.0" uuid="c8af63e0-7bd4-4fad-aa2d-3777cbe1210a" protectedtitlecache="false" titleCache="Adiantum" fullTitleCache="Adiantum" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Adiantum" hybridformula="false" monomhybrid="false" namecache="Adiantum" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="264" created="2010-12-21 15:09:45.0" uuid="b976da6a-dd84-4fcd-9a1b-9847afba1da2" protectedtitlecache="false" titleCache="Anogramma leptophylla (L.) Link" fullTitleCache="Anogramma leptophylla (L.) Link" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(L.) Link" binomhybrid="false" genusoruninomial="Anogramma" hybridformula="false" monomhybrid="false" namecache="Anogramma leptophylla" protectedauthorshipcache="false" protectednamecache="false" specificepithet="leptophylla" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="265" created="2010-12-21 15:09:45.0" uuid="c7f1db22-20fb-4eeb-810b-d37c5593b95d" protectedtitlecache="false" titleCache="Anogramma" fullTitleCache="Anogramma" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Anogramma" hybridformula="false" monomhybrid="false" namecache="Anogramma" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="812" created="2010-12-21 15:09:48.0" uuid="16450a2d-2085-471f-804a-defcd43c03e4" protectedtitlecache="false" titleCache="Cheilanthes acrostica (Balb.) Tod." fullTitleCache="Cheilanthes acrostica (Balb.) Tod." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(Balb.) Tod." binomhybrid="false" genusoruninomial="Cheilanthes" hybridformula="false" monomhybrid="false" namecache="Cheilanthes acrostica" protectedauthorshipcache="false" protectednamecache="false" specificepithet="acrostica" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="814" created="2010-12-21 15:09:48.0" uuid="bbb1c5be-5a0c-45e2-b8af-f37a80ccf858" protectedtitlecache="false" titleCache="Cheilanthes" fullTitleCache="Cheilanthes" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Cheilanthes" hybridformula="false" monomhybrid="false" namecache="Cheilanthes" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="815" created="2010-12-21 15:09:48.0" uuid="f04a9283-f856-4d28-b469-4a222472862b" protectedtitlecache="false" titleCache="Cheilanthes maderensis Lowe" fullTitleCache="Cheilanthes maderensis Lowe" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="Lowe" binomhybrid="false" genusoruninomial="Cheilanthes" hybridformula="false" monomhybrid="false" namecache="Cheilanthes maderensis" protectedauthorshipcache="false" protectednamecache="false" specificepithet="maderensis" trinomhybrid="false" anamorphic="false"    rank_id="778" />
+  <TaxonNameBase DTYPE="BotanicalName" id="946" created="2010-12-21 15:09:49.0" uuid="e30ef44b-52e4-41ff-a68d-9912d3c537f1" protectedtitlecache="false" titleCache="Cosentinia vellea (Aiton) Tod." fullTitleCache="Cosentinia vellea (Aiton) Tod." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(Aiton) Tod." binomhybrid="false" genusoruninomial="Cosentinia" hybridformula="false" monomhybrid="false" namecache="Cosentinia vellea" protectedauthorshipcache="false" protectednamecache="false" specificepithet="vellea" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="948" created="2010-12-21 15:09:49.0" uuid="21fda99e-0425-4f29-b7b2-196f8a51b054" protectedtitlecache="false" titleCache="Cosentinia" fullTitleCache="Cosentinia" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Cosentinia" hybridformula="false" monomhybrid="false" namecache="Cosentinia" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="2203" created="2010-12-21 15:09:57.0" uuid="8fe0bb4b-7687-4d32-8ff2-94e690980f81" protectedtitlecache="false" titleCache="Notholaena marantae (L.) Desv." fullTitleCache="Notholaena marantae (L.) Desv." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(L.) Desv." binomhybrid="false" genusoruninomial="Notholaena" hybridformula="false" monomhybrid="false" namecache="Notholaena marantae" protectedauthorshipcache="false" protectednamecache="false" specificepithet="marantae" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="2205" created="2010-12-21 15:09:57.0" uuid="77b7934f-8f62-4798-b96a-f3d12bfd5ebf" protectedtitlecache="false" titleCache="Notholaena" fullTitleCache="Notholaena" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Notholaena" hybridformula="false" monomhybrid="false" namecache="Notholaena" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="2737" created="2010-12-21 15:10:00.0" uuid="25560d66-07a3-41ce-8244-36ca98638c71" protectedtitlecache="false" titleCache="Pteris vittata L." fullTitleCache="Pteris vittata L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Pteris" hybridformula="false" monomhybrid="false" namecache="Pteris vittata" protectedauthorshipcache="false" protectednamecache="false" specificepithet="vittata" trinomhybrid="false" anamorphic="false"    rank_id="778" />
+  <TaxonNameBase DTYPE="BotanicalName" id="2738" created="2010-12-21 15:10:00.0" uuid="a40593ce-e8cc-43bb-a391-2de988b09039" protectedtitlecache="false" titleCache="Pteris" fullTitleCache="Pteris" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Pteris" hybridformula="false" monomhybrid="false" namecache="Pteris" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+
+  <Classification id="10" created="2010-12-21 15:09:43.0" uuid="0c2b5d25-7b15-4401-8b51-dd4be0ee5cab" updated="2015-06-09 07:10:42.0" protectedtitlecache="false" titleCache="Cyprus"   updatedby_id="10" name_id="10"  rootnode_id="4032"/>
+
+  <TaxonBase DTYPE="Taxon" id="48" created="2011-03-01 20:11:26.0" uuid="b8402dc4-5050-4882-a147-01b71e0e47d6" protectedtitlecache="false" titleCache="Adiantum capillus-veneris L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="48"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="49" created="2010-12-21 15:09:43.0" uuid="1141a510-5ee8-4a59-ae60-7b4fea44872f" protectedtitlecache="false" titleCache="Pteridophyta sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="49"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="51" created="2010-12-21 15:09:43.0" uuid="233cac41-bb05-4925-bb9e-ab0bdf330973" protectedtitlecache="false" titleCache="Adiantum sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="51"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="264" created="2011-03-01 20:11:27.0" uuid="d679c5d0-53b3-40fc-97e1-0646aad7ed23" protectedtitlecache="false" titleCache="Anogramma leptophylla (L.) Link sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="264"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="265" created="2010-12-21 15:09:45.0" uuid="1fc1d927-1155-4282-a9f5-f07202f79ace" protectedtitlecache="false" titleCache="Anogramma sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="265"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="812" created="2011-03-01 20:11:29.0" uuid="e40854d7-143f-4054-b229-6ed4cedb4bff" protectedtitlecache="false" titleCache="Cheilanthes acrostica (Balb.) Tod. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="812"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="814" created="2010-12-21 15:09:48.0" uuid="433ad11a-b931-49a4-8128-d6f4d454914a" protectedtitlecache="false" titleCache="Cheilanthes sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="814"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="815" created="2010-12-21 15:09:48.0" uuid="7ea2c74a-f2b2-41f6-acdf-1ca35f5d03f8" protectedtitlecache="false" titleCache="Cheilanthes maderensis Lowe sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="815"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="946" created="2011-03-01 20:11:30.0" uuid="ba21b018-97d2-42d7-af6c-5e8db8e495ff" protectedtitlecache="false" titleCache="Cosentinia vellea (Aiton) Tod. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="946"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="948" created="2010-12-21 15:09:49.0" uuid="a2768f6d-80f2-4e0c-a6e3-99b7a9f3bc9d" protectedtitlecache="false" titleCache="Cosentinia sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="948"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2203" created="2011-03-01 20:11:36.0" uuid="d9a0c5d5-baee-4b6b-974a-a7de5affe748" protectedtitlecache="false" titleCache="Notholaena marantae (L.) Desv. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2203"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2205" created="2010-12-21 15:09:57.0" uuid="c221d34c-76b0-4fc7-9901-e72efd4c899b" protectedtitlecache="false" titleCache="Notholaena sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2205"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2737" created="2011-03-01 20:11:39.0" uuid="6b46ac55-3e39-4c37-a1b6-b680b21599b2" protectedtitlecache="false" titleCache="Pteris vittata L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2737"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2738" created="2010-12-21 15:10:00.0" uuid="8ac3dca2-6bbf-4cd4-84b7-53ddc2973ed8" protectedtitlecache="false" titleCache="Pteris sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2738"  publish="true"/>
+
+  <DescriptionBase DTYPE="TaxonDescription" id="28" created="2010-12-21 15:09:43.0" uuid="f04f8f66-ad92-42d0-89bc-04ac5b36163c" updated="2011-03-01 19:20:45.0" protectedtitlecache="false" titleCache="Taxon description for Adiantum capillus-veneris L." imagegallery="false"   taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="149" created="2010-12-21 15:09:45.0" uuid="24df0fca-bfc4-4f0f-a269-336985ed6e5e" updated="2011-03-01 19:20:46.0" protectedtitlecache="false" titleCache="Taxon description for Anogramma leptophylla (L.) Link" imagegallery="false"   taxon_id="264"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="447" created="2010-12-21 15:09:48.0" uuid="01863b86-c6ae-48b8-a8da-f693be9087da" updated="2011-03-01 19:20:48.0" protectedtitlecache="false" titleCache="Taxon description for Cheilanthes acrostica (Balbis) Tod." imagegallery="false"   taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="448" created="2010-12-21 15:09:48.0" uuid="aac7b184-e622-409b-8eda-e14998b9021d" protectedtitlecache="false" titleCache="Taxon description for Cheilanthes maderensis Lowe" imagegallery="false"   taxon_id="815"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="521" created="2010-12-21 15:09:49.0" uuid="2d672585-0f35-42f8-9923-dfd5545e6369" updated="2011-03-01 19:20:48.0" protectedtitlecache="false" titleCache="Taxon description for Cosentinia vellea (Aiton) Tod." imagegallery="false"   taxon_id="946"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="1234" created="2010-12-21 15:09:57.0" uuid="a8a734c2-122b-4d5b-9c89-a852f4ab4661" updated="2011-03-01 19:20:53.0" protectedtitlecache="false" titleCache="Taxon description for Notholaena marantae (L.) Desv." imagegallery="false"   taxon_id="2203"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="1524" created="2010-12-21 15:10:00.0" uuid="c4e66d46-e4fb-4da2-a432-3f1cf5353b81" updated="2011-03-01 19:20:55.0" protectedtitlecache="false" titleCache="Taxon description for Pteris vittata L." imagegallery="false"   taxon_id="2737"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4567" created="2011-03-01 19:20:45.0" uuid="dd0f7395-6162-4ce4-8ece-774011b09325" updated="2011-03-01 20:11:26.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Adiantum capillus-veneris L. sec. Cyprus" imagegallery="false" taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4627" created="2011-03-01 19:20:46.0" uuid="34266202-eb5d-41ec-a0b2-da56deb11cc7" updated="2011-03-01 20:11:27.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Anogramma leptophylla (L.) Link sec. Cyprus" imagegallery="false" taxon_id="264"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4798" created="2011-03-01 19:20:48.0" uuid="504b0178-39e6-4c79-8e33-ca00b0662f27" updated="2011-03-01 20:11:29.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Cheilanthes acrostica (Balbis) Tod. sec. Cyprus" imagegallery="false" taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4840" created="2011-03-01 19:20:48.0" uuid="73396d11-5d35-43fb-8b15-4d472bdcdd43" updated="2011-03-01 20:11:30.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Cosentinia vellea (Aiton) Tod. sec. Cyprus" imagegallery="false" taxon_id="946"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="5409" created="2011-03-01 19:20:55.0" uuid="64a797b2-7f92-4012-a4f5-d76f8aaeb6b4" updated="2011-03-01 20:11:39.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Pteris vittata L. sec. Cyprus" imagegallery="false" taxon_id="2737"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="5974" created="2011-03-01 19:20:53.0" uuid="71872861-8229-4cab-8042-b75dfa0e3f63" updated="2011-03-01 20:11:36.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Notholaena marantae (L.) Desv. sec. Cyprus" imagegallery="false" taxon_id="2203"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="11766" created="2012-07-30 15:39:44.0" uuid="6b4be8a2-ea86-4815-bd31-b022055a90f2" protectedtitlecache="false" titleCache="Image gallery for Pteris vittata L." imagegallery="true"   taxon_id="2737"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="12353" created="2012-12-03 12:21:48.0" uuid="b8d3a151-032e-48d9-9191-d7b8fb1fe1a0" protectedtitlecache="false" titleCache="Image gallery for Cheilanthes acrostica (Balbis) Tod." imagegallery="true"   taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="12713" created="2013-02-10 21:43:33.0" uuid="61fbdc1b-80bf-4aea-b6cb-8f4d466bd923" protectedtitlecache="false" titleCache="Image gallery for Adiantum capillus-veneris L." imagegallery="true"   taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="13728" created="2014-02-28 19:20:29.0" uuid="53b3125e-2a43-4433-a4dd-50dd9a4cf92c" updated="2014-02-28 19:20:29.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="13817" created="2014-02-28 19:20:34.0" uuid="7b108193-e689-417a-bcab-adaf6c49d532" updated="2014-02-28 19:20:34.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="264"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14043" created="2014-02-28 19:20:58.0" uuid="de29cc97-a160-4783-b996-b929157335d5" updated="2014-02-28 19:20:58.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14101" created="2014-02-28 19:21:07.0" uuid="815336d3-19d6-493d-9ea4-bcb320d1b922" updated="2014-02-28 19:21:08.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="946"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14658" created="2014-02-28 19:23:51.0" uuid="ce4068f8-17b0-46e2-9fbb-e8c16efb7255" updated="2014-02-28 19:23:51.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="2203"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14864" created="2014-02-28 19:25:21.0" uuid="2d55f445-8e72-43d3-976a-133828e89599" updated="2014-02-28 19:25:21.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="2737"/>
+
+  <SynonymRelationship/>
+  
+  <LanguageString id="10"/>
+</dataset>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNameEditorTest.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNameEditorTest.xml
new file mode 100644 (file)
index 0000000..fb24429
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+  generated by Jailer 4.3, Wed Mar 04 16:11:14 CET 2015 from cmathew@cmbgbm-t530
+  
+  Extraction Model:  all rows from Classification (extractionmodel/by-example/SbE-Classification-16-11-06-737.csv)
+  Database URL:      jdbc:mysql://127.0.0.1:3306/local-cyprus
+  Database User:     root
+  
+  Exported Rows:     31
+      Classification                 1
+      HomotypicalGroup               2
+      SynonymRelationship            1
+      TaxonBase                      5
+      TaxonNameBase                  3
+      TaxonNode                      19
+  
+--><dataset>
+  
+  
+  <TaxonNode id="347" created="2010-12-21 15:09:45.0" uuid="d425a971-1abe-4895-9e1f-1e5c8ff1c84c" countchildren="0"  classification_id="10"  taxon_id="387" treeIndex="#t10#4032#49#346#345#347#" sortIndex="1"/>  
+  <TaxonNode id="351" created="2010-12-21 15:09:46.0" uuid="ce54c396-3694-47f2-abb0-1d7b7e057985" countchildren="0"  classification_id="10"  taxon_id="394" treeIndex="#t10#4032#49#346#345#351#" sortIndex="4"/>
+  
+  <HomotypicalGroup id="368" created="2010-12-21 15:09:45.0" uuid="d7eaa174-4efd-4d09-a427-dce4ed6513f7" />
+  <HomotypicalGroup id="375" created="2010-12-21 15:09:46.0" uuid="62ed57d6-2c69-4404-bb95-248a1c9bb24c" />
+
+  <TaxonNameBase DTYPE="BotanicalName" id="387" created="2010-12-21 15:09:45.0" uuid="d25985c7-6fb4-4b31-8a94-5d7c5ba6ad16" protectedtitlecache="false" titleCache="Asplenium ceterach L." fullTitleCache="Asplenium ceterach L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Asplenium" hybridformula="false" monomhybrid="false" namecache="Asplenium ceterach" protectedauthorshipcache="false" protectednamecache="false" specificepithet="ceterach" trinomhybrid="false" anamorphic="false"  homotypicalgroup_id="368" rank_id="778" />
+  <TaxonNameBase DTYPE="BotanicalName" id="388" created="2010-12-21 15:09:45.0" uuid="747021f1-cf5f-4249-a825-228da3368399" protectedtitlecache="true" titleCache="Asplenium cyprium Viane &amp; Van den heede" fullTitleCache="Asplenium cyprium Viane &amp; Van den heede" parsingproblem="16" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" hybridformula="false" monomhybrid="false" namecache="Asplenium cyprium Viane &amp; Van den heede" protectedauthorshipcache="false" protectednamecache="true" trinomhybrid="false" anamorphic="false" />
+  <TaxonNameBase DTYPE="BotanicalName" id="394" created="2010-12-21 15:09:46.0" uuid="08f8f376-c9a4-4ea9-950d-3ac30b7fa689" protectedtitlecache="false" titleCache="Asplenium viride Huds." fullTitleCache="Asplenium viride Huds." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="Huds." binomhybrid="false" genusoruninomial="Asplenium" hybridformula="false" monomhybrid="false" namecache="Asplenium viride" protectedauthorshipcache="false" protectednamecache="false" specificepithet="viride" trinomhybrid="false" anamorphic="false"  homotypicalgroup_id="375" rank_id="778" />
+
+  <Classification id="10" created="2010-12-21 15:09:43.0" uuid="0c2b5d25-7b15-4401-8b51-dd4be0ee5cab" protectedtitlecache="false" titleCache="Cyprus"  name_id="10" reference_id="10" />
+  <TaxonBase DTYPE="Taxon" id="387" created="2011-03-01 20:11:27.0" uuid="9763e5f0-6cd4-4d96-b8a4-4420854f7727" protectedtitlecache="false" titleCache="Asplenium ceterach L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"  name_id="387" sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Synonym" id="388" created="2010-12-21 15:09:45.0" uuid="1eb173bd-b174-4162-8ff5-5136d8f1e746" protectedtitlecache="false" titleCache="Asplenium cyprium Viane &amp; Van den heede sec. Cyprus" doubtful="false" usenamecache="false"  name_id="388" sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="394" created="2011-03-01 20:11:27.0" uuid="aff4fa6f-9aa8-463d-ac07-ec8a1925eb57" protectedtitlecache="false" titleCache="Asplenium viride Huds. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"  name_id="394" sec_id="10" publish="true"/>
+
+  <SynonymRelationship id="50" created="2010-12-21 15:09:45.0" uuid="60d1466f-5823-4a69-a071-1887d0c1e72b" doubtful="false" partial="false" proparte="false"  relatedfrom_id="388" relatedto_id="387" />
+
+  <LanguageString id="10"/>
+</dataset>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.testDeleteClassificationWithDeleteChildren.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.testDeleteClassificationWithDeleteChildren.xml
new file mode 100644 (file)
index 0000000..fec9221
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+  generated by Jailer 4.3, Mon Jun 22 14:57:08 CEST 2015 from cmathew@cmbgbm-t530
+  
+  Extraction Model:  all rows from Classification (extractionmodel/by-example/SbE-Classification-14-56-50-312.csv)
+  Database URL:      jdbc:mysql://127.0.0.1:3306/local-cyprus
+  Database User:     root
+  
+  Exported Rows:     6
+      Classification                 1
+      TaxonBase                      2
+      TaxonNode                      3
+  
+--><dataset>
+  <TaxonNode id="13" created="2010-12-21 15:09:43.0" uuid="0ac32f24-6d55-44ae-8519-c86c83faa938" countchildren="122"  classification_id="10" parent_id="4032" taxon_id="11" treeIndex="#t10#4032#13#" sortIndex="0"/>
+  <TaxonNode id="49" created="2010-12-21 15:09:43.0" uuid="572290a9-7535-48c8-9f68-25ddbc9869ee" countchildren="10"  classification_id="10" parent_id="4032" taxon_id="49" treeIndex="#t10#4032#49#" sortIndex="1"/>
+  <TaxonNode id="4032" created="2014-01-16 10:24:29.0" uuid="29b3fd3f-29b4-4011-ab12-9c1ad1607dbd" countchildren="2" classification_id="10" treeIndex="#t10#4032#"/>
+
+  <Classification id="10" created="2010-12-21 15:09:43.0" uuid="0c2b5d25-7b15-4401-8b51-dd4be0ee5cab" updated="2015-06-09 07:10:42.0" protectedtitlecache="false" titleCache="Cyprus"  updatedby_id="10"   rootnode_id="4032"/>
+
+  <TaxonBase DTYPE="Taxon" id="11" created="2010-12-21 15:09:43.0" uuid="575347a4-fac0-4af7-8514-a4246b45fd7d" protectedtitlecache="false" titleCache="Spermatophyta sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"    publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="49" created="2010-12-21 15:09:43.0" uuid="1141a510-5ee8-4a59-ae60-7b4fea44872f" protectedtitlecache="false" titleCache="Pteridophyta sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"    publish="true"/>
+
+  
+</dataset>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.xml
new file mode 100644 (file)
index 0000000..b0afec0
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+  generated by Jailer 4.3, Fri Jun 19 09:13:03 CEST 2015 from cmathew@cmbgbm-t530
+  
+  Extraction Model:  all rows from Classification (extractionmodel/by-example/SbE-Classification-09-10-20-259.csv)
+  Database URL:      jdbc:mysql://127.0.0.1:3306/local-cyprus
+  Database User:     root
+  
+  Exported Rows:     67
+      Classification                 1
+      DescriptionBase                22
+      TaxonBase                      14
+      TaxonNameBase                  14
+      TaxonNode                      16
+  
+--><dataset>
+  <TaxonNode id="46" created="2010-12-21 15:09:43.0" uuid="168a4d09-a2b0-4206-b4cc-5d13199f9306" countchildren="0"   classification_id="10" parent_id="47" taxon_id="48" treeIndex="#t10#4032#49#48#47#46#" sortIndex="0"/>
+  <TaxonNode id="47" created="2010-12-21 15:09:43.0" uuid="2f05d429-632d-4230-b9cb-70299360b470" countchildren="1"   classification_id="10" parent_id="48" taxon_id="51" treeIndex="#t10#4032#49#48#47#" sortIndex="0"/>
+  <TaxonNode id="48" created="2010-12-21 15:09:43.0" uuid="24773d3b-8f11-4400-99de-71658982b245" countchildren="6"   classification_id="10" parent_id="49"  treeIndex="#t10#4032#49#48#" sortIndex="0"/>
+  <TaxonNode id="49" created="2010-12-21 15:09:43.0" uuid="572290a9-7535-48c8-9f68-25ddbc9869ee" countchildren="10"   classification_id="10" parent_id="4032" taxon_id="49" treeIndex="#t10#4032#49#" sortIndex="0"/>
+  <TaxonNode id="236" created="2010-12-21 15:09:45.0" uuid="f5d97f8b-c673-4050-af06-bbfab33baaec" countchildren="0"   classification_id="10" parent_id="237" taxon_id="264" treeIndex="#t10#4032#49#48#237#236#" sortIndex="0"/>
+  <TaxonNode id="237" created="2010-12-21 15:09:45.0" uuid="4998de90-d0be-433b-a62f-0d57a1e399b0" countchildren="1"   classification_id="10" parent_id="48" taxon_id="265" treeIndex="#t10#4032#49#48#237#" sortIndex="1"/>
+  <TaxonNode id="714" created="2010-12-21 15:09:48.0" uuid="b85b5b78-6760-409f-ac91-bb89e95ff2a1" countchildren="0"   classification_id="10" parent_id="715" taxon_id="812" treeIndex="#t10#4032#49#48#715#714#" sortIndex="0"/>
+  <TaxonNode id="715" created="2010-12-21 15:09:48.0" uuid="91698cec-615f-4472-9002-feda1a6acded" countchildren="2"   classification_id="10" parent_id="48" taxon_id="814" treeIndex="#t10#4032#49#48#715#" sortIndex="2"/>
+  <TaxonNode id="716" created="2010-12-21 15:09:48.0" uuid="6ad8e9e2-f5f6-41ad-aa30-f62a903650db" countchildren="0"   classification_id="10" parent_id="715" taxon_id="815" treeIndex="#t10#4032#49#48#715#716#" sortIndex="1"/>
+  <TaxonNode id="828" created="2010-12-21 15:09:49.0" uuid="786622ba-cb2c-47f4-9eeb-65a6ebb7122b" countchildren="0"   classification_id="10" parent_id="829" taxon_id="946" treeIndex="#t10#4032#49#48#829#828#" sortIndex="0"/>
+  <TaxonNode id="829" created="2010-12-21 15:09:49.0" uuid="4fe03763-b966-4361-8334-352f6f777588" countchildren="1"   classification_id="10" parent_id="48" taxon_id="948" treeIndex="#t10#4032#49#48#829#" sortIndex="3"/>
+  <TaxonNode id="1915" created="2010-12-21 15:09:57.0" uuid="99f03b56-67cd-4e01-9ceb-2362d48f9d07" countchildren="0"   classification_id="10" parent_id="1916" taxon_id="2203" treeIndex="#t10#4032#49#48#1916#1915#" sortIndex="0"/>
+  <TaxonNode id="1916" created="2010-12-21 15:09:57.0" uuid="d8998200-500f-4312-90f4-2b60e6fd3a78" countchildren="1"   classification_id="10" parent_id="48" taxon_id="2205" treeIndex="#t10#4032#49#48#1916#" sortIndex="4"/>
+  <TaxonNode id="2354" created="2010-12-21 15:10:00.0" uuid="b8439f51-6b96-445a-b401-7a836ba1cf58" countchildren="0"   classification_id="10" parent_id="2355" taxon_id="2737" treeIndex="#t10#4032#49#48#2355#2354#" sortIndex="0"/>
+  <TaxonNode id="2355" created="2010-12-21 15:10:00.0" uuid="6da4e5b6-ebc3-4c46-bdce-24161b7bd0e2" countchildren="1"   classification_id="10" parent_id="48" taxon_id="2738" treeIndex="#t10#4032#49#48#2355#" sortIndex="5"/>
+  <TaxonNode id="4032" created="2014-01-16 10:24:29.0" uuid="29b3fd3f-29b4-4011-ab12-9c1ad1607dbd" countchildren="1" classification_id="10" treeIndex="#t10#4032#"/>
+
+  <TaxonNameBase DTYPE="BotanicalName" id="48" created="2010-12-21 15:09:43.0" uuid="7aceb517-2b91-46b9-a5a2-88b7e0fb3230" protectedtitlecache="false" titleCache="Adiantum capillus-veneris L." fullTitleCache="Adiantum capillus-veneris L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Adiantum" hybridformula="false" monomhybrid="false" namecache="Adiantum capillus-veneris" protectedauthorshipcache="false" protectednamecache="false" specificepithet="capillus-veneris" trinomhybrid="false" anamorphic="false"    rank_id="778" />
+  <TaxonNameBase DTYPE="BotanicalName" id="49" created="2010-12-21 15:09:43.0" uuid="079fff38-ff2d-426b-a49e-70b0f1db6c31" protectedtitlecache="false" titleCache="Pteridophyta" fullTitleCache="Pteridophyta" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Pteridophyta" hybridformula="false" monomhybrid="false" namecache="Pteridophyta" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="810"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="51" created="2010-12-21 15:09:43.0" uuid="c8af63e0-7bd4-4fad-aa2d-3777cbe1210a" protectedtitlecache="false" titleCache="Adiantum" fullTitleCache="Adiantum" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Adiantum" hybridformula="false" monomhybrid="false" namecache="Adiantum" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="264" created="2010-12-21 15:09:45.0" uuid="b976da6a-dd84-4fcd-9a1b-9847afba1da2" protectedtitlecache="false" titleCache="Anogramma leptophylla (L.) Link" fullTitleCache="Anogramma leptophylla (L.) Link" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(L.) Link" binomhybrid="false" genusoruninomial="Anogramma" hybridformula="false" monomhybrid="false" namecache="Anogramma leptophylla" protectedauthorshipcache="false" protectednamecache="false" specificepithet="leptophylla" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="265" created="2010-12-21 15:09:45.0" uuid="c7f1db22-20fb-4eeb-810b-d37c5593b95d" protectedtitlecache="false" titleCache="Anogramma" fullTitleCache="Anogramma" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Anogramma" hybridformula="false" monomhybrid="false" namecache="Anogramma" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="812" created="2010-12-21 15:09:48.0" uuid="16450a2d-2085-471f-804a-defcd43c03e4" protectedtitlecache="false" titleCache="Cheilanthes acrostica (Balb.) Tod." fullTitleCache="Cheilanthes acrostica (Balb.) Tod." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(Balb.) Tod." binomhybrid="false" genusoruninomial="Cheilanthes" hybridformula="false" monomhybrid="false" namecache="Cheilanthes acrostica" protectedauthorshipcache="false" protectednamecache="false" specificepithet="acrostica" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="814" created="2010-12-21 15:09:48.0" uuid="bbb1c5be-5a0c-45e2-b8af-f37a80ccf858" protectedtitlecache="false" titleCache="Cheilanthes" fullTitleCache="Cheilanthes" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Cheilanthes" hybridformula="false" monomhybrid="false" namecache="Cheilanthes" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="815" created="2010-12-21 15:09:48.0" uuid="f04a9283-f856-4d28-b469-4a222472862b" protectedtitlecache="false" titleCache="Cheilanthes maderensis Lowe" fullTitleCache="Cheilanthes maderensis Lowe" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="Lowe" binomhybrid="false" genusoruninomial="Cheilanthes" hybridformula="false" monomhybrid="false" namecache="Cheilanthes maderensis" protectedauthorshipcache="false" protectednamecache="false" specificepithet="maderensis" trinomhybrid="false" anamorphic="false"    rank_id="778" />
+  <TaxonNameBase DTYPE="BotanicalName" id="946" created="2010-12-21 15:09:49.0" uuid="e30ef44b-52e4-41ff-a68d-9912d3c537f1" protectedtitlecache="false" titleCache="Cosentinia vellea (Aiton) Tod." fullTitleCache="Cosentinia vellea (Aiton) Tod." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(Aiton) Tod." binomhybrid="false" genusoruninomial="Cosentinia" hybridformula="false" monomhybrid="false" namecache="Cosentinia vellea" protectedauthorshipcache="false" protectednamecache="false" specificepithet="vellea" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="948" created="2010-12-21 15:09:49.0" uuid="21fda99e-0425-4f29-b7b2-196f8a51b054" protectedtitlecache="false" titleCache="Cosentinia" fullTitleCache="Cosentinia" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Cosentinia" hybridformula="false" monomhybrid="false" namecache="Cosentinia" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="2203" created="2010-12-21 15:09:57.0" uuid="8fe0bb4b-7687-4d32-8ff2-94e690980f81" protectedtitlecache="false" titleCache="Notholaena marantae (L.) Desv." fullTitleCache="Notholaena marantae (L.) Desv." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(L.) Desv." binomhybrid="false" genusoruninomial="Notholaena" hybridformula="false" monomhybrid="false" namecache="Notholaena marantae" protectedauthorshipcache="false" protectednamecache="false" specificepithet="marantae" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="2205" created="2010-12-21 15:09:57.0" uuid="77b7934f-8f62-4798-b96a-f3d12bfd5ebf" protectedtitlecache="false" titleCache="Notholaena" fullTitleCache="Notholaena" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Notholaena" hybridformula="false" monomhybrid="false" namecache="Notholaena" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="2737" created="2010-12-21 15:10:00.0" uuid="25560d66-07a3-41ce-8244-36ca98638c71" protectedtitlecache="false" titleCache="Pteris vittata L." fullTitleCache="Pteris vittata L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Pteris" hybridformula="false" monomhybrid="false" namecache="Pteris vittata" protectedauthorshipcache="false" protectednamecache="false" specificepithet="vittata" trinomhybrid="false" anamorphic="false"    rank_id="778" />
+  <TaxonNameBase DTYPE="BotanicalName" id="2738" created="2010-12-21 15:10:00.0" uuid="a40593ce-e8cc-43bb-a391-2de988b09039" protectedtitlecache="false" titleCache="Pteris" fullTitleCache="Pteris" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Pteris" hybridformula="false" monomhybrid="false" namecache="Pteris" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+
+  <Classification id="10" created="2010-12-21 15:09:43.0" uuid="0c2b5d25-7b15-4401-8b51-dd4be0ee5cab" updated="2015-06-09 07:10:42.0" protectedtitlecache="false" titleCache="Cyprus"   updatedby_id="10" name_id="10"  rootnode_id="4032"/>
+
+  <TaxonBase DTYPE="Taxon" id="48" created="2011-03-01 20:11:26.0" uuid="b8402dc4-5050-4882-a147-01b71e0e47d6" protectedtitlecache="false" titleCache="Adiantum capillus-veneris L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="48"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="49" created="2010-12-21 15:09:43.0" uuid="1141a510-5ee8-4a59-ae60-7b4fea44872f" protectedtitlecache="false" titleCache="Pteridophyta sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="49"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="51" created="2010-12-21 15:09:43.0" uuid="233cac41-bb05-4925-bb9e-ab0bdf330973" protectedtitlecache="false" titleCache="Adiantum sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="51"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="264" created="2011-03-01 20:11:27.0" uuid="d679c5d0-53b3-40fc-97e1-0646aad7ed23" protectedtitlecache="false" titleCache="Anogramma leptophylla (L.) Link sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="264"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="265" created="2010-12-21 15:09:45.0" uuid="1fc1d927-1155-4282-a9f5-f07202f79ace" protectedtitlecache="false" titleCache="Anogramma sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="265"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="812" created="2011-03-01 20:11:29.0" uuid="e40854d7-143f-4054-b229-6ed4cedb4bff" protectedtitlecache="false" titleCache="Cheilanthes acrostica (Balb.) Tod. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="812"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="814" created="2010-12-21 15:09:48.0" uuid="433ad11a-b931-49a4-8128-d6f4d454914a" protectedtitlecache="false" titleCache="Cheilanthes sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="814"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="815" created="2010-12-21 15:09:48.0" uuid="7ea2c74a-f2b2-41f6-acdf-1ca35f5d03f8" protectedtitlecache="false" titleCache="Cheilanthes maderensis Lowe sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="815"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="946" created="2011-03-01 20:11:30.0" uuid="ba21b018-97d2-42d7-af6c-5e8db8e495ff" protectedtitlecache="false" titleCache="Cosentinia vellea (Aiton) Tod. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="946"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="948" created="2010-12-21 15:09:49.0" uuid="a2768f6d-80f2-4e0c-a6e3-99b7a9f3bc9d" protectedtitlecache="false" titleCache="Cosentinia sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="948"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2203" created="2011-03-01 20:11:36.0" uuid="d9a0c5d5-baee-4b6b-974a-a7de5affe748" protectedtitlecache="false" titleCache="Notholaena marantae (L.) Desv. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2203"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2205" created="2010-12-21 15:09:57.0" uuid="c221d34c-76b0-4fc7-9901-e72efd4c899b" protectedtitlecache="false" titleCache="Notholaena sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2205"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2737" created="2011-03-01 20:11:39.0" uuid="6b46ac55-3e39-4c37-a1b6-b680b21599b2" protectedtitlecache="false" titleCache="Pteris vittata L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2737"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2738" created="2010-12-21 15:10:00.0" uuid="8ac3dca2-6bbf-4cd4-84b7-53ddc2973ed8" protectedtitlecache="false" titleCache="Pteris sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2738"  publish="true"/>
+
+  <DescriptionBase DTYPE="TaxonDescription" id="28" created="2010-12-21 15:09:43.0" uuid="f04f8f66-ad92-42d0-89bc-04ac5b36163c" updated="2011-03-01 19:20:45.0" protectedtitlecache="false" titleCache="Taxon description for Adiantum capillus-veneris L." imagegallery="false"   taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="149" created="2010-12-21 15:09:45.0" uuid="24df0fca-bfc4-4f0f-a269-336985ed6e5e" updated="2011-03-01 19:20:46.0" protectedtitlecache="false" titleCache="Taxon description for Anogramma leptophylla (L.) Link" imagegallery="false"   taxon_id="264"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="447" created="2010-12-21 15:09:48.0" uuid="01863b86-c6ae-48b8-a8da-f693be9087da" updated="2011-03-01 19:20:48.0" protectedtitlecache="false" titleCache="Taxon description for Cheilanthes acrostica (Balbis) Tod." imagegallery="false"   taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="448" created="2010-12-21 15:09:48.0" uuid="aac7b184-e622-409b-8eda-e14998b9021d" protectedtitlecache="false" titleCache="Taxon description for Cheilanthes maderensis Lowe" imagegallery="false"   taxon_id="815"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="521" created="2010-12-21 15:09:49.0" uuid="2d672585-0f35-42f8-9923-dfd5545e6369" updated="2011-03-01 19:20:48.0" protectedtitlecache="false" titleCache="Taxon description for Cosentinia vellea (Aiton) Tod." imagegallery="false"   taxon_id="946"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="1234" created="2010-12-21 15:09:57.0" uuid="a8a734c2-122b-4d5b-9c89-a852f4ab4661" updated="2011-03-01 19:20:53.0" protectedtitlecache="false" titleCache="Taxon description for Notholaena marantae (L.) Desv." imagegallery="false"   taxon_id="2203"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="1524" created="2010-12-21 15:10:00.0" uuid="c4e66d46-e4fb-4da2-a432-3f1cf5353b81" updated="2011-03-01 19:20:55.0" protectedtitlecache="false" titleCache="Taxon description for Pteris vittata L." imagegallery="false"   taxon_id="2737"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4567" created="2011-03-01 19:20:45.0" uuid="dd0f7395-6162-4ce4-8ece-774011b09325" updated="2011-03-01 20:11:26.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Adiantum capillus-veneris L. sec. Cyprus" imagegallery="false" taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4627" created="2011-03-01 19:20:46.0" uuid="34266202-eb5d-41ec-a0b2-da56deb11cc7" updated="2011-03-01 20:11:27.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Anogramma leptophylla (L.) Link sec. Cyprus" imagegallery="false" taxon_id="264"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4798" created="2011-03-01 19:20:48.0" uuid="504b0178-39e6-4c79-8e33-ca00b0662f27" updated="2011-03-01 20:11:29.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Cheilanthes acrostica (Balbis) Tod. sec. Cyprus" imagegallery="false" taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4840" created="2011-03-01 19:20:48.0" uuid="73396d11-5d35-43fb-8b15-4d472bdcdd43" updated="2011-03-01 20:11:30.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Cosentinia vellea (Aiton) Tod. sec. Cyprus" imagegallery="false" taxon_id="946"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="5409" created="2011-03-01 19:20:55.0" uuid="64a797b2-7f92-4012-a4f5-d76f8aaeb6b4" updated="2011-03-01 20:11:39.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Pteris vittata L. sec. Cyprus" imagegallery="false" taxon_id="2737"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="5974" created="2011-03-01 19:20:53.0" uuid="71872861-8229-4cab-8042-b75dfa0e3f63" updated="2011-03-01 20:11:36.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Notholaena marantae (L.) Desv. sec. Cyprus" imagegallery="false" taxon_id="2203"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="11766" created="2012-07-30 15:39:44.0" uuid="6b4be8a2-ea86-4815-bd31-b022055a90f2" protectedtitlecache="false" titleCache="Image gallery for Pteris vittata L." imagegallery="true"   taxon_id="2737"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="12353" created="2012-12-03 12:21:48.0" uuid="b8d3a151-032e-48d9-9191-d7b8fb1fe1a0" protectedtitlecache="false" titleCache="Image gallery for Cheilanthes acrostica (Balbis) Tod." imagegallery="true"   taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="12713" created="2013-02-10 21:43:33.0" uuid="61fbdc1b-80bf-4aea-b6cb-8f4d466bd923" protectedtitlecache="false" titleCache="Image gallery for Adiantum capillus-veneris L." imagegallery="true"   taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="13728" created="2014-02-28 19:20:29.0" uuid="53b3125e-2a43-4433-a4dd-50dd9a4cf92c" updated="2014-02-28 19:20:29.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="13817" created="2014-02-28 19:20:34.0" uuid="7b108193-e689-417a-bcab-adaf6c49d532" updated="2014-02-28 19:20:34.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="264"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14043" created="2014-02-28 19:20:58.0" uuid="de29cc97-a160-4783-b996-b929157335d5" updated="2014-02-28 19:20:58.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14101" created="2014-02-28 19:21:07.0" uuid="815336d3-19d6-493d-9ea4-bcb320d1b922" updated="2014-02-28 19:21:08.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="946"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14658" created="2014-02-28 19:23:51.0" uuid="ce4068f8-17b0-46e2-9fbb-e8c16efb7255" updated="2014-02-28 19:23:51.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="2203"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14864" created="2014-02-28 19:25:21.0" uuid="2d55f445-8e72-43d3-976a-133828e89599" updated="2014-02-28 19:25:21.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="2737"/>
+
+  <SynonymRelationship/>
+  
+  <LanguageString id="10"/>
+</dataset>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/service/IOServiceExportTest.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/service/IOServiceExportTest.xml
new file mode 100644 (file)
index 0000000..b0afec0
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+  generated by Jailer 4.3, Fri Jun 19 09:13:03 CEST 2015 from cmathew@cmbgbm-t530
+  
+  Extraction Model:  all rows from Classification (extractionmodel/by-example/SbE-Classification-09-10-20-259.csv)
+  Database URL:      jdbc:mysql://127.0.0.1:3306/local-cyprus
+  Database User:     root
+  
+  Exported Rows:     67
+      Classification                 1
+      DescriptionBase                22
+      TaxonBase                      14
+      TaxonNameBase                  14
+      TaxonNode                      16
+  
+--><dataset>
+  <TaxonNode id="46" created="2010-12-21 15:09:43.0" uuid="168a4d09-a2b0-4206-b4cc-5d13199f9306" countchildren="0"   classification_id="10" parent_id="47" taxon_id="48" treeIndex="#t10#4032#49#48#47#46#" sortIndex="0"/>
+  <TaxonNode id="47" created="2010-12-21 15:09:43.0" uuid="2f05d429-632d-4230-b9cb-70299360b470" countchildren="1"   classification_id="10" parent_id="48" taxon_id="51" treeIndex="#t10#4032#49#48#47#" sortIndex="0"/>
+  <TaxonNode id="48" created="2010-12-21 15:09:43.0" uuid="24773d3b-8f11-4400-99de-71658982b245" countchildren="6"   classification_id="10" parent_id="49"  treeIndex="#t10#4032#49#48#" sortIndex="0"/>
+  <TaxonNode id="49" created="2010-12-21 15:09:43.0" uuid="572290a9-7535-48c8-9f68-25ddbc9869ee" countchildren="10"   classification_id="10" parent_id="4032" taxon_id="49" treeIndex="#t10#4032#49#" sortIndex="0"/>
+  <TaxonNode id="236" created="2010-12-21 15:09:45.0" uuid="f5d97f8b-c673-4050-af06-bbfab33baaec" countchildren="0"   classification_id="10" parent_id="237" taxon_id="264" treeIndex="#t10#4032#49#48#237#236#" sortIndex="0"/>
+  <TaxonNode id="237" created="2010-12-21 15:09:45.0" uuid="4998de90-d0be-433b-a62f-0d57a1e399b0" countchildren="1"   classification_id="10" parent_id="48" taxon_id="265" treeIndex="#t10#4032#49#48#237#" sortIndex="1"/>
+  <TaxonNode id="714" created="2010-12-21 15:09:48.0" uuid="b85b5b78-6760-409f-ac91-bb89e95ff2a1" countchildren="0"   classification_id="10" parent_id="715" taxon_id="812" treeIndex="#t10#4032#49#48#715#714#" sortIndex="0"/>
+  <TaxonNode id="715" created="2010-12-21 15:09:48.0" uuid="91698cec-615f-4472-9002-feda1a6acded" countchildren="2"   classification_id="10" parent_id="48" taxon_id="814" treeIndex="#t10#4032#49#48#715#" sortIndex="2"/>
+  <TaxonNode id="716" created="2010-12-21 15:09:48.0" uuid="6ad8e9e2-f5f6-41ad-aa30-f62a903650db" countchildren="0"   classification_id="10" parent_id="715" taxon_id="815" treeIndex="#t10#4032#49#48#715#716#" sortIndex="1"/>
+  <TaxonNode id="828" created="2010-12-21 15:09:49.0" uuid="786622ba-cb2c-47f4-9eeb-65a6ebb7122b" countchildren="0"   classification_id="10" parent_id="829" taxon_id="946" treeIndex="#t10#4032#49#48#829#828#" sortIndex="0"/>
+  <TaxonNode id="829" created="2010-12-21 15:09:49.0" uuid="4fe03763-b966-4361-8334-352f6f777588" countchildren="1"   classification_id="10" parent_id="48" taxon_id="948" treeIndex="#t10#4032#49#48#829#" sortIndex="3"/>
+  <TaxonNode id="1915" created="2010-12-21 15:09:57.0" uuid="99f03b56-67cd-4e01-9ceb-2362d48f9d07" countchildren="0"   classification_id="10" parent_id="1916" taxon_id="2203" treeIndex="#t10#4032#49#48#1916#1915#" sortIndex="0"/>
+  <TaxonNode id="1916" created="2010-12-21 15:09:57.0" uuid="d8998200-500f-4312-90f4-2b60e6fd3a78" countchildren="1"   classification_id="10" parent_id="48" taxon_id="2205" treeIndex="#t10#4032#49#48#1916#" sortIndex="4"/>
+  <TaxonNode id="2354" created="2010-12-21 15:10:00.0" uuid="b8439f51-6b96-445a-b401-7a836ba1cf58" countchildren="0"   classification_id="10" parent_id="2355" taxon_id="2737" treeIndex="#t10#4032#49#48#2355#2354#" sortIndex="0"/>
+  <TaxonNode id="2355" created="2010-12-21 15:10:00.0" uuid="6da4e5b6-ebc3-4c46-bdce-24161b7bd0e2" countchildren="1"   classification_id="10" parent_id="48" taxon_id="2738" treeIndex="#t10#4032#49#48#2355#" sortIndex="5"/>
+  <TaxonNode id="4032" created="2014-01-16 10:24:29.0" uuid="29b3fd3f-29b4-4011-ab12-9c1ad1607dbd" countchildren="1" classification_id="10" treeIndex="#t10#4032#"/>
+
+  <TaxonNameBase DTYPE="BotanicalName" id="48" created="2010-12-21 15:09:43.0" uuid="7aceb517-2b91-46b9-a5a2-88b7e0fb3230" protectedtitlecache="false" titleCache="Adiantum capillus-veneris L." fullTitleCache="Adiantum capillus-veneris L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Adiantum" hybridformula="false" monomhybrid="false" namecache="Adiantum capillus-veneris" protectedauthorshipcache="false" protectednamecache="false" specificepithet="capillus-veneris" trinomhybrid="false" anamorphic="false"    rank_id="778" />
+  <TaxonNameBase DTYPE="BotanicalName" id="49" created="2010-12-21 15:09:43.0" uuid="079fff38-ff2d-426b-a49e-70b0f1db6c31" protectedtitlecache="false" titleCache="Pteridophyta" fullTitleCache="Pteridophyta" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Pteridophyta" hybridformula="false" monomhybrid="false" namecache="Pteridophyta" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="810"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="51" created="2010-12-21 15:09:43.0" uuid="c8af63e0-7bd4-4fad-aa2d-3777cbe1210a" protectedtitlecache="false" titleCache="Adiantum" fullTitleCache="Adiantum" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Adiantum" hybridformula="false" monomhybrid="false" namecache="Adiantum" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="264" created="2010-12-21 15:09:45.0" uuid="b976da6a-dd84-4fcd-9a1b-9847afba1da2" protectedtitlecache="false" titleCache="Anogramma leptophylla (L.) Link" fullTitleCache="Anogramma leptophylla (L.) Link" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(L.) Link" binomhybrid="false" genusoruninomial="Anogramma" hybridformula="false" monomhybrid="false" namecache="Anogramma leptophylla" protectedauthorshipcache="false" protectednamecache="false" specificepithet="leptophylla" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="265" created="2010-12-21 15:09:45.0" uuid="c7f1db22-20fb-4eeb-810b-d37c5593b95d" protectedtitlecache="false" titleCache="Anogramma" fullTitleCache="Anogramma" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Anogramma" hybridformula="false" monomhybrid="false" namecache="Anogramma" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="812" created="2010-12-21 15:09:48.0" uuid="16450a2d-2085-471f-804a-defcd43c03e4" protectedtitlecache="false" titleCache="Cheilanthes acrostica (Balb.) Tod." fullTitleCache="Cheilanthes acrostica (Balb.) Tod." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(Balb.) Tod." binomhybrid="false" genusoruninomial="Cheilanthes" hybridformula="false" monomhybrid="false" namecache="Cheilanthes acrostica" protectedauthorshipcache="false" protectednamecache="false" specificepithet="acrostica" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="814" created="2010-12-21 15:09:48.0" uuid="bbb1c5be-5a0c-45e2-b8af-f37a80ccf858" protectedtitlecache="false" titleCache="Cheilanthes" fullTitleCache="Cheilanthes" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Cheilanthes" hybridformula="false" monomhybrid="false" namecache="Cheilanthes" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="815" created="2010-12-21 15:09:48.0" uuid="f04a9283-f856-4d28-b469-4a222472862b" protectedtitlecache="false" titleCache="Cheilanthes maderensis Lowe" fullTitleCache="Cheilanthes maderensis Lowe" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="Lowe" binomhybrid="false" genusoruninomial="Cheilanthes" hybridformula="false" monomhybrid="false" namecache="Cheilanthes maderensis" protectedauthorshipcache="false" protectednamecache="false" specificepithet="maderensis" trinomhybrid="false" anamorphic="false"    rank_id="778" />
+  <TaxonNameBase DTYPE="BotanicalName" id="946" created="2010-12-21 15:09:49.0" uuid="e30ef44b-52e4-41ff-a68d-9912d3c537f1" protectedtitlecache="false" titleCache="Cosentinia vellea (Aiton) Tod." fullTitleCache="Cosentinia vellea (Aiton) Tod." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(Aiton) Tod." binomhybrid="false" genusoruninomial="Cosentinia" hybridformula="false" monomhybrid="false" namecache="Cosentinia vellea" protectedauthorshipcache="false" protectednamecache="false" specificepithet="vellea" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="948" created="2010-12-21 15:09:49.0" uuid="21fda99e-0425-4f29-b7b2-196f8a51b054" protectedtitlecache="false" titleCache="Cosentinia" fullTitleCache="Cosentinia" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Cosentinia" hybridformula="false" monomhybrid="false" namecache="Cosentinia" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="2203" created="2010-12-21 15:09:57.0" uuid="8fe0bb4b-7687-4d32-8ff2-94e690980f81" protectedtitlecache="false" titleCache="Notholaena marantae (L.) Desv." fullTitleCache="Notholaena marantae (L.) Desv." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(L.) Desv." binomhybrid="false" genusoruninomial="Notholaena" hybridformula="false" monomhybrid="false" namecache="Notholaena marantae" protectedauthorshipcache="false" protectednamecache="false" specificepithet="marantae" trinomhybrid="false" anamorphic="false"    rank_id="778"  />
+  <TaxonNameBase DTYPE="BotanicalName" id="2205" created="2010-12-21 15:09:57.0" uuid="77b7934f-8f62-4798-b96a-f3d12bfd5ebf" protectedtitlecache="false" titleCache="Notholaena" fullTitleCache="Notholaena" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Notholaena" hybridformula="false" monomhybrid="false" namecache="Notholaena" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+  <TaxonNameBase DTYPE="BotanicalName" id="2737" created="2010-12-21 15:10:00.0" uuid="25560d66-07a3-41ce-8244-36ca98638c71" protectedtitlecache="false" titleCache="Pteris vittata L." fullTitleCache="Pteris vittata L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Pteris" hybridformula="false" monomhybrid="false" namecache="Pteris vittata" protectedauthorshipcache="false" protectednamecache="false" specificepithet="vittata" trinomhybrid="false" anamorphic="false"    rank_id="778" />
+  <TaxonNameBase DTYPE="BotanicalName" id="2738" created="2010-12-21 15:10:00.0" uuid="a40593ce-e8cc-43bb-a391-2de988b09039" protectedtitlecache="false" titleCache="Pteris" fullTitleCache="Pteris" parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" genusoruninomial="Pteris" hybridformula="false" monomhybrid="false" namecache="Pteris" protectedauthorshipcache="false" protectednamecache="false" trinomhybrid="false" anamorphic="false"    rank_id="788"/>
+
+  <Classification id="10" created="2010-12-21 15:09:43.0" uuid="0c2b5d25-7b15-4401-8b51-dd4be0ee5cab" updated="2015-06-09 07:10:42.0" protectedtitlecache="false" titleCache="Cyprus"   updatedby_id="10" name_id="10"  rootnode_id="4032"/>
+
+  <TaxonBase DTYPE="Taxon" id="48" created="2011-03-01 20:11:26.0" uuid="b8402dc4-5050-4882-a147-01b71e0e47d6" protectedtitlecache="false" titleCache="Adiantum capillus-veneris L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="48"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="49" created="2010-12-21 15:09:43.0" uuid="1141a510-5ee8-4a59-ae60-7b4fea44872f" protectedtitlecache="false" titleCache="Pteridophyta sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="49"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="51" created="2010-12-21 15:09:43.0" uuid="233cac41-bb05-4925-bb9e-ab0bdf330973" protectedtitlecache="false" titleCache="Adiantum sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="51"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="264" created="2011-03-01 20:11:27.0" uuid="d679c5d0-53b3-40fc-97e1-0646aad7ed23" protectedtitlecache="false" titleCache="Anogramma leptophylla (L.) Link sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="264"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="265" created="2010-12-21 15:09:45.0" uuid="1fc1d927-1155-4282-a9f5-f07202f79ace" protectedtitlecache="false" titleCache="Anogramma sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="265"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="812" created="2011-03-01 20:11:29.0" uuid="e40854d7-143f-4054-b229-6ed4cedb4bff" protectedtitlecache="false" titleCache="Cheilanthes acrostica (Balb.) Tod. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="812"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="814" created="2010-12-21 15:09:48.0" uuid="433ad11a-b931-49a4-8128-d6f4d454914a" protectedtitlecache="false" titleCache="Cheilanthes sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="814"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="815" created="2010-12-21 15:09:48.0" uuid="7ea2c74a-f2b2-41f6-acdf-1ca35f5d03f8" protectedtitlecache="false" titleCache="Cheilanthes maderensis Lowe sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="815"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="946" created="2011-03-01 20:11:30.0" uuid="ba21b018-97d2-42d7-af6c-5e8db8e495ff" protectedtitlecache="false" titleCache="Cosentinia vellea (Aiton) Tod. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="946"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="948" created="2010-12-21 15:09:49.0" uuid="a2768f6d-80f2-4e0c-a6e3-99b7a9f3bc9d" protectedtitlecache="false" titleCache="Cosentinia sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="948"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2203" created="2011-03-01 20:11:36.0" uuid="d9a0c5d5-baee-4b6b-974a-a7de5affe748" protectedtitlecache="false" titleCache="Notholaena marantae (L.) Desv. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2203"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2205" created="2010-12-21 15:09:57.0" uuid="c221d34c-76b0-4fc7-9901-e72efd4c899b" protectedtitlecache="false" titleCache="Notholaena sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2205"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2737" created="2011-03-01 20:11:39.0" uuid="6b46ac55-3e39-4c37-a1b6-b680b21599b2" protectedtitlecache="false" titleCache="Pteris vittata L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2737"  publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="2738" created="2010-12-21 15:10:00.0" uuid="8ac3dca2-6bbf-4cd4-84b7-53ddc2973ed8" protectedtitlecache="false" titleCache="Pteris sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false"   name_id="2738"  publish="true"/>
+
+  <DescriptionBase DTYPE="TaxonDescription" id="28" created="2010-12-21 15:09:43.0" uuid="f04f8f66-ad92-42d0-89bc-04ac5b36163c" updated="2011-03-01 19:20:45.0" protectedtitlecache="false" titleCache="Taxon description for Adiantum capillus-veneris L." imagegallery="false"   taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="149" created="2010-12-21 15:09:45.0" uuid="24df0fca-bfc4-4f0f-a269-336985ed6e5e" updated="2011-03-01 19:20:46.0" protectedtitlecache="false" titleCache="Taxon description for Anogramma leptophylla (L.) Link" imagegallery="false"   taxon_id="264"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="447" created="2010-12-21 15:09:48.0" uuid="01863b86-c6ae-48b8-a8da-f693be9087da" updated="2011-03-01 19:20:48.0" protectedtitlecache="false" titleCache="Taxon description for Cheilanthes acrostica (Balbis) Tod." imagegallery="false"   taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="448" created="2010-12-21 15:09:48.0" uuid="aac7b184-e622-409b-8eda-e14998b9021d" protectedtitlecache="false" titleCache="Taxon description for Cheilanthes maderensis Lowe" imagegallery="false"   taxon_id="815"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="521" created="2010-12-21 15:09:49.0" uuid="2d672585-0f35-42f8-9923-dfd5545e6369" updated="2011-03-01 19:20:48.0" protectedtitlecache="false" titleCache="Taxon description for Cosentinia vellea (Aiton) Tod." imagegallery="false"   taxon_id="946"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="1234" created="2010-12-21 15:09:57.0" uuid="a8a734c2-122b-4d5b-9c89-a852f4ab4661" updated="2011-03-01 19:20:53.0" protectedtitlecache="false" titleCache="Taxon description for Notholaena marantae (L.) Desv." imagegallery="false"   taxon_id="2203"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="1524" created="2010-12-21 15:10:00.0" uuid="c4e66d46-e4fb-4da2-a432-3f1cf5353b81" updated="2011-03-01 19:20:55.0" protectedtitlecache="false" titleCache="Taxon description for Pteris vittata L." imagegallery="false"   taxon_id="2737"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4567" created="2011-03-01 19:20:45.0" uuid="dd0f7395-6162-4ce4-8ece-774011b09325" updated="2011-03-01 20:11:26.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Adiantum capillus-veneris L. sec. Cyprus" imagegallery="false" taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4627" created="2011-03-01 19:20:46.0" uuid="34266202-eb5d-41ec-a0b2-da56deb11cc7" updated="2011-03-01 20:11:27.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Anogramma leptophylla (L.) Link sec. Cyprus" imagegallery="false" taxon_id="264"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4798" created="2011-03-01 19:20:48.0" uuid="504b0178-39e6-4c79-8e33-ca00b0662f27" updated="2011-03-01 20:11:29.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Cheilanthes acrostica (Balbis) Tod. sec. Cyprus" imagegallery="false" taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="4840" created="2011-03-01 19:20:48.0" uuid="73396d11-5d35-43fb-8b15-4d472bdcdd43" updated="2011-03-01 20:11:30.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Cosentinia vellea (Aiton) Tod. sec. Cyprus" imagegallery="false" taxon_id="946"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="5409" created="2011-03-01 19:20:55.0" uuid="64a797b2-7f92-4012-a4f5-d76f8aaeb6b4" updated="2011-03-01 20:11:39.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Pteris vittata L. sec. Cyprus" imagegallery="false" taxon_id="2737"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="5974" created="2011-03-01 19:20:53.0" uuid="71872861-8229-4cab-8042-b75dfa0e3f63" updated="2011-03-01 20:11:36.0" protectedtitlecache="true" titleCache="Cyprus Distributions Excel Import for Notholaena marantae (L.) Desv. sec. Cyprus" imagegallery="false" taxon_id="2203"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="11766" created="2012-07-30 15:39:44.0" uuid="6b4be8a2-ea86-4815-bd31-b022055a90f2" protectedtitlecache="false" titleCache="Image gallery for Pteris vittata L." imagegallery="true"   taxon_id="2737"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="12353" created="2012-12-03 12:21:48.0" uuid="b8d3a151-032e-48d9-9191-d7b8fb1fe1a0" protectedtitlecache="false" titleCache="Image gallery for Cheilanthes acrostica (Balbis) Tod." imagegallery="true"   taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="12713" created="2013-02-10 21:43:33.0" uuid="61fbdc1b-80bf-4aea-b6cb-8f4d466bd923" protectedtitlecache="false" titleCache="Image gallery for Adiantum capillus-veneris L." imagegallery="true"   taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="13728" created="2014-02-28 19:20:29.0" uuid="53b3125e-2a43-4433-a4dd-50dd9a4cf92c" updated="2014-02-28 19:20:29.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="48"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="13817" created="2014-02-28 19:20:34.0" uuid="7b108193-e689-417a-bcab-adaf6c49d532" updated="2014-02-28 19:20:34.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="264"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14043" created="2014-02-28 19:20:58.0" uuid="de29cc97-a160-4783-b996-b929157335d5" updated="2014-02-28 19:20:58.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="812"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14101" created="2014-02-28 19:21:07.0" uuid="815336d3-19d6-493d-9ea4-bcb320d1b922" updated="2014-02-28 19:21:08.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="946"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14658" created="2014-02-28 19:23:51.0" uuid="ce4068f8-17b0-46e2-9fbb-e8c16efb7255" updated="2014-02-28 19:23:51.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="2203"/>
+  <DescriptionBase DTYPE="TaxonDescription" id="14864" created="2014-02-28 19:25:21.0" uuid="2d55f445-8e72-43d3-976a-133828e89599" updated="2014-02-28 19:25:21.0" protectedtitlecache="true" titleCache="Import from Cyprus Excel Altitude Import" imagegallery="false" taxon_id="2737"/>
+
+  <SynonymRelationship/>
+  
+  <LanguageString id="10"/>
+</dataset>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/service/IOServiceImportTest.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/service/IOServiceImportTest.xml
new file mode 100644 (file)
index 0000000..e6c8bef
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dataset>
+  <TaxonNameBase />
+  <TaxonBase />
+  <TaxonNode />
+  <Classification />
+</dataset>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.xml
new file mode 100644 (file)
index 0000000..931c381
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+  generated by Jailer 4.3, Thu Oct 09 18:00:09 CEST 2014 from cmathew@cmbgbm-t530
+  
+  Extraction Model:  PolytomousKey where uuid like '0d53ba20-7de4-4baa-bd8a-401048447d66' (extractionmodel/by-example/SbE-PolytomousKey-17-59-56-907.csv)
+  Database URL:      jdbc:mysql://127.0.0.1:3306/local-cyprus
+  Database User:     root
+  
+  Exported Rows:     79
+      AgentBase                      1
+      Credit                         1     
+      Extension                      1
+      KeyStatement                   10
+      KeyStatement_LanguageString    10
+      LanguageString                 19
+      OriginalSourceBase             2
+      PolytomousKey                  2
+      PolytomousKeyNode              10
+      PolytomousKeyNode_LanguageString 9
+      PolytomousKey_Credit           1
+      PolytomousKey_Extension        1
+      PolytomousKey_OriginalSourceBase 2
+      PolytomousKey_RightsInfo       1
+      PolytomousKey_Taxon            1
+      RightsInfo                     1
+      TaxonBase                      6
+  
+--><dataset>
+  <PolytomousKey_Extension PolytomousKey_id="1550" extensions_id="10"/>
+
+  <PolytomousKey_Credit PolytomousKey_id="1550" credits_id="20" sortIndex="0"/>
+
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2751" modifyingtext_id="13780" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2752" modifyingtext_id="13781" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2753" modifyingtext_id="13795" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2754" modifyingtext_id="13788" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2755" modifyingtext_id="13785" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2756" modifyingtext_id="13787" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2757" modifyingtext_id="13794" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2758" modifyingtext_id="13791" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2759" modifyingtext_id="13793" modifyingtext_mapkey_id="124"/>
+
+  <LanguageString id="13780" created="2014-03-10 10:03:09.0" uuid="cceaa60b-61f4-4c8a-bb0e-d45f0fa3e2dc" text="Modifying Text 1a" language_id="124"/>
+  <LanguageString id="13781" created="2014-03-10 10:03:17.0" uuid="01a0ace4-de49-4725-9909-e881fb13035d" text="" language_id="124"/>
+  <LanguageString id="13782" created="2014-03-10 10:03:48.0" uuid="ec0fea40-69dd-4c3e-ab7a-34948037a069" updated="2014-03-10 10:06:32.0" text="Capitula with ligulate ray-florets; leaves pinnatisect"   language_id="124"/>
+  <LanguageString id="13783" created="2014-03-10 10:04:03.0" uuid="82f8a3a0-567f-4d89-ba10-3f3699111d55" updated="2014-03-10 10:06:32.0" text="Ray-florets yellow"   language_id="124"/>
+  <LanguageString id="13784" created="2014-03-10 10:04:21.0" uuid="4270501f-1efc-45c2-9e8f-c65f120e8f4c" updated="2014-03-10 10:06:32.0" text="Stem thinly pilose; leaves 10-15 mm wide, with spreading linear-subulate segments; perennial herb"   language_id="124"/>
+  <LanguageString id="13785" created="2014-03-10 10:04:07.0" uuid="813f5fd6-c8f6-43e8-9a2b-1464f3ba052a" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13786" created="2014-03-10 10:04:53.0" uuid="ba17ac94-632f-4d69-ac89-a882e19ff1c5" updated="2014-03-10 10:06:32.0" text="Stem white-tomentose; leaves 1-3 mm wide, with minute overlapping, transverse segments; small subshrubs with a woody base"   language_id="124"/>
+  <LanguageString id="13787" created="2014-03-10 10:04:34.0" uuid="ab219a5d-e0c4-45fd-8405-6693c3fb8abf" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13788" created="2014-03-10 10:03:53.0" uuid="2baec690-422d-4f85-bcfd-24f5718cbecf" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13789" created="2014-03-10 10:05:16.0" uuid="7c6a7984-8e6f-48b1-86b2-d5d643199bf3" updated="2014-03-10 10:06:32.0" text="Ray-florets white"   language_id="124"/>
+  <LanguageString id="13790" created="2014-03-10 10:05:34.0" uuid="72bd8bc9-1904-47ab-8bec-b9296a98b244" updated="2014-03-10 10:06:32.0" text="Perennial herb; stem pilose, hairy or glabrescent, but not tomentose; ligules 1-2 mm diam."   language_id="124"/>
+  <LanguageString id="13791" created="2014-03-10 10:05:20.0" uuid="c917e3fb-e48b-4207-b77d-c1c108e37906" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13792" created="2014-03-10 10:06:15.0" uuid="c5dd35d8-da6a-4d05-b30c-6b55220bd989" updated="2014-03-10 10:06:32.0" text="Shrub with a woody base; stem white-tomentose or woolly; ligules 4-5 mm diam."   language_id="124"/>
+  <LanguageString id="13793" created="2014-03-10 10:06:03.0" uuid="227a17f6-1ca1-4d06-8480-25711b614863" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13794" created="2014-03-10 10:05:07.0" uuid="2c434ab1-8ca7-4464-b5cd-4cee40db41ed" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13795" created="2014-03-10 10:03:38.0" uuid="27190d54-f53b-401e-820c-edfb36d4bcbf" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13796" created="2014-03-10 10:03:25.0" uuid="69cffb28-8a85-478f-bcae-533e20938ccd" updated="2014-03-10 10:06:32.0" text="Capitula without ligulate ray-florets; leaves entire or subentire"   language_id="124"/>
+  <LanguageString id="14570" created="2014-10-09 15:42:33.0" uuid="84967760-6dbe-4af4-8e0c-309f1af6ce20" updated="2014-10-09 15:42:44.0" text="Question 1" createdby_id="10" updatedby_id="10" language_id="124"/>
+  <LanguageString id="14571" created="2014-10-09 15:42:55.0" uuid="d82f37b1-f51d-42c1-a291-0c7820db155e" updated="2014-10-09 15:43:03.0" text="Question 2" createdby_id="10" updatedby_id="10" language_id="124"/>
+
+  <TaxonBase DTYPE="Taxon" id="32" created="2011-03-01 20:11:26.0" uuid="8217ef77-2ab1-4318-bd67-ccd0cdef07c4" protectedtitlecache="false" titleCache="Achillea arabica Kotschy sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="35" created="2010-12-21 15:09:43.0" uuid="fade44fd-34b2-455f-861a-d1372b866f06" protectedtitlecache="false" titleCache="Achillea sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="36" created="2011-03-01 20:11:26.0" uuid="05f0a2e1-e3c3-4e74-8fec-8a0ae89236c3" protectedtitlecache="false" titleCache="Achillea cretica L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="37" created="2011-03-01 20:11:26.0" uuid="0f8d18a9-e861-48e8-bfab-83e01a379bc0" protectedtitlecache="false" titleCache="Achillea maritima (L.)Ehrend. &amp; Y.-P. Guo subsp. maritima sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="40" created="2010-12-21 15:09:43.0" uuid="2b336df7-29e8-4f79-985f-66502739d22f" protectedtitlecache="false" titleCache="Achillea millefolium L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="41" created="2011-03-01 20:11:26.0" uuid="094e1af8-efd8-4605-b037-b4f715379562" protectedtitlecache="false" titleCache="Achillea santolinoides subsp. wilhelmsii (K. Koch) Greuter sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11" sec_id="10" publish="true"/>
+
+  <PolytomousKey_Taxon polytomousKey_id="1550" taxon_id="35"/>
+
+  <RightsInfo id="10" created="2014-10-09 15:45:53.0" uuid="bdfb572b-be25-45e7-9349-22a9da43531f" updated="2014-10-09 15:48:01.0" text="Rights Text Test" createdby_id="10" updatedby_id="10" agent_id="4809" type_id="2056"/>
+
+
+  <PolytomousKeyNode id="2750" created="2014-03-10 10:02:35.0" uuid="75e4c924-ff58-4ee7-a59d-fd9173517d08" updated="2014-03-10 10:02:42.0" nodenumber="1"   key_id="1550" question_id="2760"/>
+  <PolytomousKeyNode id="2751" created="2014-03-10 10:02:52.0" uuid="23e51ff7-11b1-443b-aff2-3fe8b5ace9fe" sortindex="0" key_id="1550" statement_id="2467" subkey_id="751" taxon_id="37" parent_id="2750"/>
+  <PolytomousKeyNode id="2752" created="2014-03-10 10:03:16.0" uuid="dcf326f7-c0ad-4e76-b64e-43aea11f767c" key_id="1550"/>
+  <PolytomousKeyNode id="2753" created="2014-03-10 10:03:38.0" uuid="b775c027-13c0-4b87-8aa9-712faeaafbdc" updated="2014-03-10 10:06:32.0" nodenumber="2" sortindex="1"   key_id="1550" question_id="2761" statement_id="2460"  subkey_id="751" parent_id="2750"/>
+  <PolytomousKeyNode id="2754" created="2014-03-10 10:03:52.0" uuid="df5d5922-35de-43d5-9d46-7730ae28eeb3" updated="2014-03-10 10:06:32.0" nodenumber="3" sortindex="0"   key_id="1550" statement_id="2461" subkey_id="751" parent_id="2753"/>
+  <PolytomousKeyNode id="2755" created="2014-03-10 10:04:07.0" uuid="0c8583ee-399e-433c-b76b-272c54dbd9f5" updated="2014-03-10 10:06:32.0" sortindex="0"   key_id="1550" statement_id="2462" taxon_id="32" parent_id="2754"/>
+  <PolytomousKeyNode id="2756" created="2014-03-10 10:04:34.0" uuid="a10e1e61-82c0-470e-a245-10a927b80c9a" updated="2014-03-10 10:06:32.0" sortindex="1"   key_id="1550" statement_id="2463" taxon_id="41" parent_id="2754"/>
+  <PolytomousKeyNode id="2757" created="2014-03-10 10:05:07.0" uuid="19f7a6a2-4c55-49cb-8b92-d68a9fd9074c" updated="2014-03-10 10:06:32.0" nodenumber="4" sortindex="1"   key_id="1550" statement_id="2464" parent_id="2753"/>
+  <PolytomousKeyNode id="2758" created="2014-03-10 10:05:20.0" uuid="0a4d86d1-fba5-4088-8dcc-6f0e7268ca5b" updated="2014-03-10 10:06:32.0" sortindex="0"   key_id="1550" statement_id="2465" taxon_id="40" parent_id="2757"/>
+  <PolytomousKeyNode id="2759" created="2014-03-10 10:06:03.0" uuid="827c9df4-ac15-4163-95ab-616d51f62803" updated="2014-03-10 10:06:32.0" sortindex="1"   key_id="1550" statement_id="2466" taxon_id="36" parent_id="2757"/>
+
+  <Credit id="20" created="2014-10-09 15:45:22.0" uuid="aa412b15-ee6c-4834-b14e-a66969cb398d" updated="2014-10-09 15:48:01.0" text="Credits Text Test" createdby_id="10" updatedby_id="10" language_id="124" agent_id="4809"/>
+
+  <KeyStatement id="2460" created="2014-03-10 10:03:48.0" uuid="66da6df7-784c-4d5a-9378-58b2cf92ba13" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2461" created="2014-03-10 10:04:03.0" uuid="f9cfd498-de47-48fd-b38c-43cf57b63750" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2462" created="2014-03-10 10:04:21.0" uuid="817fb39e-91d4-4d8c-a942-6acab47575d1" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2463" created="2014-03-10 10:04:53.0" uuid="6b571b86-7764-4f27-925c-ae5e2653f7ad" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2464" created="2014-03-10 10:05:16.0" uuid="91bbb534-abdf-4915-9f6f-a0cb41f8cf58" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2465" created="2014-03-10 10:05:34.0" uuid="1991ca31-2630-4917-8db3-eb67cec8f231" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2466" created="2014-03-10 10:06:15.0" uuid="3e1bbc59-b098-4533-ac35-245e1140a0ae" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2467" created="2014-03-10 10:03:24.0" uuid="68fd99f6-64ce-4bb8-a6af-d2cf2c046e2c" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2760" created="2014-10-09 15:42:33.0" uuid="b9702653-f620-4208-bda9-a6fe082004d1" updated="2014-10-09 15:42:44.0" createdby_id="10" updatedby_id="10"/>
+  <KeyStatement id="2761" created="2014-10-09 15:42:55.0" uuid="688a432f-4b57-4c6f-a8f6-0c468a28cb7c" updated="2014-10-09 15:43:03.0" createdby_id="10" updatedby_id="10"/>
+
+  <AgentBase DTYPE="Person" id="4809" created="2010-12-21 15:09:59.0" uuid="945d08f2-eb92-45b6-9252-6275ea6d338b" protectedtitlecache="false" titleCache="R. A. Graham" nomenclaturaltitle="R. A. Graham"/>
+
+  <Extension id="10" created="2014-10-09 15:45:41.0" uuid="0d6f35d7-7e76-446a-a017-7e8355ee1b4c" updated="2014-10-09 15:48:01.0" extendedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" extendedObj_id="1550" value="http://test.com" createdby_id="10" updatedby_id="10" type_id="2075"/>
+
+  <PolytomousKey_OriginalSourceBase PolytomousKey_id="1550" sources_id="23710"/>
+  <PolytomousKey_OriginalSourceBase PolytomousKey_id="1550" sources_id="23711"/>
+
+  <PolytomousKey_RightsInfo PolytomousKey_id="1550" rights_id="10"/>
+
+  <KeyStatement_LanguageString KeyStatement_id="2460" label_id="13782" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2461" label_id="13783" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2462" label_id="13784" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2463" label_id="13786" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2464" label_id="13789" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2465" label_id="13790" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2466" label_id="13792" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2467" label_id="13796" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2760" label_id="14570" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2761" label_id="14571" label_mapkey_id="124"/>
+
+  <PolytomousKey id="751" created="2013-03-24 11:17:08.0" uuid="9d8bf4f6-a70a-4b80-8556-2ccfb436ff01" protectedtitlecache="true" titleCache="Asphodeline"   startNumber="1"/>
+  <PolytomousKey id="1550" created="2014-03-10 10:02:35.0" uuid="0d53ba20-7de4-4baa-bd8a-401048447d66" updated="2014-03-10 10:02:42.0" protectedtitlecache="true" titleCache="Achillea"   root_id="2750" startNumber="1"/>
+
+  <OriginalSourceBase DTYPE="IdentifiableSource" id="23710" created="2014-03-10 10:06:57.0" uuid="95e05e82-499d-4b8a-ad6b-1085f74a7496" updated="2014-03-10 10:07:33.0" sourcedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" sourcedObj_id="1550"    sourceType="PTS"/>
+  <OriginalSourceBase DTYPE="IdentifiableSource" id="23711" created="2014-03-10 10:06:48.0" uuid="f77555fe-0d98-4c9f-98ed-a5bca6b1e342" updated="2014-03-10 10:07:33.0" sourcedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" sourcedObj_id="1550"    sourceType="PTS"/>   
+  
+</dataset>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/session/CdmEntitySessionManagerTest.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/session/CdmEntitySessionManagerTest.xml
new file mode 100644 (file)
index 0000000..f5683e0
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+  generated by Jailer 4.3, Thu Oct 09 18:00:09 CEST 2014 from cmathew@cmbgbm-t530
+  
+  Extraction Model:  PolytomousKey where uuid like '0d53ba20-7de4-4baa-bd8a-401048447d66' (extractionmodel/by-example/SbE-PolytomousKey-17-59-56-907.csv)
+  Database URL:      jdbc:mysql://127.0.0.1:3306/local-cyprus
+  Database User:     root
+  
+  Exported Rows:     79
+      AgentBase                      1
+      Credit                         1
+      Extension                      1
+      KeyStatement                   10
+      KeyStatement_LanguageString    10
+      LanguageString                 19
+      OriginalSourceBase             2
+      PolytomousKey                  2
+      PolytomousKeyNode              10
+      PolytomousKeyNode_LanguageString 9
+      PolytomousKey_Credit           1
+      PolytomousKey_Extension        1
+      PolytomousKey_OriginalSourceBase 2
+      PolytomousKey_RightsInfo       1
+      PolytomousKey_Taxon            1
+      RightsInfo                     1
+      TaxonBase                      6
+  
+--><dataset>
+  <PolytomousKey_Extension PolytomousKey_id="1550" extensions_id="10"/>
+
+  <PolytomousKey_Credit PolytomousKey_id="1550" credits_id="20" sortIndex="0"/>
+
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2751" modifyingtext_id="13780" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2752" modifyingtext_id="13781" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2753" modifyingtext_id="13795" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2754" modifyingtext_id="13788" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2755" modifyingtext_id="13785" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2756" modifyingtext_id="13787" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2757" modifyingtext_id="13794" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2758" modifyingtext_id="13791" modifyingtext_mapkey_id="124"/>
+  <PolytomousKeyNode_LanguageString PolytomousKeyNode_id="2759" modifyingtext_id="13793" modifyingtext_mapkey_id="124"/>
+
+  <LanguageString id="13780" created="2014-03-10 10:03:09.0" uuid="cceaa60b-61f4-4c8a-bb0e-d45f0fa3e2dc" text="Modifying Text 1a" language_id="124"/>
+  <LanguageString id="13781" created="2014-03-10 10:03:17.0" uuid="01a0ace4-de49-4725-9909-e881fb13035d" text="" language_id="124"/>
+  <LanguageString id="13782" created="2014-03-10 10:03:48.0" uuid="ec0fea40-69dd-4c3e-ab7a-34948037a069" updated="2014-03-10 10:06:32.0" text="Capitula with ligulate ray-florets; leaves pinnatisect"   language_id="124"/>
+  <LanguageString id="13783" created="2014-03-10 10:04:03.0" uuid="82f8a3a0-567f-4d89-ba10-3f3699111d55" updated="2014-03-10 10:06:32.0" text="Ray-florets yellow"   language_id="124"/>
+  <LanguageString id="13784" created="2014-03-10 10:04:21.0" uuid="4270501f-1efc-45c2-9e8f-c65f120e8f4c" updated="2014-03-10 10:06:32.0" text="Stem thinly pilose; leaves 10-15 mm wide, with spreading linear-subulate segments; perennial herb"   language_id="124"/>
+  <LanguageString id="13785" created="2014-03-10 10:04:07.0" uuid="813f5fd6-c8f6-43e8-9a2b-1464f3ba052a" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13786" created="2014-03-10 10:04:53.0" uuid="ba17ac94-632f-4d69-ac89-a882e19ff1c5" updated="2014-03-10 10:06:32.0" text="Stem white-tomentose; leaves 1-3 mm wide, with minute overlapping, transverse segments; small subshrubs with a woody base"   language_id="124"/>
+  <LanguageString id="13787" created="2014-03-10 10:04:34.0" uuid="ab219a5d-e0c4-45fd-8405-6693c3fb8abf" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13788" created="2014-03-10 10:03:53.0" uuid="2baec690-422d-4f85-bcfd-24f5718cbecf" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13789" created="2014-03-10 10:05:16.0" uuid="7c6a7984-8e6f-48b1-86b2-d5d643199bf3" updated="2014-03-10 10:06:32.0" text="Ray-florets white"   language_id="124"/>
+  <LanguageString id="13790" created="2014-03-10 10:05:34.0" uuid="72bd8bc9-1904-47ab-8bec-b9296a98b244" updated="2014-03-10 10:06:32.0" text="Perennial herb; stem pilose, hairy or glabrescent, but not tomentose; ligules 1-2 mm diam."   language_id="124"/>
+  <LanguageString id="13791" created="2014-03-10 10:05:20.0" uuid="c917e3fb-e48b-4207-b77d-c1c108e37906" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13792" created="2014-03-10 10:06:15.0" uuid="c5dd35d8-da6a-4d05-b30c-6b55220bd989" updated="2014-03-10 10:06:32.0" text="Shrub with a woody base; stem white-tomentose or woolly; ligules 4-5 mm diam."   language_id="124"/>
+  <LanguageString id="13793" created="2014-03-10 10:06:03.0" uuid="227a17f6-1ca1-4d06-8480-25711b614863" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13794" created="2014-03-10 10:05:07.0" uuid="2c434ab1-8ca7-4464-b5cd-4cee40db41ed" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13795" created="2014-03-10 10:03:38.0" uuid="27190d54-f53b-401e-820c-edfb36d4bcbf" updated="2014-03-10 10:06:32.0" text=""   language_id="124"/>
+  <LanguageString id="13796" created="2014-03-10 10:03:25.0" uuid="69cffb28-8a85-478f-bcae-533e20938ccd" updated="2014-03-10 10:06:32.0" text="Capitula without ligulate ray-florets; leaves entire or subentire"   language_id="124"/>
+  <LanguageString id="14570" created="2014-10-09 15:42:33.0" uuid="84967760-6dbe-4af4-8e0c-309f1af6ce20" updated="2014-10-09 15:42:44.0" text="Question 1" createdby_id="10" updatedby_id="10" language_id="124"/>
+  <LanguageString id="14571" created="2014-10-09 15:42:55.0" uuid="d82f37b1-f51d-42c1-a291-0c7820db155e" updated="2014-10-09 15:43:03.0" text="Question 2" createdby_id="10" updatedby_id="10" language_id="124"/>
+
+  <TaxonBase DTYPE="Taxon" id="32" created="2011-03-01 20:11:26.0" uuid="8217ef77-2ab1-4318-bd67-ccd0cdef07c4" protectedtitlecache="false" titleCache="Achillea arabica Kotschy sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="35" created="2010-12-21 15:09:43.0" uuid="fade44fd-34b2-455f-861a-d1372b866f06" protectedtitlecache="false" titleCache="Achillea sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="36" created="2011-03-01 20:11:26.0" uuid="05f0a2e1-e3c3-4e74-8fec-8a0ae89236c3" protectedtitlecache="false" titleCache="Achillea cretica L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="37" created="2011-03-01 20:11:26.0" uuid="0f8d18a9-e861-48e8-bfab-83e01a379bc0" protectedtitlecache="false" titleCache="Achillea maritima (L.)Ehrend. &amp; Y.-P. Guo subsp. maritima sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="40" created="2010-12-21 15:09:43.0" uuid="2b336df7-29e8-4f79-985f-66502739d22f" protectedtitlecache="false" titleCache="Achillea millefolium L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11"  sec_id="10" publish="true"/>
+  <TaxonBase DTYPE="Taxon" id="41" created="2011-03-01 20:11:26.0" uuid="094e1af8-efd8-4605-b037-b4f715379562" protectedtitlecache="false" titleCache="Achillea santolinoides subsp. wilhelmsii (K. Koch) Greuter sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11" sec_id="10" publish="true"/>
+
+  <PolytomousKey_Taxon polytomousKey_id="1550" taxon_id="35"/>
+
+  <RightsInfo id="10" created="2014-10-09 15:45:53.0" uuid="bdfb572b-be25-45e7-9349-22a9da43531f" updated="2014-10-09 15:48:01.0" text="Rights Text Test" createdby_id="10" updatedby_id="10" agent_id="4809" type_id="2056"/>
+
+  <PolytomousKeyNode id="2750" created="2014-03-10 10:02:35.0" uuid="75e4c924-ff58-4ee7-a59d-fd9173517d08" updated="2014-03-10 10:02:42.0" nodenumber="1"   key_id="1550" question_id="2760"/>
+  <PolytomousKeyNode id="2751" created="2014-03-10 10:02:52.0" uuid="23e51ff7-11b1-443b-aff2-3fe8b5ace9fe" sortindex="0" key_id="1550" statement_id="2467" subkey_id="1550" taxon_id="37" parent_id="2750"/>
+  <PolytomousKeyNode id="2752" created="2014-03-10 10:03:16.0" uuid="dcf326f7-c0ad-4e76-b64e-43aea11f767c" key_id="1550"/>
+  <PolytomousKeyNode id="2753" created="2014-03-10 10:03:38.0" uuid="b775c027-13c0-4b87-8aa9-712faeaafbdc" updated="2014-03-10 10:06:32.0" nodenumber="2" sortindex="1"   key_id="1550" question_id="2761" statement_id="2460"  subkey_id="1550" parent_id="2750"/>
+  <PolytomousKeyNode id="2754" created="2014-03-10 10:03:52.0" uuid="df5d5922-35de-43d5-9d46-7730ae28eeb3" updated="2014-03-10 10:06:32.0" nodenumber="3" sortindex="0"   key_id="1550" statement_id="2461" subkey_id="1550" parent_id="2753"/>
+  <PolytomousKeyNode id="2755" created="2014-03-10 10:04:07.0" uuid="0c8583ee-399e-433c-b76b-272c54dbd9f5" updated="2014-03-10 10:06:32.0" sortindex="0"   key_id="1550" statement_id="2462" taxon_id="32" parent_id="2754"/>
+  <PolytomousKeyNode id="2756" created="2014-03-10 10:04:34.0" uuid="a10e1e61-82c0-470e-a245-10a927b80c9a" updated="2014-03-10 10:06:32.0" sortindex="1"   key_id="1550" statement_id="2463" taxon_id="41" parent_id="2754"/>
+  <PolytomousKeyNode id="2757" created="2014-03-10 10:05:07.0" uuid="19f7a6a2-4c55-49cb-8b92-d68a9fd9074c" updated="2014-03-10 10:06:32.0" nodenumber="4" sortindex="1"   key_id="1550" statement_id="2464" parent_id="2753"/>
+  <PolytomousKeyNode id="2758" created="2014-03-10 10:05:20.0" uuid="0a4d86d1-fba5-4088-8dcc-6f0e7268ca5b" updated="2014-03-10 10:06:32.0" sortindex="0"   key_id="1550" statement_id="2465" taxon_id="40" parent_id="2757"/>
+  <PolytomousKeyNode id="2759" created="2014-03-10 10:06:03.0" uuid="827c9df4-ac15-4163-95ab-616d51f62803" updated="2014-03-10 10:06:32.0" sortindex="1"   key_id="1550" statement_id="2466" taxon_id="36" parent_id="2757"/>
+
+  <Credit id="20" created="2014-10-09 15:45:22.0" uuid="aa412b15-ee6c-4834-b14e-a66969cb398d" updated="2014-10-09 15:48:01.0" text="Credits Text Test" createdby_id="10" updatedby_id="10" language_id="124" agent_id="4809"/>
+
+  <KeyStatement id="2460" created="2014-03-10 10:03:48.0" uuid="66da6df7-784c-4d5a-9378-58b2cf92ba13" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2461" created="2014-03-10 10:04:03.0" uuid="f9cfd498-de47-48fd-b38c-43cf57b63750" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2462" created="2014-03-10 10:04:21.0" uuid="817fb39e-91d4-4d8c-a942-6acab47575d1" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2463" created="2014-03-10 10:04:53.0" uuid="6b571b86-7764-4f27-925c-ae5e2653f7ad" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2464" created="2014-03-10 10:05:16.0" uuid="91bbb534-abdf-4915-9f6f-a0cb41f8cf58" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2465" created="2014-03-10 10:05:34.0" uuid="1991ca31-2630-4917-8db3-eb67cec8f231" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2466" created="2014-03-10 10:06:15.0" uuid="3e1bbc59-b098-4533-ac35-245e1140a0ae" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2467" created="2014-03-10 10:03:24.0" uuid="68fd99f6-64ce-4bb8-a6af-d2cf2c046e2c" updated="2014-03-10 10:06:32.0"  />
+  <KeyStatement id="2760" created="2014-10-09 15:42:33.0" uuid="b9702653-f620-4208-bda9-a6fe082004d1" updated="2014-10-09 15:42:44.0" createdby_id="10" updatedby_id="10"/>
+  <KeyStatement id="2761" created="2014-10-09 15:42:55.0" uuid="688a432f-4b57-4c6f-a8f6-0c468a28cb7c" updated="2014-10-09 15:43:03.0" createdby_id="10" updatedby_id="10"/>
+
+  <AgentBase DTYPE="Person" id="4809" created="2010-12-21 15:09:59.0" uuid="945d08f2-eb92-45b6-9252-6275ea6d338b" protectedtitlecache="false" titleCache="R. A. Graham" nomenclaturaltitle="R. A. Graham" createdby_id="11"/>
+
+  <Extension id="10" created="2014-10-09 15:45:41.0" uuid="0d6f35d7-7e76-446a-a017-7e8355ee1b4c" updated="2014-10-09 15:48:01.0" extendedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" extendedObj_id="1550" value="http://test.com" createdby_id="10" updatedby_id="10" type_id="2075"/>
+
+  <PolytomousKey_OriginalSourceBase PolytomousKey_id="1550" sources_id="23710"/>
+  <PolytomousKey_OriginalSourceBase PolytomousKey_id="1550" sources_id="23711"/>
+
+  <PolytomousKey_RightsInfo PolytomousKey_id="1550" rights_id="10"/>
+
+  <KeyStatement_LanguageString KeyStatement_id="2460" label_id="13782" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2461" label_id="13783" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2462" label_id="13784" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2463" label_id="13786" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2464" label_id="13789" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2465" label_id="13790" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2466" label_id="13792" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2467" label_id="13796" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2760" label_id="14570" label_mapkey_id="124"/>
+  <KeyStatement_LanguageString KeyStatement_id="2761" label_id="14571" label_mapkey_id="124"/>
+
+  <PolytomousKey id="751" created="2013-03-24 11:17:08.0" uuid="9d8bf4f6-a70a-4b80-8556-2ccfb436ff01" protectedtitlecache="true" titleCache="Asphodeline"   startNumber="1"/>
+  <PolytomousKey id="1550" created="2014-03-10 10:02:35.0" uuid="0d53ba20-7de4-4baa-bd8a-401048447d66" updated="2014-03-10 10:02:42.0" protectedtitlecache="true" titleCache="Achillea"   root_id="2750" startNumber="1"/>
+
+  <OriginalSourceBase DTYPE="IdentifiableSource" id="23710" created="2014-03-10 10:06:57.0" uuid="95e05e82-499d-4b8a-ad6b-1085f74a7496" updated="2014-03-10 10:07:33.0" sourcedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" sourcedObj_id="1550"    sourceType="PTS"/>
+  <OriginalSourceBase DTYPE="IdentifiableSource" id="23711" created="2014-03-10 10:06:48.0" uuid="f77555fe-0d98-4c9f-98ed-a5bca6b1e342" updated="2014-03-10 10:07:33.0" sourcedObj_type="eu.etaxonomy.cdm.model.description.PolytomousKey" sourcedObj_id="1550"    sourceType="PTS"/>
+
+  
+</dataset>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/h2/cdmTest.h2.db b/eu.etaxonomy.taxeditor.test/src/test/resources/h2/cdmTest.h2.db
new file mode 100644 (file)
index 0000000..98a3b77
Binary files /dev/null and b/eu.etaxonomy.taxeditor.test/src/test/resources/h2/cdmTest.h2.db differ
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/h2/cdmTest.trace.db b/eu.etaxonomy.taxeditor.test/src/test/resources/h2/cdmTest.trace.db
new file mode 100644 (file)
index 0000000..934783e
--- /dev/null
@@ -0,0 +1,7659 @@
+06-15 17:37:28 jdbc[2]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:67)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:45)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.executeQuery(CdmDataSourceBase.java:182)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.executeQuery(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getSingleValue(CdmDataSourceBase.java:136)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getSingleValue(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getMetaDataMap(CdmDataSourceBase.java:288)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getMetaDataMap(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:84)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.testConnection(CdmDataSourceBase.java:93)
+       at eu.etaxonomy.cdm.database.CdmDataSource.testConnection(CdmDataSource.java:33)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage.testDbConfiguration(CdmDataSourceCredentialsWizardPage.java:292)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage.testDbConfiguration(CdmDataSourceCredentialsWizardPage.java:281)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage$1.widgetSelected(CdmDataSourceCredentialsWizardPage.java:165)
+       at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
+       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
+       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
+       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
+       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
+       at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
+       at org.eclipse.jface.window.Window.open(Window.java:801)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler.specificExecute(CreateDataSourceHandler.java:41)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.AbstractDataSourceHandler.execute(AbstractDataSourceHandler.java:37)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler.execute(CreateDataSourceHandler.java:1)
+       at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
+       at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
+       at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
+       at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
+       at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
+       at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
+       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
+       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
+       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
+       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
+       at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
+       at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
+       at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
+       at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
+       at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
+       at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
+       at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
+       at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
+       at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
+       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+       at java.lang.reflect.Method.invoke(Method.java:606)
+       at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
+       at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
+       at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
+       at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 58 more
+06-15 17:37:28 jdbc[2]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:67)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:45)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.executeQuery(CdmDataSourceBase.java:182)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.executeQuery(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getSingleValue(CdmDataSourceBase.java:136)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getSingleValue(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getMetaDataMap(CdmDataSourceBase.java:288)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getMetaDataMap(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:84)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.testConnection(CdmDataSourceBase.java:93)
+       at eu.etaxonomy.cdm.database.CdmDataSource.testConnection(CdmDataSource.java:33)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage.testDbConfiguration(CdmDataSourceCredentialsWizardPage.java:292)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage.testDbConfiguration(CdmDataSourceCredentialsWizardPage.java:281)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage$1.widgetSelected(CdmDataSourceCredentialsWizardPage.java:165)
+       at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
+       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
+       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
+       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
+       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
+       at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
+       at org.eclipse.jface.window.Window.open(Window.java:801)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler.specificExecute(CreateDataSourceHandler.java:41)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.AbstractDataSourceHandler.execute(AbstractDataSourceHandler.java:37)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler.execute(CreateDataSourceHandler.java:1)
+       at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
+       at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
+       at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
+       at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
+       at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
+       at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
+       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
+       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
+       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
+       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
+       at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
+       at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
+       at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
+       at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
+       at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
+       at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
+       at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
+       at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
+       at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
+       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+       at java.lang.reflect.Method.invoke(Method.java:606)
+       at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
+       at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
+       at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
+       at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 58 more
+06-15 17:37:28 jdbc[2]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:67)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:45)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.executeQuery(CdmDataSourceBase.java:182)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.executeQuery(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getSingleValue(CdmDataSourceBase.java:136)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getSingleValue(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getMetaDataMap(CdmDataSourceBase.java:288)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getMetaDataMap(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:84)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.testConnection(CdmDataSourceBase.java:93)
+       at eu.etaxonomy.cdm.database.CdmDataSource.testConnection(CdmDataSource.java:33)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage.testDbConfiguration(CdmDataSourceCredentialsWizardPage.java:292)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage.testDbConfiguration(CdmDataSourceCredentialsWizardPage.java:281)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage$1.widgetSelected(CdmDataSourceCredentialsWizardPage.java:165)
+       at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
+       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
+       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
+       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
+       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
+       at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
+       at org.eclipse.jface.window.Window.open(Window.java:801)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler.specificExecute(CreateDataSourceHandler.java:41)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.AbstractDataSourceHandler.execute(AbstractDataSourceHandler.java:37)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler.execute(CreateDataSourceHandler.java:1)
+       at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
+       at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
+       at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
+       at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
+       at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
+       at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
+       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
+       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
+       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
+       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
+       at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
+       at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
+       at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
+       at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
+       at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
+       at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
+       at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
+       at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
+       at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
+       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+       at java.lang.reflect.Method.invoke(Method.java:606)
+       at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
+       at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
+       at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
+       at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 58 more
+06-15 17:37:28 jdbc[2]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.testConnection(CdmDataSourceBase.java:93)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.testConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.checkConnection(CdmDataSourceBase.java:110)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.checkConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:72)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.testConnection(CdmDataSourceBase.java:93)
+       at eu.etaxonomy.cdm.database.CdmDataSource.testConnection(CdmDataSource.java:33)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage.testDbConfiguration(CdmDataSourceCredentialsWizardPage.java:292)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage.testDbConfiguration(CdmDataSourceCredentialsWizardPage.java:281)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage$1.widgetSelected(CdmDataSourceCredentialsWizardPage.java:165)
+       at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
+       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
+       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
+       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
+       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
+       at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
+       at org.eclipse.jface.window.Window.open(Window.java:801)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler.specificExecute(CreateDataSourceHandler.java:41)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.AbstractDataSourceHandler.execute(AbstractDataSourceHandler.java:37)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler.execute(CreateDataSourceHandler.java:1)
+       at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
+       at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
+       at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
+       at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
+       at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
+       at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
+       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
+       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
+       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
+       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
+       at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
+       at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
+       at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
+       at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
+       at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
+       at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
+       at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
+       at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
+       at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
+       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+       at java.lang.reflect.Method.invoke(Method.java:606)
+       at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
+       at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
+       at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
+       at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 58 more
+06-15 17:37:28 jdbc[2]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:67)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:45)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.executeQuery(CdmDataSourceBase.java:182)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.executeQuery(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getSingleValue(CdmDataSourceBase.java:136)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getSingleValue(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getMetaDataMap(CdmDataSourceBase.java:288)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getMetaDataMap(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:84)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.testConnection(CdmDataSourceBase.java:93)
+       at eu.etaxonomy.cdm.database.CdmDataSource.testConnection(CdmDataSource.java:33)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage.testDbConfiguration(CdmDataSourceCredentialsWizardPage.java:292)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage.testDbConfiguration(CdmDataSourceCredentialsWizardPage.java:281)
+       at eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage$1.widgetSelected(CdmDataSourceCredentialsWizardPage.java:165)
+       at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
+       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
+       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
+       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
+       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
+       at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
+       at org.eclipse.jface.window.Window.open(Window.java:801)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler.specificExecute(CreateDataSourceHandler.java:41)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.AbstractDataSourceHandler.execute(AbstractDataSourceHandler.java:37)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler.execute(CreateDataSourceHandler.java:1)
+       at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
+       at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
+       at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
+       at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
+       at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
+       at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
+       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
+       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
+       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
+       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
+       at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
+       at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
+       at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
+       at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
+       at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
+       at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
+       at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
+       at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
+       at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
+       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+       at java.lang.reflect.Method.invoke(Method.java:606)
+       at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
+       at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
+       at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
+       at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 58 more
+06-15 17:37:31 jdbc[3]: exception
+org.h2.jdbc.JdbcSQLException: Table "CDMMETADATA" not found; SQL statement:
+SELECT value FROM CdmMetaData WHERE propertyname=0 [42102-170]
+06-15 17:37:34 jdbc[6]: exception
+org.h2.jdbc.JdbcSQLException: Table "CDMMETADATA" not found; SQL statement:
+SELECT value FROM CdmMetaData WHERE propertyname=0 [42102-170]
+06-15 17:38:06 jdbc[7]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.testConnection(CdmDataSourceBase.java:93)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.testConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.checkConnection(CdmDataSourceBase.java:110)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.checkConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:72)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
+       at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
+       at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
+       at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
+       at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
+       at eu.etaxonomy.cdm.database.LocalH2.createDataSource(LocalH2.java:88)
+       at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
+       at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
+       at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
+       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
+       at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276)
+       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 60 more
+06-15 17:38:06 jdbc[7]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:67)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:45)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.executeQuery(CdmDataSourceBase.java:182)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.executeQuery(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getSingleValue(CdmDataSourceBase.java:136)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getSingleValue(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getMetaDataMap(CdmDataSourceBase.java:288)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getMetaDataMap(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:84)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
+       at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
+       at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
+       at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
+       at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
+       at eu.etaxonomy.cdm.database.LocalH2.createDataSource(LocalH2.java:88)
+       at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
+       at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
+       at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
+       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
+       at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276)
+       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 60 more
+06-15 17:38:06 jdbc[7]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:67)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:45)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.executeQuery(CdmDataSourceBase.java:182)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.executeQuery(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getSingleValue(CdmDataSourceBase.java:136)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getSingleValue(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getMetaDataMap(CdmDataSourceBase.java:288)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getMetaDataMap(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:84)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
+       at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
+       at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
+       at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
+       at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
+       at eu.etaxonomy.cdm.database.LocalH2.createDataSource(LocalH2.java:88)
+       at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
+       at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
+       at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
+       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
+       at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276)
+       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 60 more
+06-15 17:38:06 jdbc[7]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:67)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:45)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.executeQuery(CdmDataSourceBase.java:182)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.executeQuery(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getSingleValue(CdmDataSourceBase.java:136)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getSingleValue(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getDbSchemaVersion(CdmDataSourceBase.java:156)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getDbSchemaVersion(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.isDbEmpty(CdmDataSourceBase.java:165)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.isDbEmpty(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.checkIsNonEmptyCdmDatabase(CdmStoreConnector.java:231)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:73)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
+       at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
+       at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
+       at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
+       at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
+       at eu.etaxonomy.cdm.database.LocalH2.createDataSource(LocalH2.java:88)
+       at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
+       at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
+       at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
+       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
+       at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276)
+       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 60 more
+06-15 17:38:06 jdbc[7]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.testConnection(CdmDataSourceBase.java:93)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.testConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.checkConnection(CdmDataSourceBase.java:110)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.checkConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.handler.ChangeConnectionHandler.execute(ChangeConnectionHandler.java:49)
+       at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
+       at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
+       at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
+       at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
+       at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
+       at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
+       at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
+       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
+       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
+       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
+       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
+       at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
+       at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
+       at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
+       at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
+       at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
+       at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
+       at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
+       at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
+       at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
+       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
+       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
+       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+       at java.lang.reflect.Method.invoke(Method.java:606)
+       at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
+       at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
+       at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
+       at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
+       at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
+       at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
+       at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
+       at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
+       at eu.etaxonomy.cdm.database.LocalH2.createDataSource(LocalH2.java:88)
+       at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
+       at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
+       at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
+       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
+       at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276)
+       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 60 more
+06-15 17:38:06 jdbc[7]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:67)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:45)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.executeQuery(CdmDataSourceBase.java:182)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.executeQuery(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getSingleValue(CdmDataSourceBase.java:136)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getSingleValue(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getMetaDataMap(CdmDataSourceBase.java:288)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getMetaDataMap(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:84)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
+       at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
+       at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
+       at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
+       at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
+       at eu.etaxonomy.cdm.database.LocalH2.createDataSource(LocalH2.java:88)
+       at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
+       at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
+       at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
+       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
+       at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276)
+       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 60 more
+06-15 17:38:06 jdbc[7]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:67)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:45)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.executeQuery(CdmDataSourceBase.java:182)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.executeQuery(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getSingleValue(CdmDataSourceBase.java:136)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getSingleValue(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getMetaDataMap(CdmDataSourceBase.java:288)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getMetaDataMap(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:84)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
+       at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
+       at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
+       at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
+       at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
+       at eu.etaxonomy.cdm.database.LocalH2.createDataSource(LocalH2.java:88)
+       at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
+       at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
+       at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
+       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
+       at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276)
+       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 60 more
+06-15 17:38:06 jdbc[7]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:67)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getConnection(CdmDataSourceBase.java:45)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.executeQuery(CdmDataSourceBase.java:182)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.executeQuery(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getSingleValue(CdmDataSourceBase.java:136)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getSingleValue(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.getMetaDataMap(CdmDataSourceBase.java:288)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.getMetaDataMap(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:84)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
+       at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
+       at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
+       at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
+       at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
+       at eu.etaxonomy.cdm.database.LocalH2.createDataSource(LocalH2.java:88)
+       at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
+       at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
+       at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
+       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
+       at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276)
+       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 60 more
+06-15 17:38:06 jdbc[7]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.testConnection(CdmDataSourceBase.java:93)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.testConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.checkConnection(CdmDataSourceBase.java:110)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.checkConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.checkDatabaseReachable(CdmStoreConnector.java:253)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:69)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
+       at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
+       at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
+       at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
+       at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
+       at eu.etaxonomy.cdm.database.LocalH2.createDataSource(LocalH2.java:88)
+       at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
+       at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
+       at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
+       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
+       at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276)
+       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 60 more
+06-15 17:38:06 jdbc[7]: java.lang.Exception: Open Stack Trace
+       at org.h2.util.CloseWatcher.register(CloseWatcher.java:99)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:121)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at java.sql.DriverManager.getConnection(DriverManager.java:571)
+       at java.sql.DriverManager.getConnection(DriverManager.java:215)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.testConnection(CdmDataSourceBase.java:93)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.testConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.cdm.database.CdmDataSourceBase.checkConnection(CdmDataSourceBase.java:110)
+       at eu.etaxonomy.cdm.database.CdmPersistentDataSource.checkConnection(CdmPersistentDataSource.java:51)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer.getMetaDataFromDataSource(CdmMetaDataAwareDataSourceContainer.java:72)
+       at eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart$DataSourceJob.run(CdmDataSourceViewPart.java:140)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+
+org.h2.message.DbException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.message.DbException.get(DbException.java:135)
+       at org.h2.jdbc.JdbcConnection.closeOld(JdbcConnection.java:175)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:120)
+       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
+       at org.h2.Driver.connect(Driver.java:72)
+       at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
+       at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
+       at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
+       at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
+       at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
+       at eu.etaxonomy.cdm.database.LocalH2.createDataSource(LocalH2.java:88)
+       at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
+       at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
+       at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
+       at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
+       at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
+       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
+       at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276)
+       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+Caused by: org.h2.jdbc.JdbcSQLException: The connection was not closed by the application and is garbage collected [90018-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       ... 60 more
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ADDRESS" not found; SQL statement:
+alter table Address drop constraint FK1ED033D44FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ADDRESS" not found; SQL statement:
+alter table Address drop constraint FK1ED033D4BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ADDRESS" not found; SQL statement:
+alter table Address drop constraint FK1ED033D4CDD3C17E [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ADDRESS" not found; SQL statement:
+alter table Address drop constraint FK1ED033D4132A2FE8 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ADDRESS_AUD" not found; SQL statement:
+alter table Address_AUD drop constraint FK115657A534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE" not found; SQL statement:
+alter table AgentBase drop constraint FK1205D3564FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE" not found; SQL statement:
+alter table AgentBase drop constraint FK1205D356BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE" not found; SQL statement:
+alter table AgentBase drop constraint FK1205D356A830578 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_AUD" not found; SQL statement:
+alter table AgentBase_AUD drop constraint FK29CC662734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_ADDRESS" not found; SQL statement:
+alter table AgentBase_Address drop constraint FK1EDFF7EB50751EC5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_ADDRESS" not found; SQL statement:
+alter table AgentBase_Address drop constraint FK1EDFF7EB86EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_ADDRESS_AUD" not found; SQL statement:
+alter table AgentBase_Address_AUD drop constraint FK3D28383C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_AGENTBASE" not found; SQL statement:
+alter table AgentBase_AgentBase drop constraint FK4D34EDADE9E535F9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_AGENTBASE" not found; SQL statement:
+alter table AgentBase_AgentBase drop constraint FK4D34EDAD1C0E9907 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_AGENTBASE_AUD" not found; SQL statement:
+alter table AgentBase_AgentBase_AUD drop constraint FKA8A87CFE34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_ANNOTATION" not found; SQL statement:
+alter table AgentBase_Annotation drop constraint FK44D5F7D81E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_ANNOTATION" not found; SQL statement:
+alter table AgentBase_Annotation drop constraint FK44D5F7D886EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_ANNOTATION_AUD" not found; SQL statement:
+alter table AgentBase_Annotation_AUD drop constraint FK771279A934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_CREDIT" not found; SQL statement:
+alter table AgentBase_Credit drop constraint FK2636742232D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_CREDIT" not found; SQL statement:
+alter table AgentBase_Credit drop constraint FK2636742286EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_CREDIT_AUD" not found; SQL statement:
+alter table AgentBase_Credit_AUD drop constraint FK7FE7C0F334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_DEFINEDTERMBASE" not found; SQL statement:
+alter table AgentBase_DefinedTermBase drop constraint FK6665C77DF116FEB0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_DEFINEDTERMBASE" not found; SQL statement:
+alter table AgentBase_DefinedTermBase drop constraint FK6665C77D8D9AB196 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_DEFINEDTERMBASE_AUD" not found; SQL statement:
+alter table AgentBase_DefinedTermBase_AUD drop constraint FKA737EECE34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_EXTENSION" not found; SQL statement:
+alter table AgentBase_Extension drop constraint FK8E1E5676927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_EXTENSION" not found; SQL statement:
+alter table AgentBase_Extension drop constraint FK8E1E567686EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_EXTENSION_AUD" not found; SQL statement:
+alter table AgentBase_Extension_AUD drop constraint FK11AE594734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_IDENTIFIER" not found; SQL statement:
+alter table AgentBase_Identifier drop constraint FK410EB952E12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_IDENTIFIER" not found; SQL statement:
+alter table AgentBase_Identifier drop constraint FK410EB95286EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_IDENTIFIER_AUD" not found; SQL statement:
+alter table AgentBase_Identifier_AUD drop constraint FK3DB9EE2334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_MARKER" not found; SQL statement:
+alter table AgentBase_Marker drop constraint FK365D5D63777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_MARKER" not found; SQL statement:
+alter table AgentBase_Marker drop constraint FK365D5D6386EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_MARKER_AUD" not found; SQL statement:
+alter table AgentBase_Marker_AUD drop constraint FKE40621B434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_MEDIA" not found; SQL statement:
+alter table AgentBase_Media drop constraint FKE8FC5D9BC2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_MEDIA" not found; SQL statement:
+alter table AgentBase_Media drop constraint FKE8FC5D9B86EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_MEDIA_AUD" not found; SQL statement:
+alter table AgentBase_Media_AUD drop constraint FK323A45EC34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table AgentBase_OriginalSourceBase drop constraint FKB482C5E63A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table AgentBase_OriginalSourceBase drop constraint FKB482C5E686EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table AgentBase_OriginalSourceBase_AUD drop constraint FK886D90B734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_RIGHTSINFO" not found; SQL statement:
+alter table AgentBase_RightsInfo drop constraint FK4FD6A3CEC13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_RIGHTSINFO" not found; SQL statement:
+alter table AgentBase_RightsInfo drop constraint FK4FD6A3CE86EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_RIGHTSINFO_AUD" not found; SQL statement:
+alter table AgentBase_RightsInfo_AUD drop constraint FK79503A9F34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_CONTACT_EMAILADDRESSES" not found; SQL statement:
+alter table AgentBase_contact_emailaddresses drop constraint FK4BD2B08E86EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_CONTACT_EMAILADDRESSES_AUD" not found; SQL statement:
+alter table AgentBase_contact_emailaddresses_AUD drop constraint FKCAF7E75F34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_CONTACT_FAXNUMBERS" not found; SQL statement:
+alter table AgentBase_contact_faxnumbers drop constraint FK52E1AD9586EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_CONTACT_FAXNUMBERS_AUD" not found; SQL statement:
+alter table AgentBase_contact_faxnumbers_AUD drop constraint FK88A308E634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_CONTACT_PHONENUMBERS" not found; SQL statement:
+alter table AgentBase_contact_phonenumbers drop constraint FKC171CC2486EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_CONTACT_PHONENUMBERS_AUD" not found; SQL statement:
+alter table AgentBase_contact_phonenumbers_AUD drop constraint FKDDD347F534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_CONTACT_URLS" not found; SQL statement:
+alter table AgentBase_contact_urls drop constraint FK9A9643EC86EFC5D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AGENTBASE_CONTACT_URLS_AUD" not found; SQL statement:
+alter table AgentBase_contact_urls_AUD drop constraint FK1CE69BBD34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION" not found; SQL statement:
+alter table Amplification drop constraint FK9DA6B4164FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION" not found; SQL statement:
+alter table Amplification drop constraint FK9DA6B416BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION" not found; SQL statement:
+alter table Amplification drop constraint FK9DA6B4163DA462D5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION" not found; SQL statement:
+alter table Amplification drop constraint FK9DA6B4166D2CE418 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION" not found; SQL statement:
+alter table Amplification drop constraint FK9DA6B4163781DA30 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION" not found; SQL statement:
+alter table Amplification drop constraint FK9DA6B416403E17F4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION" not found; SQL statement:
+alter table Amplification drop constraint FK9DA6B416AFCA96F8 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION" not found; SQL statement:
+alter table Amplification drop constraint FK9DA6B4161600EAB3 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT" not found; SQL statement:
+alter table AmplificationResult drop constraint FK484B7FD34FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT" not found; SQL statement:
+alter table AmplificationResult drop constraint FK484B7FD3BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT" not found; SQL statement:
+alter table AmplificationResult drop constraint FK484B7FD3614CEB1F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT" not found; SQL statement:
+alter table AmplificationResult drop constraint FK484B7FD3DEC4385F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT" not found; SQL statement:
+alter table AmplificationResult drop constraint FK484B7FD3E671A9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT" not found; SQL statement:
+alter table AmplificationResult drop constraint FK484B7FD3825BDDD3 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT_AUD" not found; SQL statement:
+alter table AmplificationResult_AUD drop constraint FK343D8C2434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT_ANNOTATION" not found; SQL statement:
+alter table AmplificationResult_Annotation drop constraint FKFE4A8B3B1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT_ANNOTATION" not found; SQL statement:
+alter table AmplificationResult_Annotation drop constraint FKFE4A8B3BD320A65F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT_ANNOTATION_AUD" not found; SQL statement:
+alter table AmplificationResult_Annotation_AUD drop constraint FK7378A38C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT_MARKER" not found; SQL statement:
+alter table AmplificationResult_Marker drop constraint FK5B911A46777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT_MARKER" not found; SQL statement:
+alter table AmplificationResult_Marker drop constraint FK5B911A46D320A65F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATIONRESULT_MARKER_AUD" not found; SQL statement:
+alter table AmplificationResult_Marker_AUD drop constraint FK9D7AB51734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION_AUD" not found; SQL statement:
+alter table Amplification_AUD drop constraint FK448EE6E734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION_ANNOTATION" not found; SQL statement:
+alter table Amplification_Annotation drop constraint FK6B251F181E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION_ANNOTATION" not found; SQL statement:
+alter table Amplification_Annotation drop constraint FK6B251F18614CEB1F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION_ANNOTATION_AUD" not found; SQL statement:
+alter table Amplification_Annotation_AUD drop constraint FK6FC00E934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION_MARKER" not found; SQL statement:
+alter table Amplification_Marker drop constraint FK46E224A3777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION_MARKER" not found; SQL statement:
+alter table Amplification_Marker drop constraint FK46E224A3614CEB1F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "AMPLIFICATION_MARKER_AUD" not found; SQL statement:
+alter table Amplification_Marker_AUD drop constraint FKA5548F434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION" not found; SQL statement:
+alter table Annotation drop constraint FK1A21C74F4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION" not found; SQL statement:
+alter table Annotation drop constraint FK1A21C74FBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION" not found; SQL statement:
+alter table Annotation drop constraint FK1A21C74FE8D36B00 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION" not found; SQL statement:
+alter table Annotation drop constraint FK1A21C74FDF299D00 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION" not found; SQL statement:
+alter table Annotation drop constraint FK1A21C74FE7692740 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION_AUD" not found; SQL statement:
+alter table Annotation_AUD drop constraint FK1A6BB5A034869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION_ANNOTATION" not found; SQL statement:
+alter table Annotation_Annotation drop constraint FKC99DFE3F1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION_ANNOTATION" not found; SQL statement:
+alter table Annotation_Annotation drop constraint FKC99DFE3F994CCE20 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION_ANNOTATION_AUD" not found; SQL statement:
+alter table Annotation_Annotation_AUD drop constraint FKB212F49034869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION_MARKER" not found; SQL statement:
+alter table Annotation_Marker drop constraint FKB17EAF4A777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION_MARKER" not found; SQL statement:
+alter table Annotation_Marker drop constraint FKB17EAF4A994CCE20 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ANNOTATION_MARKER_AUD" not found; SQL statement:
+alter table Annotation_Marker_AUD drop constraint FK68CE281B34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CDMMETADATA" not found; SQL statement:
+alter table CdmMetaData drop constraint FK6EA78F7B4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION" not found; SQL statement:
+alter table Classification drop constraint FKDB1100064FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION" not found; SQL statement:
+alter table Classification drop constraint FKDB110006BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION" not found; SQL statement:
+alter table Classification drop constraint FKDB11000677E2F09E [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION" not found; SQL statement:
+alter table Classification drop constraint FKDB1100068D0FB4DA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION" not found; SQL statement:
+alter table Classification drop constraint FKDB110006D1E08681 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_AUD" not found; SQL statement:
+alter table Classification_AUD drop constraint FKEB11BAD734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_ANNOTATION" not found; SQL statement:
+alter table Classification_Annotation drop constraint FKC978FD281E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_ANNOTATION" not found; SQL statement:
+alter table Classification_Annotation drop constraint FKC978FD2884A3CE1B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_ANNOTATION_AUD" not found; SQL statement:
+alter table Classification_Annotation_AUD drop constraint FK3D1256F934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_CREDIT" not found; SQL statement:
+alter table Classification_Credit drop constraint FK4950A17232D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_CREDIT" not found; SQL statement:
+alter table Classification_Credit drop constraint FK4950A17284A3CE1B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_CREDIT_AUD" not found; SQL statement:
+alter table Classification_Credit_AUD drop constraint FK48AC64334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_DESCRIPTION" not found; SQL statement:
+alter table Classification_Description drop constraint FK382EB1232BEBA58D [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_DESCRIPTION" not found; SQL statement:
+alter table Classification_Description drop constraint FK382EB12328459272 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_DESCRIPTION" not found; SQL statement:
+alter table Classification_Description drop constraint FK382EB12384A3CE1B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_DESCRIPTION_AUD" not found; SQL statement:
+alter table Classification_Description_AUD drop constraint FK3187957434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_EXTENSION" not found; SQL statement:
+alter table Classification_Extension drop constraint FK715D6726927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_EXTENSION" not found; SQL statement:
+alter table Classification_Extension drop constraint FK715D672684A3CE1B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_EXTENSION_AUD" not found; SQL statement:
+alter table Classification_Extension_AUD drop constraint FK289591F734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_GEOSCOPE" not found; SQL statement:
+alter table Classification_GeoScope drop constraint FK379FE5BC86D04E74 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_GEOSCOPE" not found; SQL statement:
+alter table Classification_GeoScope drop constraint FK379FE5BC84A3CE1B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_GEOSCOPE_AUD" not found; SQL statement:
+alter table Classification_GeoScope_AUD drop constraint FKF5AAD58D34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_IDENTIFIER" not found; SQL statement:
+alter table Classification_Identifier drop constraint FKC5B1BEA2E12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_IDENTIFIER" not found; SQL statement:
+alter table Classification_Identifier drop constraint FKC5B1BEA284A3CE1B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_IDENTIFIER_AUD" not found; SQL statement:
+alter table Classification_Identifier_AUD drop constraint FK3B9CB7334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_MARKER" not found; SQL statement:
+alter table Classification_Marker drop constraint FK59778AB3777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_MARKER" not found; SQL statement:
+alter table Classification_Marker drop constraint FK59778AB384A3CE1B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_MARKER_AUD" not found; SQL statement:
+alter table Classification_Marker_AUD drop constraint FK68A9270434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table Classification_OriginalSourceBase drop constraint FK91B37B363A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table Classification_OriginalSourceBase drop constraint FK91B37B3684A3CE1B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table Classification_OriginalSourceBase_AUD drop constraint FK48A31E0734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_RIGHTSINFO" not found; SQL statement:
+alter table Classification_RightsInfo drop constraint FKD479A91EC13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_RIGHTSINFO" not found; SQL statement:
+alter table Classification_RightsInfo drop constraint FKD479A91E84A3CE1B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CLASSIFICATION_RIGHTSINFO_AUD" not found; SQL statement:
+alter table Classification_RightsInfo_AUD drop constraint FK3F5017EF34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION" not found; SQL statement:
+alter table Collection drop constraint FKF078ABE4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION" not found; SQL statement:
+alter table Collection drop constraint FKF078ABEBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION" not found; SQL statement:
+alter table Collection drop constraint FKF078ABE16B9CA77 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION" not found; SQL statement:
+alter table Collection drop constraint FKF078ABECEB38EFF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_AUD" not found; SQL statement:
+alter table Collection_AUD drop constraint FKD6D4298F34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_ANNOTATION" not found; SQL statement:
+alter table Collection_Annotation drop constraint FKEA970F701E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_ANNOTATION" not found; SQL statement:
+alter table Collection_Annotation drop constraint FKEA970F70EB62BE9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_ANNOTATION_AUD" not found; SQL statement:
+alter table Collection_Annotation_AUD drop constraint FKA0CE054134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_CREDIT" not found; SQL statement:
+alter table Collection_Credit drop constraint FKE0A317BA32D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_CREDIT" not found; SQL statement:
+alter table Collection_Credit drop constraint FKE0A317BAEB62BE9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_CREDIT_AUD" not found; SQL statement:
+alter table Collection_Credit_AUD drop constraint FK25A8D88B34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_EXTENSION" not found; SQL statement:
+alter table Collection_Extension drop constraint FKF68FEBDE927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_EXTENSION" not found; SQL statement:
+alter table Collection_Extension drop constraint FKF68FEBDEEB62BE9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_EXTENSION_AUD" not found; SQL statement:
+alter table Collection_Extension_AUD drop constraint FK1306FAAF34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_IDENTIFIER" not found; SQL statement:
+alter table Collection_Identifier drop constraint FKE6CFD0EAE12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_IDENTIFIER" not found; SQL statement:
+alter table Collection_Identifier drop constraint FKE6CFD0EAEB62BE9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_IDENTIFIER_AUD" not found; SQL statement:
+alter table Collection_Identifier_AUD drop constraint FK677579BB34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_MARKER" not found; SQL statement:
+alter table Collection_Marker drop constraint FKF0CA00FB777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_MARKER" not found; SQL statement:
+alter table Collection_Marker drop constraint FKF0CA00FBEB62BE9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_MARKER_AUD" not found; SQL statement:
+alter table Collection_Marker_AUD drop constraint FK89C7394C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_MEDIA" not found; SQL statement:
+alter table Collection_Media drop constraint FK7320E703C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_MEDIA" not found; SQL statement:
+alter table Collection_Media drop constraint FK7320E703EB62BE9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_MEDIA_AUD" not found; SQL statement:
+alter table Collection_Media_AUD drop constraint FK9AABDB5434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table Collection_OriginalSourceBase drop constraint FK37DEC57E3A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table Collection_OriginalSourceBase drop constraint FK37DEC57EEB62BE9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table Collection_OriginalSourceBase_AUD drop constraint FKF810044F34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_RIGHTSINFO" not found; SQL statement:
+alter table Collection_RightsInfo drop constraint FKF597BB66C13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_RIGHTSINFO" not found; SQL statement:
+alter table Collection_RightsInfo drop constraint FKF597BB66EB62BE9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "COLLECTION_RIGHTSINFO_AUD" not found; SQL statement:
+alter table Collection_RightsInfo_AUD drop constraint FKA30BC63734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CREDIT" not found; SQL statement:
+alter table Credit drop constraint FK78CA97194FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CREDIT" not found; SQL statement:
+alter table Credit drop constraint FK78CA9719BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CREDIT" not found; SQL statement:
+alter table Credit drop constraint FK78CA9719E8D36B00 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CREDIT" not found; SQL statement:
+alter table Credit drop constraint FK78CA9719F7976FC5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CREDIT_AUD" not found; SQL statement:
+alter table Credit_AUD drop constraint FK5533906A34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CREDIT_ANNOTATION" not found; SQL statement:
+alter table Credit_Annotation drop constraint FKE8DA4C351E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CREDIT_ANNOTATION" not found; SQL statement:
+alter table Credit_Annotation drop constraint FKE8DA4C354CF694E0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CREDIT_ANNOTATION_AUD" not found; SQL statement:
+alter table Credit_Annotation_AUD drop constraint FK1DEB578634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CREDIT_MARKER" not found; SQL statement:
+alter table Credit_Marker drop constraint FK10CC6840777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CREDIT_MARKER" not found; SQL statement:
+alter table Credit_Marker drop constraint FK10CC68404CF694E0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "CREDIT_MARKER_AUD" not found; SQL statement:
+alter table Credit_Marker_AUD drop constraint FK880A761134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE" not found; SQL statement:
+alter table DefinedTermBase drop constraint FK2E340A664FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE" not found; SQL statement:
+alter table DefinedTermBase drop constraint FK2E340A66BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE" not found; SQL statement:
+alter table DefinedTermBase drop constraint FK2E340A663B0DA0EF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE" not found; SQL statement:
+alter table DefinedTermBase drop constraint FK2E340A66D040DBF0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE" not found; SQL statement:
+alter table DefinedTermBase drop constraint FK2E340A6647AF954C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE" not found; SQL statement:
+alter table DefinedTermBase drop constraint FK2E340A6624AF3F70 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE" not found; SQL statement:
+alter table DefinedTermBase drop constraint FK2E340A6636C6F6F6 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE" not found; SQL statement:
+alter table DefinedTermBase drop constraint FK2E340A66CC0240B6 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE" not found; SQL statement:
+alter table DefinedTermBase drop constraint FK2E340A6688206484 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_AUD" not found; SQL statement:
+alter table DefinedTermBase_AUD drop constraint FK86E8953734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_ANNOTATION" not found; SQL statement:
+alter table DefinedTermBase_Annotation drop constraint FK589B6C81E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_ANNOTATION" not found; SQL statement:
+alter table DefinedTermBase_Annotation drop constraint FK589B6C8C0DB4934 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_ANNOTATION_AUD" not found; SQL statement:
+alter table DefinedTermBase_Annotation_AUD drop constraint FK28ED409934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_CONTINENT" not found; SQL statement:
+alter table DefinedTermBase_Continent drop constraint FK45F60AFB9AEE7205 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_CONTINENT" not found; SQL statement:
+alter table DefinedTermBase_Continent drop constraint FK45F60AFB901A60CE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_CONTINENT_AUD" not found; SQL statement:
+alter table DefinedTermBase_Continent_AUD drop constraint FKF5DE434C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_COUNTRY" not found; SQL statement:
+alter table DefinedTermBase_Country drop constraint FKA2ADDA9D47CE41A0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_COUNTRY" not found; SQL statement:
+alter table DefinedTermBase_Country drop constraint FKA2ADDA9DCE5C0F9E [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_COUNTRY_AUD" not found; SQL statement:
+alter table DefinedTermBase_Country_AUD drop constraint FK8D0171EE34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_CREDIT" not found; SQL statement:
+alter table DefinedTermBase_Credit drop constraint FK78FF2B1232D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_CREDIT" not found; SQL statement:
+alter table DefinedTermBase_Credit drop constraint FK78FF2B12C0DB4934 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_CREDIT_AUD" not found; SQL statement:
+alter table DefinedTermBase_Credit_AUD drop constraint FK409B7FE334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_EXTENSION" not found; SQL statement:
+alter table DefinedTermBase_Extension drop constraint FK397EF986927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_EXTENSION" not found; SQL statement:
+alter table DefinedTermBase_Extension drop constraint FK397EF986C0DB4934 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_EXTENSION_AUD" not found; SQL statement:
+alter table DefinedTermBase_Extension_AUD drop constraint FK6E6F45734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_IDENTIFIER" not found; SQL statement:
+alter table DefinedTermBase_Identifier drop constraint FK1C27842E12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_IDENTIFIER" not found; SQL statement:
+alter table DefinedTermBase_Identifier drop constraint FK1C27842C0DB4934 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_IDENTIFIER_AUD" not found; SQL statement:
+alter table DefinedTermBase_Identifier_AUD drop constraint FKEF94B51334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_MARKER" not found; SQL statement:
+alter table DefinedTermBase_Marker drop constraint FK89261453777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_MARKER" not found; SQL statement:
+alter table DefinedTermBase_Marker drop constraint FK89261453C0DB4934 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_MARKER_AUD" not found; SQL statement:
+alter table DefinedTermBase_Marker_AUD drop constraint FKA4B9E0A434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_MEASUREMENTUNIT" not found; SQL statement:
+alter table DefinedTermBase_MeasurementUnit drop constraint FKE9D17767F3BB39BD [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_MEASUREMENTUNIT" not found; SQL statement:
+alter table DefinedTermBase_MeasurementUnit drop constraint FKE9D17767D0BDAE9B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_MEASUREMENTUNIT_AUD" not found; SQL statement:
+alter table DefinedTermBase_MeasurementUnit_AUD drop constraint FK2C1599B834869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_MEDIA" not found; SQL statement:
+alter table DefinedTermBase_Media drop constraint FK6FC908ABC2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_MEDIA" not found; SQL statement:
+alter table DefinedTermBase_Media drop constraint FK6FC908ABC0DB4934 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_MEDIA_AUD" not found; SQL statement:
+alter table DefinedTermBase_Media_AUD drop constraint FKDD9AE8FC34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table DefinedTermBase_OriginalSourceBase drop constraint FKDCC094D63A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table DefinedTermBase_OriginalSourceBase drop constraint FKDCC094D6C0DB4934 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table DefinedTermBase_OriginalSourceBase_AUD drop constraint FKAE4A67A734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION" not found; SQL statement:
+alter table DefinedTermBase_RecommendedModifierEnumeration drop constraint FKA72FB5AE5255EAFD [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION" not found; SQL statement:
+alter table DefinedTermBase_RecommendedModifierEnumeration drop constraint FKA72FB5AED0BDAE9B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION_AUD" not found; SQL statement:
+alter table DefinedTermBase_RecommendedModifierEnumeration_AUD drop constraint FK780D5C7F34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_REPRESENTATION" not found; SQL statement:
+alter table DefinedTermBase_Representation drop constraint FKAAC8AFE6B31C4747 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_REPRESENTATION" not found; SQL statement:
+alter table DefinedTermBase_Representation drop constraint FKAAC8AFE6C0DB4934 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_REPRESENTATION_AUD" not found; SQL statement:
+alter table DefinedTermBase_Representation_AUD drop constraint FKB5AE7AB734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_RIGHTSINFO" not found; SQL statement:
+alter table DefinedTermBase_RightsInfo drop constraint FK108A62BEC13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_RIGHTSINFO" not found; SQL statement:
+alter table DefinedTermBase_RightsInfo drop constraint FK108A62BEC0DB4934 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_RIGHTSINFO_AUD" not found; SQL statement:
+alter table DefinedTermBase_RightsInfo_AUD drop constraint FK2B2B018F34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_STATISTICALMEASURE" not found; SQL statement:
+alter table DefinedTermBase_StatisticalMeasure drop constraint FK6FF15DFCC9CD5B57 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_STATISTICALMEASURE" not found; SQL statement:
+alter table DefinedTermBase_StatisticalMeasure drop constraint FK6FF15DFCD0BDAE9B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_STATISTICALMEASURE_AUD" not found; SQL statement:
+alter table DefinedTermBase_StatisticalMeasure_AUD drop constraint FK3C062DCD34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION" not found; SQL statement:
+alter table DefinedTermBase_SupportedCategoricalEnumeration drop constraint FK2170B25C5AF2C74 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION" not found; SQL statement:
+alter table DefinedTermBase_SupportedCategoricalEnumeration drop constraint FK2170B25CD0BDAE9B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION_AUD" not found; SQL statement:
+alter table DefinedTermBase_SupportedCategoricalEnumeration_AUD drop constraint FKBB04522D34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT" not found; SQL statement:
+alter table DerivationEvent drop constraint FK426BC034FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT" not found; SQL statement:
+alter table DerivationEvent drop constraint FK426BC03BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT" not found; SQL statement:
+alter table DerivationEvent drop constraint FK426BC033DA462D5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT" not found; SQL statement:
+alter table DerivationEvent drop constraint FK426BC03403E17F4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT" not found; SQL statement:
+alter table DerivationEvent drop constraint FK426BC038524B89D [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT_AUD" not found; SQL statement:
+alter table DerivationEvent_AUD drop constraint FKDABF305434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT_ANNOTATION" not found; SQL statement:
+alter table DerivationEvent_Annotation drop constraint FKEFA0D10B1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT_ANNOTATION" not found; SQL statement:
+alter table DerivationEvent_Annotation drop constraint FKEFA0D10B4AAB411A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT_ANNOTATION_AUD" not found; SQL statement:
+alter table DerivationEvent_Annotation_AUD drop constraint FKA197815C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT_MARKER" not found; SQL statement:
+alter table DerivationEvent_Marker drop constraint FKE412C816777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT_MARKER" not found; SQL statement:
+alter table DerivationEvent_Marker drop constraint FKE412C8164AAB411A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DERIVATIONEVENT_MARKER_AUD" not found; SQL statement:
+alter table DerivationEvent_Marker_AUD drop constraint FK8ED0FAE734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE" not found; SQL statement:
+alter table DescriptionBase drop constraint FKFF4D58CD4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE" not found; SQL statement:
+alter table DescriptionBase drop constraint FKFF4D58CDBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE" not found; SQL statement:
+alter table DescriptionBase drop constraint FKFF4D58CDB56856A4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE" not found; SQL statement:
+alter table DescriptionBase drop constraint FKFF4D58CDDE9A3E39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE" not found; SQL statement:
+alter table DescriptionBase drop constraint FKFF4D58CDDA935185 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_AUD" not found; SQL statement:
+alter table DescriptionBase_AUD drop constraint FK7456581E34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_ANNOTATION" not found; SQL statement:
+alter table DescriptionBase_Annotation drop constraint FKF3AD32011E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_ANNOTATION" not found; SQL statement:
+alter table DescriptionBase_Annotation drop constraint FKF3AD3201F1DDBFAB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_ANNOTATION_AUD" not found; SQL statement:
+alter table DescriptionBase_Annotation_AUD drop constraint FK15FE775234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_CREDIT" not found; SQL statement:
+alter table DescriptionBase_Credit drop constraint FK510B2ACB32D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_CREDIT" not found; SQL statement:
+alter table DescriptionBase_Credit drop constraint FK510B2ACBF1DDBFAB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_CREDIT_AUD" not found; SQL statement:
+alter table DescriptionBase_Credit_AUD drop constraint FK2EBEFB1C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_EXTENSION" not found; SQL statement:
+alter table DescriptionBase_Extension drop constraint FKD5D2B32D927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_EXTENSION" not found; SQL statement:
+alter table DescriptionBase_Extension drop constraint FKD5D2B32DF1DDBFAB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_EXTENSION_AUD" not found; SQL statement:
+alter table DescriptionBase_Extension_AUD drop constraint FK79E7827E34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_GEOSCOPE" not found; SQL statement:
+alter table DescriptionBase_GeoScope drop constraint FK3ADD7CD586D04E74 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_GEOSCOPE" not found; SQL statement:
+alter table DescriptionBase_GeoScope drop constraint FK3ADD7CD5D86445CE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_GEOSCOPE_AUD" not found; SQL statement:
+alter table DescriptionBase_GeoScope_AUD drop constraint FK63A5382634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_IDENTIFIER" not found; SQL statement:
+alter table DescriptionBase_Identifier drop constraint FKEFE5F37BE12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_IDENTIFIER" not found; SQL statement:
+alter table DescriptionBase_Identifier drop constraint FKEFE5F37BF1DDBFAB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_IDENTIFIER_AUD" not found; SQL statement:
+alter table DescriptionBase_Identifier_AUD drop constraint FKDCA5EBCC34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_MARKER" not found; SQL statement:
+alter table DescriptionBase_Marker drop constraint FK6132140C777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_MARKER" not found; SQL statement:
+alter table DescriptionBase_Marker drop constraint FK6132140CF1DDBFAB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_MARKER_AUD" not found; SQL statement:
+alter table DescriptionBase_Marker_AUD drop constraint FK92DD5BDD34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table DescriptionBase_OriginalSourceBase drop constraint FKDC75C70F3A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table DescriptionBase_OriginalSourceBase drop constraint FKDC75C70FF1DDBFAB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table DescriptionBase_OriginalSourceBase_AUD drop constraint FK8F39D56034869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_REFERENCE" not found; SQL statement:
+alter table DescriptionBase_Reference drop constraint FKC330D6395C601E49 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_REFERENCE" not found; SQL statement:
+alter table DescriptionBase_Reference drop constraint FKC330D639F1DDBFAB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_REFERENCE_AUD" not found; SQL statement:
+alter table DescriptionBase_Reference_AUD drop constraint FK76253F8A34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_RIGHTSINFO" not found; SQL statement:
+alter table DescriptionBase_RightsInfo drop constraint FKFEADDDF7C13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_RIGHTSINFO" not found; SQL statement:
+alter table DescriptionBase_RightsInfo drop constraint FKFEADDDF7F1DDBFAB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_RIGHTSINFO_AUD" not found; SQL statement:
+alter table DescriptionBase_RightsInfo_AUD drop constraint FK183C384834869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_SCOPE" not found; SQL statement:
+alter table DescriptionBase_Scope drop constraint FKB9257C4294E290CA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_SCOPE" not found; SQL statement:
+alter table DescriptionBase_Scope drop constraint FKB9257C42D86445CE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONBASE_SCOPE_AUD" not found; SQL statement:
+alter table DescriptionBase_Scope_AUD drop constraint FK75D5B91334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE" not found; SQL statement:
+alter table DescriptionElementBase drop constraint FK38FE76714FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE" not found; SQL statement:
+alter table DescriptionElementBase drop constraint FK38FE7671BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE" not found; SQL statement:
+alter table DescriptionElementBase drop constraint FK38FE76714220AFEB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE" not found; SQL statement:
+alter table DescriptionElementBase drop constraint FK38FE767134AF0E81 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE" not found; SQL statement:
+alter table DescriptionElementBase drop constraint FK38FE76711C3C3FF7 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE" not found; SQL statement:
+alter table DescriptionElementBase drop constraint FK38FE7671E8D36B00 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE" not found; SQL statement:
+alter table DescriptionElementBase drop constraint FK38FE7671693C1147 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE" not found; SQL statement:
+alter table DescriptionElementBase drop constraint FK38FE76716561D9B1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE" not found; SQL statement:
+alter table DescriptionElementBase drop constraint FK38FE767110A80E07 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE" not found; SQL statement:
+alter table DescriptionElementBase drop constraint FK38FE76719108D9B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE" not found; SQL statement:
+alter table DescriptionElementBase drop constraint FK38FE76716D0D7A56 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_AUD" not found; SQL statement:
+alter table DescriptionElementBase_AUD drop constraint FKF3803C234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_ANNOTATION" not found; SQL statement:
+alter table DescriptionElementBase_Annotation drop constraint FK7EE5E5DD1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_ANNOTATION" not found; SQL statement:
+alter table DescriptionElementBase_Annotation drop constraint FK7EE5E5DD3B8BB609 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_ANNOTATION_AUD" not found; SQL statement:
+alter table DescriptionElementBase_Annotation_AUD drop constraint FK2BC1DD2E34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_LANGUAGESTRING" not found; SQL statement:
+alter table DescriptionElementBase_LanguageString drop constraint FKC753F137ACF5F60B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_LANGUAGESTRING" not found; SQL statement:
+alter table DescriptionElementBase_LanguageString drop constraint FKC753F137C6D55834 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_LANGUAGESTRING" not found; SQL statement:
+alter table DescriptionElementBase_LanguageString drop constraint FKC753F137C086B46F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD" not found; SQL statement:
+alter table DescriptionElementBase_LanguageString_AUD drop constraint FK2D26AB8834869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MARKER" not found; SQL statement:
+alter table DescriptionElementBase_Marker drop constraint FK1CB715E8777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MARKER" not found; SQL statement:
+alter table DescriptionElementBase_Marker drop constraint FK1CB715E83B8BB609 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MARKER_AUD" not found; SQL statement:
+alter table DescriptionElementBase_Marker_AUD drop constraint FK1E160FB934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MEDIA" not found; SQL statement:
+alter table DescriptionElementBase_Media drop constraint FK21F70076C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MEDIA" not found; SQL statement:
+alter table DescriptionElementBase_Media drop constraint FK21F700763B8BB609 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MEDIA_AUD" not found; SQL statement:
+alter table DescriptionElementBase_Media_AUD drop constraint FK5522034734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MODIFIER" not found; SQL statement:
+alter table DescriptionElementBase_Modifier drop constraint FK97E0D105F4E35BCD [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MODIFIER" not found; SQL statement:
+alter table DescriptionElementBase_Modifier drop constraint FK97E0D1053B8BB609 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MODIFIER_AUD" not found; SQL statement:
+alter table DescriptionElementBase_Modifier_AUD drop constraint FK2982F45634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MODIFYINGTEXT" not found; SQL statement:
+alter table DescriptionElementBase_ModifyingText drop constraint FK522D90C7F05D08D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MODIFYINGTEXT" not found; SQL statement:
+alter table DescriptionElementBase_ModifyingText drop constraint FK522D90C79682414B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MODIFYINGTEXT" not found; SQL statement:
+alter table DescriptionElementBase_ModifyingText drop constraint FK522D90C73B8BB609 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD" not found; SQL statement:
+alter table DescriptionElementBase_ModifyingText_AUD drop constraint FK6C06031834869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table DescriptionElementBase_OriginalSourceBase drop constraint FKF41ADEEBA6473CCC [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table DescriptionElementBase_OriginalSourceBase drop constraint FKF41ADEEB3B8BB609 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table DescriptionElementBase_OriginalSourceBase_AUD drop constraint FK9C979F3C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT" not found; SQL statement:
+alter table DeterminationEvent drop constraint FK1DB24974FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT" not found; SQL statement:
+alter table DeterminationEvent drop constraint FK1DB2497BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT" not found; SQL statement:
+alter table DeterminationEvent drop constraint FK1DB24973DA462D5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT" not found; SQL statement:
+alter table DeterminationEvent drop constraint FK1DB24974B251DAD [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT" not found; SQL statement:
+alter table DeterminationEvent drop constraint FK1DB2497BD54CF92 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT" not found; SQL statement:
+alter table DeterminationEvent drop constraint FK1DB2497AEC8CCAA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT" not found; SQL statement:
+alter table DeterminationEvent drop constraint FK1DB2497DA935185 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT_AUD" not found; SQL statement:
+alter table DeterminationEvent_AUD drop constraint FKA0252EE834869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT_ANNOTATION" not found; SQL statement:
+alter table DeterminationEvent_Annotation drop constraint FKB74F03F71E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT_ANNOTATION" not found; SQL statement:
+alter table DeterminationEvent_Annotation drop constraint FKB74F03F76BE0BFDA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT_ANNOTATION_AUD" not found; SQL statement:
+alter table DeterminationEvent_Annotation_AUD drop constraint FKAFDA5E4834869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT_MARKER" not found; SQL statement:
+alter table DeterminationEvent_Marker drop constraint FK5C475102777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT_MARKER" not found; SQL statement:
+alter table DeterminationEvent_Marker drop constraint FK5C4751026BE0BFDA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT_MARKER_AUD" not found; SQL statement:
+alter table DeterminationEvent_Marker_AUD drop constraint FK567F2DD334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT_REFERENCE" not found; SQL statement:
+alter table DeterminationEvent_Reference drop constraint FK8FB1ED8355A53F64 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT_REFERENCE" not found; SQL statement:
+alter table DeterminationEvent_Reference drop constraint FK8FB1ED836BE0BFDA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DETERMINATIONEVENT_REFERENCE_AUD" not found; SQL statement:
+alter table DeterminationEvent_Reference_AUD drop constraint FK6255A1D434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DNAQUALITY" not found; SQL statement:
+alter table DnaQuality drop constraint FK7F4518084FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DNAQUALITY" not found; SQL statement:
+alter table DnaQuality drop constraint FK7F451808BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DNAQUALITY" not found; SQL statement:
+alter table DnaQuality drop constraint FK7F45180823A844FA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DNAQUALITY" not found; SQL statement:
+alter table DnaQuality drop constraint FK7F45180887BB6462 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DNAQUALITY" not found; SQL statement:
+alter table DnaQuality drop constraint FK7F451808632EAD0D [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "DNAQUALITY_AUD" not found; SQL statement:
+alter table DnaQuality_AUD drop constraint FKA79601D934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ENTITYCONSTRAINTVIOLATION" not found; SQL statement:
+alter table EntityConstraintViolation drop constraint FK8970AEC54FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ENTITYCONSTRAINTVIOLATION" not found; SQL statement:
+alter table EntityConstraintViolation drop constraint FK8970AEC57CB10052 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ENTITYVALIDATION" not found; SQL statement:
+alter table EntityValidation drop constraint FKE5A60CDC4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "EXTENSION" not found; SQL statement:
+alter table Extension drop constraint FK52EF3C1F4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "EXTENSION" not found; SQL statement:
+alter table Extension drop constraint FK52EF3C1FBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "EXTENSION" not found; SQL statement:
+alter table Extension drop constraint FK52EF3C1FAD392BD3 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "EXTENSION_AUD" not found; SQL statement:
+alter table Extension_AUD drop constraint FK92D2427034869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE" not found; SQL statement:
+alter table FeatureNode drop constraint FK4CEED9F84FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE" not found; SQL statement:
+alter table FeatureNode drop constraint FK4CEED9F8BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE" not found; SQL statement:
+alter table FeatureNode drop constraint FK4CEED9F84220AFEB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE" not found; SQL statement:
+alter table FeatureNode drop constraint FK4CEED9F847C496CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE" not found; SQL statement:
+alter table FeatureNode drop constraint FK4CEED9F8E0AD2C59 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE_AUD" not found; SQL statement:
+alter table FeatureNode_AUD drop constraint FK25AD4BC934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF" not found; SQL statement:
+alter table FeatureNode_DefinedTermBase_InapplicableIf drop constraint FK56833D011128E63B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF" not found; SQL statement:
+alter table FeatureNode_DefinedTermBase_InapplicableIf drop constraint FK56833D0152FCC4B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD" not found; SQL statement:
+alter table FeatureNode_DefinedTermBase_InapplicableIf_AUD drop constraint FKB8D7025234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE" not found; SQL statement:
+alter table FeatureNode_DefinedTermBase_OnlyApplicable drop constraint FK6AE876AB57FA94D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE" not found; SQL statement:
+alter table FeatureNode_DefinedTermBase_OnlyApplicable drop constraint FK6AE876AB52FCC4B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD" not found; SQL statement:
+alter table FeatureNode_DefinedTermBase_OnlyApplicable_AUD drop constraint FK3F5356FC34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE" not found; SQL statement:
+alter table FeatureTree drop constraint FK4CF19F944FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE" not found; SQL statement:
+alter table FeatureTree drop constraint FK4CF19F94BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE" not found; SQL statement:
+alter table FeatureTree drop constraint FK4CF19F94B7892921 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_AUD" not found; SQL statement:
+alter table FeatureTree_AUD drop constraint FK355BE36534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_ANNOTATION" not found; SQL statement:
+alter table FeatureTree_Annotation drop constraint FK5D8B8DA1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_ANNOTATION" not found; SQL statement:
+alter table FeatureTree_Annotation drop constraint FK5D8B8DA47C496CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_ANNOTATION_AUD" not found; SQL statement:
+alter table FeatureTree_Annotation_AUD drop constraint FK86E8E9AB34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_CREDIT" not found; SQL statement:
+alter table FeatureTree_Credit drop constraint FK7536062432D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_CREDIT" not found; SQL statement:
+alter table FeatureTree_Credit drop constraint FK7536062447C496CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_CREDIT_AUD" not found; SQL statement:
+alter table FeatureTree_Credit_AUD drop constraint FK40EA81F534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_EXTENSION" not found; SQL statement:
+alter table FeatureTree_Extension drop constraint FKAD1E6D34927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_EXTENSION" not found; SQL statement:
+alter table FeatureTree_Extension drop constraint FKAD1E6D3447C496CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_EXTENSION_AUD" not found; SQL statement:
+alter table FeatureTree_Extension_AUD drop constraint FKF128E10534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_IDENTIFIER" not found; SQL statement:
+alter table FeatureTree_Identifier drop constraint FK2117A54E12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_IDENTIFIER" not found; SQL statement:
+alter table FeatureTree_Identifier drop constraint FK2117A5447C496CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_IDENTIFIER_AUD" not found; SQL statement:
+alter table FeatureTree_Identifier_AUD drop constraint FK4D905E2534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_MARKER" not found; SQL statement:
+alter table FeatureTree_Marker drop constraint FK855CEF65777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_MARKER" not found; SQL statement:
+alter table FeatureTree_Marker drop constraint FK855CEF6547C496CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_MARKER_AUD" not found; SQL statement:
+alter table FeatureTree_Marker_AUD drop constraint FKA508E2B634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table FeatureTree_OriginalSourceBase drop constraint FK13BD64E83A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table FeatureTree_OriginalSourceBase drop constraint FK13BD64E847C496CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table FeatureTree_OriginalSourceBase_AUD drop constraint FK7B5CDEB934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_REPRESENTATION" not found; SQL statement:
+alter table FeatureTree_Representation drop constraint FK8C458F8B31C4747 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_REPRESENTATION" not found; SQL statement:
+alter table FeatureTree_Representation drop constraint FK8C458F847C496CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_REPRESENTATION_AUD" not found; SQL statement:
+alter table FeatureTree_Representation_AUD drop constraint FKECAB4AC934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_RIGHTSINFO" not found; SQL statement:
+alter table FeatureTree_RightsInfo drop constraint FK10D964D0C13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_RIGHTSINFO" not found; SQL statement:
+alter table FeatureTree_RightsInfo drop constraint FK10D964D047C496CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "FEATURETREE_RIGHTSINFO_AUD" not found; SQL statement:
+alter table FeatureTree_RightsInfo_AUD drop constraint FK8926AAA134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT" not found; SQL statement:
+alter table GatheringEvent drop constraint FK6F1286F34FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT" not found; SQL statement:
+alter table GatheringEvent drop constraint FK6F1286F3BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT" not found; SQL statement:
+alter table GatheringEvent drop constraint FK6F1286F33DA462D5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT" not found; SQL statement:
+alter table GatheringEvent drop constraint FK6F1286F3C15704E [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT" not found; SQL statement:
+alter table GatheringEvent drop constraint FK6F1286F3F55AFD89 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT" not found; SQL statement:
+alter table GatheringEvent drop constraint FK6F1286F38B455EC6 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT_AUD" not found; SQL statement:
+alter table GatheringEvent_AUD drop constraint FK3EC034434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT_ANNOTATION" not found; SQL statement:
+alter table GatheringEvent_Annotation drop constraint FK76DDD01B1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT_ANNOTATION" not found; SQL statement:
+alter table GatheringEvent_Annotation drop constraint FK76DDD01BF95F225A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT_ANNOTATION_AUD" not found; SQL statement:
+alter table GatheringEvent_Annotation_AUD drop constraint FK351E786C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT_DEFINEDTERMBASE" not found; SQL statement:
+alter table GatheringEvent_DefinedTermBase drop constraint FK69D9A11A7C34B6D6 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT_DEFINEDTERMBASE" not found; SQL statement:
+alter table GatheringEvent_DefinedTermBase drop constraint FK69D9A11AF95F225A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT_DEFINEDTERMBASE_AUD" not found; SQL statement:
+alter table GatheringEvent_DefinedTermBase_AUD drop constraint FKB3BBB1EB34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT_MARKER" not found; SQL statement:
+alter table GatheringEvent_Marker drop constraint FK7B49CF26777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT_MARKER" not found; SQL statement:
+alter table GatheringEvent_Marker drop constraint FK7B49CF26F95F225A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GATHERINGEVENT_MARKER_AUD" not found; SQL statement:
+alter table GatheringEvent_Marker_AUD drop constraint FK160DF9F734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "GRANTEDAUTHORITYIMPL" not found; SQL statement:
+alter table GrantedAuthorityImpl drop constraint FKB05CF9284FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HOMOTYPICALGROUP" not found; SQL statement:
+alter table HomotypicalGroup drop constraint FK7DECCC184FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HOMOTYPICALGROUP" not found; SQL statement:
+alter table HomotypicalGroup drop constraint FK7DECCC18BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HOMOTYPICALGROUP_AUD" not found; SQL statement:
+alter table HomotypicalGroup_AUD drop constraint FKE4252DE934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HOMOTYPICALGROUP_ANNOTATION" not found; SQL statement:
+alter table HomotypicalGroup_Annotation drop constraint FK7A0351D61E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HOMOTYPICALGROUP_ANNOTATION" not found; SQL statement:
+alter table HomotypicalGroup_Annotation drop constraint FK7A0351D6BFEAE500 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HOMOTYPICALGROUP_ANNOTATION_AUD" not found; SQL statement:
+alter table HomotypicalGroup_Annotation_AUD drop constraint FK41E6A4A734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HOMOTYPICALGROUP_MARKER" not found; SQL statement:
+alter table HomotypicalGroup_Marker drop constraint FK97D36661777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HOMOTYPICALGROUP_MARKER" not found; SQL statement:
+alter table HomotypicalGroup_Marker drop constraint FK97D36661BFEAE500 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HOMOTYPICALGROUP_MARKER_AUD" not found; SQL statement:
+alter table HomotypicalGroup_Marker_AUD drop constraint FK19337BB234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP" not found; SQL statement:
+alter table HybridRelationship drop constraint FK9033CE744FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP" not found; SQL statement:
+alter table HybridRelationship drop constraint FK9033CE74BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP" not found; SQL statement:
+alter table HybridRelationship drop constraint FK9033CE74AEB7F3BE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP" not found; SQL statement:
+alter table HybridRelationship drop constraint FK9033CE749DD57A93 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP" not found; SQL statement:
+alter table HybridRelationship drop constraint FK9033CE74AF4F9F62 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP" not found; SQL statement:
+alter table HybridRelationship drop constraint FK9033CE7455F241D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP_AUD" not found; SQL statement:
+alter table HybridRelationship_AUD drop constraint FK9C2BA24534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP_ANNOTATION" not found; SQL statement:
+alter table HybridRelationship_Annotation drop constraint FK2C7E7DFA1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP_ANNOTATION" not found; SQL statement:
+alter table HybridRelationship_Annotation drop constraint FK2C7E7DFA59832240 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP_ANNOTATION_AUD" not found; SQL statement:
+alter table HybridRelationship_Annotation_AUD drop constraint FKACE71ECB34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP_MARKER" not found; SQL statement:
+alter table HybridRelationship_Marker drop constraint FKCEF24485777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP_MARKER" not found; SQL statement:
+alter table HybridRelationship_Marker drop constraint FKCEF2448559832240 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "HYBRIDRELATIONSHIP_MARKER_AUD" not found; SQL statement:
+alter table HybridRelationship_Marker_AUD drop constraint FKCBAEA7D634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "IDENTIFIER" not found; SQL statement:
+alter table Identifier drop constraint FK165A88C94FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "IDENTIFIER" not found; SQL statement:
+alter table Identifier drop constraint FK165A88C9BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "IDENTIFIER" not found; SQL statement:
+alter table Identifier drop constraint FK165A88C9E67FC44F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "IDENTIFIER_AUD" not found; SQL statement:
+alter table Identifier_AUD drop constraint FKE1132A1A34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "IDENTIFIER_ANNOTATION" not found; SQL statement:
+alter table Identifier_Annotation drop constraint FK12BB6C851E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "IDENTIFIER_ANNOTATION" not found; SQL statement:
+alter table Identifier_Annotation drop constraint FK12BB6C85E640A3E0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "IDENTIFIER_ANNOTATION_AUD" not found; SQL statement:
+alter table Identifier_Annotation_AUD drop constraint FK36A3CFD634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "IDENTIFIER_MARKER" not found; SQL statement:
+alter table Identifier_Marker drop constraint FK4A6A3090777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "IDENTIFIER_MARKER" not found; SQL statement:
+alter table Identifier_Marker drop constraint FK4A6A3090E640A3E0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "IDENTIFIER_MARKER_AUD" not found; SQL statement:
+alter table Identifier_Marker_AUD drop constraint FKB1EB966134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INDIVIDUALASSOCIATION_LANGUAGESTRING" not found; SQL statement:
+alter table IndividualAssociation_LanguageString drop constraint FKB5C75EC02BEBA58D [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INDIVIDUALASSOCIATION_LANGUAGESTRING" not found; SQL statement:
+alter table IndividualAssociation_LanguageString drop constraint FKB5C75EC028459272 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INDIVIDUALASSOCIATION_LANGUAGESTRING" not found; SQL statement:
+alter table IndividualAssociation_LanguageString drop constraint FKB5C75EC084FF3EDF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INDIVIDUALASSOCIATION_LANGUAGESTRING_AUD" not found; SQL statement:
+alter table IndividualAssociation_LanguageString_AUD drop constraint FKB1A62C9134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INSTITUTIONALMEMBERSHIP" not found; SQL statement:
+alter table InstitutionalMembership drop constraint FK3C8E1FF94FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INSTITUTIONALMEMBERSHIP" not found; SQL statement:
+alter table InstitutionalMembership drop constraint FK3C8E1FF9BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INSTITUTIONALMEMBERSHIP" not found; SQL statement:
+alter table InstitutionalMembership drop constraint FK3C8E1FF916B9CA77 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INSTITUTIONALMEMBERSHIP" not found; SQL statement:
+alter table InstitutionalMembership drop constraint FK3C8E1FF9AAC1B820 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INSTITUTIONALMEMBERSHIP_AUD" not found; SQL statement:
+alter table InstitutionalMembership_AUD drop constraint FK847A94A34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE" not found; SQL statement:
+alter table IntextReference drop constraint FK861B8B794FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE" not found; SQL statement:
+alter table IntextReference drop constraint FK861B8B79BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE" not found; SQL statement:
+alter table IntextReference drop constraint FK861B8B79F7976FC5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE" not found; SQL statement:
+alter table IntextReference drop constraint FK861B8B79994CCE20 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE" not found; SQL statement:
+alter table IntextReference drop constraint FK861B8B7937998500 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE" not found; SQL statement:
+alter table IntextReference drop constraint FK861B8B79C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE" not found; SQL statement:
+alter table IntextReference drop constraint FK861B8B795CB60F3B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE" not found; SQL statement:
+alter table IntextReference drop constraint FK861B8B798D0FB4DA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE" not found; SQL statement:
+alter table IntextReference drop constraint FK861B8B79AEC8CCAA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE" not found; SQL statement:
+alter table IntextReference drop constraint FK861B8B79DA935185 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE" not found; SQL statement:
+alter table IntextReference drop constraint FK861B8B79EE6B45A6 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "INTEXTREFERENCE_AUD" not found; SQL statement:
+alter table IntextReference_AUD drop constraint FKAE3354CA34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "KEYSTATEMENT" not found; SQL statement:
+alter table KeyStatement drop constraint FK7125B9F04FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "KEYSTATEMENT" not found; SQL statement:
+alter table KeyStatement drop constraint FK7125B9F0BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "KEYSTATEMENT_AUD" not found; SQL statement:
+alter table KeyStatement_AUD drop constraint FK93036FC134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "KEYSTATEMENT_LANGUAGESTRING" not found; SQL statement:
+alter table KeyStatement_LanguageString drop constraint FK70BB5FD89C782795 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "KEYSTATEMENT_LANGUAGESTRING" not found; SQL statement:
+alter table KeyStatement_LanguageString drop constraint FK70BB5FD8DA0C376A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "KEYSTATEMENT_LANGUAGESTRING" not found; SQL statement:
+alter table KeyStatement_LanguageString drop constraint FK70BB5FD8AAA67049 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "KEYSTATEMENT_LANGUAGESTRING_AUD" not found; SQL statement:
+alter table KeyStatement_LanguageString_AUD drop constraint FKE203E1A934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LSIDAUTHORITY" not found; SQL statement:
+alter table LSIDAuthority drop constraint FK759DB8814FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LSIDAUTHORITY_NAMESPACES" not found; SQL statement:
+alter table LSIDAuthority_namespaces drop constraint FKB04948F64FFCFD94 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LANGUAGESTRING" not found; SQL statement:
+alter table LanguageString drop constraint FKB5FDC9A94FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LANGUAGESTRING" not found; SQL statement:
+alter table LanguageString drop constraint FKB5FDC9A9BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LANGUAGESTRING" not found; SQL statement:
+alter table LanguageString drop constraint FKB5FDC9A9E8D36B00 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LANGUAGESTRING_AUD" not found; SQL statement:
+alter table LanguageString_AUD drop constraint FK896AFAFA34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LANGUAGESTRING_ANNOTATION" not found; SQL statement:
+alter table LanguageString_Annotation drop constraint FK8400DFA51E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LANGUAGESTRING_ANNOTATION" not found; SQL statement:
+alter table LanguageString_Annotation drop constraint FK8400DFA537998500 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LANGUAGESTRING_ANNOTATION_AUD" not found; SQL statement:
+alter table LanguageString_Annotation_AUD drop constraint FKD3BAB2F634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LANGUAGESTRING_MARKER" not found; SQL statement:
+alter table LanguageString_Marker drop constraint FK8DA633B0777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LANGUAGESTRING_MARKER" not found; SQL statement:
+alter table LanguageString_Marker drop constraint FK8DA633B037998500 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "LANGUAGESTRING_MARKER_AUD" not found; SQL statement:
+alter table LanguageString_Marker_AUD drop constraint FK2331098134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MARKER" not found; SQL statement:
+alter table Marker drop constraint FK88F1805A4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MARKER" not found; SQL statement:
+alter table Marker drop constraint FK88F1805ABC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MARKER" not found; SQL statement:
+alter table Marker drop constraint FK88F1805AD64DC020 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MARKER_AUD" not found; SQL statement:
+alter table Marker_AUD drop constraint FKB951F12B34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT" not found; SQL statement:
+alter table MaterialOrMethodEvent drop constraint FK458A264F4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT" not found; SQL statement:
+alter table MaterialOrMethodEvent drop constraint FK458A264FBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT" not found; SQL statement:
+alter table MaterialOrMethodEvent drop constraint FK458A264F3DA462D5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT" not found; SQL statement:
+alter table MaterialOrMethodEvent drop constraint FK458A264F14D2C695 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT" not found; SQL statement:
+alter table MaterialOrMethodEvent drop constraint FK458A264F3781DA30 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT" not found; SQL statement:
+alter table MaterialOrMethodEvent drop constraint FK458A264F1600EAB3 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT" not found; SQL statement:
+alter table MaterialOrMethodEvent drop constraint FK458A264F9A129634 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT_AUD" not found; SQL statement:
+alter table MaterialOrMethodEvent_AUD drop constraint FK8C8C94A034869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT_ANNOTATION" not found; SQL statement:
+alter table MaterialOrMethodEvent_Annotation drop constraint FKD9943F3F1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT_ANNOTATION" not found; SQL statement:
+alter table MaterialOrMethodEvent_Annotation drop constraint FKD9943F3F2F50355A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT_ANNOTATION_AUD" not found; SQL statement:
+alter table MaterialOrMethodEvent_Annotation_AUD drop constraint FK6B00B59034869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT_MARKER" not found; SQL statement:
+alter table MaterialOrMethodEvent_Marker drop constraint FKF0BD704A777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT_MARKER" not found; SQL statement:
+alter table MaterialOrMethodEvent_Marker drop constraint FKF0BD704A2F50355A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MATERIALORMETHODEVENT_MARKER_AUD" not found; SQL statement:
+alter table MaterialOrMethodEvent_Marker_AUD drop constraint FK78C4691B34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA" not found; SQL statement:
+alter table Media drop constraint FK46C7FC44FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA" not found; SQL statement:
+alter table Media drop constraint FK46C7FC4BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA" not found; SQL statement:
+alter table Media drop constraint FK46C7FC4C2445443 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAKEY_NAMEDAREA" not found; SQL statement:
+alter table MediaKey_NamedArea drop constraint FK31E7D4023FF8E7B2 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAKEY_NAMEDAREA" not found; SQL statement:
+alter table MediaKey_NamedArea drop constraint FK31E7D402BE59D760 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAKEY_NAMEDAREA_AUD" not found; SQL statement:
+alter table MediaKey_NamedArea_AUD drop constraint FK922630D334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAKEY_SCOPE" not found; SQL statement:
+alter table MediaKey_Scope drop constraint FKBFFEE8F05431B96E [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAKEY_SCOPE" not found; SQL statement:
+alter table MediaKey_Scope drop constraint FKBFFEE8F0BE59D760 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAKEY_SCOPE_AUD" not found; SQL statement:
+alter table MediaKey_Scope_AUD drop constraint FK63AD1EC134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAKEY_TAXON" not found; SQL statement:
+alter table MediaKey_Taxon drop constraint FKC00C3966DE9A3E39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAKEY_TAXON" not found; SQL statement:
+alter table MediaKey_Taxon drop constraint FKC00C3966815C7E9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAKEY_TAXON_AUD" not found; SQL statement:
+alter table MediaKey_Taxon_AUD drop constraint FK311443734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAREPRESENTATION" not found; SQL statement:
+alter table MediaRepresentation drop constraint FK1966BDB14FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAREPRESENTATION" not found; SQL statement:
+alter table MediaRepresentation drop constraint FK1966BDB1BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAREPRESENTATION" not found; SQL statement:
+alter table MediaRepresentation drop constraint FK1966BDB1C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAREPRESENTATIONPART" not found; SQL statement:
+alter table MediaRepresentationPart drop constraint FK67A455444FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAREPRESENTATIONPART" not found; SQL statement:
+alter table MediaRepresentationPart drop constraint FK67A45544BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAREPRESENTATIONPART" not found; SQL statement:
+alter table MediaRepresentationPart drop constraint FK67A45544E3818E37 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAREPRESENTATIONPART_AUD" not found; SQL statement:
+alter table MediaRepresentationPart_AUD drop constraint FKA75C411534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAREPRESENTATION_AUD" not found; SQL statement:
+alter table MediaRepresentation_AUD drop constraint FK67AAAB0234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIAREPRESENTATION_MEDIAREPRESENTATIONPART_AUD" not found; SQL statement:
+alter table MediaRepresentation_MediaRepresentationPart_AUD drop constraint FK3544378734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_AUD" not found; SQL statement:
+alter table Media_AUD drop constraint FKF70B2B9534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_ANNOTATION" not found; SQL statement:
+alter table Media_Annotation drop constraint FKA020DAAA1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_ANNOTATION" not found; SQL statement:
+alter table Media_Annotation drop constraint FKA020DAAAC2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_ANNOTATION_AUD" not found; SQL statement:
+alter table Media_Annotation_AUD drop constraint FK99ABA37B34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_CREDIT" not found; SQL statement:
+alter table Media_Credit drop constraint FKC1F78FF432D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_CREDIT" not found; SQL statement:
+alter table Media_Credit drop constraint FKC1F78FF4C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_CREDIT_AUD" not found; SQL statement:
+alter table Media_Credit_AUD drop constraint FKDB32A3C534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_DESCRIPTION" not found; SQL statement:
+alter table Media_Description drop constraint FK368283E12BEBA58D [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_DESCRIPTION" not found; SQL statement:
+alter table Media_Description drop constraint FK368283E128459272 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_DESCRIPTION" not found; SQL statement:
+alter table Media_Description drop constraint FK368283E1C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_DESCRIPTION_AUD" not found; SQL statement:
+alter table Media_Description_AUD drop constraint FK6817D93234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_EXTENSION" not found; SQL statement:
+alter table Media_Extension drop constraint FKDB62D164927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_EXTENSION" not found; SQL statement:
+alter table Media_Extension drop constraint FKDB62D164C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_EXTENSION_AUD" not found; SQL statement:
+alter table Media_Extension_AUD drop constraint FKE13FAD3534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_IDENTIFIER" not found; SQL statement:
+alter table Media_Identifier drop constraint FK9C599C24E12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_IDENTIFIER" not found; SQL statement:
+alter table Media_Identifier drop constraint FK9C599C24C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_IDENTIFIER_AUD" not found; SQL statement:
+alter table Media_Identifier_AUD drop constraint FK605317F534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_LANGUAGESTRING" not found; SQL statement:
+alter table Media_LanguageString drop constraint FK353DB784A1CA19B1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_LANGUAGESTRING" not found; SQL statement:
+alter table Media_LanguageString drop constraint FK353DB784A0A6EDCE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_LANGUAGESTRING" not found; SQL statement:
+alter table Media_LanguageString drop constraint FK353DB784C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_LANGUAGESTRING_AUD" not found; SQL statement:
+alter table Media_LanguageString_AUD drop constraint FK68FA835534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_MARKER" not found; SQL statement:
+alter table Media_Marker drop constraint FKD21E7935777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_MARKER" not found; SQL statement:
+alter table Media_Marker drop constraint FKD21E7935C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_MARKER_AUD" not found; SQL statement:
+alter table Media_Marker_AUD drop constraint FK3F51048634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table Media_OriginalSourceBase drop constraint FK2FEEB6B83A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table Media_OriginalSourceBase drop constraint FK2FEEB6B8C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table Media_OriginalSourceBase_AUD drop constraint FK97F0C88934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_REPRESENTATION" not found; SQL statement:
+alter table Media_Representation drop constraint FK1B8712C88F6CABE6 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_REPRESENTATION" not found; SQL statement:
+alter table Media_Representation drop constraint FK1B8712C8BE59D760 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_REPRESENTATION_AUD" not found; SQL statement:
+alter table Media_Representation_AUD drop constraint FK8DC9C9934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_RIGHTSINFO" not found; SQL statement:
+alter table Media_RightsInfo drop constraint FKAB2186A0C13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_RIGHTSINFO" not found; SQL statement:
+alter table Media_RightsInfo drop constraint FKAB2186A0C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_RIGHTSINFO_AUD" not found; SQL statement:
+alter table Media_RightsInfo_AUD drop constraint FK9BE9647134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_SEQUENCE" not found; SQL statement:
+alter table Media_Sequence drop constraint FK61D09FCF29B4761 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_SEQUENCE" not found; SQL statement:
+alter table Media_Sequence drop constraint FK61D09FC3282B64 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_SEQUENCE_AUD" not found; SQL statement:
+alter table Media_Sequence_AUD drop constraint FK3C7BD9CD34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_TAXONBASE" not found; SQL statement:
+alter table Media_TaxonBase drop constraint FK1ABD49E07C3D0017 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_TAXONBASE" not found; SQL statement:
+alter table Media_TaxonBase drop constraint FK1ABD49E0BE59D760 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MEDIA_TAXONBASE_AUD" not found; SQL statement:
+alter table Media_TaxonBase_AUD drop constraint FK857187B134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MULTIACCESSKEY_NAMEDAREA" not found; SQL statement:
+alter table MultiAccessKey_NamedArea drop constraint FK1F5A74893FF8E7B2 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MULTIACCESSKEY_NAMEDAREA" not found; SQL statement:
+alter table MultiAccessKey_NamedArea drop constraint FK1F5A7489B4555A9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MULTIACCESSKEY_NAMEDAREA_AUD" not found; SQL statement:
+alter table MultiAccessKey_NamedArea_AUD drop constraint FK4CB735DA34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MULTIACCESSKEY_SCOPE" not found; SQL statement:
+alter table MultiAccessKey_Scope drop constraint FKCC6CE4F75431B96E [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MULTIACCESSKEY_SCOPE" not found; SQL statement:
+alter table MultiAccessKey_Scope drop constraint FKCC6CE4F7B4555A9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MULTIACCESSKEY_SCOPE_AUD" not found; SQL statement:
+alter table MultiAccessKey_Scope_AUD drop constraint FK511FBF4834869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MULTIACCESSKEY_TAXON" not found; SQL statement:
+alter table MultiAccessKey_Taxon drop constraint FKCC7A356DDE9A3E39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MULTIACCESSKEY_TAXON" not found; SQL statement:
+alter table MultiAccessKey_Taxon drop constraint FKCC7A356DB64A7B29 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "MULTIACCESSKEY_TAXON_AUD" not found; SQL statement:
+alter table MultiAccessKey_Taxon_AUD drop constraint FKF083E4BE34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP" not found; SQL statement:
+alter table NameRelationship drop constraint FK5E510834FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP" not found; SQL statement:
+alter table NameRelationship drop constraint FK5E51083BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP" not found; SQL statement:
+alter table NameRelationship drop constraint FK5E51083AEB7F3BE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP" not found; SQL statement:
+alter table NameRelationship drop constraint FK5E5108316CDFF85 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP" not found; SQL statement:
+alter table NameRelationship drop constraint FK5E5108328482454 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP" not found; SQL statement:
+alter table NameRelationship drop constraint FK5E51083AF619DE3 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP_AUD" not found; SQL statement:
+alter table NameRelationship_AUD drop constraint FK743F44D434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP_ANNOTATION" not found; SQL statement:
+alter table NameRelationship_Annotation drop constraint FK2E38AC8B1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP_ANNOTATION" not found; SQL statement:
+alter table NameRelationship_Annotation drop constraint FK2E38AC8B7B4CB560 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP_ANNOTATION_AUD" not found; SQL statement:
+alter table NameRelationship_Annotation_AUD drop constraint FKD1D59CDC34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP_MARKER" not found; SQL statement:
+alter table NameRelationship_Marker drop constraint FKE3E46396777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP_MARKER" not found; SQL statement:
+alter table NameRelationship_Marker drop constraint FKE3E463967B4CB560 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NAMERELATIONSHIP_MARKER_AUD" not found; SQL statement:
+alter table NameRelationship_Marker_AUD drop constraint FKCD68D66734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NOMENCLATURALSTATUS" not found; SQL statement:
+alter table NomenclaturalStatus drop constraint FK1FFEC88B4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NOMENCLATURALSTATUS" not found; SQL statement:
+alter table NomenclaturalStatus drop constraint FK1FFEC88BBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NOMENCLATURALSTATUS" not found; SQL statement:
+alter table NomenclaturalStatus drop constraint FK1FFEC88BAEB7F3BE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NOMENCLATURALSTATUS" not found; SQL statement:
+alter table NomenclaturalStatus drop constraint FK1FFEC88B7029BD9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NOMENCLATURALSTATUS_AUD" not found; SQL statement:
+alter table NomenclaturalStatus_AUD drop constraint FKFB2DB8DC34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NOMENCLATURALSTATUS_ANNOTATION" not found; SQL statement:
+alter table NomenclaturalStatus_Annotation drop constraint FKE6E91F831E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NOMENCLATURALSTATUS_ANNOTATION" not found; SQL statement:
+alter table NomenclaturalStatus_Annotation drop constraint FKE6E91F838D2CB1D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NOMENCLATURALSTATUS_ANNOTATION_AUD" not found; SQL statement:
+alter table NomenclaturalStatus_Annotation_AUD drop constraint FK6A3D3D434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NOMENCLATURALSTATUS_MARKER" not found; SQL statement:
+alter table NomenclaturalStatus_Marker drop constraint FK2F5128E777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NOMENCLATURALSTATUS_MARKER" not found; SQL statement:
+alter table NomenclaturalStatus_Marker drop constraint FK2F5128E8D2CB1D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "NOMENCLATURALSTATUS_MARKER_AUD" not found; SQL statement:
+alter table NomenclaturalStatus_Marker_AUD drop constraint FK8619495F34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ORIGINALSOURCEBASE" not found; SQL statement:
+alter table OriginalSourceBase drop constraint FK505F2E5D4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ORIGINALSOURCEBASE" not found; SQL statement:
+alter table OriginalSourceBase drop constraint FK505F2E5DBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ORIGINALSOURCEBASE" not found; SQL statement:
+alter table OriginalSourceBase drop constraint FK505F2E5DAEB7F3BE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ORIGINALSOURCEBASE" not found; SQL statement:
+alter table OriginalSourceBase drop constraint FK505F2E5D966B96B2 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table OriginalSourceBase_AUD drop constraint FK9662E5AE34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ORIGINALSOURCEBASE_ANNOTATION" not found; SQL statement:
+alter table OriginalSourceBase_Annotation drop constraint FK208142711E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ORIGINALSOURCEBASE_ANNOTATION" not found; SQL statement:
+alter table OriginalSourceBase_Annotation drop constraint FK20814271B029DDA0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ORIGINALSOURCEBASE_ANNOTATION_AUD" not found; SQL statement:
+alter table OriginalSourceBase_Annotation_AUD drop constraint FKA074CFC234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ORIGINALSOURCEBASE_MARKER" not found; SQL statement:
+alter table OriginalSourceBase_Marker drop constraint FKB3FFDC7C777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ORIGINALSOURCEBASE_MARKER" not found; SQL statement:
+alter table OriginalSourceBase_Marker drop constraint FKB3FFDC7CB029DDA0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "ORIGINALSOURCEBASE_MARKER_AUD" not found; SQL statement:
+alter table OriginalSourceBase_Marker_AUD drop constraint FKBFB16C4D34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PERMISSIONGROUP" not found; SQL statement:
+alter table PermissionGroup drop constraint FK629941D04FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PERMISSIONGROUP_GRANTEDAUTHORITYIMPL" not found; SQL statement:
+alter table PermissionGroup_GrantedAuthorityImpl drop constraint FK53114371857F6C2 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PERMISSIONGROUP_GRANTEDAUTHORITYIMPL" not found; SQL statement:
+alter table PermissionGroup_GrantedAuthorityImpl drop constraint FK5311437CA0971A3 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY" not found; SQL statement:
+alter table PolytomousKey drop constraint FKA9E6B1384FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY" not found; SQL statement:
+alter table PolytomousKey drop constraint FKA9E6B138BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY" not found; SQL statement:
+alter table PolytomousKey drop constraint FKA9E6B138576595C3 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE" not found; SQL statement:
+alter table PolytomousKeyNode drop constraint FK860775A4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE" not found; SQL statement:
+alter table PolytomousKeyNode drop constraint FK860775ABC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE" not found; SQL statement:
+alter table PolytomousKeyNode drop constraint FK860775A4220AFEB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE" not found; SQL statement:
+alter table PolytomousKeyNode drop constraint FK860775AC73A7584 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE" not found; SQL statement:
+alter table PolytomousKeyNode drop constraint FK860775A4FEE4393 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE" not found; SQL statement:
+alter table PolytomousKeyNode drop constraint FK860775A808998FB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE" not found; SQL statement:
+alter table PolytomousKeyNode drop constraint FK860775A9D3C2E93 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE" not found; SQL statement:
+alter table PolytomousKeyNode drop constraint FK860775A4382686A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE" not found; SQL statement:
+alter table PolytomousKeyNode drop constraint FK860775A1C0483C4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE" not found; SQL statement:
+alter table PolytomousKeyNode drop constraint FK860775ADE9A3E39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE_AUD" not found; SQL statement:
+alter table PolytomousKeyNode_AUD drop constraint FK6A6D682B34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE_LANGUAGESTRING" not found; SQL statement:
+alter table PolytomousKeyNode_LanguageString drop constraint FK5574E12EF05D08D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE_LANGUAGESTRING" not found; SQL statement:
+alter table PolytomousKeyNode_LanguageString drop constraint FK5574E12E9682414B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE_LANGUAGESTRING" not found; SQL statement:
+alter table PolytomousKeyNode_LanguageString drop constraint FK5574E12EF135C42B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEYNODE_LANGUAGESTRING_AUD" not found; SQL statement:
+alter table PolytomousKeyNode_LanguageString_AUD drop constraint FKE0D0C7FF34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_AUD" not found; SQL statement:
+alter table PolytomousKey_AUD drop constraint FK867830934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_ANNOTATION" not found; SQL statement:
+alter table PolytomousKey_Annotation drop constraint FK278CF8B61E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_ANNOTATION" not found; SQL statement:
+alter table PolytomousKey_Annotation drop constraint FK278CF8B689D97CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_ANNOTATION_AUD" not found; SQL statement:
+alter table PolytomousKey_Annotation_AUD drop constraint FK3281DB8734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_CREDIT" not found; SQL statement:
+alter table PolytomousKey_Credit drop constraint FKADC940032D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_CREDIT" not found; SQL statement:
+alter table PolytomousKey_Credit drop constraint FKADC940089D97CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_CREDIT_AUD" not found; SQL statement:
+alter table PolytomousKey_Credit_AUD drop constraint FK629EC1D134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_EXTENSION" not found; SQL statement:
+alter table PolytomousKey_Extension drop constraint FKAE34C1D8927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_EXTENSION" not found; SQL statement:
+alter table PolytomousKey_Extension drop constraint FKAE34C1D889D97CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_EXTENSION_AUD" not found; SQL statement:
+alter table PolytomousKey_Extension_AUD drop constraint FK1FFC43A934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_IDENTIFIER" not found; SQL statement:
+alter table PolytomousKey_Identifier drop constraint FK23C5BA30E12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_IDENTIFIER" not found; SQL statement:
+alter table PolytomousKey_Identifier drop constraint FK23C5BA3089D97CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_IDENTIFIER_AUD" not found; SQL statement:
+alter table PolytomousKey_Identifier_AUD drop constraint FKF929500134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_MARKER" not found; SQL statement:
+alter table PolytomousKey_Marker drop constraint FK1B037D41777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_MARKER" not found; SQL statement:
+alter table PolytomousKey_Marker drop constraint FK1B037D4189D97CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_MARKER_AUD" not found; SQL statement:
+alter table PolytomousKey_Marker_AUD drop constraint FKC6BD229234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_NAMEDAREA" not found; SQL statement:
+alter table PolytomousKey_NamedArea drop constraint FK1C727CFF3FF8E7B2 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_NAMEDAREA" not found; SQL statement:
+alter table PolytomousKey_NamedArea drop constraint FK1C727CFF89D97CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_NAMEDAREA_AUD" not found; SQL statement:
+alter table PolytomousKey_NamedArea_AUD drop constraint FK750A135034869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table PolytomousKey_OriginalSourceBase drop constraint FK839208C43A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table PolytomousKey_OriginalSourceBase drop constraint FK839208C489D97CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table PolytomousKey_OriginalSourceBase_AUD drop constraint FKE644349534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_RIGHTSINFO" not found; SQL statement:
+alter table PolytomousKey_RightsInfo drop constraint FK328DA4ACC13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_RIGHTSINFO" not found; SQL statement:
+alter table PolytomousKey_RightsInfo drop constraint FK328DA4AC89D97CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_RIGHTSINFO_AUD" not found; SQL statement:
+alter table PolytomousKey_RightsInfo_AUD drop constraint FK34BF9C7D34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_SCOPE" not found; SQL statement:
+alter table PolytomousKey_Scope drop constraint FK8D97986D5431B96E [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_SCOPE" not found; SQL statement:
+alter table PolytomousKey_Scope drop constraint FK8D97986D89D97CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_SCOPE_AUD" not found; SQL statement:
+alter table PolytomousKey_Scope_AUD drop constraint FK4E37C7BE34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_TAXON" not found; SQL statement:
+alter table PolytomousKey_Taxon drop constraint FK8DA4E8E3DE9A3E39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_TAXON" not found; SQL statement:
+alter table PolytomousKey_Taxon drop constraint FK8DA4E8E389D97CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_TAXONBASE" not found; SQL statement:
+alter table PolytomousKey_TaxonBase drop constraint FKED8F3A547C3D0017 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_TAXONBASE" not found; SQL statement:
+alter table PolytomousKey_TaxonBase drop constraint FKED8F3A5489D97CB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_TAXONBASE_AUD" not found; SQL statement:
+alter table PolytomousKey_TaxonBase_AUD drop constraint FKC42E1E2534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "POLYTOMOUSKEY_TAXON_AUD" not found; SQL statement:
+alter table PolytomousKey_Taxon_AUD drop constraint FKED9BED3434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PRIMER" not found; SQL statement:
+alter table Primer drop constraint FK8EFB89F34FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PRIMER" not found; SQL statement:
+alter table Primer drop constraint FK8EFB89F3BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PRIMER" not found; SQL statement:
+alter table Primer drop constraint FK8EFB89F36D2CE418 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PRIMER" not found; SQL statement:
+alter table Primer drop constraint FK8EFB89F3D0374392 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PRIMER_AUD" not found; SQL statement:
+alter table Primer_AUD drop constraint FK319B864434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PRIMER_ANNOTATION" not found; SQL statement:
+alter table Primer_Annotation drop constraint FK9044ED1B1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PRIMER_ANNOTATION" not found; SQL statement:
+alter table Primer_Annotation drop constraint FK9044ED1B48BD1F55 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PRIMER_ANNOTATION_AUD" not found; SQL statement:
+alter table Primer_Annotation_AUD drop constraint FKDBAF156C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PRIMER_MARKER" not found; SQL statement:
+alter table Primer_Marker drop constraint FKF6C76C26777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PRIMER_MARKER" not found; SQL statement:
+alter table Primer_Marker drop constraint FKF6C76C2648BD1F55 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "PRIMER_MARKER_AUD" not found; SQL statement:
+alter table Primer_Marker_AUD drop constraint FK2F7516F734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE" not found; SQL statement:
+alter table Reference drop constraint FK404D5F2B4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE" not found; SQL statement:
+alter table Reference drop constraint FK404D5F2BBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE" not found; SQL statement:
+alter table Reference drop constraint FK404D5F2BD741CE1F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE" not found; SQL statement:
+alter table Reference drop constraint FK404D5F2BAD54327F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE" not found; SQL statement:
+alter table Reference drop constraint FK404D5F2B403E17F4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE" not found; SQL statement:
+alter table Reference drop constraint FK404D5F2BAEC3B8B8 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_AUD" not found; SQL statement:
+alter table Reference_AUD drop constraint FK8F0FFF7C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_ANNOTATION" not found; SQL statement:
+alter table Reference_Annotation drop constraint FKFC824E31E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_ANNOTATION" not found; SQL statement:
+alter table Reference_Annotation drop constraint FKFC824E38D0FB4DA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_ANNOTATION_AUD" not found; SQL statement:
+alter table Reference_Annotation_AUD drop constraint FKF3C1293434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_CREDIT" not found; SQL statement:
+alter table Reference_Credit drop constraint FK5BC6DEAD32D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_CREDIT" not found; SQL statement:
+alter table Reference_Credit drop constraint FK5BC6DEAD8D0FB4DA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_CREDIT_AUD" not found; SQL statement:
+alter table Reference_Credit_AUD drop constraint FK4AD9EDFE34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_EXTENSION" not found; SQL statement:
+alter table Reference_Extension drop constraint FKDEFCDC0B927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_EXTENSION" not found; SQL statement:
+alter table Reference_Extension drop constraint FKDEFCDC0B8D0FB4DA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_EXTENSION_AUD" not found; SQL statement:
+alter table Reference_Extension_AUD drop constraint FK1DF60C5C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_IDENTIFIER" not found; SQL statement:
+alter table Reference_Identifier drop constraint FKC00E65DE12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_IDENTIFIER" not found; SQL statement:
+alter table Reference_Identifier drop constraint FKC00E65D8D0FB4DA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_IDENTIFIER_AUD" not found; SQL statement:
+alter table Reference_Identifier_AUD drop constraint FKBA689DAE34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_MARKER" not found; SQL statement:
+alter table Reference_Marker drop constraint FK6BEDC7EE777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_MARKER" not found; SQL statement:
+alter table Reference_Marker drop constraint FK6BEDC7EE8D0FB4DA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_MARKER_AUD" not found; SQL statement:
+alter table Reference_Marker_AUD drop constraint FKAEF84EBF34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_MEDIA" not found; SQL statement:
+alter table Reference_Media drop constraint FKBBEF5B0C2C29593 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_MEDIA" not found; SQL statement:
+alter table Reference_Media drop constraint FKBBEF5B08D0FB4DA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_MEDIA_AUD" not found; SQL statement:
+alter table Reference_Media_AUD drop constraint FK8318CB8134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table Reference_OriginalSourceBase drop constraint FKD3E8B7F13A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table Reference_OriginalSourceBase drop constraint FKD3E8B7F18D0FB4DA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table Reference_OriginalSourceBase_AUD drop constraint FKC025854234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_RIGHTSINFO" not found; SQL statement:
+alter table Reference_RightsInfo drop constraint FK1AC8D0D9C13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_RIGHTSINFO" not found; SQL statement:
+alter table Reference_RightsInfo drop constraint FK1AC8D0D98D0FB4DA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REFERENCE_RIGHTSINFO_AUD" not found; SQL statement:
+alter table Reference_RightsInfo_AUD drop constraint FKF5FEEA2A34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RELATIONSHIPTERMBASE_INVERSEREPRESENTATION" not found; SQL statement:
+alter table RelationshipTermBase_inverseRepresentation drop constraint FK98592F33473FB677 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RELATIONSHIPTERMBASE_INVERSEREPRESENTATION" not found; SQL statement:
+alter table RelationshipTermBase_inverseRepresentation drop constraint FK98592F33ECEEF4AF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RELATIONSHIPTERMBASE_INVERSEREPRESENTATION_AUD" not found; SQL statement:
+alter table RelationshipTermBase_inverseRepresentation_AUD drop constraint FK5D248B8434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REPRESENTATION" not found; SQL statement:
+alter table Representation drop constraint FK9C4724ED4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REPRESENTATION" not found; SQL statement:
+alter table Representation drop constraint FK9C4724EDBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REPRESENTATION" not found; SQL statement:
+alter table Representation drop constraint FK9C4724EDE8D36B00 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REPRESENTATION_AUD" not found; SQL statement:
+alter table Representation_AUD drop constraint FK294D143E34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REPRESENTATION_ANNOTATION" not found; SQL statement:
+alter table Representation_Annotation drop constraint FK371091E11E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REPRESENTATION_ANNOTATION" not found; SQL statement:
+alter table Representation_Annotation drop constraint FK371091E147E8AE60 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REPRESENTATION_ANNOTATION_AUD" not found; SQL statement:
+alter table Representation_Annotation_AUD drop constraint FK36EEE73234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REPRESENTATION_MARKER" not found; SQL statement:
+alter table Representation_Marker drop constraint FK560063EC777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REPRESENTATION_MARKER" not found; SQL statement:
+alter table Representation_Marker drop constraint FK560063EC47E8AE60 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "REPRESENTATION_MARKER_AUD" not found; SQL statement:
+alter table Representation_Marker_AUD drop constraint FKD640BBBD34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO" not found; SQL statement:
+alter table RightsInfo drop constraint FK252273454FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO" not found; SQL statement:
+alter table RightsInfo drop constraint FK25227345BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO" not found; SQL statement:
+alter table RightsInfo drop constraint FK25227345E8D36B00 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO" not found; SQL statement:
+alter table RightsInfo drop constraint FK25227345F7976FC5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO" not found; SQL statement:
+alter table RightsInfo drop constraint FK25227345E6D2D338 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO_AUD" not found; SQL statement:
+alter table RightsInfo_AUD drop constraint FK1CA9769634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO_ANNOTATION" not found; SQL statement:
+alter table RightsInfo_Annotation drop constraint FKECC95C891E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO_ANNOTATION" not found; SQL statement:
+alter table RightsInfo_Annotation drop constraint FKECC95C89EFE62333 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO_ANNOTATION_AUD" not found; SQL statement:
+alter table RightsInfo_Annotation_AUD drop constraint FK78721DDA34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO_MARKER" not found; SQL statement:
+alter table RightsInfo_Marker drop constraint FK81D8C294777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO_MARKER" not found; SQL statement:
+alter table RightsInfo_Marker drop constraint FK81D8C294EFE62333 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "RIGHTSINFO_MARKER_AUD" not found; SQL statement:
+alter table RightsInfo_Marker_AUD drop constraint FK8BF9866534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE" not found; SQL statement:
+alter table Sequence drop constraint FK544ADBE14FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE" not found; SQL statement:
+alter table Sequence drop constraint FK544ADBE1BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE" not found; SQL statement:
+alter table Sequence drop constraint FK544ADBE19F65E72B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE" not found; SQL statement:
+alter table Sequence drop constraint FK544ADBE16D2CE418 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE" not found; SQL statement:
+alter table Sequence drop constraint FK544ADBE1E671A9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE_AUD" not found; SQL statement:
+alter table Sequence_AUD drop constraint FK39F4313234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE_ANNOTATION" not found; SQL statement:
+alter table Sequence_Annotation drop constraint FK1010BA6D1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE_ANNOTATION" not found; SQL statement:
+alter table Sequence_Annotation drop constraint FK1010BA6DD57FFDD5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE_ANNOTATION_AUD" not found; SQL statement:
+alter table Sequence_Annotation_AUD drop constraint FKCB4FE9BE34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE_MARKER" not found; SQL statement:
+alter table Sequence_Marker drop constraint FK3D22B278777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE_MARKER" not found; SQL statement:
+alter table Sequence_Marker drop constraint FK3D22B278D57FFDD5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE_MARKER_AUD" not found; SQL statement:
+alter table Sequence_Marker_AUD drop constraint FKAF40E44934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE_REFERENCE" not found; SQL statement:
+alter table Sequence_Reference drop constraint FK6944904D1DDDC219 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE_REFERENCE" not found; SQL statement:
+alter table Sequence_Reference drop constraint FK6944904DD57FFDD5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SEQUENCE_REFERENCE_AUD" not found; SQL statement:
+alter table Sequence_Reference_AUD drop constraint FK18E5CF9E34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD" not found; SQL statement:
+alter table SingleRead drop constraint FKAD45CA1E4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD" not found; SQL statement:
+alter table SingleRead drop constraint FKAD45CA1EBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD" not found; SQL statement:
+alter table SingleRead drop constraint FKAD45CA1E3DA462D5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD" not found; SQL statement:
+alter table SingleRead drop constraint FKAD45CA1ED320A65F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD" not found; SQL statement:
+alter table SingleRead drop constraint FKAD45CA1EE0EBCFFE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD" not found; SQL statement:
+alter table SingleRead drop constraint FKAD45CA1E55DDFE96 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD" not found; SQL statement:
+alter table SingleRead drop constraint FKAD45CA1E48BD1F55 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREADALIGNMENT" not found; SQL statement:
+alter table SingleReadAlignment drop constraint FKE50A79654FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREADALIGNMENT" not found; SQL statement:
+alter table SingleReadAlignment drop constraint FKE50A7965BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREADALIGNMENT" not found; SQL statement:
+alter table SingleReadAlignment drop constraint FKE50A7965ECE53A6A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREADALIGNMENT" not found; SQL statement:
+alter table SingleReadAlignment drop constraint FKE50A79653A5A5E15 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREADALIGNMENT_AUD" not found; SQL statement:
+alter table SingleReadAlignment_AUD drop constraint FKFEE16CB634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD_AUD" not found; SQL statement:
+alter table SingleRead_AUD drop constraint FKA323B8EF34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD_ANNOTATION" not found; SQL statement:
+alter table SingleRead_Annotation drop constraint FK33E974101E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD_ANNOTATION" not found; SQL statement:
+alter table SingleRead_Annotation drop constraint FK33E974103A5A5E15 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD_ANNOTATION_AUD" not found; SQL statement:
+alter table SingleRead_Annotation_AUD drop constraint FK7B1D19E134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD_MARKER" not found; SQL statement:
+alter table SingleRead_Marker drop constraint FKCF47B59B777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD_MARKER" not found; SQL statement:
+alter table SingleRead_Marker drop constraint FKCF47B59B3A5A5E15 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SINGLEREAD_MARKER_AUD" not found; SQL statement:
+alter table SingleRead_Marker_AUD drop constraint FKD3199DEC34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA32724FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA3272BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA3272F53E6AFA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA32728C35BD07 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA3272E35D77A3 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA3272EB62BE9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA3272156CF96 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA3272C8505DB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA32727CC340C5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA327295CC5995 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA32724FF2F98B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA3272F95F225A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase drop constraint FK21CA3272DADF76EA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_AUD" not found; SQL statement:
+alter table SpecimenOrObservationBase_AUD drop constraint FKF3D3D74334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_ANNOTATION" not found; SQL statement:
+alter table SpecimenOrObservationBase_Annotation drop constraint FK365E4F3C1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_ANNOTATION" not found; SQL statement:
+alter table SpecimenOrObservationBase_Annotation drop constraint FK365E4F3C3B8A5ABA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD" not found; SQL statement:
+alter table SpecimenOrObservationBase_Annotation_AUD drop constraint FK34187F0D34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_CREDIT" not found; SQL statement:
+alter table SpecimenOrObservationBase_Credit drop constraint FK7E3A1D8632D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_CREDIT" not found; SQL statement:
+alter table SpecimenOrObservationBase_Credit drop constraint FK7E3A1D863B8A5ABA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_CREDIT_AUD" not found; SQL statement:
+alter table SpecimenOrObservationBase_Credit_AUD drop constraint FK7170185734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT" not found; SQL statement:
+alter table SpecimenOrObservationBase_DerivationEvent drop constraint FK20132036BD59A1AD [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT" not found; SQL statement:
+alter table SpecimenOrObservationBase_DerivationEvent drop constraint FK2013203654C216AA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD" not found; SQL statement:
+alter table SpecimenOrObservationBase_DerivationEvent_AUD drop constraint FKA4A8430734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_EXTENSION" not found; SQL statement:
+alter table SpecimenOrObservationBase_Extension drop constraint FKE03B8292927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_EXTENSION" not found; SQL statement:
+alter table SpecimenOrObservationBase_Extension drop constraint FKE03B82923B8A5ABA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_EXTENSION_AUD" not found; SQL statement:
+alter table SpecimenOrObservationBase_Extension_AUD drop constraint FK7AE0176334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_IDENTIFIER" not found; SQL statement:
+alter table SpecimenOrObservationBase_Identifier drop constraint FK329710B6E12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_IDENTIFIER" not found; SQL statement:
+alter table SpecimenOrObservationBase_Identifier drop constraint FK329710B63B8A5ABA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD" not found; SQL statement:
+alter table SpecimenOrObservationBase_Identifier_AUD drop constraint FKFABFF38734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_LANGUAGESTRING" not found; SQL statement:
+alter table SpecimenOrObservationBase_LanguageString drop constraint FKCFAA9316CD55E0D6 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_LANGUAGESTRING" not found; SQL statement:
+alter table SpecimenOrObservationBase_LanguageString drop constraint FKCFAA93168028C309 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_LANGUAGESTRING" not found; SQL statement:
+alter table SpecimenOrObservationBase_LanguageString drop constraint FKCFAA93163B8A5ABA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD" not found; SQL statement:
+alter table SpecimenOrObservationBase_LanguageString_AUD drop constraint FK38B45E734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_MARKER" not found; SQL statement:
+alter table SpecimenOrObservationBase_Marker drop constraint FK8E6106C7777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_MARKER" not found; SQL statement:
+alter table SpecimenOrObservationBase_Marker drop constraint FK8E6106C73B8A5ABA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_MARKER_AUD" not found; SQL statement:
+alter table SpecimenOrObservationBase_Marker_AUD drop constraint FKD58E791834869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase_OriginalSourceBase drop constraint FKCA7F794A3A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table SpecimenOrObservationBase_OriginalSourceBase drop constraint FKCA7F794A3B8A5ABA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table SpecimenOrObservationBase_OriginalSourceBase_AUD drop constraint FK2059F21B34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_RIGHTSINFO" not found; SQL statement:
+alter table SpecimenOrObservationBase_RightsInfo drop constraint FK415EFB32C13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_RIGHTSINFO" not found; SQL statement:
+alter table SpecimenOrObservationBase_RightsInfo drop constraint FK415EFB323B8A5ABA [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD" not found; SQL statement:
+alter table SpecimenOrObservationBase_RightsInfo_AUD drop constraint FK3656400334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA" not found; SQL statement:
+alter table StateData drop constraint FKFB1697BB4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA" not found; SQL statement:
+alter table StateData drop constraint FKFB1697BBBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA" not found; SQL statement:
+alter table StateData drop constraint FKFB1697BB9D97028B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA" not found; SQL statement:
+alter table StateData drop constraint FKFB1697BB682A4E4B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA_AUD" not found; SQL statement:
+alter table StateData_AUD drop constraint FKDA6A700C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA_DEFINEDTERMBASE" not found; SQL statement:
+alter table StateData_DefinedTermBase drop constraint FK107321E2F4E35BCD [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA_DEFINEDTERMBASE" not found; SQL statement:
+alter table StateData_DefinedTermBase drop constraint FK107321E28E7BF9AB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA_DEFINEDTERMBASE_AUD" not found; SQL statement:
+alter table StateData_DefinedTermBase_AUD drop constraint FK7C978EB334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA_LANGUAGESTRING" not found; SQL statement:
+alter table StateData_LanguageString drop constraint FK93FFD2ADF05D08D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA_LANGUAGESTRING" not found; SQL statement:
+alter table StateData_LanguageString drop constraint FK93FFD2AD9682414B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA_LANGUAGESTRING" not found; SQL statement:
+alter table StateData_LanguageString drop constraint FK93FFD2AD8E7BF9AB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATEDATA_LANGUAGESTRING_AUD" not found; SQL statement:
+alter table StateData_LanguageString_AUD drop constraint FK1578E1FE34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATISTICALMEASUREMENTVALUE" not found; SQL statement:
+alter table StatisticalMeasurementValue drop constraint FK2DCE02904FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATISTICALMEASUREMENTVALUE" not found; SQL statement:
+alter table StatisticalMeasurementValue drop constraint FK2DCE0290BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATISTICALMEASUREMENTVALUE" not found; SQL statement:
+alter table StatisticalMeasurementValue drop constraint FK2DCE029084A26F69 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATISTICALMEASUREMENTVALUE" not found; SQL statement:
+alter table StatisticalMeasurementValue drop constraint FK2DCE02904C428112 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATISTICALMEASUREMENTVALUE_AUD" not found; SQL statement:
+alter table StatisticalMeasurementValue_AUD drop constraint FKBB16686134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE" not found; SQL statement:
+alter table StatisticalMeasurementValue_DefinedTermBase drop constraint FK686C42B7F4E35BCD [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE" not found; SQL statement:
+alter table StatisticalMeasurementValue_DefinedTermBase drop constraint FK686C42B75C9F4F2B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD" not found; SQL statement:
+alter table StatisticalMeasurementValue_DefinedTermBase_AUD drop constraint FKFEBA3D0834869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP" not found; SQL statement:
+alter table SynonymRelationship drop constraint FKF483ADB34FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP" not found; SQL statement:
+alter table SynonymRelationship drop constraint FKF483ADB3BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP" not found; SQL statement:
+alter table SynonymRelationship drop constraint FKF483ADB3AEB7F3BE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP" not found; SQL statement:
+alter table SynonymRelationship drop constraint FKF483ADB34BAC703F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP" not found; SQL statement:
+alter table SynonymRelationship drop constraint FKF483ADB3F8991B9D [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP" not found; SQL statement:
+alter table SynonymRelationship drop constraint FKF483ADB380924EEC [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP_AUD" not found; SQL statement:
+alter table SynonymRelationship_AUD drop constraint FK8AEBCA0434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP_ANNOTATION" not found; SQL statement:
+alter table SynonymRelationship_Annotation drop constraint FKF494F15B1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP_ANNOTATION" not found; SQL statement:
+alter table SynonymRelationship_Annotation drop constraint FKF494F15B260A8379 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP_ANNOTATION_AUD" not found; SQL statement:
+alter table SynonymRelationship_Annotation_AUD drop constraint FKD3E2F9AC34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP_MARKER" not found; SQL statement:
+alter table SynonymRelationship_Marker drop constraint FK7A439066777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP_MARKER" not found; SQL statement:
+alter table SynonymRelationship_Marker drop constraint FK7A439066260A8379 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "SYNONYMRELATIONSHIP_MARKER_AUD" not found; SQL statement:
+alter table SynonymRelationship_Marker_AUD drop constraint FK93C51B3734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE" not found; SQL statement:
+alter table TaxonBase drop constraint FK9249B49B4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE" not found; SQL statement:
+alter table TaxonBase drop constraint FK9249B49BBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE" not found; SQL statement:
+alter table TaxonBase drop constraint FK9249B49B8492378F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE" not found; SQL statement:
+alter table TaxonBase drop constraint FK9249B49B74FED214 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE" not found; SQL statement:
+alter table TaxonBase drop constraint FK9249B49B7C7B5AED [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_AUD" not found; SQL statement:
+alter table TaxonBase_AUD drop constraint FK37041CEC34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_ANNOTATION" not found; SQL statement:
+alter table TaxonBase_Annotation drop constraint FK41ED09731E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_ANNOTATION" not found; SQL statement:
+alter table TaxonBase_Annotation drop constraint FK41ED09739C9D39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_ANNOTATION_AUD" not found; SQL statement:
+alter table TaxonBase_Annotation_AUD drop constraint FK8C145C434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_CREDIT" not found; SQL statement:
+alter table TaxonBase_Credit drop constraint FK4CB48B3D32D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_CREDIT" not found; SQL statement:
+alter table TaxonBase_Credit drop constraint FK4CB48B3D9C9D39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_CREDIT_AUD" not found; SQL statement:
+alter table TaxonBase_Credit_AUD drop constraint FK7CFED28E34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_EXTENSION" not found; SQL statement:
+alter table TaxonBase_Extension drop constraint FKF961257B927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_EXTENSION" not found; SQL statement:
+alter table TaxonBase_Extension drop constraint FKF961257B9C9D39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_EXTENSION_AUD" not found; SQL statement:
+alter table TaxonBase_Extension_AUD drop constraint FK71381DCC34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_IDENTIFIER" not found; SQL statement:
+alter table TaxonBase_Identifier drop constraint FK3E25CAEDE12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_IDENTIFIER" not found; SQL statement:
+alter table TaxonBase_Identifier drop constraint FK3E25CAED9C9D39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_IDENTIFIER_AUD" not found; SQL statement:
+alter table TaxonBase_Identifier_AUD drop constraint FKCF68BA3E34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_MARKER" not found; SQL statement:
+alter table TaxonBase_Marker drop constraint FK5CDB747E777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_MARKER" not found; SQL statement:
+alter table TaxonBase_Marker drop constraint FK5CDB747E9C9D39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_MARKER_AUD" not found; SQL statement:
+alter table TaxonBase_Marker_AUD drop constraint FKE11D334F34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table TaxonBase_OriginalSourceBase drop constraint FKFB680C813A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table TaxonBase_OriginalSourceBase drop constraint FKFB680C819C9D39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table TaxonBase_OriginalSourceBase_AUD drop constraint FKB7C811D234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_RIGHTSINFO" not found; SQL statement:
+alter table TaxonBase_RightsInfo drop constraint FK4CEDB569C13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_RIGHTSINFO" not found; SQL statement:
+alter table TaxonBase_RightsInfo drop constraint FK4CEDB5699C9D39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONBASE_RIGHTSINFO_AUD" not found; SQL statement:
+alter table TaxonBase_RightsInfo_AUD drop constraint FKAFF06BA34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONINTERACTION_LANGUAGESTRING" not found; SQL statement:
+alter table TaxonInteraction_LanguageString drop constraint FK579A1DC02BEBA58D [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONINTERACTION_LANGUAGESTRING" not found; SQL statement:
+alter table TaxonInteraction_LanguageString drop constraint FK579A1DC028459272 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONINTERACTION_LANGUAGESTRING" not found; SQL statement:
+alter table TaxonInteraction_LanguageString drop constraint FK579A1DC086C86FE0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONINTERACTION_LANGUAGESTRING_AUD" not found; SQL statement:
+alter table TaxonInteraction_LanguageString_AUD drop constraint FK9E016B9134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE" not found; SQL statement:
+alter table TaxonNameBase drop constraint FKB4870C64FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE" not found; SQL statement:
+alter table TaxonNameBase drop constraint FKB4870C6BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE" not found; SQL statement:
+alter table TaxonNameBase drop constraint FKB4870C6BFEAE500 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE" not found; SQL statement:
+alter table TaxonNameBase drop constraint FKB4870C6617E62B3 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE" not found; SQL statement:
+alter table TaxonNameBase drop constraint FKB4870C6D7BE55A0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE" not found; SQL statement:
+alter table TaxonNameBase drop constraint FKB4870C6FBFA5597 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE" not found; SQL statement:
+alter table TaxonNameBase drop constraint FKB4870C681F5DBB0 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE" not found; SQL statement:
+alter table TaxonNameBase drop constraint FKB4870C6503B46C4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE" not found; SQL statement:
+alter table TaxonNameBase drop constraint FKB4870C63357BF63 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_AUD" not found; SQL statement:
+alter table TaxonNameBase_AUD drop constraint FK5CA2CB9734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_ANNOTATION" not found; SQL statement:
+alter table TaxonNameBase_Annotation drop constraint FK9E7794681E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_ANNOTATION" not found; SQL statement:
+alter table TaxonNameBase_Annotation drop constraint FK9E7794688C85CF94 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_ANNOTATION_AUD" not found; SQL statement:
+alter table TaxonNameBase_Annotation_AUD drop constraint FKB6734E3934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_CREDIT" not found; SQL statement:
+alter table TaxonNameBase_Credit drop constraint FK29BCD8B232D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_CREDIT" not found; SQL statement:
+alter table TaxonNameBase_Credit drop constraint FK29BCD8B28C85CF94 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_CREDIT_AUD" not found; SQL statement:
+alter table TaxonNameBase_Credit_AUD drop constraint FKD9895D8334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_EXTENSION" not found; SQL statement:
+alter table TaxonNameBase_Extension drop constraint FKC28EE7E6927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_EXTENSION" not found; SQL statement:
+alter table TaxonNameBase_Extension drop constraint FKC28EE7E68C85CF94 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_EXTENSION_AUD" not found; SQL statement:
+alter table TaxonNameBase_Extension_AUD drop constraint FK8F98B2B734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_IDENTIFIER" not found; SQL statement:
+alter table TaxonNameBase_Identifier drop constraint FK9AB055E2E12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_IDENTIFIER" not found; SQL statement:
+alter table TaxonNameBase_Identifier drop constraint FK9AB055E28C85CF94 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_IDENTIFIER_AUD" not found; SQL statement:
+alter table TaxonNameBase_Identifier_AUD drop constraint FK7D1AC2B334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_MARKER" not found; SQL statement:
+alter table TaxonNameBase_Marker drop constraint FK39E3C1F3777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_MARKER" not found; SQL statement:
+alter table TaxonNameBase_Marker drop constraint FK39E3C1F38C85CF94 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_MARKER_AUD" not found; SQL statement:
+alter table TaxonNameBase_Marker_AUD drop constraint FK3DA7BE4434869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_NOMENCLATURALSTATUS" not found; SQL statement:
+alter table TaxonNameBase_NomenclaturalStatus drop constraint FK560BA7926615E90D [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_NOMENCLATURALSTATUS" not found; SQL statement:
+alter table TaxonNameBase_NomenclaturalStatus drop constraint FK560BA7928C85CF94 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_NOMENCLATURALSTATUS_AUD" not found; SQL statement:
+alter table TaxonNameBase_NomenclaturalStatus_AUD drop constraint FK9215BC6334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table TaxonNameBase_OriginalSourceBase drop constraint FKF746D2763A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table TaxonNameBase_OriginalSourceBase drop constraint FKF746D2768C85CF94 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table TaxonNameBase_OriginalSourceBase_AUD drop constraint FK7A38D54734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_RIGHTSINFO" not found; SQL statement:
+alter table TaxonNameBase_RightsInfo drop constraint FKA978405EC13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_RIGHTSINFO" not found; SQL statement:
+alter table TaxonNameBase_RightsInfo drop constraint FKA978405E8C85CF94 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_RIGHTSINFO_AUD" not found; SQL statement:
+alter table TaxonNameBase_RightsInfo_AUD drop constraint FKB8B10F2F34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_TYPEDESIGNATIONBASE" not found; SQL statement:
+alter table TaxonNameBase_TypeDesignationBase drop constraint FKC0D6BBB5C7DF530C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_TYPEDESIGNATIONBASE" not found; SQL statement:
+alter table TaxonNameBase_TypeDesignationBase drop constraint FKC0D6BBB58C85CF94 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNAMEBASE_TYPEDESIGNATIONBASE_AUD" not found; SQL statement:
+alter table TaxonNameBase_TypeDesignationBase_AUD drop constraint FKBB24070634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE" not found; SQL statement:
+alter table TaxonNode drop constraint FK924F5BCC4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE" not found; SQL statement:
+alter table TaxonNode drop constraint FK924F5BCCBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE" not found; SQL statement:
+alter table TaxonNode drop constraint FK924F5BCC84A3CE1B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE" not found; SQL statement:
+alter table TaxonNode drop constraint FK924F5BCC39DB2DFB [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE" not found; SQL statement:
+alter table TaxonNode drop constraint FK924F5BCC381381B5 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE" not found; SQL statement:
+alter table TaxonNode drop constraint FK924F5BCCCC05993E [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE" not found; SQL statement:
+alter table TaxonNode drop constraint FK924F5BCCDE9A3E39 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION" not found; SQL statement:
+alter table TaxonNodeAgentRelation drop constraint FK28D12BB54FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION" not found; SQL statement:
+alter table TaxonNodeAgentRelation drop constraint FK28D12BB5BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION" not found; SQL statement:
+alter table TaxonNodeAgentRelation drop constraint FK28D12BB58EB3A8A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION" not found; SQL statement:
+alter table TaxonNodeAgentRelation drop constraint FK28D12BB5927D8399 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION" not found; SQL statement:
+alter table TaxonNodeAgentRelation drop constraint FK28D12BB5E67FC44F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION_AUD" not found; SQL statement:
+alter table TaxonNodeAgentRelation_AUD drop constraint FKC066770634869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION_ANNOTATION" not found; SQL statement:
+alter table TaxonNodeAgentRelation_Annotation drop constraint FK7CEFFE191E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION_ANNOTATION" not found; SQL statement:
+alter table TaxonNodeAgentRelation_Annotation drop constraint FK7CEFFE193F9CAA9B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION_ANNOTATION_AUD" not found; SQL statement:
+alter table TaxonNodeAgentRelation_Annotation_AUD drop constraint FK6A4D776A34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION_MARKER" not found; SQL statement:
+alter table TaxonNodeAgentRelation_Marker drop constraint FKE92EAC24777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION_MARKER" not found; SQL statement:
+alter table TaxonNodeAgentRelation_Marker drop constraint FKE92EAC243F9CAA9B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODEAGENTRELATION_MARKER_AUD" not found; SQL statement:
+alter table TaxonNodeAgentRelation_Marker_AUD drop constraint FK1C2027F534869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE_AUD" not found; SQL statement:
+alter table TaxonNode_AUD drop constraint FKE090C39D34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE_ANNOTATION" not found; SQL statement:
+alter table TaxonNode_Annotation drop constraint FKD8A9A9A21E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE_ANNOTATION" not found; SQL statement:
+alter table TaxonNode_Annotation drop constraint FKD8A9A9A2927D8399 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE_ANNOTATION_AUD" not found; SQL statement:
+alter table TaxonNode_Annotation_AUD drop constraint FKB2C4367334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE_MARKER" not found; SQL statement:
+alter table TaxonNode_Marker drop constraint FK395842D777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE_MARKER" not found; SQL statement:
+alter table TaxonNode_Marker drop constraint FK395842D927D8399 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONNODE_MARKER_AUD" not found; SQL statement:
+alter table TaxonNode_Marker_AUD drop constraint FK77D9D37E34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP" not found; SQL statement:
+alter table TaxonRelationship drop constraint FK7482BA024FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP" not found; SQL statement:
+alter table TaxonRelationship drop constraint FK7482BA02BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP" not found; SQL statement:
+alter table TaxonRelationship drop constraint FK7482BA02AEB7F3BE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP" not found; SQL statement:
+alter table TaxonRelationship drop constraint FK7482BA02E71EF6CE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP" not found; SQL statement:
+alter table TaxonRelationship drop constraint FK7482BA02F8991B9D [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP" not found; SQL statement:
+alter table TaxonRelationship drop constraint FK7482BA02F11BD77B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP_AUD" not found; SQL statement:
+alter table TaxonRelationship_AUD drop constraint FKA0DE16D334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP_ANNOTATION" not found; SQL statement:
+alter table TaxonRelationship_Annotation drop constraint FK82C86DAC1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP_ANNOTATION" not found; SQL statement:
+alter table TaxonRelationship_Annotation drop constraint FK82C86DAC2BD180D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP_ANNOTATION_AUD" not found; SQL statement:
+alter table TaxonRelationship_Annotation_AUD drop constraint FKE86DE57D34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP_MARKER" not found; SQL statement:
+alter table TaxonRelationship_Marker drop constraint FK69FBDD37777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP_MARKER" not found; SQL statement:
+alter table TaxonRelationship_Marker drop constraint FK69FBDD372BD180D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TAXONRELATIONSHIP_MARKER_AUD" not found; SQL statement:
+alter table TaxonRelationship_Marker_AUD drop constraint FK21F8978834869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY" not found; SQL statement:
+alter table TermVocabulary drop constraint FK487AA6924FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY" not found; SQL statement:
+alter table TermVocabulary drop constraint FK487AA692BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_AUD" not found; SQL statement:
+alter table TermVocabulary_AUD drop constraint FKA6ED3B6334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_ANNOTATION" not found; SQL statement:
+alter table TermVocabulary_Annotation drop constraint FK76D2071C1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_ANNOTATION" not found; SQL statement:
+alter table TermVocabulary_Annotation drop constraint FK76D2071C258E060 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_ANNOTATION_AUD" not found; SQL statement:
+alter table TermVocabulary_Annotation_AUD drop constraint FK222D46ED34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_CREDIT" not found; SQL statement:
+alter table TermVocabulary_Credit drop constraint FK7604C56632D1B9F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_CREDIT" not found; SQL statement:
+alter table TermVocabulary_Credit drop constraint FK7604C566258E060 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_CREDIT_AUD" not found; SQL statement:
+alter table TermVocabulary_Credit_AUD drop constraint FKB1E3D03734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_EXTENSION" not found; SQL statement:
+alter table TermVocabulary_Extension drop constraint FKA8814EB2927DE9DF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_EXTENSION" not found; SQL statement:
+alter table TermVocabulary_Extension drop constraint FKA8814EB2258E060 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_EXTENSION_AUD" not found; SQL statement:
+alter table TermVocabulary_Extension_AUD drop constraint FKD522D38334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_IDENTIFIER" not found; SQL statement:
+alter table TermVocabulary_Identifier drop constraint FK730AC896E12073FF [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_IDENTIFIER" not found; SQL statement:
+alter table TermVocabulary_Identifier drop constraint FK730AC896258E060 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_IDENTIFIER_AUD" not found; SQL statement:
+alter table TermVocabulary_Identifier_AUD drop constraint FKE8D4BB6734869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_MARKER" not found; SQL statement:
+alter table TermVocabulary_Marker drop constraint FK862BAEA7777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_MARKER" not found; SQL statement:
+alter table TermVocabulary_Marker drop constraint FK862BAEA7258E060 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_MARKER_AUD" not found; SQL statement:
+alter table TermVocabulary_Marker_AUD drop constraint FK160230F834869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table TermVocabulary_OriginalSourceBase drop constraint FK8F2D512A3A6735D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_ORIGINALSOURCEBASE" not found; SQL statement:
+alter table TermVocabulary_OriginalSourceBase drop constraint FK8F2D512A258E060 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_ORIGINALSOURCEBASE_AUD" not found; SQL statement:
+alter table TermVocabulary_OriginalSourceBase_AUD drop constraint FKA898D9FB34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_REPRESENTATION" not found; SQL statement:
+alter table TermVocabulary_Representation drop constraint FKA408B63AB31C4747 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_REPRESENTATION" not found; SQL statement:
+alter table TermVocabulary_Representation drop constraint FKA408B63A258E060 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_REPRESENTATION_AUD" not found; SQL statement:
+alter table TermVocabulary_Representation_AUD drop constraint FK681B370B34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_RIGHTSINFO" not found; SQL statement:
+alter table TermVocabulary_RightsInfo drop constraint FK81D2B312C13F7B21 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_RIGHTSINFO" not found; SQL statement:
+alter table TermVocabulary_RightsInfo drop constraint FK81D2B312258E060 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TERMVOCABULARY_RIGHTSINFO_AUD" not found; SQL statement:
+alter table TermVocabulary_RightsInfo_AUD drop constraint FK246B07E334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE" not found; SQL statement:
+alter table TypeDesignationBase drop constraint FK8AC9DCAE4FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE" not found; SQL statement:
+alter table TypeDesignationBase drop constraint FK8AC9DCAEBC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE" not found; SQL statement:
+alter table TypeDesignationBase drop constraint FK8AC9DCAEAEB7F3BE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE" not found; SQL statement:
+alter table TypeDesignationBase drop constraint FK8AC9DCAE9E3ED08 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE" not found; SQL statement:
+alter table TypeDesignationBase drop constraint FK8AC9DCAE4CB0F315 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE" not found; SQL statement:
+alter table TypeDesignationBase drop constraint FK8AC9DCAEFBFA41D9 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE_AUD" not found; SQL statement:
+alter table TypeDesignationBase_AUD drop constraint FK243C037F34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE_ANNOTATION" not found; SQL statement:
+alter table TypeDesignationBase_Annotation drop constraint FK4D7327801E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE_ANNOTATION" not found; SQL statement:
+alter table TypeDesignationBase_Annotation drop constraint FK4D73278044E9E6D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE_ANNOTATION_AUD" not found; SQL statement:
+alter table TypeDesignationBase_Annotation_AUD drop constraint FK88BF955134869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE_MARKER" not found; SQL statement:
+alter table TypeDesignationBase_Marker drop constraint FKB914A10B777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE_MARKER" not found; SQL statement:
+alter table TypeDesignationBase_Marker drop constraint FKB914A10B44E9E6D4 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "TYPEDESIGNATIONBASE_MARKER_AUD" not found; SQL statement:
+alter table TypeDesignationBase_Marker_AUD drop constraint FKECA3515C34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "USERACCOUNT" not found; SQL statement:
+alter table UserAccount drop constraint FKB3F13C24FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "USERACCOUNT" not found; SQL statement:
+alter table UserAccount drop constraint FKB3F13C2AAC1B820 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "USERACCOUNT_AUD" not found; SQL statement:
+alter table UserAccount_AUD drop constraint FK6A57909334869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "USERACCOUNT_GRANTEDAUTHORITYIMPL" not found; SQL statement:
+alter table UserAccount_GrantedAuthorityImpl drop constraint FKFD724D851857F6C2 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "USERACCOUNT_GRANTEDAUTHORITYIMPL" not found; SQL statement:
+alter table UserAccount_GrantedAuthorityImpl drop constraint FKFD724D855EA5DD89 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "USERACCOUNT_PERMISSIONGROUP" not found; SQL statement:
+alter table UserAccount_PermissionGroup drop constraint FK812DE753DA9DCB5F [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "USERACCOUNT_PERMISSIONGROUP" not found; SQL statement:
+alter table UserAccount_PermissionGroup drop constraint FK812DE753887E3D12 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET" not found; SQL statement:
+alter table WorkingSet drop constraint FK668D5B914FF2DB2C [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET" not found; SQL statement:
+alter table WorkingSet drop constraint FK668D5B91BC5DA539 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET" not found; SQL statement:
+alter table WorkingSet drop constraint FK668D5B9123DB7F04 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_AUD" not found; SQL statement:
+alter table WorkingSet_AUD drop constraint FK628F58E234869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_ANNOTATION" not found; SQL statement:
+alter table WorkingSet_Annotation drop constraint FKCBBA8CBD1E403E0B [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_ANNOTATION" not found; SQL statement:
+alter table WorkingSet_Annotation drop constraint FKCBBA8CBDBBD2C869 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_ANNOTATION_AUD" not found; SQL statement:
+alter table WorkingSet_Annotation_AUD drop constraint FK1E28140E34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_DESCRIPTIONBASE" not found; SQL statement:
+alter table WorkingSet_DescriptionBase drop constraint FK731CC81F33B8A841 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_DESCRIPTIONBASE" not found; SQL statement:
+alter table WorkingSet_DescriptionBase drop constraint FK731CC81FBBD2C869 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_DESCRIPTIONBASE_AUD" not found; SQL statement:
+alter table WorkingSet_DescriptionBase_AUD drop constraint FK8959CE7034869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_MARKER" not found; SQL statement:
+alter table WorkingSet_Marker drop constraint FK9CB22CC8777265A1 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_MARKER" not found; SQL statement:
+alter table WorkingSet_Marker drop constraint FK9CB22CC8BBD2C869 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_MARKER_AUD" not found; SQL statement:
+alter table WorkingSet_Marker_AUD drop constraint FK6AEAB69934869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_REPRESENTATION" not found; SQL statement:
+alter table WorkingSet_Representation drop constraint FKA003835BB31C4747 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_REPRESENTATION" not found; SQL statement:
+alter table WorkingSet_Representation drop constraint FKA003835BBBD2C869 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_REPRESENTATION_AUD" not found; SQL statement:
+alter table WorkingSet_Representation_AUD drop constraint FK21B88BAC34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_TAXONBASE" not found; SQL statement:
+alter table WorkingSet_TaxonBase drop constraint FK34EB896D7C3D0017 [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_TAXONBASE" not found; SQL statement:
+alter table WorkingSet_TaxonBase drop constraint FK34EB896DB4555A9A [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Table "WORKINGSET_TAXONBASE_AUD" not found; SQL statement:
+alter table WorkingSet_TaxonBase_AUD drop constraint FK582B38BE34869AAE [42102-170]
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table AgentBase add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Amplification add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table AmplificationResult add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Annotation add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table CdmMetaData add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Classification add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Collection add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Credit add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table DefinedTermBase add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table DerivationEvent add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table DescriptionBase add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table DescriptionElementBase add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table DeterminationEvent add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table DnaQuality add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table EntityConstraintViolation add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table EntityValidation add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Extension add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table FeatureNode add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:36 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table FeatureTree add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table GatheringEvent add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table GrantedAuthorityImpl add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table HomotypicalGroup add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table HybridRelationship add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Identifier add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table InstitutionalMembership add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table IntextReference add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table KeyStatement add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table LSIDAuthority add constraint _UniqueKey unique (uuid, authority) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table LanguageString add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Marker add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table MaterialOrMethodEvent add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Media add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table MediaRepresentation add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table MediaRepresentationPart add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table NameRelationship add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table NomenclaturalStatus add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table OriginalSourceBase add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table PermissionGroup add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table PolytomousKey add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table PolytomousKeyNode add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Primer add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Reference add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Representation add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table RightsInfo add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table Sequence add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table SingleRead add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table SingleReadAlignment add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table SpecimenOrObservationBase add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table StateData add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table StatisticalMeasurementValue add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table SynonymRelationship add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table TaxonBase add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table TaxonNameBase add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table TaxonNode add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table TaxonNodeAgentRelation add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table TaxonRelationship add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table TermVocabulary add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table TypeDesignationBase add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table UserAccount add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
+06-15 17:38:37 jdbc[2]: exception
+org.h2.jdbc.JdbcSQLException: Constraint "_UNIQUEKEY" already exists; SQL statement:
+alter table WorkingSet add constraint _UniqueKey unique (uuid) [90045-170]
+       at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
+       at org.h2.message.DbException.get(DbException.java:169)
+       at org.h2.message.DbException.get(DbException.java:146)
+       at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:89)
+       at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:68)
+       at org.h2.command.CommandContainer.update(CommandContainer.java:75)
+       at org.h2.command.Command.executeUpdate(Command.java:230)
+       at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:125)
+       at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
+       at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.perform(SchemaExport.java:418)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:375)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
+       at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
+       at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
+       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1781)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:247)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:373)
+       at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:358)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
+       at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
+       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.createBean(MonitoredListableBeanFactory.java:108)
+       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
+       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
+       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
+       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
+       at eu.etaxonomy.cdm.api.application.MonitoredListableBeanFactory.preInstantiateSingletons(MonitoredListableBeanFactory.java:71)
+       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.finishBeanFactoryInitialization(MonitoredGenericApplicationContext.java:74)
+       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
+       at eu.etaxonomy.cdm.api.application.MonitoredGenericApplicationContext.refresh(MonitoredGenericApplicationContext.java:102)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.setNewDataSource(CdmApplicationController.java:264)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.<init>(CdmApplicationController.java:204)
+       at eu.etaxonomy.cdm.api.application.CdmApplicationController.NewInstance(CdmApplicationController.java:148)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.getApplicationController(CdmStoreConnector.java:151)
+       at eu.etaxonomy.taxeditor.store.CdmStoreConnector.run(CdmStoreConnector.java:99)
+       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/imports/ABCDImport.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/imports/ABCDImport.xml
new file mode 100644 (file)
index 0000000..b97b0f1
--- /dev/null
@@ -0,0 +1,737 @@
+<?xml version="1.0"?>
+<abcd:DataSets xmlns:abcd="http://www.tdwg.org/schemas/abcd/2.06" xmlns:biocase="http://www.biocase.org/schemas/protocol/1.3" xmlns:ns1="http://www.dnabank-network.org/test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.biocase.org/schemas/protocol/1.3 http://www.bgbm.org/biodivinf/schema/protocol_1_31.xsd">
+      <abcd:DataSet>
+        <abcd:DatasetGUID>www.floraweb.de/florkart/atlas/2007</abcd:DatasetGUID>
+        <abcd:TechnicalContacts>
+          <abcd:TechnicalContact>
+            <abcd:Name>Rudolf May</abcd:Name>
+            <abcd:Email>rudolf.may@bfn.de</abcd:Email>
+            <abcd:Phone>+49-228-84911441</abcd:Phone>
+            <abcd:Address>BfN, Konstantinstr. 110, D-53179 Bonn</abcd:Address>
+          </abcd:TechnicalContact>
+        </abcd:TechnicalContacts>
+        <abcd:ContentContacts>
+          <abcd:ContentContact>
+            <abcd:Name>Rudolf May</abcd:Name>
+            <abcd:Email>rudolf.may@bfn.de</abcd:Email>
+            <abcd:Phone>+49-228-84911441</abcd:Phone>
+            <abcd:Address>BfN, Konstantinstr. 110, D-53179 Bonn</abcd:Address>
+          </abcd:ContentContact>
+        </abcd:ContentContacts>
+        <abcd:Metadata>
+          <abcd:Description>
+            <abcd:Representation abcd:language="GE German Deutsch">
+              <abcd:Title>FlorKart - FlorenKartierung Gefaesspflanzen</abcd:Title>
+              <abcd:Details>Verbreitung der Farn- und Bluetenpflanzen in Deutschland, Vorkommensnachweise aggregiert auf Rasterfelder der Topographischen Karte im Massstab 1 : 25000 (TK25 = MTB), Blattschnitt 6 x 10 Minuten, sowie in Zeitperioden 'vor 1950', '1950 - 1980', '1980 - 2000'</abcd:Details>
+              <abcd:Coverage>Deutschland</abcd:Coverage>
+              <abcd:URI>http://www.floraweb.de</abcd:URI>
+            </abcd:Representation>
+          </abcd:Description>
+          <abcd:IconURI>http://www.floraweb.de/images/floraweb.gif</abcd:IconURI>
+          <abcd:Version>
+            <abcd:Major>2007</abcd:Major>
+          </abcd:Version>
+          <abcd:RevisionData>
+            <abcd:Creators>Netzwerk Phytodiversitaet Deutschlands (NetPhyD) und Bundesamt f&#xFC;r Naturschutz (BfN)</abcd:Creators>
+            <abcd:Contributors>Alle ehrenamtlich an der Floristischen Kartierung Deutschlands beteiligten Mitarbeiter</abcd:Contributors>
+            <abcd:DateCreated>2007-01-01</abcd:DateCreated>
+            <abcd:DateModified>2010-01-01</abcd:DateModified>
+          </abcd:RevisionData>
+          <abcd:Owners>
+            <abcd:Owner>
+              <abcd:Organisation>
+                <abcd:Name>
+                  <abcd:Representation abcd:language="GE German Deutsch">
+                    <abcd:Text>Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversit&#xE4;t Deutschlands (NetPhyD)</abcd:Text>
+                    <abcd:Abbreviation>BfN/NetPhyD</abcd:Abbreviation>
+                  </abcd:Representation>
+                </abcd:Name>
+              </abcd:Organisation>
+              <abcd:Person>
+                <abcd:FullName>Rudolf May</abcd:FullName>
+              </abcd:Person>
+              <abcd:Roles>
+                <abcd:Role>Project Manager</abcd:Role>
+              </abcd:Roles>
+              <abcd:Addresses>
+                <abcd:Address>BfN, Konstantinstr. 110, D-53179 Bonn</abcd:Address>
+              </abcd:Addresses>
+              <abcd:TelephoneNumbers>
+                <abcd:TelephoneNumber>
+                  <abcd:Number>+49-228-84911441</abcd:Number>
+                  <abcd:Device>voice</abcd:Device>
+                </abcd:TelephoneNumber>
+              </abcd:TelephoneNumbers>
+              <abcd:EmailAddresses>
+                <abcd:EmailAddress>floraweb@bfn.de</abcd:EmailAddress>
+              </abcd:EmailAddresses>
+              <abcd:URIs>
+                <abcd:URL>http://www.bfn.de</abcd:URL>
+              </abcd:URIs>
+              <abcd:LogoURI>http://www.bfn.de/fileadmin/global/templates/images/logo_bfn.gif</abcd:LogoURI>
+            </abcd:Owner>
+          </abcd:Owners>
+          <abcd:IPRStatements>
+            <abcd:IPRDeclarations>
+              <abcd:IPRDeclaration abcd:language="GE German Deutsch">
+                <abcd:Text>Mitarbeiter der Floristischen Kartierung Deutschlands</abcd:Text>
+                <abcd:Details>Alle amtlich und ehrenamtlich an der Floristischen Kartierung Deutschlands beteiligten Mitarbeiter</abcd:Details>
+              </abcd:IPRDeclaration>
+            </abcd:IPRDeclarations>
+            <abcd:Copyrights>
+              <abcd:Copyright abcd:language="GE German Deutsch">
+                <abcd:Text>BfN/NetPhyD</abcd:Text>
+                <abcd:Details>Bundesamt fuer Naturschutz und Netzwerk Phytodiversitaet Deutschlands</abcd:Details>
+              </abcd:Copyright>
+            </abcd:Copyrights>
+            <abcd:TermsOfUseStatements>
+              <abcd:TermsOfUse abcd:language="GE German Deutsch">
+                <abcd:Text>Bei Verwendung in Publikationen bitte die Datenquelle vollstaendig zitieren.</abcd:Text>
+                <abcd:Details>Bei Verwendung in Publikationen bitte die Datenquelle vollstaendig zitieren.  Die Verwendung der Daten zu kommerziellen Zwecken wird untersagt.</abcd:Details>
+              </abcd:TermsOfUse>
+            </abcd:TermsOfUseStatements>
+            <abcd:Disclaimers>
+              <abcd:Disclaimer abcd:language="GE German Deutsch">
+                <abcd:Text>Fuer die Richtigkeit der Daten wird keine Gewaehrleistung uebernommen</abcd:Text>
+                <abcd:Details>Fuer die Richtigkeit der Daten wird keine Gewaehrleistung uebernommen</abcd:Details>
+              </abcd:Disclaimer>
+            </abcd:Disclaimers>
+            <abcd:Acknowledgements>
+              <abcd:Acknowledgement abcd:language="GE German Deutsch">
+                <abcd:Text>In Anerkennung der Leistungen der ehrenamtlichen Kartierer der Flora Deutschlands</abcd:Text>
+                <abcd:Details>Die Kompilation der Verbreitungsdaten beruht auf unentgeltlich erbrachten Kartierungsleistungen von &#xFC;ber 2000 ehrenamtlichen Mitarbeitern der Floristischen Kartierung Deutschlands, die in zahlreichen regionalen Kartierungsprojekten organisiert sind.</abcd:Details>
+                <abcd:URI>http://www.floraweb.de/pflanzenarten/hintergrundtexte_florkart_organisation.html</abcd:URI>
+              </abcd:Acknowledgement>
+            </abcd:Acknowledgements>
+            <abcd:Citations>
+              <abcd:Citation abcd:language="GE German Deutsch">
+                <abcd:Text>Datenbank FLORKART, BfN und NetPhyD</abcd:Text>
+                <abcd:Details>Datenbank FLORKART der Floristischen Kartierung Deutschlands, Stand 2007, Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversitaet Deutschland (NetPhyD)</abcd:Details>
+              </abcd:Citation>
+            </abcd:Citations>
+          </abcd:IPRStatements>
+        </abcd:Metadata>
+        <abcd:Units>
+          <abcd:Unit>
+            <abcd:SourceInstitutionID>BfN</abcd:SourceInstitutionID>
+            <abcd:SourceID>FlorKart_BfN</abcd:SourceID>
+            <abcd:UnitID>1003121</abcd:UnitID>
+            <abcd:UnitReferences>
+              <abcd:UnitReference>
+                <abcd:TitleCitation>Datenbank FLORKART, BfN und NetPhyD</abcd:TitleCitation>
+                <abcd:CitationDetail>Datenbank FLORKART der Floristischen Kartierung Deutschlands, Stand 2007, Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversitaet Deutschland (NetPhyD)</abcd:CitationDetail>
+              </abcd:UnitReference>
+            </abcd:UnitReferences>
+            <abcd:Identifications>
+              <abcd:Identification>
+                <abcd:Result>
+                  <abcd:TaxonIdentified>
+                    <abcd:HigherTaxa>
+                      <abcd:HigherTaxon>
+                        <abcd:HigherTaxonName>Asteraceae</abcd:HigherTaxonName>
+                      </abcd:HigherTaxon>
+                    </abcd:HigherTaxa>
+                    <abcd:ScientificName>
+                      <abcd:FullScientificNameString>Cichorium calvum Asch.</abcd:FullScientificNameString>
+                      <abcd:NameAtomised>
+                        <abcd:Botanical>
+                          <abcd:GenusOrMonomial>Cichorium</abcd:GenusOrMonomial>
+                          <abcd:FirstEpithet>calvum</abcd:FirstEpithet>
+                          <abcd:Rank>SPE</abcd:Rank>
+                          <abcd:AuthorTeamParenthesis>Asch.</abcd:AuthorTeamParenthesis>
+                        </abcd:Botanical>
+                      </abcd:NameAtomised>
+                    </abcd:ScientificName>
+                  </abcd:TaxonIdentified>
+                </abcd:Result>
+              </abcd:Identification>
+            </abcd:Identifications>
+            <abcd:Gathering>
+              <abcd:DateTime>
+                <abcd:DateText>1950-1980</abcd:DateText>
+                <abcd:PeriodExplicit>false</abcd:PeriodExplicit>
+              </abcd:DateTime>
+              <abcd:Agents>
+                <abcd:GatheringAgentsText>Mitarbeiter der Floristischen Kartierung Deutschlands</abcd:GatheringAgentsText>
+              </abcd:Agents>
+              <abcd:LocalityText>MTB 3915: Bockhorst</abcd:LocalityText>
+              <abcd:Country>
+                <abcd:Name language="German">Deutschland</abcd:Name>
+              </abcd:Country>
+              <abcd:SiteCoordinateSets>
+                <abcd:SiteCoordinates>
+                  <abcd:CoordinatesGrid>
+                    <abcd:GridCellSystem>German TK25</abcd:GridCellSystem>
+                    <abcd:GridCellCode>3915</abcd:GridCellCode>
+                  </abcd:CoordinatesGrid>
+                  <abcd:CoordinatesLatLong>
+                    <abcd:LongitudeDecimal>8.25</abcd:LongitudeDecimal>
+                    <abcd:LatitudeDecimal>52.06</abcd:LatitudeDecimal>
+                    <abcd:AccuracyStatement>Mittelpunkte von TK25-Rasterfeldern</abcd:AccuracyStatement>
+                    <abcd:CoordinateErrorDistanceInMeters>6363</abcd:CoordinateErrorDistanceInMeters>
+                  </abcd:CoordinatesLatLong>
+                </abcd:SiteCoordinates>
+              </abcd:SiteCoordinateSets>
+            </abcd:Gathering>
+          </abcd:Unit>
+          <abcd:Unit>
+            <abcd:SourceInstitutionID>BfN</abcd:SourceInstitutionID>
+            <abcd:SourceID>FlorKart_BfN</abcd:SourceID>
+            <abcd:UnitID>1003122</abcd:UnitID>
+            <abcd:UnitReferences>
+              <abcd:UnitReference>
+                <abcd:TitleCitation>Datenbank FLORKART, BfN und NetPhyD</abcd:TitleCitation>
+                <abcd:CitationDetail>Datenbank FLORKART der Floristischen Kartierung Deutschlands, Stand 2007, Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversitaet Deutschland (NetPhyD)</abcd:CitationDetail>
+              </abcd:UnitReference>
+            </abcd:UnitReferences>
+            <abcd:Identifications>
+              <abcd:Identification>
+                <abcd:Result>
+                  <abcd:TaxonIdentified>
+                    <abcd:HigherTaxa>
+                      <abcd:HigherTaxon>
+                        <abcd:HigherTaxonName>Asteraceae</abcd:HigherTaxonName>
+                      </abcd:HigherTaxon>
+                    </abcd:HigherTaxa>
+                    <abcd:ScientificName>
+                      <abcd:FullScientificNameString>Cichorium calvum Asch.</abcd:FullScientificNameString>
+                      <abcd:NameAtomised>
+                        <abcd:Botanical>
+                          <abcd:GenusOrMonomial>Cichorium</abcd:GenusOrMonomial>
+                          <abcd:FirstEpithet>calvum</abcd:FirstEpithet>
+                          <abcd:Rank>SPE</abcd:Rank>
+                          <abcd:AuthorTeamParenthesis>Asch.</abcd:AuthorTeamParenthesis>
+                        </abcd:Botanical>
+                      </abcd:NameAtomised>
+                    </abcd:ScientificName>
+                  </abcd:TaxonIdentified>
+                </abcd:Result>
+              </abcd:Identification>
+            </abcd:Identifications>
+            <abcd:Gathering>
+              <abcd:DateTime>
+                <abcd:DateText>1950-1980</abcd:DateText>
+                <abcd:PeriodExplicit>false</abcd:PeriodExplicit>
+              </abcd:DateTime>
+              <abcd:Agents>
+                <abcd:GatheringAgentsText>Mitarbeiter der Floristischen Kartierung Deutschlands</abcd:GatheringAgentsText>
+              </abcd:Agents>
+              <abcd:LocalityText>MTB 3916: Halle  (Westfalen)</abcd:LocalityText>
+              <abcd:Country>
+                <abcd:Name language="German">Deutschland</abcd:Name>
+              </abcd:Country>
+              <abcd:SiteCoordinateSets>
+                <abcd:SiteCoordinates>
+                  <abcd:CoordinatesGrid>
+                    <abcd:GridCellSystem>German TK25</abcd:GridCellSystem>
+                    <abcd:GridCellCode>3916</abcd:GridCellCode>
+                  </abcd:CoordinatesGrid>
+                  <abcd:CoordinatesLatLong>
+                    <abcd:LongitudeDecimal>8.42</abcd:LongitudeDecimal>
+                    <abcd:LatitudeDecimal>52.06</abcd:LatitudeDecimal>
+                    <abcd:AccuracyStatement>Mittelpunkte von TK25-Rasterfeldern</abcd:AccuracyStatement>
+                    <abcd:CoordinateErrorDistanceInMeters>6363</abcd:CoordinateErrorDistanceInMeters>
+                  </abcd:CoordinatesLatLong>
+                </abcd:SiteCoordinates>
+              </abcd:SiteCoordinateSets>
+            </abcd:Gathering>
+          </abcd:Unit>
+          <abcd:Unit>
+            <abcd:SourceInstitutionID>BfN</abcd:SourceInstitutionID>
+            <abcd:SourceID>FlorKart_BfN</abcd:SourceID>
+            <abcd:UnitID>1003123</abcd:UnitID>
+            <abcd:UnitReferences>
+              <abcd:UnitReference>
+                <abcd:TitleCitation>Datenbank FLORKART, BfN und NetPhyD</abcd:TitleCitation>
+                <abcd:CitationDetail>Datenbank FLORKART der Floristischen Kartierung Deutschlands, Stand 2007, Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversitaet Deutschland (NetPhyD)</abcd:CitationDetail>
+              </abcd:UnitReference>
+            </abcd:UnitReferences>
+            <abcd:Identifications>
+              <abcd:Identification>
+                <abcd:Result>
+                  <abcd:TaxonIdentified>
+                    <abcd:HigherTaxa>
+                      <abcd:HigherTaxon>
+                        <abcd:HigherTaxonName>Asteraceae</abcd:HigherTaxonName>
+                      </abcd:HigherTaxon>
+                    </abcd:HigherTaxa>
+                    <abcd:ScientificName>
+                      <abcd:FullScientificNameString>Cichorium calvum Asch.</abcd:FullScientificNameString>
+                      <abcd:NameAtomised>
+                        <abcd:Botanical>
+                          <abcd:GenusOrMonomial>Cichorium</abcd:GenusOrMonomial>
+                          <abcd:FirstEpithet>calvum</abcd:FirstEpithet>
+                          <abcd:Rank>SPE</abcd:Rank>
+                          <abcd:AuthorTeamParenthesis>Asch.</abcd:AuthorTeamParenthesis>
+                        </abcd:Botanical>
+                      </abcd:NameAtomised>
+                    </abcd:ScientificName>
+                  </abcd:TaxonIdentified>
+                </abcd:Result>
+              </abcd:Identification>
+            </abcd:Identifications>
+            <abcd:Gathering>
+              <abcd:DateTime>
+                <abcd:DateText>1950-1980</abcd:DateText>
+                <abcd:PeriodExplicit>false</abcd:PeriodExplicit>
+              </abcd:DateTime>
+              <abcd:Agents>
+                <abcd:GatheringAgentsText>Mitarbeiter der Floristischen Kartierung Deutschlands</abcd:GatheringAgentsText>
+              </abcd:Agents>
+              <abcd:LocalityText>MTB 5628: Bad K&#xF6;nigshofen im Grabfeld</abcd:LocalityText>
+              <abcd:Country>
+                <abcd:Name language="German">Deutschland</abcd:Name>
+              </abcd:Country>
+              <abcd:SiteCoordinateSets>
+                <abcd:SiteCoordinates>
+                  <abcd:CoordinatesGrid>
+                    <abcd:GridCellSystem>German TK25</abcd:GridCellSystem>
+                    <abcd:GridCellCode>5628</abcd:GridCellCode>
+                  </abcd:CoordinatesGrid>
+                  <abcd:CoordinatesLatLong>
+                    <abcd:LongitudeDecimal>10.42</abcd:LongitudeDecimal>
+                    <abcd:LatitudeDecimal>50.36</abcd:LatitudeDecimal>
+                    <abcd:AccuracyStatement>Mittelpunkte von TK25-Rasterfeldern</abcd:AccuracyStatement>
+                    <abcd:CoordinateErrorDistanceInMeters>6481</abcd:CoordinateErrorDistanceInMeters>
+                  </abcd:CoordinatesLatLong>
+                </abcd:SiteCoordinates>
+              </abcd:SiteCoordinateSets>
+            </abcd:Gathering>
+          </abcd:Unit>
+          <abcd:Unit>
+            <abcd:SourceInstitutionID>BfN</abcd:SourceInstitutionID>
+            <abcd:SourceID>FlorKart_BfN</abcd:SourceID>
+            <abcd:UnitID>1003124</abcd:UnitID>
+            <abcd:UnitReferences>
+              <abcd:UnitReference>
+                <abcd:TitleCitation>Datenbank FLORKART, BfN und NetPhyD</abcd:TitleCitation>
+                <abcd:CitationDetail>Datenbank FLORKART der Floristischen Kartierung Deutschlands, Stand 2007, Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversitaet Deutschland (NetPhyD)</abcd:CitationDetail>
+              </abcd:UnitReference>
+            </abcd:UnitReferences>
+            <abcd:Identifications>
+              <abcd:Identification>
+                <abcd:Result>
+                  <abcd:TaxonIdentified>
+                    <abcd:HigherTaxa>
+                      <abcd:HigherTaxon>
+                        <abcd:HigherTaxonName>Asteraceae</abcd:HigherTaxonName>
+                      </abcd:HigherTaxon>
+                    </abcd:HigherTaxa>
+                    <abcd:ScientificName>
+                      <abcd:FullScientificNameString>Cichorium calvum Asch.</abcd:FullScientificNameString>
+                      <abcd:NameAtomised>
+                        <abcd:Botanical>
+                          <abcd:GenusOrMonomial>Cichorium</abcd:GenusOrMonomial>
+                          <abcd:FirstEpithet>calvum</abcd:FirstEpithet>
+                          <abcd:Rank>SPE</abcd:Rank>
+                          <abcd:AuthorTeamParenthesis>Asch.</abcd:AuthorTeamParenthesis>
+                        </abcd:Botanical>
+                      </abcd:NameAtomised>
+                    </abcd:ScientificName>
+                  </abcd:TaxonIdentified>
+                </abcd:Result>
+              </abcd:Identification>
+            </abcd:Identifications>
+            <abcd:Gathering>
+              <abcd:DateTime>
+                <abcd:DateText>1950-1980</abcd:DateText>
+                <abcd:PeriodExplicit>false</abcd:PeriodExplicit>
+              </abcd:DateTime>
+              <abcd:Agents>
+                <abcd:GatheringAgentsText>Mitarbeiter der Floristischen Kartierung Deutschlands</abcd:GatheringAgentsText>
+              </abcd:Agents>
+              <abcd:LocalityText>MTB 5634: Teuschnitz</abcd:LocalityText>
+              <abcd:Country>
+                <abcd:Name language="German">Deutschland</abcd:Name>
+              </abcd:Country>
+              <abcd:SiteCoordinateSets>
+                <abcd:SiteCoordinates>
+                  <abcd:CoordinatesGrid>
+                    <abcd:GridCellSystem>German TK25</abcd:GridCellSystem>
+                    <abcd:GridCellCode>5634</abcd:GridCellCode>
+                  </abcd:CoordinatesGrid>
+                  <abcd:CoordinatesLatLong>
+                    <abcd:LongitudeDecimal>11.42</abcd:LongitudeDecimal>
+                    <abcd:LatitudeDecimal>50.36</abcd:LatitudeDecimal>
+                    <abcd:AccuracyStatement>Mittelpunkte von TK25-Rasterfeldern</abcd:AccuracyStatement>
+                    <abcd:CoordinateErrorDistanceInMeters>6482</abcd:CoordinateErrorDistanceInMeters>
+                  </abcd:CoordinatesLatLong>
+                </abcd:SiteCoordinates>
+              </abcd:SiteCoordinateSets>
+            </abcd:Gathering>
+          </abcd:Unit>
+          <abcd:Unit>
+            <abcd:SourceInstitutionID>BfN</abcd:SourceInstitutionID>
+            <abcd:SourceID>FlorKart_BfN</abcd:SourceID>
+            <abcd:UnitID>1003125</abcd:UnitID>
+            <abcd:UnitReferences>
+              <abcd:UnitReference>
+                <abcd:TitleCitation>Datenbank FLORKART, BfN und NetPhyD</abcd:TitleCitation>
+                <abcd:CitationDetail>Datenbank FLORKART der Floristischen Kartierung Deutschlands, Stand 2007, Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversitaet Deutschland (NetPhyD)</abcd:CitationDetail>
+              </abcd:UnitReference>
+            </abcd:UnitReferences>
+            <abcd:Identifications>
+              <abcd:Identification>
+                <abcd:Result>
+                  <abcd:TaxonIdentified>
+                    <abcd:HigherTaxa>
+                      <abcd:HigherTaxon>
+                        <abcd:HigherTaxonName>Asteraceae</abcd:HigherTaxonName>
+                      </abcd:HigherTaxon>
+                    </abcd:HigherTaxa>
+                    <abcd:ScientificName>
+                      <abcd:FullScientificNameString>Cichorium calvum Asch.</abcd:FullScientificNameString>
+                      <abcd:NameAtomised>
+                        <abcd:Botanical>
+                          <abcd:GenusOrMonomial>Cichorium</abcd:GenusOrMonomial>
+                          <abcd:FirstEpithet>calvum</abcd:FirstEpithet>
+                          <abcd:Rank>SPE</abcd:Rank>
+                          <abcd:AuthorTeamParenthesis>Asch.</abcd:AuthorTeamParenthesis>
+                        </abcd:Botanical>
+                      </abcd:NameAtomised>
+                    </abcd:ScientificName>
+                  </abcd:TaxonIdentified>
+                </abcd:Result>
+              </abcd:Identification>
+            </abcd:Identifications>
+            <abcd:Gathering>
+              <abcd:DateTime>
+                <abcd:DateText>1950-1980</abcd:DateText>
+                <abcd:PeriodExplicit>false</abcd:PeriodExplicit>
+              </abcd:DateTime>
+              <abcd:Agents>
+                <abcd:GatheringAgentsText>Mitarbeiter der Floristischen Kartierung Deutschlands</abcd:GatheringAgentsText>
+              </abcd:Agents>
+              <abcd:LocalityText>MTB 5635: Nordhalben</abcd:LocalityText>
+              <abcd:Country>
+                <abcd:Name language="German">Deutschland</abcd:Name>
+              </abcd:Country>
+              <abcd:SiteCoordinateSets>
+                <abcd:SiteCoordinates>
+                  <abcd:CoordinatesGrid>
+                    <abcd:GridCellSystem>German TK25</abcd:GridCellSystem>
+                    <abcd:GridCellCode>5635</abcd:GridCellCode>
+                  </abcd:CoordinatesGrid>
+                  <abcd:CoordinatesLatLong>
+                    <abcd:LongitudeDecimal>11.58</abcd:LongitudeDecimal>
+                    <abcd:LatitudeDecimal>50.36</abcd:LatitudeDecimal>
+                    <abcd:AccuracyStatement>Mittelpunkte von TK25-Rasterfeldern</abcd:AccuracyStatement>
+                    <abcd:CoordinateErrorDistanceInMeters>6483</abcd:CoordinateErrorDistanceInMeters>
+                  </abcd:CoordinatesLatLong>
+                </abcd:SiteCoordinates>
+              </abcd:SiteCoordinateSets>
+            </abcd:Gathering>
+          </abcd:Unit>
+          <abcd:Unit>
+            <abcd:SourceInstitutionID>BfN</abcd:SourceInstitutionID>
+            <abcd:SourceID>FlorKart_BfN</abcd:SourceID>
+            <abcd:UnitID>1003126</abcd:UnitID>
+            <abcd:UnitReferences>
+              <abcd:UnitReference>
+                <abcd:TitleCitation>Datenbank FLORKART, BfN und NetPhyD</abcd:TitleCitation>
+                <abcd:CitationDetail>Datenbank FLORKART der Floristischen Kartierung Deutschlands, Stand 2007, Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversitaet Deutschland (NetPhyD)</abcd:CitationDetail>
+              </abcd:UnitReference>
+            </abcd:UnitReferences>
+            <abcd:Identifications>
+              <abcd:Identification>
+                <abcd:Result>
+                  <abcd:TaxonIdentified>
+                    <abcd:HigherTaxa>
+                      <abcd:HigherTaxon>
+                        <abcd:HigherTaxonName>Asteraceae</abcd:HigherTaxonName>
+                      </abcd:HigherTaxon>
+                    </abcd:HigherTaxa>
+                    <abcd:ScientificName>
+                      <abcd:FullScientificNameString>Cichorium calvum Asch.</abcd:FullScientificNameString>
+                      <abcd:NameAtomised>
+                        <abcd:Botanical>
+                          <abcd:GenusOrMonomial>Cichorium</abcd:GenusOrMonomial>
+                          <abcd:FirstEpithet>calvum</abcd:FirstEpithet>
+                          <abcd:Rank>SPE</abcd:Rank>
+                          <abcd:AuthorTeamParenthesis>Asch.</abcd:AuthorTeamParenthesis>
+                        </abcd:Botanical>
+                      </abcd:NameAtomised>
+                    </abcd:ScientificName>
+                  </abcd:TaxonIdentified>
+                </abcd:Result>
+              </abcd:Identification>
+            </abcd:Identifications>
+            <abcd:Gathering>
+              <abcd:DateTime>
+                <abcd:DateText>1950-1980</abcd:DateText>
+                <abcd:PeriodExplicit>false</abcd:PeriodExplicit>
+              </abcd:DateTime>
+              <abcd:Agents>
+                <abcd:GatheringAgentsText>Mitarbeiter der Floristischen Kartierung Deutschlands</abcd:GatheringAgentsText>
+              </abcd:Agents>
+              <abcd:LocalityText>MTB 5728: Oberlauringen</abcd:LocalityText>
+              <abcd:Country>
+                <abcd:Name language="German">Deutschland</abcd:Name>
+              </abcd:Country>
+              <abcd:SiteCoordinateSets>
+                <abcd:SiteCoordinates>
+                  <abcd:CoordinatesGrid>
+                    <abcd:GridCellSystem>German TK25</abcd:GridCellSystem>
+                    <abcd:GridCellCode>5728</abcd:GridCellCode>
+                  </abcd:CoordinatesGrid>
+                  <abcd:CoordinatesLatLong>
+                    <abcd:LongitudeDecimal>10.42</abcd:LongitudeDecimal>
+                    <abcd:LatitudeDecimal>50.26</abcd:LatitudeDecimal>
+                    <abcd:AccuracyStatement>Mittelpunkte von TK25-Rasterfeldern</abcd:AccuracyStatement>
+                    <abcd:CoordinateErrorDistanceInMeters>6487</abcd:CoordinateErrorDistanceInMeters>
+                  </abcd:CoordinatesLatLong>
+                </abcd:SiteCoordinates>
+              </abcd:SiteCoordinateSets>
+            </abcd:Gathering>
+          </abcd:Unit>
+          <abcd:Unit>
+            <abcd:SourceInstitutionID>BfN</abcd:SourceInstitutionID>
+            <abcd:SourceID>FlorKart_BfN</abcd:SourceID>
+            <abcd:UnitID>1003127</abcd:UnitID>
+            <abcd:UnitReferences>
+              <abcd:UnitReference>
+                <abcd:TitleCitation>Datenbank FLORKART, BfN und NetPhyD</abcd:TitleCitation>
+                <abcd:CitationDetail>Datenbank FLORKART der Floristischen Kartierung Deutschlands, Stand 2007, Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversitaet Deutschland (NetPhyD)</abcd:CitationDetail>
+              </abcd:UnitReference>
+            </abcd:UnitReferences>
+            <abcd:Identifications>
+              <abcd:Identification>
+                <abcd:Result>
+                  <abcd:TaxonIdentified>
+                    <abcd:HigherTaxa>
+                      <abcd:HigherTaxon>
+                        <abcd:HigherTaxonName>Asteraceae</abcd:HigherTaxonName>
+                      </abcd:HigherTaxon>
+                    </abcd:HigherTaxa>
+                    <abcd:ScientificName>
+                      <abcd:FullScientificNameString>Cichorium calvum Asch.</abcd:FullScientificNameString>
+                      <abcd:NameAtomised>
+                        <abcd:Botanical>
+                          <abcd:GenusOrMonomial>Cichorium</abcd:GenusOrMonomial>
+                          <abcd:FirstEpithet>calvum</abcd:FirstEpithet>
+                          <abcd:Rank>SPE</abcd:Rank>
+                          <abcd:AuthorTeamParenthesis>Asch.</abcd:AuthorTeamParenthesis>
+                        </abcd:Botanical>
+                      </abcd:NameAtomised>
+                    </abcd:ScientificName>
+                  </abcd:TaxonIdentified>
+                </abcd:Result>
+              </abcd:Identification>
+            </abcd:Identifications>
+            <abcd:Gathering>
+              <abcd:DateTime>
+                <abcd:DateText>1950-1980</abcd:DateText>
+                <abcd:PeriodExplicit>false</abcd:PeriodExplicit>
+              </abcd:DateTime>
+              <abcd:Agents>
+                <abcd:GatheringAgentsText>Mitarbeiter der Floristischen Kartierung Deutschlands</abcd:GatheringAgentsText>
+              </abcd:Agents>
+              <abcd:LocalityText>MTB 6132: Buttenheim</abcd:LocalityText>
+              <abcd:Country>
+                <abcd:Name language="German">Deutschland</abcd:Name>
+              </abcd:Country>
+              <abcd:SiteCoordinateSets>
+                <abcd:SiteCoordinates>
+                  <abcd:CoordinatesGrid>
+                    <abcd:GridCellSystem>German TK25</abcd:GridCellSystem>
+                    <abcd:GridCellCode>6132</abcd:GridCellCode>
+                  </abcd:CoordinatesGrid>
+                  <abcd:CoordinatesLatLong>
+                    <abcd:LongitudeDecimal>11.08</abcd:LongitudeDecimal>
+                    <abcd:LatitudeDecimal>49.86</abcd:LatitudeDecimal>
+                    <abcd:AccuracyStatement>Mittelpunkte von TK25-Rasterfeldern</abcd:AccuracyStatement>
+                    <abcd:CoordinateErrorDistanceInMeters>6515</abcd:CoordinateErrorDistanceInMeters>
+                  </abcd:CoordinatesLatLong>
+                </abcd:SiteCoordinates>
+              </abcd:SiteCoordinateSets>
+            </abcd:Gathering>
+          </abcd:Unit>
+          <abcd:Unit>
+            <abcd:SourceInstitutionID>BfN</abcd:SourceInstitutionID>
+            <abcd:SourceID>FlorKart_BfN</abcd:SourceID>
+            <abcd:UnitID>1003128</abcd:UnitID>
+            <abcd:UnitReferences>
+              <abcd:UnitReference>
+                <abcd:TitleCitation>Datenbank FLORKART, BfN und NetPhyD</abcd:TitleCitation>
+                <abcd:CitationDetail>Datenbank FLORKART der Floristischen Kartierung Deutschlands, Stand 2007, Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversitaet Deutschland (NetPhyD)</abcd:CitationDetail>
+              </abcd:UnitReference>
+            </abcd:UnitReferences>
+            <abcd:Identifications>
+              <abcd:Identification>
+                <abcd:Result>
+                  <abcd:TaxonIdentified>
+                    <abcd:HigherTaxa>
+                      <abcd:HigherTaxon>
+                        <abcd:HigherTaxonName>Asteraceae</abcd:HigherTaxonName>
+                      </abcd:HigherTaxon>
+                    </abcd:HigherTaxa>
+                    <abcd:ScientificName>
+                      <abcd:FullScientificNameString>Cichorium calvum Asch.</abcd:FullScientificNameString>
+                      <abcd:NameAtomised>
+                        <abcd:Botanical>
+                          <abcd:GenusOrMonomial>Cichorium</abcd:GenusOrMonomial>
+                          <abcd:FirstEpithet>calvum</abcd:FirstEpithet>
+                          <abcd:Rank>SPE</abcd:Rank>
+                          <abcd:AuthorTeamParenthesis>Asch.</abcd:AuthorTeamParenthesis>
+                        </abcd:Botanical>
+                      </abcd:NameAtomised>
+                    </abcd:ScientificName>
+                  </abcd:TaxonIdentified>
+                </abcd:Result>
+              </abcd:Identification>
+            </abcd:Identifications>
+            <abcd:Gathering>
+              <abcd:DateTime>
+                <abcd:DateText>1950-1980</abcd:DateText>
+                <abcd:PeriodExplicit>false</abcd:PeriodExplicit>
+              </abcd:DateTime>
+              <abcd:Agents>
+                <abcd:GatheringAgentsText>Mitarbeiter der Floristischen Kartierung Deutschlands</abcd:GatheringAgentsText>
+              </abcd:Agents>
+              <abcd:LocalityText>MTB 6232: Forchheim</abcd:LocalityText>
+              <abcd:Country>
+                <abcd:Name language="German">Deutschland</abcd:Name>
+              </abcd:Country>
+              <abcd:SiteCoordinateSets>
+                <abcd:SiteCoordinates>
+                  <abcd:CoordinatesGrid>
+                    <abcd:GridCellSystem>German TK25</abcd:GridCellSystem>
+                    <abcd:GridCellCode>6232</abcd:GridCellCode>
+                  </abcd:CoordinatesGrid>
+                  <abcd:CoordinatesLatLong>
+                    <abcd:LongitudeDecimal>11.08</abcd:LongitudeDecimal>
+                    <abcd:LatitudeDecimal>49.76</abcd:LatitudeDecimal>
+                    <abcd:AccuracyStatement>Mittelpunkte von TK25-Rasterfeldern</abcd:AccuracyStatement>
+                    <abcd:CoordinateErrorDistanceInMeters>6522</abcd:CoordinateErrorDistanceInMeters>
+                  </abcd:CoordinatesLatLong>
+                </abcd:SiteCoordinates>
+              </abcd:SiteCoordinateSets>
+            </abcd:Gathering>
+          </abcd:Unit>
+          <abcd:Unit>
+            <abcd:SourceInstitutionID>BfN</abcd:SourceInstitutionID>
+            <abcd:SourceID>FlorKart_BfN</abcd:SourceID>
+            <abcd:UnitID>1003129</abcd:UnitID>
+            <abcd:UnitReferences>
+              <abcd:UnitReference>
+                <abcd:TitleCitation>Datenbank FLORKART, BfN und NetPhyD</abcd:TitleCitation>
+                <abcd:CitationDetail>Datenbank FLORKART der Floristischen Kartierung Deutschlands, Stand 2007, Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversitaet Deutschland (NetPhyD)</abcd:CitationDetail>
+              </abcd:UnitReference>
+            </abcd:UnitReferences>
+            <abcd:Identifications>
+              <abcd:Identification>
+                <abcd:Result>
+                  <abcd:TaxonIdentified>
+                    <abcd:HigherTaxa>
+                      <abcd:HigherTaxon>
+                        <abcd:HigherTaxonName>Asteraceae</abcd:HigherTaxonName>
+                      </abcd:HigherTaxon>
+                    </abcd:HigherTaxa>
+                    <abcd:ScientificName>
+                      <abcd:FullScientificNameString>Cichorium calvum Asch.</abcd:FullScientificNameString>
+                      <abcd:NameAtomised>
+                        <abcd:Botanical>
+                          <abcd:GenusOrMonomial>Cichorium</abcd:GenusOrMonomial>
+                          <abcd:FirstEpithet>calvum</abcd:FirstEpithet>
+                          <abcd:Rank>SPE</abcd:Rank>
+                          <abcd:AuthorTeamParenthesis>Asch.</abcd:AuthorTeamParenthesis>
+                        </abcd:Botanical>
+                      </abcd:NameAtomised>
+                    </abcd:ScientificName>
+                  </abcd:TaxonIdentified>
+                </abcd:Result>
+              </abcd:Identification>
+            </abcd:Identifications>
+            <abcd:Gathering>
+              <abcd:DateTime>
+                <abcd:DateText>1950-1980</abcd:DateText>
+                <abcd:PeriodExplicit>false</abcd:PeriodExplicit>
+              </abcd:DateTime>
+              <abcd:Agents>
+                <abcd:GatheringAgentsText>Mitarbeiter der Floristischen Kartierung Deutschlands</abcd:GatheringAgentsText>
+              </abcd:Agents>
+              <abcd:LocalityText>MTB 6235: Pegnitz</abcd:LocalityText>
+              <abcd:Country>
+                <abcd:Name language="German">Deutschland</abcd:Name>
+              </abcd:Country>
+              <abcd:SiteCoordinateSets>
+                <abcd:SiteCoordinates>
+                  <abcd:CoordinatesGrid>
+                    <abcd:GridCellSystem>German TK25</abcd:GridCellSystem>
+                    <abcd:GridCellCode>6235</abcd:GridCellCode>
+                  </abcd:CoordinatesGrid>
+                  <abcd:CoordinatesLatLong>
+                    <abcd:LongitudeDecimal>11.58</abcd:LongitudeDecimal>
+                    <abcd:LatitudeDecimal>49.76</abcd:LatitudeDecimal>
+                    <abcd:AccuracyStatement>Mittelpunkte von TK25-Rasterfeldern</abcd:AccuracyStatement>
+                    <abcd:CoordinateErrorDistanceInMeters>6523</abcd:CoordinateErrorDistanceInMeters>
+                  </abcd:CoordinatesLatLong>
+                </abcd:SiteCoordinates>
+              </abcd:SiteCoordinateSets>
+            </abcd:Gathering>
+          </abcd:Unit>
+          <abcd:Unit>
+            <abcd:SourceInstitutionID>BfN</abcd:SourceInstitutionID>
+            <abcd:SourceID>FlorKart_BfN</abcd:SourceID>
+            <abcd:UnitID>1003130</abcd:UnitID>
+            <abcd:UnitReferences>
+              <abcd:UnitReference>
+                <abcd:TitleCitation>Datenbank FLORKART, BfN und NetPhyD</abcd:TitleCitation>
+                <abcd:CitationDetail>Datenbank FLORKART der Floristischen Kartierung Deutschlands, Stand 2007, Bundesamt f&#xFC;r Naturschutz (BfN) und Netzwerk Phytodiversitaet Deutschland (NetPhyD)</abcd:CitationDetail>
+              </abcd:UnitReference>
+            </abcd:UnitReferences>
+            <abcd:Identifications>
+              <abcd:Identification>
+                <abcd:Result>
+                  <abcd:TaxonIdentified>
+                    <abcd:HigherTaxa>
+                      <abcd:HigherTaxon>
+                        <abcd:HigherTaxonName>Asteraceae</abcd:HigherTaxonName>
+                      </abcd:HigherTaxon>
+                    </abcd:HigherTaxa>
+                    <abcd:ScientificName>
+                      <abcd:FullScientificNameString>Cichorium calvum Asch.</abcd:FullScientificNameString>
+                      <abcd:NameAtomised>
+                        <abcd:Botanical>
+                          <abcd:GenusOrMonomial>Cichorium</abcd:GenusOrMonomial>
+                          <abcd:FirstEpithet>calvum</abcd:FirstEpithet>
+                          <abcd:Rank>SPE</abcd:Rank>
+                          <abcd:AuthorTeamParenthesis>Asch.</abcd:AuthorTeamParenthesis>
+                        </abcd:Botanical>
+                      </abcd:NameAtomised>
+                    </abcd:ScientificName>
+                  </abcd:TaxonIdentified>
+                </abcd:Result>
+              </abcd:Identification>
+            </abcd:Identifications>
+            <abcd:Gathering>
+              <abcd:DateTime>
+                <abcd:DateText>1950-1980</abcd:DateText>
+                <abcd:PeriodExplicit>false</abcd:PeriodExplicit>
+              </abcd:DateTime>
+              <abcd:Agents>
+                <abcd:GatheringAgentsText>Mitarbeiter der Floristischen Kartierung Deutschlands</abcd:GatheringAgentsText>
+              </abcd:Agents>
+              <abcd:LocalityText>MTB 7032: Bieswang</abcd:LocalityText>
+              <abcd:Country>
+                <abcd:Name language="German">Deutschland</abcd:Name>
+              </abcd:Country>
+              <abcd:SiteCoordinateSets>
+                <abcd:SiteCoordinates>
+                  <abcd:CoordinatesGrid>
+                    <abcd:GridCellSystem>German TK25</abcd:GridCellSystem>
+                    <abcd:GridCellCode>7032</abcd:GridCellCode>
+                  </abcd:CoordinatesGrid>
+                  <abcd:CoordinatesLatLong>
+                    <abcd:LongitudeDecimal>11.08</abcd:LongitudeDecimal>
+                    <abcd:LatitudeDecimal>48.96</abcd:LatitudeDecimal>
+                    <abcd:AccuracyStatement>Mittelpunkte von TK25-Rasterfeldern</abcd:AccuracyStatement>
+                    <abcd:CoordinateErrorDistanceInMeters>6575</abcd:CoordinateErrorDistanceInMeters>
+                  </abcd:CoordinatesLatLong>
+                </abcd:SiteCoordinates>
+              </abcd:SiteCoordinateSets>
+            </abcd:Gathering>
+          </abcd:Unit>
+        </abcd:Units>
+      </abcd:DataSet>
+    </abcd:DataSets>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/imports/NormalExplicitImport.xls b/eu.etaxonomy.taxeditor.test/src/test/resources/imports/NormalExplicitImport.xls
new file mode 100644 (file)
index 0000000..1c69278
Binary files /dev/null and b/eu.etaxonomy.taxeditor.test/src/test/resources/imports/NormalExplicitImport.xls differ
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/imports/SDD.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/imports/SDD.xml
new file mode 100644 (file)
index 0000000..4154c28
--- /dev/null
@@ -0,0 +1,981 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Datasets xmlns="http://rs.tdwg.org/UBIF/2006/"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://rs.tdwg.org/UBIF/2006/ http://rs.tdwg.org/UBIF/2006/Schema/1.1/SDD.xsd">
+    <TechnicalMetadata created="1970-01-01T09:34:00">
+        <Generator name="Xper2"
+            notes="This software is developed and distributed by LIS - Laboratoire Informatique et SystÈmatique (LIS) - UniversitÈ Pierre et Marie Curie - Paris VI - Copyright (c) 2004-2009" version="1.1"/>
+    </TechnicalMetadata>
+    <Dataset xml:lang="fr">
+        <Representation>
+            <Label>ant base</Label>
+        </Representation>
+        <RevisionData>
+            <Creators>
+                <Agent ref="a0" role="aut"/>
+            </Creators>
+            <DateCreated>2012-06-06T09:34:58</DateCreated>
+            <DateModified>2012-06-06T09:34:58</DateModified>
+        </RevisionData>
+        <TaxonNames>
+            <TaxonName id="t1">
+                <Representation>
+                    <Label>Dolichoderinae</Label>
+                </Representation>
+            </TaxonName>
+            <TaxonName id="t2">
+                <Representation>
+                    <Label>Formicinae</Label>
+                </Representation>
+            </TaxonName>
+            <TaxonName id="t3">
+                <Representation>
+                    <Label>Ponerinae</Label>
+                </Representation>
+            </TaxonName>
+            <TaxonName id="t4">
+                <Representation>
+                    <Label>Myrmicinae</Label>
+                </Representation>
+            </TaxonName>
+            <TaxonName id="t5">
+                <Representation>
+                    <Label>Pseudomyrmecinae</Label>
+                </Representation>
+            </TaxonName>
+            <TaxonName id="t6">
+                <Representation>
+                    <Label>Ecitoninae</Label>
+                </Representation>
+            </TaxonName>
+            <TaxonName id="t7">
+                <Representation>
+                    <Label>Ectatomminae</Label>
+                </Representation>
+            </TaxonName>
+            <TaxonName id="t8">
+                <Representation>
+                    <Label>Cerapachyinae</Label>
+                </Representation>
+            </TaxonName>
+            <TaxonName id="t9">
+                <Representation>
+                    <Label>Genus Ectatom</Label>
+                </Representation>
+            </TaxonName>
+        </TaxonNames>
+        <TaxonHierarchies>
+            <TaxonHierarchy id="th1">
+                <Representation>
+                    <Label>Default Entity Tree</Label>
+                </Representation>
+                <TaxonHierarchyType>UnspecifiedTaxonomy</TaxonHierarchyType>
+                <Nodes>
+                    <Node id="tn1">
+                        <TaxonName ref="t1"/>
+                    </Node>
+                    <Node id="tn2">
+                        <TaxonName ref="t2"/>
+                    </Node>
+                    <Node id="tn3">
+                        <Parent ref="tn2"/>
+                        <TaxonName ref="t3"/>
+                    </Node>
+                    <Node id="tn4">
+                        <TaxonName ref="t4"/>
+                    </Node>
+                    <Node id="tn5">
+                        <Parent ref="tn4"/>
+                        <TaxonName ref="t5"/>
+                    </Node>
+                    <Node id="tn6">
+                        <TaxonName ref="t6"/>
+                    </Node>
+                    <Node id="tn7">
+                        <Parent ref="tn6"/>
+                        <TaxonName ref="t8"/>
+                    </Node>
+                </Nodes>
+            </TaxonHierarchy>
+        </TaxonHierarchies>
+        <Characters>
+            <CategoricalCharacter id="c1">
+                <Representation>
+                    <Label>Pétiole</Label>
+                    <Detail>Le &lt;b&gt;pétiole&lt;/b&gt; se situe entre le mésosoma et l'alitrunk.</Detail>
+                    <MediaObject ref="m35"/>
+                    <MediaObject ref="m36"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s1">
+                        <Representation>
+                            <Label>un seul article réduit ou isolé</Label>
+                            <MediaObject ref="m37"/>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s2">
+                        <Representation>
+                            <Label>deux articles réduits ou isolés</Label>
+                            <Detail>Les deux articles correspondent au&lt;b&gt;pétiole&lt;/b&gt; et au &lt;b&gt;post-pétiole&lt;/b&gt;.&lt;br&gt;Soit les deux segments sont plus ou moins réduits, soit le deuxième article est plus large que le premier, soit le postpétiole est largement plus réduit.</Detail>
+                            <MediaObject ref="m38"/>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c2">
+                <Representation>
+                    <Label>Aiguillon venimeux</Label>
+                    <Detail>Quand il est vestigial et non fonctionnel, on le considère comme absent.</Detail>
+                    <MediaObject ref="m39"/>
+                    <MediaObject ref="m40"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s3">
+                        <Representation>
+                            <Label>absent</Label>
+                            <Detail>Apex du gastre &lt;b&gt;sans aiguillon&lt;/b&gt;.</Detail>
+                            <MediaObject ref="m41"/>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s4">
+                        <Representation>
+                            <Label>présent</Label>
+                            <Detail>C'est l'&lt;b&gt;apex du gastre&lt;/b&gt; qui porte l'aiguillon.&lt;br&gt;Il est considéré comme présent uniquement s'il &lt;b&gt;est fonctionnel&lt;/b&gt;. Certains aiguillons sont dévaginables, d'autres sont visibles de façon permanente.</Detail>
+                            <MediaObject ref="m42"/>
+                            <MediaObject ref="m43"/>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c3">
+                <Representation>
+                    <Label>Acidopore</Label>
+                    <Detail>L'&lt;b&gt;acidopore&lt;/b&gt; est l'ouverture Ã  la base du gastre par laquelle le venin est Ã©jecté ou vaporisé</Detail>
+                    <MediaObject ref="m44"/>
+                    <MediaObject ref="m45"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s5">
+                        <Representation>
+                            <Label>circulaire et entouré de soies</Label>
+                            <Detail>Quand cette structure est présente, le venin est projeté sous forme de spray. L'&lt;b&gt;acidopore circulaire&lt;/b&gt; est parfois visible Ã  l'oeil nu chez les fourmis de grande taille.</Detail>
+                            <MediaObject ref="m46"/>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s6">
+                        <Representation>
+                            <Label>sous forme de fente</Label>
+                            <Detail>Contrairement Ã  l'acidopore circulaire, la &lt;b&gt;fente&lt;/b&gt; est rarement visible Ã  l'oeil nu.</Detail>
+                            <MediaObject ref="m47"/>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s7">
+                        <Representation>
+                            <Label>absent ou quasi invisible</Label>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c4">
+                <Representation>
+                    <Label>Pygidium</Label>
+                    <Detail>Le &lt;b&gt;pygidium&lt;/b&gt; correspond au tergite Ã  l'apex du gastre.</Detail>
+                    <MediaObject ref="m48"/>
+                    <MediaObject ref="m49"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s8">
+                        <Representation>
+                            <Label>non armé</Label>
+                            <Detail>&lt;b&gt;Pygidium lisse non armé&lt;/b&gt; latéralement ou postérieurement.</Detail>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s9">
+                        <Representation>
+                            <Label>armé</Label>
+                            <Detail>&lt;b&gt;Pygidium armé &lt;/b&gt; latéralement, postérieurement ou les deux par une rangée de courtes Ã©pines ou dents.</Detail>
+                            <MediaObject ref="m50"/>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c5">
+                <Representation>
+                    <Label>Marge clypéale</Label>
+                    <MediaObject ref="m51"/>
+                    <MediaObject ref="m52"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s10">
+                        <Representation>
+                            <Label>sans projection</Label>
+                            <Detail>Il s'agit de la &lt;b&gt;marge clypéale antérolatérale&lt;/b&gt;.</Detail>
+                            <MediaObject ref="m53"/>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s11">
+                        <Representation>
+                            <Label>avec projection</Label>
+                            <MediaObject ref="m54"/>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c6">
+                <Representation>
+                    <Label>Yeux</Label>
+                    <Detail>Les &lt;b&gt;yeux&lt;/b&gt; des insectes sont des yeux composés d'&lt;b&gt;ommatidies&lt;/b&gt;. Attention Ã  ne pas les confondre avec les &lt;b&gt;ocelles&lt;/b&gt;, yeux simples souvent situés sur le dessu-de la tête, servant Ã  détecter les variations de luminosité.</Detail>
+                    <MediaObject ref="m55"/>
+                    <MediaObject ref="m56"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s12">
+                        <Representation>
+                            <Label>absents ou très réduits</Label>
+                            <Detail>Yeux absents ou très réduits c'est Ã  dire représentés seulement par une seule ou un petit nombre d'ommatidies.</Detail>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s13">
+                        <Representation>
+                            <Label>présents et bien visibles</Label>
+                            <Detail>Yeux présent et bien visibles composés d'un grand nombre d'ommatidies.</Detail>
+                            <MediaObject ref="m57"/>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c7">
+                <Representation>
+                    <Label>Antennes</Label>
+                    <MediaObject ref="m58"/>
+                    <MediaObject ref="m59"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s14">
+                        <Representation>
+                            <Label>de 8 Ã  10 segments</Label>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s15">
+                        <Representation>
+                            <Label>de 12 segments</Label>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s16">
+                        <Representation>
+                            <Label>moins de 8 segments</Label>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s17">
+                        <Representation>
+                            <Label>10 ou 11 segments</Label>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c8">
+                <Representation>
+                    <Label>Répartition mondiale</Label>
+                </Representation>
+                <States>
+                    <StateDefinition id="s18">
+                        <Representation>
+                            <Label>monde entier</Label>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s19">
+                        <Representation>
+                            <Label>régions tempérées</Label>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s20">
+                        <Representation>
+                            <Label>tropiques</Label>
+                            <Detail>Il s'agit des tropiques (voire subtropiques) du monden entier.</Detail>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s21">
+                        <Representation>
+                            <Label>néotropiques</Label>
+                            <Detail>Il s'agit des zones tropicales américaines.</Detail>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c9">
+                <Representation>
+                    <Label>Lobes frontaux</Label>
+                    <MediaObject ref="m60"/>
+                    <MediaObject ref="m61"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s22">
+                        <Representation>
+                            <Label>absents ou très réduits et verticaux</Label>
+                            <MediaObject ref="m62"/>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s23">
+                        <Representation>
+                            <Label>présents et horizontaux</Label>
+                            <MediaObject ref="m63"/>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c10">
+                <Representation>
+                    <Label>Bases antennaires</Label>
+                    <MediaObject ref="m64"/>
+                    <MediaObject ref="m65"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s24">
+                        <Representation>
+                            <Label>partiellement ou complètement camouflées</Label>
+                            <Detail>En vue de face, les &lt;b&gt;bases antennaires&lt;/b&gt; sont partiellement ou complètement recouvertes par les &lt;b&gt; lobes frontaux&lt;/b&gt; (jamais complètement exposées).</Detail>
+                            <MediaObject ref="m66"/>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s25">
+                        <Representation>
+                            <Label>totalement exposées</Label>
+                            <Detail>En vue de face, les &lt;b&gt;bases antennaires&lt;/b&gt; sont complètement exposées et non recouvertes par les lobes frontaux.</Detail>
+                            <MediaObject ref="m67"/>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c11">
+                <Representation>
+                    <Label>Suture promésonotale</Label>
+                    <Detail>La &lt;b&gt;suture promésonotale&lt;/b&gt; est la suture (ligne de ligne de fusion) entre le pronotum et le mesonotum, les deux premiers articles du thorax.</Detail>
+                    <MediaObject ref="m68"/>
+                    <MediaObject ref="m69"/>
+                    <MediaObject ref="m70"/>
+                    <MediaObject ref="m71"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s26">
+                        <Representation>
+                            <Label>absente</Label>
+                            <MediaObject ref="m72"/>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s27">
+                        <Representation>
+                            <Label>vestigiale</Label>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s28">
+                        <Representation>
+                            <Label>présente</Label>
+                            <MediaObject ref="m73"/>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c12">
+                <Representation>
+                    <Label>Ocelle(s)</Label>
+                    <Detail>Les &lt;b&gt;ocelles&lt;/b&gt; sont des yeux simples servant Ã  détecter les variations de luminosité. Les ouvrières peuvent avoir un ou plusieurs ocelles.</Detail>
+                    <MediaObject ref="m74"/>
+                    <MediaObject ref="m75"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s29">
+                        <Representation>
+                            <Label>absent(s)</Label>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s30">
+                        <Representation>
+                            <Label>présent(s)</Label>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+            <CategoricalCharacter id="c13">
+                <Representation>
+                    <Label>Palpes maxillaires</Label>
+                    <MediaObject ref="m76"/>
+                </Representation>
+                <States>
+                    <StateDefinition id="s31">
+                        <Representation>
+                            <Label>présents et bien visibles</Label>
+                        </Representation>
+                    </StateDefinition>
+                    <StateDefinition id="s32">
+                        <Representation>
+                            <Label>absents ou très difficilement visibles</Label>
+                        </Representation>
+                    </StateDefinition>
+                </States>
+            </CategoricalCharacter>
+        </Characters>
+        <CharacterTrees>
+            <CharacterTree id="ct1">
+                <Representation>
+                    <Label>Ordre et dÈpendance entre caractËres</Label>
+                </Representation>
+                <ShouldContainAllCharacters>true</ShouldContainAllCharacters>
+                <Nodes>
+                    <CharNode>
+                        <Character ref="c1"/>
+                    </CharNode>
+                    <CharNode>
+                        <Character ref="c2"/>
+                    </CharNode>
+                    <CharNode>
+                        <DependencyRules>
+                            <InapplicableIf>
+                                <State ref="s2"/>
+                            </InapplicableIf>
+                        </DependencyRules>
+                        <Character ref="c3"/>
+                    </CharNode>
+                    <CharNode>
+                        <Character ref="c4"/>
+                    </CharNode>
+                    <CharNode>
+                        <DependencyRules>
+                            <InapplicableIf>
+                                <State ref="s3"/>
+                            </InapplicableIf>
+                        </DependencyRules>
+                        <Character ref="c5"/>
+                    </CharNode>
+                    <CharNode>
+                        <Character ref="c6"/>
+                    </CharNode>
+                    <CharNode>
+                        <Character ref="c7"/>
+                    </CharNode>
+                    <CharNode>
+                        <Character ref="c8"/>
+                    </CharNode>
+                    <CharNode>
+                        <Character ref="c9"/>
+                    </CharNode>
+                    <CharNode>
+                        <Character ref="c10"/>
+                    </CharNode>
+                    <CharNode>
+                        <Character ref="c11"/>
+                    </CharNode>
+                    <CharNode>
+                        <Character ref="c12"/>
+                    </CharNode>
+                    <CharNode>
+                        <Character ref="c13"/>
+                    </CharNode>
+                </Nodes>
+            </CharacterTree>
+        </CharacterTrees>
+        <CodedDescriptions>
+            <CodedDescription id="D1">
+                <Representation>
+                    <Label>Dolichoderinae</Label>
+                    <MediaObject ref="m1"/>
+                    <MediaObject ref="m2"/>
+                    <MediaObject ref="m3"/>
+                </Representation>
+                <Scope>
+                    <TaxonName ref="t1"/>
+                </Scope>
+                <SummaryData>
+                    <Categorical ref="c1">
+                        <State ref="s1"/>
+                    </Categorical>
+                    <Categorical ref="c2">
+                        <Note>Leur aiguillon venimeux est vestigial et non fonctionnel.</Note>
+                        <State ref="s3"/>
+                    </Categorical>
+                    <Categorical ref="c3">
+                        <State ref="s6"/>
+                    </Categorical>
+                    <Categorical ref="c4">
+                        <State ref="s8"/>
+                    </Categorical>
+                    <Categorical ref="c5"/>
+                    <Categorical ref="c6">
+                        <State ref="s13"/>
+                    </Categorical>
+                    <Categorical ref="c7">
+                        <Note>Les ouvrières possèdent généralement 11 articles antennaires, rarement 10 ou 11.</Note>
+                        <State ref="s14"/>
+                        <State ref="s15"/>
+                    </Categorical>
+                    <Categorical ref="c8">
+                        <State ref="s18"/>
+                    </Categorical>
+                    <Categorical ref="c9">
+                        <Status code="DataUnavailable"/>
+                    </Categorical>
+                    <Categorical ref="c10">
+                        <Note>Elles sont partiellement ou totalement cachées par la carèbe frontale, marge du lbe frontal.</Note>
+                        <State ref="s24"/>
+                    </Categorical>
+                    <Categorical ref="c11">
+                        <Note>Elle est présente et flexible.</Note>
+                        <State ref="s28"/>
+                    </Categorical>
+                    <Categorical ref="c12">
+                        <Note>Les ocelles sont pratiquement tout le temps absents.</Note>
+                        <State ref="s29"/>
+                    </Categorical>
+                    <Categorical ref="c13">
+                        <State ref="s31"/>
+                    </Categorical>
+                </SummaryData>
+            </CodedDescription>
+            <CodedDescription id="D2">
+                <Representation>
+                    <Label>Formicinae</Label>
+                    <MediaObject ref="m4"/>
+                    <MediaObject ref="m5"/>
+                    <MediaObject ref="m6"/>
+                    <MediaObject ref="m7"/>
+                    <MediaObject ref="m8"/>
+                </Representation>
+                <Scope>
+                    <TaxonName ref="t2"/>
+                </Scope>
+                <SummaryData>
+                    <Categorical ref="c1">
+                        <State ref="s1"/>
+                    </Categorical>
+                    <Categorical ref="c2">
+                        <Note>Leur aiguillon est non fonctionnel.</Note>
+                        <State ref="s3"/>
+                    </Categorical>
+                    <Categorical ref="c3">
+                        <State ref="s5"/>
+                    </Categorical>
+                    <Categorical ref="c4">
+                        <State ref="s8"/>
+                    </Categorical>
+                    <Categorical ref="c5"/>
+                    <Categorical ref="c6">
+                        <Note>Leurs yeux sont généralement bien développés, rarement réduits ou absents.</Note>
+                        <State ref="s12"/>
+                        <State ref="s13"/>
+                    </Categorical>
+                    <Categorical ref="c7">
+                        <State ref="s14"/>
+                        <State ref="s15"/>
+                        <State ref="s17"/>
+                    </Categorical>
+                    <Categorical ref="c8">
+                        <State ref="s18"/>
+                    </Categorical>
+                    <Categorical ref="c9">
+                        <Status code="DataUnavailable"/>
+                    </Categorical>
+                    <Categorical ref="c10">
+                        <State ref="s25"/>
+                    </Categorical>
+                    <Categorical ref="c11">
+                        <State ref="s28"/>
+                    </Categorical>
+                    <Categorical ref="c12">
+                        <Note>Les ocelles sont présents dans la grande majorité des genres.</Note>
+                        <State ref="s30"/>
+                    </Categorical>
+                    <Categorical ref="c13">
+                        <State ref="s31"/>
+                        <State ref="s32"/>
+                    </Categorical>
+                </SummaryData>
+            </CodedDescription>
+            <CodedDescription id="D3">
+                <Representation>
+                    <Label>Ponerinae</Label>
+                    <MediaObject ref="m9"/>
+                    <MediaObject ref="m10"/>
+                    <MediaObject ref="m11"/>
+                    <MediaObject ref="m12"/>
+                    <MediaObject ref="m13"/>
+                </Representation>
+                <Scope>
+                    <TaxonName ref="t3"/>
+                </Scope>
+                <SummaryData>
+                    <Categorical ref="c1">
+                        <State ref="s1"/>
+                    </Categorical>
+                    <Categorical ref="c2">
+                        <State ref="s4"/>
+                    </Categorical>
+                    <Categorical ref="c3">
+                        <State ref="s7"/>
+                    </Categorical>
+                    <Categorical ref="c4">
+                        <State ref="s8"/>
+                    </Categorical>
+                    <Categorical ref="c5">
+                        <State ref="s10"/>
+                    </Categorical>
+                    <Categorical ref="c6">
+                        <Note>Les Ponerinae possèdent des yeux bien développés dans la grande majorité des cas.</Note>
+                        <State ref="s13"/>
+                    </Categorical>
+                    <Categorical ref="c7">
+                        <Status code="DataUnavailable"/>
+                    </Categorical>
+                    <Categorical ref="c8">
+                        <State ref="s19"/>
+                        <State ref="s20"/>
+                    </Categorical>
+                    <Categorical ref="c9">
+                        <State ref="s23"/>
+                    </Categorical>
+                    <Categorical ref="c10">
+                        <State ref="s24"/>
+                    </Categorical>
+                    <Categorical ref="c11">
+                        <Note>Si les yeux et les lobes frontaux sont absents, la suture promésonotale est toujours absente.</Note>
+                        <State ref="s26"/>
+                        <State ref="s28"/>
+                    </Categorical>
+                    <Categorical ref="c12">
+                        <Note>En général les ouvrières de poneriane ne portent pas d'ocelles.</Note>
+                        <State ref="s29"/>
+                    </Categorical>
+                    <Categorical ref="c13">
+                        <State ref="s31"/>
+                        <State ref="s32"/>
+                    </Categorical>
+                </SummaryData>
+            </CodedDescription>
+            <CodedDescription id="D4">
+                <Representation>
+                    <Label>Myrmicinae</Label>
+                    <MediaObject ref="m14"/>
+                    <MediaObject ref="m15"/>
+                    <MediaObject ref="m16"/>
+                    <MediaObject ref="m17"/>
+                    <MediaObject ref="m18"/>
+                    <MediaObject ref="m19"/>
+                    <MediaObject ref="m20"/>
+                </Representation>
+                <Scope>
+                    <TaxonName ref="t4"/>
+                </Scope>
+                <SummaryData>
+                    <Categorical ref="c1">
+                        <State ref="s2"/>
+                    </Categorical>
+                    <Categorical ref="c2">
+                        <State ref="s4"/>
+                    </Categorical>
+                    <Categorical ref="c3"/>
+                    <Categorical ref="c4">
+                        <State ref="s8"/>
+                    </Categorical>
+                    <Categorical ref="c5">
+                        <State ref="s10"/>
+                    </Categorical>
+                    <Categorical ref="c6">
+                        <State ref="s13"/>
+                    </Categorical>
+                    <Categorical ref="c7">
+                        <Note>Le nombre d'articles antennaires peut varier de 4 Ã  12 chez les Myrmicinae.</Note>
+                        <State ref="s14"/>
+                        <State ref="s15"/>
+                        <State ref="s16"/>
+                    </Categorical>
+                    <Categorical ref="c8">
+                        <State ref="s18"/>
+                    </Categorical>
+                    <Categorical ref="c9">
+                        <State ref="s22"/>
+                        <State ref="s23"/>
+                    </Categorical>
+                    <Categorical ref="c10">
+                        <State ref="s24"/>
+                        <State ref="s25"/>
+                    </Categorical>
+                    <Categorical ref="c11">
+                        <Note>Elle est souvent complètement absente et rarement vestigiale. Quand c'est le cas, elle donne l'impression transversalement s'un arche en vue dorsale.</Note>
+                        <State ref="s26"/>
+                        <State ref="s27"/>
+                    </Categorical>
+                    <Categorical ref="c12">
+                        <Note>Les ocelles sont la plupart du temps absents, très rarement présents.</Note>
+                        <State ref="s29"/>
+                    </Categorical>
+                    <Categorical ref="c13">
+                        <State ref="s31"/>
+                        <State ref="s32"/>
+                    </Categorical>
+                </SummaryData>
+            </CodedDescription>
+            <CodedDescription id="D5">
+                <Representation>
+                    <Label>Pseudomyrmecinae</Label>
+                    <MediaObject ref="m21"/>
+                    <MediaObject ref="m22"/>
+                    <MediaObject ref="m23"/>
+                    <MediaObject ref="m24"/>
+                </Representation>
+                <Scope>
+                    <TaxonName ref="t5"/>
+                </Scope>
+                <SummaryData>
+                    <Categorical ref="c1">
+                        <State ref="s2"/>
+                    </Categorical>
+                    <Categorical ref="c2">
+                        <State ref="s4"/>
+                    </Categorical>
+                    <Categorical ref="c3"/>
+                    <Categorical ref="c4">
+                        <State ref="s8"/>
+                    </Categorical>
+                    <Categorical ref="c5">
+                        <Note>La projestion clypéale concernée est postérieure c'est Ã  dir vers les mandibules, et non vers le haut de la tête.</Note>
+                        <State ref="s10"/>
+                    </Categorical>
+                    <Categorical ref="c6">
+                        <State ref="s13"/>
+                    </Categorical>
+                    <Categorical ref="c7">
+                        <State ref="s15"/>
+                    </Categorical>
+                    <Categorical ref="c8">
+                        <State ref="s20"/>
+                    </Categorical>
+                    <Categorical ref="c9">
+                        <State ref="s22"/>
+                        <State ref="s23"/>
+                    </Categorical>
+                    <Categorical ref="c10">
+                        <State ref="s24"/>
+                    </Categorical>
+                    <Categorical ref="c11">
+                        <Note>Elle est très visible en vue dorsale.</Note>
+                        <State ref="s28"/>
+                    </Categorical>
+                    <Categorical ref="c12">
+                        <State ref="s30"/>
+                    </Categorical>
+                    <Categorical ref="c13">
+                        <State ref="s32"/>
+                    </Categorical>
+                </SummaryData>
+            </CodedDescription>
+            <CodedDescription id="D6">
+                <Representation>
+                    <Label>Ecitoninae</Label>
+                    <MediaObject ref="m25"/>
+                    <MediaObject ref="m26"/>
+                    <MediaObject ref="m27"/>
+                    <MediaObject ref="m28"/>
+                </Representation>
+                <Scope>
+                    <TaxonName ref="t6"/>
+                </Scope>
+                <SummaryData>
+                    <Categorical ref="c1">
+                        <State ref="s2"/>
+                    </Categorical>
+                    <Categorical ref="c2">
+                        <State ref="s4"/>
+                    </Categorical>
+                    <Categorical ref="c3"/>
+                    <Categorical ref="c4">
+                        <State ref="s8"/>
+                    </Categorical>
+                    <Categorical ref="c5">
+                        <State ref="s10"/>
+                    </Categorical>
+                    <Categorical ref="c6">
+                        <Note>Leurs yeux sont réduits Ã  une seule ommatidies ou absents.</Note>
+                        <State ref="s12"/>
+                    </Categorical>
+                    <Categorical ref="c7">
+                        <State ref="s15"/>
+                    </Categorical>
+                    <Categorical ref="c8">
+                        <State ref="s19"/>
+                        <State ref="s21"/>
+                    </Categorical>
+                    <Categorical ref="c9">
+                        <State ref="s22"/>
+                    </Categorical>
+                    <Categorical ref="c10">
+                        <State ref="s25"/>
+                    </Categorical>
+                    <Categorical ref="c11">
+                        <Note>Cette suture n'est jamais marqué et elle est flexible.</Note>
+                        <State ref="s26"/>
+                        <State ref="s27"/>
+                    </Categorical>
+                    <Categorical ref="c12">
+                        <State ref="s30"/>
+                    </Categorical>
+                    <Categorical ref="c13">
+                        <State ref="s32"/>
+                    </Categorical>
+                </SummaryData>
+            </CodedDescription>
+            <CodedDescription id="D7">
+                <Representation>
+                    <Label>Ectatomminae</Label>
+                    <MediaObject ref="m29"/>
+                    <MediaObject ref="m30"/>
+                </Representation>
+                <Scope>
+                    <TaxonName ref="t7"/>
+                </Scope>
+                <SummaryData>
+                    <Categorical ref="c1">
+                        <State ref="s1"/>
+                    </Categorical>
+                    <Categorical ref="c2">
+                        <State ref="s3"/>
+                    </Categorical>
+                    <Categorical ref="c3">
+                        <State ref="s7"/>
+                    </Categorical>
+                    <Categorical ref="c4">
+                        <State ref="s8"/>
+                    </Categorical>
+                    <Categorical ref="c5"/>
+                    <Categorical ref="c6">
+                        <State ref="s13"/>
+                    </Categorical>
+                    <Categorical ref="c7">
+                        <Status code="DataUnavailable"/>
+                    </Categorical>
+                    <Categorical ref="c8">
+                        <State ref="s18"/>
+                    </Categorical>
+                    <Categorical ref="c9">
+                        <State ref="s22"/>
+                    </Categorical>
+                    <Categorical ref="c10">
+                        <State ref="s24"/>
+                    </Categorical>
+                    <Categorical ref="c11">
+                        <Status code="DataUnavailable"/>
+                    </Categorical>
+                    <Categorical ref="c12">
+                        <State ref="s29"/>
+                    </Categorical>
+                    <Categorical ref="c13">
+                        <State ref="s32"/>
+                    </Categorical>
+                </SummaryData>
+            </CodedDescription>
+            <CodedDescription id="D8">
+                <Representation>
+                    <Label>Cerapachyinae</Label>
+                    <MediaObject ref="m31"/>
+                    <MediaObject ref="m32"/>
+                    <MediaObject ref="m33"/>
+                    <MediaObject ref="m34"/>
+                </Representation>
+                <Scope>
+                    <TaxonName ref="t8"/>
+                </Scope>
+                <SummaryData>
+                    <Categorical ref="c1">
+                        <State ref="s1"/>
+                    </Categorical>
+                    <Categorical ref="c2">
+                        <Note>Aiguillon bien dévellopé et fonctionnel.</Note>
+                        <State ref="s4"/>
+                    </Categorical>
+                    <Categorical ref="c3">
+                        <Status code="DataUnavailable"/>
+                    </Categorical>
+                    <Categorical ref="c4">
+                        <Note>Il existe un rangée apicale ou marginale de courtes dents ou Ã©pines.</Note>
+                        <State ref="s9"/>
+                    </Categorical>
+                    <Categorical ref="c5">
+                        <State ref="s11"/>
+                    </Categorical>
+                    <Categorical ref="c6">
+                        <Note>Les yeux sont généralement présents, très rarement réduits ou absents.</Note>
+                        <State ref="s12"/>
+                    </Categorical>
+                    <Categorical ref="c7">
+                        <State ref="s15"/>
+                        <State ref="s17"/>
+                    </Categorical>
+                    <Categorical ref="c8">
+                        <State ref="s20"/>
+                    </Categorical>
+                    <Categorical ref="c9">
+                        <Status code="DataUnavailable"/>
+                    </Categorical>
+                    <Categorical ref="c10">
+                        <State ref="s25"/>
+                    </Categorical>
+                    <Categorical ref="c11">
+                        <Note>La plupart du temps, elle est complètement absente. Elle n'est que très rarement visible.</Note>
+                        <State ref="s26"/>
+                        <State ref="s28"/>
+                    </Categorical>
+                    <Categorical ref="c12">
+                        <State ref="s30"/>
+                    </Categorical>
+                    <Categorical ref="c13">
+                        <Status code="DataUnavailable"/>
+                    </Categorical>
+                </SummaryData>
+            </CodedDescription>
+            <CodedDescription id="D9">
+                <Representation>
+                    <Label>Genus Ectatom</Label>
+                </Representation>
+                <Scope>
+                    <TaxonName ref="t9"/>
+                </Scope>
+                <SummaryData>
+                    <Categorical ref="c1"/>
+                    <Categorical ref="c2"/>
+                    <Categorical ref="c3"/>
+                    <Categorical ref="c4"/>
+                    <Categorical ref="c5"/>
+                    <Categorical ref="c6"/>
+                    <Categorical ref="c7"/>
+                    <Categorical ref="c8"/>
+                    <Categorical ref="c9"/>
+                    <Categorical ref="c10"/>
+                    <Categorical ref="c11"/>
+                    <Categorical ref="c12"/>
+                    <Categorical ref="c13"/>
+                </SummaryData>
+            </CodedDescription>
+        </CodedDescriptions>
+        <Agents>
+            <Agent id="a0">
+                <Representation>
+                    <Label>Unknown</Label>
+                </Representation>
+            </Agent>
+        </Agents>
+        <MediaObjects>
+            <MediaObject id="m1">
+                <Representation>
+                    <Label>Dolichoderinae - m1</Label>
+                    <Detail role="Caption">Dolichoderinae</Detail>
+                </Representation>
+                <Type>Image</Type>
+                <Source href="http://cybertaxonomy.eu/sites/wp5.e-taxonomy.eu/files/cybergate.PNG"/>
+            </MediaObject>
+            <MediaObject id="m2">
+                <Representation>
+                    <Label>Dolichoderinae - m2</Label>
+                    <Detail role="Caption">Dolichoderinae</Detail>
+                </Representation>
+                <Type>Image</Type>
+                <Source href="http://cybertaxonomy.eu/sites/wp5.e-taxonomy.eu/files/cybergate.PNG"/>
+            </MediaObject>
+        </MediaObjects>
+    </Dataset>
+</Datasets>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/imports/SpecimenExcelImport.xls b/eu.etaxonomy.taxeditor.test/src/test/resources/imports/SpecimenExcelImport.xls
new file mode 100644 (file)
index 0000000..4b8db5b
Binary files /dev/null and b/eu.etaxonomy.taxeditor.test/src/test/resources/imports/SpecimenExcelImport.xls differ
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/imports/TcsImport.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/imports/TcsImport.xml
new file mode 100644 (file)
index 0000000..545f7c8
--- /dev/null
@@ -0,0 +1,382 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<DataSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tdwg.org/schemas/tcs/1.01     http://tdwg.napier.ac.uk/TCS_1.01/v101.xsd" xmlns="http://www.tdwg.org/schemas/tcs/1.01">
+    <!-- This is an instance document that tests as many different
+    applications of the schema as possible within a single document.
+    It is not meant to a 'realistic' example of a real data set
+    but a illustration of all the different types of data that can 
+    be passed. -->
+    <MetaData>
+        <!-- to be completed -->
+        <Simple/>
+    </MetaData>
+    <Specimens>
+        <Specimen id="2">
+            <Simple/>
+            <Institution identifier=""/>
+            <Collection identifier="LE"/>
+            <SpecimenItem identifier=""/>
+        </Specimen>
+    </Specimens>
+    <Publications>
+        <Publication id="1">
+            <Simple>Fl. SSR</Simple>
+        </Publication>
+        <Publication id="2">
+            <Simple>Copeland, H.F. (1943). A study, anatomical and taxonomic, of the
+                genera of Rhododendroideae. Am. Midl.Nat. 30:533-625</Simple>
+        </Publication>
+        <Publication id="3">
+            <Simple>Wilson, E.H. &amp; Rehder, A. (1921). A monograph of the azaleas.
+                Publication of the Arnold Arboretum No. 9 Harvard University, Cambridge
+            MA.</Simple>
+        </Publication>
+        <Publication id="4">
+            <Simple>Judd, W.S. &amp; Kron, K.A. (1995) A Revision of Rhododendron VI
+                Edinb. J. Bot. 52(1): 1-54</Simple>
+        </Publication>
+        <Publication id="5">
+            <Simple>Maximoxicz, C.J. (1870) Rhododendron schlippenbachii. Mem. Acad. Sci.
+                St Petersbourg. ser.3 15.</Simple>
+        </Publication>
+    </Publications>
+    <TaxonNames>
+        <TaxonName id="0" nomenclaturalCode="Botanical">
+            <Simple>Rhododendron</Simple>
+        </TaxonName>
+        <TaxonName nomenclaturalCode="Botanical" id="1">
+            <Simple>Rhododendron subgenus Pentanthera (G. Don) Poyarkova</Simple>
+            <CanonicalName>
+                <Simple>Rhododedron subgenus Pentanthera</Simple>
+                <Genus>Rhododendron</Genus>
+                <InfragenericEpithet>Pentanthera</InfragenericEpithet>
+            </CanonicalName>
+            <CanonicalAuthorship>
+                <Simple>(G.Don) Poyarkova</Simple>
+                <BasionymAuthorship>
+                    <Simple>G. Don</Simple>
+                    <Authors>
+                        <AgentName>G. Don</AgentName>
+                    </Authors>
+                </BasionymAuthorship>
+                <CombinationAuthorship>
+                    <Simple>Poyarkova</Simple>
+                    <Authors>
+                        <AgentName>Poyarkova</AgentName>
+                    </Authors>
+                </CombinationAuthorship>
+            </CanonicalAuthorship>
+            <PublishedIn ref="1">Fl. SSR Vol 18 (1952)</PublishedIn>
+            <MicroReference>Page 57</MicroReference>
+            <Typification>
+                <Simple>Rhododendron flavum G.Don</Simple>
+                    <!--
+                        N.B. This could be linked to a full name entry if
+                        required but no details are in the current monograph so
+                        it isn't
+                    -->
+                <TypeName/>
+            </Typification>
+        </TaxonName>
+        <TaxonName id="2" nomenclaturalCode="Botanical">
+            <Simple>Rhododendron sect. Sciadorhodion Rehder &amp; Wilson</Simple>
+            <CanonicalName>
+                <Simple>Rhododendron sect. Sciadorhodion</Simple>
+                <Genus>Rhododendron</Genus>
+                <InfragenericEpithet>Sciadorhodion</InfragenericEpithet>
+            </CanonicalName>
+            <CanonicalAuthorship>
+                <Simple>Rehder &amp; Wilson</Simple>
+                <BasionymAuthorship>
+                    <Simple>Rehder &amp; Wilson</Simple>
+                </BasionymAuthorship>
+            </CanonicalAuthorship>
+            <PublishedIn linkType="local" ref="3">Wislon &amp; Rehder Monogr. Azaleas 79 (1921)</PublishedIn>
+            <MicroReference>Page 79</MicroReference>
+            <Typification>
+                <Simple/>
+                <TypeName>
+                    <NameReference linkType="local" ref="3">Rhododendron quinquefolium Bisset
+                        &amp; Moore</NameReference>
+                    <LectotypePublication ref="2">Copeland, H.F.(1943)</LectotypePublication>
+                </TypeName>
+            </Typification>
+            <Basionym>
+                <RelatedName ref="4">Azalea subgen. Sciadorhodion (Rhehder &amp; Wilson)
+                    Copeland</RelatedName>
+            </Basionym>
+        </TaxonName>
+        <TaxonName id="3" nomenclaturalCode="Botanical">
+            <Simple>Rhododendron quinquefolium Bisset &amp; Moore</Simple>
+        </TaxonName>
+        <TaxonName id="4" nomenclaturalCode="Botanical">
+            <!-- for brevity this NameObject isn't fully expanded -->
+            <Simple>Azalea subgen. Sciadorhodion (Rhehder &amp; Wilson) Copeland </Simple>
+            <Basionym>
+                <RelatedName ref="2">Rhododendron sect. Sciadorhodion Rehder &amp;
+                Wilson</RelatedName>
+            </Basionym>
+        </TaxonName>
+        <TaxonName id="5" nomenclaturalCode="Botanical">
+            <Simple>Rhododendron schlippenbachii Maxim.</Simple>
+            <Rank code="sp">Species</Rank>
+            <CanonicalName>
+                <Simple>Rhododendron schlippenbachii</Simple>
+                <Genus>Rhododendron</Genus>
+                <SpecificEpithet>schlippenbachii</SpecificEpithet>
+            </CanonicalName>
+            <CanonicalAuthorship>
+                <Simple>Maxim.</Simple>
+                <BasionymAuthorship>
+                    <Simple>Maxim.</Simple>
+                    <Authors>
+                        <AgentName>Maximoxicz, C.J.</AgentName>
+                    </Authors>
+                </BasionymAuthorship>
+            </CanonicalAuthorship>
+            <PublishedIn ref="5">Bull. Acad. Sci. St Petersbourg, ser. 3 15 (1870)</PublishedIn>
+            <MicroReference>Page 226</MicroReference>
+            <Typification>
+                <Simple/>
+                <TypeVouchers>
+                <TypeVoucher typeOfType="lecto">
+                    <VoucherReference linkType="local" ref="1"/>
+                    <LectotypePublication ref="4"/>
+                    <LectotypeMicroReference>Page 15</LectotypeMicroReference>
+                </TypeVoucher>
+                <TypeVoucher typeOfType="isolecto">
+                    <VoucherReference linkType="local" ref="2"/>
+                    <LectotypePublication ref="4"/>
+                    <LectotypeMicroReference>Page 15</LectotypeMicroReference>
+                </TypeVoucher>
+                </TypeVouchers>
+            </Typification>
+        </TaxonName>
+        <TaxonName id="6" nomenclaturalCode="Botanical">
+            <Simple>Azalea schlippenbachii (Maxim.) Kuntze</Simple>
+            <CanonicalName>
+                <Simple>Azalea schlippenbachii</Simple>
+                <Genus>Azalea</Genus>
+                <SpecificEpithet>schlippenbachii</SpecificEpithet>
+            </CanonicalName>
+            <CanonicalAuthorship>
+                <Simple>(Maxim.) Kuntze</Simple>
+                <BasionymAuthorship>
+                    <Simple>Maxim.</Simple>
+                </BasionymAuthorship>
+                <CombinationAuthorship>
+                    <Simple>Kuntze</Simple>
+                </CombinationAuthorship>
+            </CanonicalAuthorship>
+            <PublishedIn>Revis. Gen.Pl. 2:387 (1891)</PublishedIn>
+            <Typification>
+                <Simple/>
+                <TypeVouchers>
+                <TypeVoucher typeOfType="lecto">
+                    <VoucherReference ref="2">[Russia] Manchuria, shores of Possiet Bay, [SW of
+                        Vladivostok], 1860, C. Maximowicz LE</VoucherReference>
+                    <LectotypePublication ref="4"/>
+                    <LectotypeMicroReference>Page 15</LectotypeMicroReference>
+                </TypeVoucher>
+               </TypeVouchers>
+            </Typification>
+        </TaxonName>
+        <TaxonName id="7" nomenclaturalCode="Botanical">
+            <Simple>Rhododendron pentaphyllum Maxim.</Simple>
+            <CanonicalName>
+                <Simple>Rhododendron pentaphyllum</Simple>
+                <Genus>Rhododendron</Genus>
+                <SpecificEpithet>pentaphyllum</SpecificEpithet>
+            </CanonicalName>
+            <CanonicalAuthorship>
+                <Simple>Maxim.</Simple>
+            </CanonicalAuthorship>
+            <PublishedIn>Bull. Acad. Sci. St Petersbourg, ser. 3, 31:65 (1887)</PublishedIn>
+            <Typification>
+                <Simple/>
+                <TypeVouchers>
+                    <TypeVoucher typeOfType="holo">
+                        <VoucherReference>Japan, Kyushiu, prov. Osumi, summit, Mt Taka-kuma, Tashiro
+                            (LE)</VoucherReference>
+                    </TypeVoucher>
+                </TypeVouchers>
+           
+            </Typification>
+        </TaxonName>
+        <TaxonName id="8" nomenclaturalCode="Botanical">
+            <Simple>Azalea pentaphylla (Maxim.) Copeland</Simple>
+            <CanonicalName>
+                <Simple>Azalea pentaphylla</Simple>
+                <Genus>Azalea</Genus>
+                <SpecificEpithet>pentaphylla</SpecificEpithet>
+            </CanonicalName>
+            <CanonicalAuthorship>
+                <Simple>(Maxim.) Copeland</Simple>
+                <BasionymAuthorship>
+                    <Simple>Maxim.</Simple>
+                </BasionymAuthorship>
+                <CombinationAuthorship>
+                    <Simple>Copeland</Simple>
+                </CombinationAuthorship>
+            </CanonicalAuthorship>
+            <PublishedIn>Am.Midl.Nat. 30:595 (1943)</PublishedIn>
+            <Typification>
+                <Simple/>
+                <TypeVouchers>
+                    <TypeVoucher typeOfType="holo">
+                        <VoucherReference>Japan, Kyushiu, prov. Osumi, summit, Mt Taka-kuma, Tashiro
+                            (LE)</VoucherReference>
+                    </TypeVoucher>
+                </TypeVouchers>
+            </Typification>
+        </TaxonName>
+        <TaxonName id="9" nomenclaturalCode="Botanical">
+            <Simple>Rhododendron pentaphyllum var. nikoense Komatsu</Simple>
+            <Rank code="var">variety</Rank>
+            <CanonicalName>
+                <Simple>Rhododendron pentaphyllum var. nikoense</Simple>
+                <Genus ref="0">Rhododendron</Genus>
+                <SpecificEpithet>pentaphyllum</SpecificEpithet>
+                <InfraspecificEpithet>nikoense</InfraspecificEpithet>
+            </CanonicalName>
+            <CanonicalAuthorship>
+                <Simple>Konatsu</Simple>
+            </CanonicalAuthorship>
+            <PublishedIn>Icon. Pl. Koisikav. 3: 45, t 168 (1916)</PublishedIn>
+        </TaxonName>
+        <TaxonName id="10" nomenclaturalCode="Botanical">
+            <Simple>Rhododendron nikoense (Komatsu) Nakai</Simple>
+            <Rank code="sp">Species</Rank>
+            <CanonicalName>
+                <Simple>Rhododendron nikoense</Simple>
+                <Genus ref="0">Rhododendron</Genus>
+                <SpecificEpithet>nikoense</SpecificEpithet>
+            </CanonicalName>
+            <CanonicalAuthorship>
+                <Simple>(Komatsu) Nakai</Simple>
+                <BasionymAuthorship>
+                    <Simple>Komatsu</Simple>
+                </BasionymAuthorship>
+                <CombinationAuthorship>
+                    <Simple>Nakai</Simple>
+                </CombinationAuthorship>
+            </CanonicalAuthorship>
+            <PublishedIn>Nakai &amp; Koidz. Trees and Shrubs Japan 1: 68 (1922)</PublishedIn>
+            <Basionym>
+                <RelatedName ref="9">Rhododendron pentaphyllum var. nikoense</RelatedName>
+            </Basionym>
+        </TaxonName>
+        <TaxonName id="11" nomenclaturalCode="Botanical">
+            <Simple>Rhododendron quinquefolium Bisset &amp; S. Moore var. roseum Rehder</Simple>
+            <Rank code="var">variety</Rank>
+            <CanonicalName>
+                <Simple>Rhododendron quinquefolium</Simple>
+                <Genus ref="0">Rhododendron</Genus>
+                <SpecificEpithet>quinquefolium</SpecificEpithet>
+                <InfraspecificEpithet>roseum</InfraspecificEpithet>
+            </CanonicalName>
+            <CanonicalAuthorship>
+                <Simple>Rehder</Simple>
+            </CanonicalAuthorship>
+            <PublishedIn>Bailey, Stand. Cycl. Hort. 5: 2947 (1916)</PublishedIn>
+        </TaxonName>
+        <TaxonName id="12" nomenclaturalCode="Botanical">
+            <Simple>Rhododendron pentaphyllum Maxim. var. shikokianum T. Yamazaki</Simple>
+            <Rank code="sp">species</Rank>
+            <CanonicalName>
+                <Simple>Rhododendron pentaphyllum var. shikokianum</Simple>
+                <Genus ref="0">Rhododendron</Genus>
+                <SpecificEpithet>pentaphyllum</SpecificEpithet>
+                <InfraspecificEpithet>shikokianum</InfraspecificEpithet>
+            </CanonicalName>
+            <CanonicalAuthorship>
+                <Simple>T. Yamazaki</Simple>
+            </CanonicalAuthorship>
+            <PublishedIn>Jap. Bot. 63: 312 (1988)</PublishedIn>
+        </TaxonName>
+    </TaxonNames>
+    <TaxonConcepts>
+        <TaxonConcept id="1">
+            <Name scientific="true" linkType="local" ref="2">Rhododendron sect. Sciadorhodion Rehder
+                &amp; Wilson</Name>
+            <Rank code="sect">Section</Rank>
+            <AccordingTo>
+                <Simple>Judd &amp; Kron (1995)</Simple>
+                <AccordingToDetailed>
+                    <PublishedIn linkType="local" ref="4">Judd &amp; Kron (1995) A Revision of
+                        Rhododendron VI </PublishedIn>
+                    <MicroReference>Page 13-14</MicroReference>
+                </AccordingToDetailed>
+            </AccordingTo>
+            <TaxonRelationships>
+                <TaxonRelationship type="is parent taxon of">
+                    <ToTaxonConcept linkType="local" ref="2"/>
+                </TaxonRelationship>
+            </TaxonRelationships>
+        </TaxonConcept>
+        <TaxonConcept id="2">
+            <Name scientific="true" linkType="local" ref="5">Rhododendron schlippenbachii Maxim.</Name>
+            <AccordingTo>
+                <Simple>Judd &amp; Kron (1995)</Simple>
+                <AccordingToDetailed>
+                    <PublishedIn linkType="local" ref="4"/>
+                    <MicroReference>Page 15</MicroReference>
+                </AccordingToDetailed>
+            </AccordingTo>
+            <TaxonRelationships>
+                <TaxonRelationship type="is child taxon of">
+                    <ToTaxonConcept ref="1">Rhododendron sect. Sciadorhodion Rehder &amp;
+                    Wilson</ToTaxonConcept>
+                </TaxonRelationship>
+            </TaxonRelationships>
+        </TaxonConcept>
+        <TaxonConcept id="3">
+            <Name scientific="true" ref="6">Azalea schlippenbachii (Maxim.) Kuntze</Name>
+            <AccordingTo>
+                <Simple>Kuntze (1891)</Simple>
+            </AccordingTo>
+            <TaxonRelationships>
+                <TaxonRelationship type="is congruent to">
+                    <ToTaxonConcept ref="2"/>
+                </TaxonRelationship>
+            </TaxonRelationships>
+        </TaxonConcept>
+        <TaxonConcept id="4">
+            <Name scientific="true" ref="7">Rhododendron pentaphyllum Maxim.</Name>
+            <AccordingTo>
+                <Simple>Judd &amp; Kron (1995)</Simple>
+            </AccordingTo>
+            <TaxonRelationships>
+                <!-- relationships linking to taxonconcept without any descriptive string -->
+                <TaxonRelationship type="has synonym">
+                    <ToTaxonConcept ref="6"/>
+                </TaxonRelationship>
+                <TaxonRelationship type="has synonym">
+                    <ToTaxonConcept ref="7"/>
+                </TaxonRelationship>
+                <!-- relationship with linking reference to another taxon concept and string description of concept -->
+                <TaxonRelationship type="has synonym">
+                    <ToTaxonConcept ref="8">Rhododendron pentaphyllum var. nikoense
+                    Komatsu</ToTaxonConcept>
+                </TaxonRelationship>
+                <!-- relationships without linking -->
+                <TaxonRelationship type="has synonym">
+                    <ToTaxonConcept>Rhododendron pentaphyllum Maxim. var. shikokianum T.
+                    Yamazaki</ToTaxonConcept>
+                </TaxonRelationship>
+                <TaxonRelationship type="has synonym">
+                    <ToTaxonConcept>Rhododendron quinquefolium Bisset &amp; S. Moore var. roseum
+                        Rehder</ToTaxonConcept>
+                </TaxonRelationship>
+            </TaxonRelationships>
+        </TaxonConcept>
+        <TaxonConcept id="6">
+            <Name scientific="true">Rhododendron nikoense (Komatsu) Nakai</Name>
+        </TaxonConcept>
+        <TaxonConcept id="7">
+            <Name scientific="true" ref="10">Rhododendron nikoense (Komatsu) Nakai</Name>
+        </TaxonConcept>
+        <TaxonConcept id="8">
+            <Name scientific="true" ref="9">Rhododendron pentaphyllum var. nikoense Komatsu</Name>
+        </TaxonConcept>
+    </TaxonConcepts>
+</DataSet>
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/log4j.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/log4j.xml
new file mode 100644 (file)
index 0000000..64c4d55
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> 
+        <param name="Target" value="System.out"/>
+        <layout class="org.apache.log4j.PatternLayout"> 
+            <param name="ConversionPattern" value="%d %p [%c] - %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.filter.ExpressionFilter">
+            <param name="expression" value="msg like  '.*has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.*'" />
+            <param name="acceptOnMatch" value="false"/>
+        </filter>            
+    </appender>
+    <root>
+        <priority value ="WARN" />
+        <appender-ref ref="CONSOLE"/>
+    </root>
+    <logger name="org.hibernate.proxy.AbstractLazyInitializer">
+        <level value="info"/> 
+    </logger>
+    <logger name="org.hibernate.collection.internal.AbstractPersistentCollection">
+        <level value="info"/> 
+    </logger>
+</log4j:configuration>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/server.properties b/eu.etaxonomy.taxeditor.test/src/test/resources/server.properties
new file mode 100644 (file)
index 0000000..5b20cc4
--- /dev/null
@@ -0,0 +1,5 @@
+httpPort=9090
+stopPort=9191
+stopKey=jetty-cdm-server
+user=admin
+password=00000
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/unitils.properties b/eu.etaxonomy.taxeditor.test/src/test/resources/unitils.properties
new file mode 100644 (file)
index 0000000..daea61b
--- /dev/null
@@ -0,0 +1,69 @@
+#
+# NOTE: this is the unitils.properties file for the cdmlib-persistence module
+# a separate unitils.properties exists for cdmlib-io and for cdmlib-services
+#
+#
+# the list of all properties is found in
+# http://unitils.org/unitils-default.properties
+#
+
+### Unitils Modules ###
+# List of modules that is loaded. Overloading this list is normally not useful, unless you want to add a custom
+# module. Disabling a module can be performed by setting unitils.module.<modulename>.enabled to false.
+# If a module's specific dependencies are not found (e.g. hibernate is not in you classpath), this module is not loaded,
+# even if it is in this list and the enabled property is set to true. It's therefore not strictly necessary to disable
+# any of these modules.
+#DEFAULT: unitils.modules=database,dbunit,hibernate,mock,easymock,inject,spring,jpa
+unitils.module.easymock.enabled=false
+unitils.module.mock.enabled=false
+
+
+### Database ###
+#
+# Name or path of the user specific properties file. This file should contain the necessary parameters to connect to the
+# developer's own unit test schema. It is recommended to override the name of this file in the project specific properties
+# file, to include the name of the project. The system will try to find this file in the classpath, the user home folder
+# (recommended) or the local filesystem.
+#
+unitils.configuration.localFileName=unitils-cdmlib-local.properties
+
+# H2 #
+#
+database.driverClassName=org.h2.Driver
+#database.url=jdbc:h2:file:./src/main/resources/h2/cdmTest;AUTO_SERVER=TRUE
+database.url=jdbc:h2:file:./target/classes/h2/cdmTest;AUTO_SERVER=TRUE
+database.dialect=h2
+database.userName=sa
+database.password=
+database.schemaNames=PUBLIC
+org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.h2=org.dbunit.ext.h2.H2DataTypeFactory
+org.unitils.core.dbsupport.DbSupport.implClassName.h2=eu.etaxonomy.taxeditor.util.H2DbSupport
+database.storedIndentifierCase.h2=auto
+database.identifierQuoteString.h2=auto
+
+
+#### Transaction mode ###
+#
+# If set to commit or rollback, each test is run in a transaction,
+# which is committed or rolled back after the test is finished.
+# Since we have many tests with incomplete data these tests would be
+# failing during commit so it is better use rollback as default
+# and set commit for individual test where necessary
+DatabaseModule.Transactional.value.default=rollback
+
+# org.unitils.database.transaction.impl.DefaultUnitilsTransactionManager is used by default:
+#
+#   Implements transactions for unit tests, by delegating to a spring PlatformTransactionManager.
+#   The concrete implementation of PlatformTransactionManager that is used depends on the test class.
+#   If a custom PlatformTransactionManager was configured in a spring ApplicationContext, this one is used.
+#   If not, a suitable subclass of PlatformTransactionManager is created, depending on the configuration
+#   of a test. E.g. if some ORM persistence unit was configured on the test, a PlatformTransactionManager
+#   that can offer transactional behavior for such a persistence unit is used.
+#   If no such configuration is found, a DataSourceTransactionManager is used.
+#
+# org.unitils.database.transaction.UnitilsTransactionManager.implClassName=org.unitils.database.transaction.impl.SpringTransactionManager
+
+### Hibernate ###
+#
+HibernateModule.configuration.implClassName=org.hibernate.cfg.Configuration
+
index ba79cb2965e11c063686d144465972190211b7a5..70b3b40b6fed0bc8f5b149bcd63fe15750ec995d 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?><product application="eu.etaxonomy.taxeditor.application.application" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" includeLaunchers="true" name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" useFeatures="true" version="3.8.0.qualifier">
+<?pde version="3.5"?><product application="eu.etaxonomy.taxeditor.application.application" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" includeLaunchers="true" name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" useFeatures="true" version="3.12.0.SNAPSHOT">
   <aboutInfo>
     <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
     <text>
index 7998db3a2427f9f5930a82bebae98cff91867f6d..2710aece7625e9087d0fc6eff4bceefbd37e7485 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 
-<product name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product.jre" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" application="eu.etaxonomy.taxeditor.application.application" version="3.8.0.qualifier" useFeatures="true" includeLaunchers="true">
+<product name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product.jre" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" application="eu.etaxonomy.taxeditor.application.application" version="3.9.0.qualifier" useFeatures="true" includeLaunchers="true">
 
    <aboutInfo>
       <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
index 09c338c76e97538ae64f8ecb946f9b16d03af2c7..d775da5ba237bee64bb556980ae584f3979a0b09 100644 (file)
@@ -2,7 +2,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>3.8.0-SNAPSHOT</version>
+    <version>3.12.0-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
   <name>EDIT Taxonomic Editor Product</name>
   <description>The EDIT Taxonomic Desktop Editor</description>
   <url>http://wp5.e-taxonomy.eu/taxeditor</url>
-  <properties>    
+  <properties>
     <product.id>eu.etaxonomy.taxeditor.product</product.id>
   </properties>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.eclipse.tycho</groupId>
-        <artifactId>tycho-p2-director-plugin</artifactId>
-        <version>${tycho.version}</version>
-        <executions>
-          <execution>
-            <id>materialize-products</id>
-            <goals>
-              <goal>materialize-products</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>archive-products</id>
-            <goals>
-              <goal>archive-products</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <products>
-            <product>
-              <id>${product.id}</id>
-              <rootFolder>EDIT Taxonomic Editor</rootFolder>
-            </product>
-          </products>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+
   <profiles>
+    <profile>
+      <id>buildProducts</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.eclipse.tycho</groupId>
+            <artifactId>tycho-p2-director-plugin</artifactId>
+            <version>${tycho.version}</version>
+            <executions>
+              <execution>
+                <id>materialize-products</id>
+                <goals>
+                  <goal>materialize-products</goal>
+                </goals>
+              </execution>
+              <execution>
+                <id>archive-products</id>
+                <goals>
+                  <goal>archive-products</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <products>
+                <product>
+                  <id>${product.id}</id>
+                  <rootFolder>EDIT Taxonomic Editor</rootFolder>
+                </product>
+              </products>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
     <profile>
       <id>signJars</id>
       <build>
diff --git a/pom.xml b/pom.xml
index 44ff82a0435db2349a683eb4e550959c0dfce9c0..0dad8594b2338afe26aa0b5eab65182a8b883e53 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <prerequisites>
     <maven>3.0</maven>
   </prerequisites>
   <groupId>eu.etaxonomy</groupId>
   <artifactId>taxeditor-parent</artifactId>
-  <version>3.8.0-SNAPSHOT</version>
+  <version>3.12.0-SNAPSHOT</version>
   <name>EDIT Taxonomic Editor</name>
   <description>The Taxonomic Editor for EDIT's platform for
     cybertaxonomy
   <properties>
     <java.codelevel>1.6</java.codelevel>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <cdmlib.version>3.8.0-SNAPSHOT</cdmlib.version>
+    <cdmlib.version>3.12.0-SNAPSHOT</cdmlib.version>
     <!-- TODO can we use project.version ????? -->
     <tycho.version>0.22.0</tycho.version>
-    <taxeditor.version>3.8.0-SNAPSHOT</taxeditor.version>
+    <taxeditor.version>3.12.0-SNAPSHOT</taxeditor.version>
     <update.dir>snapshot</update.dir>
+    <unitils.version>3.4.2</unitils.version>
   </properties>
   <modules>
     <module>eu.etaxonomy.taxeditor.cdmlib</module>