fix #5759 remove all switches for remoting and standalone root/branches/taxeditor/develop
authorKatja Luther <k.luther@bgbm.org>
Tue, 6 Sep 2016 10:29:19 +0000 (12:29 +0200)
committerKatja Luther <k.luther@bgbm.org>
Tue, 6 Sep 2016 10:29:19 +0000 (12:29 +0200)
57 files changed:
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/MediaEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/OccurrenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/TaxonEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/UserEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/UserCreator.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/group/authority/CdmAuthorityEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorInput.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/contextMenu/CreateDerivateContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateFieldUnitContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/SingleReadHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaViewPart.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditorInput.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/RecentNamesContributionItem.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/TermEditorInput.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/EditFeatureTreeWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/FeatureTreeEditorWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/SelectFeatureTreeWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/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/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/newWizard/NewAmplificationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewClassificationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewCollectionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewDerivedUnitBaseWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewFieldUnitWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewGrantedAuthorityWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewGroupWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewInstitutionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewNonViralNameWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPersonWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPolytomousKeyWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPrimerWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTeamWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewUserWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.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/section/feature/FeatureDistributionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameRelationshipWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EditFromSelectionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SaveImportedSpecimenAction.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SpecimenImportView.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SpecimenSearchWizard.java

index 26e12964f5873fec932eb26d4696a3974158161d..31b7498ca2421f463b3fc1b38d3fcb449d6a5b04 100644 (file)
@@ -150,12 +150,8 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
 
        @Override
        public TeamOrPersonBase save(TeamOrPersonBase entity) {
 
        @Override
        public TeamOrPersonBase save(TeamOrPersonBase entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return (TeamOrPersonBase) CdmStore.getService(IAgentService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IAgentService.class).saveOrUpdate(entity) ;
-               return entity;
-           }
+          return (TeamOrPersonBase) CdmStore.getService(IAgentService.class).merge(entity, true).getMergedEntity();
+          
        }
 
        @Override
        }
 
        @Override
index b868562441ad299f4c0f05c82c9475019e00d6d4..440af4567837e95f5fe471146040569e163821d0 100644 (file)
@@ -66,12 +66,8 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
         */
        @Override
        public Group save(Group entity) {
         */
        @Override
        public Group save(Group entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IGroupService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IGroupService.class).saveOrUpdate(entity);
-               return entity;
-           }
+           return CdmStore.getService(IGroupService.class).merge(entity, true).getMergedEntity();
+           
        }
 
        /* (non-Javadoc)
        }
 
        /* (non-Javadoc)
index 2af42543a735e2914c44d81378a94a1cfd7236be..697118e4610fa7614fb72e2d2c54f2da3dfa180e 100644 (file)
@@ -56,12 +56,8 @@ public class MediaEditorInput extends AbstractBulkEditorInput<Media> {
 
     @Override
     public Media save(Media entity) {
 
     @Override
     public Media save(Media entity) {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            return CdmStore.getService(IMediaService.class).merge(entity, true).getMergedEntity();
-        } else {
-            CdmStore.getService(IMediaService.class).saveOrUpdate(entity) ;
-            return entity;
-        }
+       return CdmStore.getService(IMediaService.class).merge(entity, true).getMergedEntity();
+       
     }
 
     @Override
     }
 
     @Override
index 1cc24918e01040056414c335df3a52e1661c33e5..9017638d02c7cabc867d1ae9211516a9175ab3d7 100644 (file)
@@ -123,12 +123,8 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
        @Override
     public TaxonNameBase save(TaxonNameBase entity) {
                TaxonNameBase mergedName = null;
        @Override
     public TaxonNameBase save(TaxonNameBase entity) {
                TaxonNameBase mergedName = null;
-               
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                       mergedName =  CdmStore.getService(INameService.class).merge(entity, true).getMergedEntity();
-           } 
-               
-               return mergedName;
+               mergedName =  CdmStore.getService(INameService.class).merge(entity, true).getMergedEntity();
+               return mergedName;
                
        }
 
                
        }
 
index 5f20772409c7e74d718ec3a9dcd14df23ff008cc..b247659c2420489dde582728704e45dc114bed2a 100644 (file)
@@ -139,12 +139,8 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
        /** {@inheritDoc} */
        @Override
     public SpecimenOrObservationBase<IIdentifiableEntityCacheStrategy> save(SpecimenOrObservationBase entity) {
        /** {@inheritDoc} */
        @Override
     public SpecimenOrObservationBase<IIdentifiableEntityCacheStrategy> save(SpecimenOrObservationBase entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IOccurrenceService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IOccurrenceService.class).save(entity);
-               return entity;
-           }
+           return CdmStore.getService(IOccurrenceService.class).merge(entity, true).getMergedEntity();
+          
        }
 
 
        }
 
 
index 8b8c11360c4442e1c160b9ed43ea630209e3b738..a269df46a5f098281d8780630ee10c49d17ad787 100644 (file)
@@ -139,12 +139,7 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
        /** {@inheritDoc} */
        @Override
     public Reference save(Reference entity) {
        /** {@inheritDoc} */
        @Override
     public Reference save(Reference entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IReferenceService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IReferenceService.class).saveOrUpdate(entity);
-               return entity;
-           }
+          return CdmStore.getService(IReferenceService.class).merge(entity, true).getMergedEntity();
        }
 
        /* (non-Javadoc)
        }
 
        /* (non-Javadoc)
index aa6dd1537bbae92c19b7a49adc5b35dbb09964eb..5ea635f3b156e82c05d07745a4264d00b44f7f21 100644 (file)
@@ -71,12 +71,7 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
        }\r
        @Override\r
        public TaxonBase save(TaxonBase entity) {\r
        }\r
        @Override\r
        public TaxonBase save(TaxonBase entity) {\r
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {\r
-               return CdmStore.getService(ITaxonService.class).merge(entity, true).getMergedEntity();\r
-           } else {\r
-               CdmStore.getService(ITaxonService.class).saveOrUpdate(entity);\r
-               return entity;\r
-           }\r
+           return CdmStore.getService(ITaxonService.class).merge(entity, true).getMergedEntity();\r
        }\r
 \r
 \r
        }\r
 \r
 \r
index 46ce65fbe542e10062963e7833f759ecd0224c6f..f78e19d0d4111b757db6380e538d3e4d484193d3 100644 (file)
@@ -64,13 +64,7 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
         */
        @Override
        public User save(User entity) {
         */
        @Override
        public User save(User entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IUserService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IUserService.class).saveOrUpdate(entity);
-               return entity;
-           }
-
+           return CdmStore.getService(IUserService.class).merge(entity, true).getMergedEntity();
        }
 
        /* (non-Javadoc)
        }
 
        /* (non-Javadoc)
index 81ebab53c8c63236ee855d06810806a8a13b884d..c9f014554a3efa6580f0c8d9b5177a4f87ff46ed 100644 (file)
@@ -43,12 +43,8 @@ public class UserCreator  implements IEntityCreator<User>{
        public User createEntity(Object key, String text) {
                try{
                        User user = User.NewInstance(text, text);
        public User createEntity(Object key, String text) {
                try{
                        User user = User.NewInstance(text, text);
-                        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                            CdmStore.getService(IUserService.class).createUser(user);
-                            user = CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
-                        } else {
-                            CdmStore.getService(IUserService.class).createUser(user);
-                        }
+                       CdmStore.getService(IUserService.class).createUser(user);
+                       user = CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
                        return user;
                } catch (AccessDeniedException e){
                        MessagingUtils.messageDialog("Access denied", getClass(), e.getMessage(), e);
                        return user;
                } catch (AccessDeniedException e){
                        MessagingUtils.messageDialog("Access denied", getClass(), e.getMessage(), e);
index d127c3f317347b866f89fcb6f23b84ce44643c29..0c223154ba6b55c5dc509a9b5da65ee7657b3480 100644 (file)
@@ -454,9 +454,8 @@ public class TaxonEditorInput  extends CdmEntitySessionInput implements IEditorI
      */
     @Override
     public void merge() {
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
-        }
+       CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
+       
     }
 
     @Override
     }
 
     @Override
index fa78b41d88044db94249d9b55fe250b10df73211..f4979367750683a514ae5263b75b6940999b7d34 100644 (file)
@@ -157,8 +157,7 @@ public class CdmAuthorityEditorInput extends CdmEntitySessionInput implements IE
      */
     @Override
     public void merge() {
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            group = CdmStore.getService(IGroupService.class).merge(group, true).getMergedEntity();
-        }
+        group = CdmStore.getService(IGroupService.class).merge(group, true).getMergedEntity();
+       
     }
 }
     }
 }
index 7a190f4323be88cf4668390e437fc48080a72867..e75a1262272b753c8679e86ea875f44b25ab2f58 100644 (file)
@@ -91,9 +91,8 @@ public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<
      */
     @Override
     public void merge() {
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            key = CdmStore.getService(IPolytomousKeyService.class).merge(key,true).getMergedEntity();
-        }
+       key = CdmStore.getService(IPolytomousKeyService.class).merge(key,true).getMergedEntity();
+      
     }
 
     @Override
     }
 
     @Override
index e4df386b14e82ed34774039cf79d949b8318592d..c5bcfb75a8c4e0d2bdca90719b15eb0220a50bd3 100644 (file)
@@ -356,9 +356,8 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         // commit the conversation and start a new transaction immediately
         conversation.commit(true);
 
         // commit the conversation and start a new transaction immediately
         conversation.commit(true);
 
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(IOccurrenceService.class).merge(new ArrayList<SpecimenOrObservationBase>(rootElements), true);
-        }
+        CdmStore.getService(IOccurrenceService.class).merge(new ArrayList<SpecimenOrObservationBase>(rootElements), true);
+        
         monitor.worked(1);
 
         this.setDirty(false);
         monitor.worked(1);
 
         this.setDirty(false);
index daf96f4315be5126cf654de656924d9e05dd03a6..cbdd50c782dbedc1c2ef97249e53a95fc7503e2f 100644 (file)
@@ -141,9 +141,8 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                             specimenOrObservationBase.addDerivationEvent(DerivationEvent.NewSimpleInstance(specimenOrObservationBase, mediaSpecimen, derivationEventType));
                             mediaSpecimen.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                             mediaSpecimen.getTitleCache(); //update title cache
                             specimenOrObservationBase.addDerivationEvent(DerivationEvent.NewSimpleInstance(specimenOrObservationBase, mediaSpecimen, derivationEventType));
                             mediaSpecimen.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                             mediaSpecimen.getTitleCache(); //update title cache
-                            if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                                CdmStore.getService(IOccurrenceService.class).merge(specimenOrObservationBase, true);
-                            }
+                            CdmStore.getService(IOccurrenceService.class).merge(specimenOrObservationBase, true);
+                           
                         }
 
                         //refresh view
                         }
 
                         //refresh view
@@ -208,17 +207,13 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                     Sequence newInstance = Sequence.NewInstance(dnaSample, "", 0); //$NON-NLS-1$
                     createdElement = newInstance;
                 }
                     Sequence newInstance = Sequence.NewInstance(dnaSample, "", 0); //$NON-NLS-1$
                     createdElement = newInstance;
                 }
-                if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                    CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
-                }
-            }
-            else if(selectedDerivate instanceof Sequence){
+                CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
+            } else if(selectedDerivate instanceof Sequence){
                 SingleRead newInstance = SingleRead.NewInstance();
                 ((Sequence) selectedDerivate).addSingleRead(newInstance);
                 createdElement = newInstance;
                 SingleRead newInstance = SingleRead.NewInstance();
                 ((Sequence) selectedDerivate).addSingleRead(newInstance);
                 createdElement = newInstance;
-                if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                    CdmApplicationState.getCurrentAppConfig().getSequenceService().merge((Sequence)selectedDerivate, true);
-                }
+                CdmApplicationState.getCurrentAppConfig().getSequenceService().merge((Sequence)selectedDerivate, true);
+                
             }
             if(selectedDerivate instanceof SpecimenOrObservationBase && DerivedUnit.class.isAssignableFrom(childClass)){
                 SpecimenOrObservationBase<?> specimenOrObservationBase = (SpecimenOrObservationBase<?>)selectedDerivate;
             }
             if(selectedDerivate instanceof SpecimenOrObservationBase && DerivedUnit.class.isAssignableFrom(childClass)){
                 SpecimenOrObservationBase<?> specimenOrObservationBase = (SpecimenOrObservationBase<?>)selectedDerivate;
@@ -244,9 +239,8 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                 derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                 derivedUnit.getTitleCache(); //update title cache
                 createdElement = derivedUnit;
                 derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                 derivedUnit.getTitleCache(); //update title cache
                 createdElement = derivedUnit;
-                if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                    CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
-                }
+                CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
+                
             }
 
             //refresh view
             }
 
             //refresh view
index 7a7c749b99c40147d5339a5bc9675f106afd2bd9..09a52a28831990c75919f588d8dc4b6a94d0229c 100644 (file)
@@ -70,12 +70,8 @@ public class CreateFieldUnitContextMenu extends CompoundContributionItem {
                                                 description = TaxonDescription.NewInstance(taxon);
                                             }
                                             description.addElement(association);
                                                 description = TaxonDescription.NewInstance(taxon);
                                             }
                                             description.addElement(association);
-                                            if(CdmStore.getCurrentSessionManager().isRemoting()){
-                                                CdmStore.getService(ITaxonService.class).merge(taxon);
-                                            }
-                                            else{
-                                                CdmStore.getService(ITaxonService.class).saveOrUpdate(taxon);
-                                            }
+                                            CdmStore.getService(ITaxonService.class).merge(taxon);
+                                            
 
                                             derivateView.getConversationHolder().commit();
                                             derivateView.addFieldUnit(fieldUnit);
 
                                             derivateView.getConversationHolder().commit();
                                             derivateView.addFieldUnit(fieldUnit);
index ba5f2b953f252df0f40cbc635088c579c16c5e59..3a02146cc23a6bdff1273bc0d921e3a526dfb51f 100644 (file)
@@ -41,12 +41,8 @@ public class SingleReadHandler extends AbstractHandler {
                     SingleRead singleRead = (SingleRead)clipBoardTreeNode.getValue();
                     Sequence sequence = (Sequence)selectedTreeNode.getValue();
                     sequence.addSingleRead(singleRead);
                     SingleRead singleRead = (SingleRead)clipBoardTreeNode.getValue();
                     Sequence sequence = (Sequence)selectedTreeNode.getValue();
                     sequence.addSingleRead(singleRead);
-                    if(CdmStore.getCurrentSessionManager().isRemoting()){
-                        CdmStore.getService(ISequenceService.class).merge(sequence);
-                    }
-                    else{
-                        CdmStore.getService(ISequenceService.class).saveOrUpdate(sequence);
-                    }
+                    CdmStore.getService(ISequenceService.class).merge(sequence);
+                   
                     if(activeEditor instanceof DerivateView) {
                         derivateView.getConversationHolder().commit();
                         derivateView.refreshTree();
                     if(activeEditor instanceof DerivateView) {
                         derivateView.getConversationHolder().commit();
                         derivateView.refreshTree();
@@ -63,12 +59,8 @@ public class SingleReadHandler extends AbstractHandler {
                         selectedTreeNode.getValue() instanceof SingleRead && selectedTreeNode.getParent().getValue() instanceof Sequence) {
                     Sequence sequence = (Sequence) selectedTreeNode.getParent().getValue();
                     sequence.removeSingleRead((SingleRead) selectedTreeNode.getValue());
                         selectedTreeNode.getValue() instanceof SingleRead && selectedTreeNode.getParent().getValue() instanceof Sequence) {
                     Sequence sequence = (Sequence) selectedTreeNode.getParent().getValue();
                     sequence.removeSingleRead((SingleRead) selectedTreeNode.getValue());
-                    if(CdmStore.getCurrentSessionManager().isRemoting()){
-                        CdmStore.getService(ISequenceService.class).merge(sequence);
-                    }
-                    else{
-                        CdmStore.getService(ISequenceService.class).saveOrUpdate(sequence);
-                    }
+                    CdmStore.getService(ISequenceService.class).merge(sequence);
+                    
                     if(activeEditor instanceof DerivateView) {
                         derivateView.getConversationHolder().commit();
                         derivateView.refreshTree();
                     if(activeEditor instanceof DerivateView) {
                         derivateView.getConversationHolder().commit();
                         derivateView.refreshTree();
index 53d3b558be85e3f81968c31252598658cdc27044..b61efaa48f9eef794f3922ebdcbdb45704cea269 100644 (file)
@@ -279,10 +279,9 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
                }
                if(part instanceof BulkEditor && !(object instanceof SpecimenOrObservationBase<?>)){
                    ((BulkEditor) part).forceDirty();
                }
                if(part instanceof BulkEditor && !(object instanceof SpecimenOrObservationBase<?>)){
                    ((BulkEditor) part).forceDirty();
-                   if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                       IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
-                       ((BulkEditor) part).changed(selection.getFirstElement());
-                   }
+                   IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
+                   ((BulkEditor) part).changed(selection.getFirstElement());
+                   
                }
 
 
                }
 
 
index 331526d40397a50d0d24cd73c10560d87031aced..28beab559a53cd7205b2c1df62378d0effb27c8d 100644 (file)
@@ -135,10 +135,9 @@ public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartCon
            // take a look at ISaveblePart
            if(part instanceof BulkEditor && !(object instanceof SpecimenOrObservationBase<?>)){
                ((BulkEditor) part).forceDirty();
            // take a look at ISaveblePart
            if(part instanceof BulkEditor && !(object instanceof SpecimenOrObservationBase<?>)){
                ((BulkEditor) part).forceDirty();
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
-                ((BulkEditor) part).changed(selection.getFirstElement());
-            }
+               IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
+            ((BulkEditor) part).changed(selection.getFirstElement());
+            
            }
            super.changed(object);
        }
            }
            super.changed(object);
        }
index 4bc956e3c574047187657a788b2118005a810ed3..89bc3cba996fdb1def53f73bccb0bb6d614ac7eb 100644 (file)
@@ -163,8 +163,7 @@ public class AlignmentEditorInput extends CdmEntitySessionInput implements IEdit
      */
     @Override
     public void merge() {
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(ISequenceService.class).merge(sequenceNode, true);
-        }
+        CdmStore.getService(ISequenceService.class).merge(sequenceNode, true);
+        
     }
 }
     }
 }
index 984d7cf0a187d3f44a8315e11f4cf1393c60b426..3d190f9a13014380f39110014633a983f0656d42 100644 (file)
@@ -73,7 +73,7 @@ public class RecentNamesContributionItem extends ContributionItem {
        /** {@inheritDoc} */
        @Override
        public void fill(Menu parent, int index) {
        /** {@inheritDoc} */
        @Override
        public void fill(Menu parent, int index) {
-               getRecentWindows().fill(parent, index);
+       //      getRecentWindows().fill(parent, index);
        }
 
        /* (non-Javadoc)
        }
 
        /* (non-Javadoc)
index 33c0be7541f96d1dbd65474211ee049abc2158f4..035397f3c2b3e85b7cf17e0ddd90e6175d3d7666 100644 (file)
@@ -198,14 +198,9 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                return Status.CANCEL_STATUS;
                        }
 
                                return Status.CANCEL_STATUS;
                        }
 
-                       if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                           AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
-                           NavigationUtil.executeOperation(operation, null);
-                       } else {
-                           AbstractPostOperation operation = new MoveTaxonOperation
-                                   ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
-                           NavigationUtil.executeOperation(operation);
-            }
+                       AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
+                       NavigationUtil.executeOperation(operation, null);
+                       
 
                        logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                        return Status.OK_STATUS;
 
                        logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                        return Status.OK_STATUS;
@@ -221,14 +216,9 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                        return Status.CANCEL_STATUS;
                                }
 
                                        return Status.CANCEL_STATUS;
                                }
 
-                               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                                   AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
-                                   NavigationUtil.executeOperation(operation, null);
-                               } else {
-                                   AbstractPostOperation operation = new MoveTaxonOperation
-                                           ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
-                                   NavigationUtil.executeOperation(operation);
-                               }
+                               AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
+                               NavigationUtil.executeOperation(operation, null);
+                               
 
                                logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                                return Status.OK_STATUS;
 
                                logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                                return Status.OK_STATUS;
@@ -240,14 +230,9 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                }
                                TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
 
                                }
                                TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
 
-                               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                                   AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, targetNode, MovingType.BEHIND);
-                                   NavigationUtil.executeOperation(operation, null);
-                               } else {
-                                   AbstractPostOperation operation = new MoveTaxonOperation
-                                           ("Move Taxon", workspaceUndoContext, uuids, targetNode, this, taxonNavigator, MovingType.BEHIND);
-                                   NavigationUtil.executeOperation(operation);
-                               }
+                               AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, targetNode, MovingType.BEHIND);
+                               NavigationUtil.executeOperation(operation, null);
+                               
                                logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                                return Status.OK_STATUS;
 //                     }else if (returnCode == 2){
                                logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                                return Status.OK_STATUS;
 //                     }else if (returnCode == 2){
index 518382f1f1f494a3b3f6e4c211807f0e4e9db7c5..a02e9a73288a0f1c92ae8ee5ce506cf9105fb127 100644 (file)
@@ -101,10 +101,8 @@ public class TermEditorInput extends AbstractDefinedTermEditorInput<DefinedTerm>
      */
     @Override
     public void merge() {
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(IVocabularyService.class).merge(new ArrayList<TermVocabulary>(getRootEntities()), true);
-            updateDefaultFeatureTree();
-        }
+        CdmStore.getService(IVocabularyService.class).merge(new ArrayList<TermVocabulary>(getRootEntities()), true);
+        updateDefaultFeatureTree();
     }
 
     public static FeatureTree getDefaultFeatureTree() {
     }
 
     public static FeatureTree getDefaultFeatureTree() {
index 78cd5bd5aec99f095c9a6b893de13f8fde580e40..36a91960340ee97e7b025ace6011a98f168f1ad5 100644 (file)
@@ -206,11 +206,8 @@ public class EditFeatureTreeWizardPage extends WizardPage implements
                                                .getAdditionalFeatures();
                                for (Feature feature : additionalFeatures) {
                                        FeatureNode child = FeatureNode.NewInstance(feature);
                                                .getAdditionalFeatures();
                                for (Feature feature : additionalFeatures) {
                                        FeatureNode child = FeatureNode.NewInstance(feature);
-                                       if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                                           CdmStore.getService(IFeatureNodeService.class).merge(child, true);
-                                       } else {
-                                           CdmStore.getService(IFeatureNodeService.class).saveOrUpdate(child);
-                                       }
+                                       CdmStore.getService(IFeatureNodeService.class).merge(child, true);
+                                       
                                        parent.addChild(child);
                                }
                                viewer.refresh();
                                        parent.addChild(child);
                                }
                                viewer.refresh();
index d65ad420e94c6cb1c34220b7246246ccedccc893..c8c58d3e0602c2f0a81169e21d8c029f0108fe2e 100644 (file)
@@ -70,11 +70,7 @@ public class FeatureTreeEditorWizard extends Wizard implements ICdmEntitySession
        public boolean performFinish() {
                try{
                        if (selectedFeatureTree != null){
        public boolean performFinish() {
                try{
                        if (selectedFeatureTree != null){
-                           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                               CdmStore.getService(IFeatureTreeService.class).merge(selectedFeatureTree, true);
-                           } else {
-                               CdmStore.getService(IFeatureTreeService.class).saveOrUpdate(selectedFeatureTree);
-                           }
+                           CdmStore.getService(IFeatureTreeService.class).merge(selectedFeatureTree, true);
                        }
                        conversation.commit();
                }finally{
                        }
                        conversation.commit();
                }finally{
index 409dae7e618292496c491b0506838e6f42cda02b..a7abcb38bb498c2f8fe4163769a604ef0c5bf964 100644 (file)
@@ -151,11 +151,8 @@ public class SelectFeatureTreeWizardPage extends WizardPage implements ISelectio
                        featureTree.setTitleCache(text_title.getText(), true);
 
                        viewer.add(featureTree);
                        featureTree.setTitleCache(text_title.getText(), true);
 
                        viewer.add(featureTree);
-                       if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                CdmStore.getService(IFeatureTreeService.class).merge(featureTree, true);
-                       } else {
-                           CdmStore.getService(IFeatureTreeService.class).saveOrUpdate(featureTree);
-                       }
+                       CdmStore.getService(IFeatureTreeService.class).merge(featureTree, true);
+                       
                        text_title.setText("");
                        viewer.setSelection(new StructuredSelection(featureTree));
 
                        text_title.setText("");
                        viewer.setSelection(new StructuredSelection(featureTree));
 
index d6f3236ea638ddb1463fbdb70c4b48a185008dfc..d75d589bfb5572a0c2bec55c7258f87a77bc657f 100644 (file)
@@ -56,20 +56,8 @@ public class AbcdImportWizard extends AbstractImportWizard<Abcd206ImportConfigur
                configurator.setClassificationUuid(classificationChooserWizardPage.getClassification().getUuid());
            }
 
                configurator.setClassificationUuid(classificationChooserWizardPage.getClassification().getUuid());
            }
 
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               //Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
-               //CdmStore.getImportManager().run(job);
-               CdmStore.getImportManager().runMoniteredOperation(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
-           } 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);
-           }
+           CdmStore.getImportManager().runMoniteredOperation(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
+           
            return true;
 
        }
            return true;
 
        }
index e703c2d3dbc74f7f2807088a9d866f8889f9c152..59962024a4c011ed5592e8afd9eab7e8e536730a 100644 (file)
@@ -93,19 +93,15 @@ public class CsvExportWizard extends AbstractExportWizard<CsvDemoExportConfigura
                        configurator.setLastChange(true);
                    }
                }
                        configurator.setLastChange(true);
                    }
                }
-               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);
-               }
+               
+           // 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();
+               
                return true;
        }
 
                return true;
        }
 
index 3e13950c02f6b364613229352067dd4872bad297..8ca8ef64cc6576074b0535cce491cea9fca4257e 100644 (file)
@@ -67,18 +67,15 @@ public class CsvNameExportWizard extends AbstractExportWizard<CsvNameExportConfi
 \r
            final Combo combo = page.getCombo();\r
            configurator.setClassificationUUID(page.getSelectedClassificationUUID());\r
 \r
            final Combo combo = page.getCombo();\r
            configurator.setClassificationUUID(page.getSelectedClassificationUUID());\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
+           \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
+          \r
                return true;\r
        }\r
 \r
                return true;\r
        }\r
 \r
index 870082e6d4ab1546d41ab64fca170637508672db..dbda86082f2e06a0fc20adb5df0f8f9e2cb5513f 100644 (file)
@@ -63,20 +63,14 @@ public class CsvPrintExportWizard extends CsvNameExportWizard{
 \r
           \r
            configurator.setClassificationUUID(page.getSelectedClassificationUUID());\r
 \r
           \r
            configurator.setClassificationUUID(page.getSelectedClassificationUUID());\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
                \r
                \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
                return true;\r
        }\r
 \r
index cd6b6800381979f1683b86666eeebbc621134cd0..519345e9f63777633f6920c101e5429501f55c08 100644 (file)
@@ -57,14 +57,9 @@ public class ExcelNormalExplicitTaxaImportWizard extends AbstractImportWizard<No
                configurator.setSource(source);
                configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
 
                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);
-               }
-
-
+           Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
+           CdmStore.getImportManager().run(job);
+               
                return true;
        }
 
                return true;
        }
 
index 00a9c1bc6f2623c14c784c577c827770318e25c5..146fff3ef3a11216484655c3b09171505f8e611b 100644 (file)
@@ -55,17 +55,15 @@ public class JaxbExportWizard extends AbstractExportWizard<JaxbExportConfigurato
                File exportFile = new File(page.getFolderText() + File.separator + page.getExportFileName());
                URI urlString = exportFile.toURI();
                configurator.setDestination(urlString);
                File exportFile = new File(page.getFolderText() + File.separator + page.getExportFileName());
                URI urlString = exportFile.toURI();
                configurator.setDestination(urlString);
-               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);
-               }
+               
+           // 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();
+               
                performFinish = true;
                return performFinish;
        }
                performFinish = true;
                return performFinish;
        }
index 379a59f1ae1b89ea1fc0fbe421e67091f629fcc5..5efedee663e9fd2ea749d9e67f05322365292f76 100644 (file)
@@ -49,19 +49,14 @@ public class SddExportWizard extends AbstractExportWizard<SDDExportConfigurator>
        @Override
        public boolean performFinish() {
            File file = new File(page.getFolderText() + File.separator + page.getExportFileName());
        @Override
        public boolean performFinish() {
            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);
-           }
+        // 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();
+           
            return true;
        }
 
            return true;
        }
 
index 8f4d382fe447410f271f066467f0656caa06a8d0..d701f6f4a3bf79e99c35e12a5aae907ddfad1f69 100644 (file)
@@ -67,14 +67,9 @@ public class SddImportWizard extends AbstractImportWizard<SDDImportConfigurator>
                URI source = dataSourcePage.getUri();
                configurator.setSource(source);
                configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
                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);
-               }
-
+               Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
+               CdmStore.getImportManager().run(job);
+               
                return true;
        }
 
                return true;
        }
 
index 13113c2e49a6bf93ee1058b30955bb69d58d2396..bc41736523837ba8abe1001503a0e2587384a09d 100644 (file)
@@ -45,13 +45,9 @@ public class TcsImportWizard extends AbstractImportWizard<TcsXmlImportConfigurat
            configurator.setSource(source);
            configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
 
            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);
-           }
-
+           Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
+           CdmStore.getImportManager().run(job);
+          
            return true;
        }
 
            return true;
        }
 
index 69fc04ed2b324d6ad69b5d93f8589af99796bff6..8d91b6f60ead116d34d79c1b52447a7f2d0fe7d8 100644 (file)
@@ -38,11 +38,8 @@ public class NewAmplificationWizard  extends AbstractNewEntityWizard<Amplificati
     /** {@inheritDoc} */
     @Override
     protected void saveEntity() {
     /** {@inheritDoc} */
     @Override
     protected void saveEntity() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(IAmplificationService.class).merge(getEntity(), true);
-        } else {
-            CdmStore.getService(IAmplificationService.class).save(getEntity());
-        }
+        CdmStore.getService(IAmplificationService.class).merge(getEntity(), true);
+        
     }
 
     /** {@inheritDoc} */
     }
 
     /** {@inheritDoc} */
index 4586b9275e2329e4580b97a9361e51ec122c32d3..b9d99c6d6fd517d66a0d106cd38d4e1bd800691d 100644 (file)
@@ -50,13 +50,10 @@ public class NewClassificationWizard extends AbstractNewEntityWizard<Classificat
        protected void saveEntity() {
                //CdmStore.getService(IClassificationService.class).saveOrUpdate(getEntity());
            Classification classification = getEntity();
        protected void saveEntity() {
                //CdmStore.getService(IClassificationService.class).saveOrUpdate(getEntity());
            Classification classification = getEntity();
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IClassificationService.class).merge(getEntity(), true);
-               CdmApplicationState.getCurrentDataChangeService()
+          CdmStore.getService(IClassificationService.class).merge(getEntity(), true);
+          CdmApplicationState.getCurrentDataChangeService()
                .fireChangeEvent(new CdmChangeEvent(Action.Create, classification, NewTaxonNodeWizard.class), true);
                .fireChangeEvent(new CdmChangeEvent(Action.Create, classification, NewTaxonNodeWizard.class), true);
-           } else {
-               CdmStore.getService(IClassificationService.class).save(getEntity());
-           }
+          
 
        }
 
 
        }
 
index 8efc02f8cfa1f4db1f0fad5c2ea5e4b80353e2b3..e3da3529e402ecb114a2e877beb07ae1545f7bc4 100644 (file)
@@ -36,11 +36,8 @@ public class NewCollectionWizard extends AbstractNewEntityWizard<Collection> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(ICollectionService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(ICollectionService.class).save(getEntity());
-           }
+           CdmStore.getService(ICollectionService.class).merge(getEntity(), true);
+           
        }
 
        /* (non-Javadoc)
        }
 
        /* (non-Javadoc)
index a09a1a8e8143c0464275a09b996d88cbfb25faa1..664a54c330b7754afcc4d61e92658dd93a321926 100644 (file)
@@ -93,11 +93,8 @@ public class NewDerivedUnitBaseWizard extends AbstractNewEntityWizard<SpecimenOr
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               setEntity(CdmStore.getService(IOccurrenceService.class).merge(getEntity()));
-           } else {
-               CdmStore.getService(IOccurrenceService.class).save(getEntity());
-           }
+           setEntity(CdmStore.getService(IOccurrenceService.class).merge(getEntity()));
+           
        }
 
 
        }
 
 
index 59086434ccdf25bb50bd22367971a78dfbb995f9..90f9ee0df8670fcf475d4cd2bd07ed4be4ab98ff 100644 (file)
@@ -38,11 +38,8 @@ public class NewFieldUnitWizard extends AbstractNewEntityWizard<FieldUnit> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IOccurrenceService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IOccurrenceService.class).save(getEntity());
-           }
+           CdmStore.getService(IOccurrenceService.class).merge(getEntity(), true);
+           
        }
 
        @Override
        }
 
        @Override
index c3342795473dbd318516f80f6dea016b12186660..1a51c72c75a1dbc8f3b6a0f2ae23fad642b15d1a 100644 (file)
@@ -38,11 +38,8 @@ public class NewGrantedAuthorityWizard extends AbstractNewEntityWizard<GrantedAu
         */
        @Override
        protected void saveEntity() {
         */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IGrantedAuthorityService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IGrantedAuthorityService.class).save(getEntity());
-           }
+           CdmStore.getService(IGrantedAuthorityService.class).merge(getEntity(), true);
+          
        }
 
        /* (non-Javadoc)
        }
 
        /* (non-Javadoc)
index 6f6b52236b12ff50c4d513070ad4cd05b43318a6..51bd2f9731e85582742285321c0bc54f93ad54b3 100644 (file)
@@ -38,11 +38,8 @@ public class NewGroupWizard extends AbstractNewEntityWizard<Group> {
         */
        @Override
        protected void saveEntity() {
         */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IGroupService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IGroupService.class).save(getEntity());
-           }
+           CdmStore.getService(IGroupService.class).merge(getEntity(), true);
+          
        }
 
        /* (non-Javadoc)
        }
 
        /* (non-Javadoc)
index 6ac2d44407d5d86204df615c1bf8493c72aef7f4..a03cafa04279642add2887a416e0400385536e74 100644 (file)
@@ -35,11 +35,7 @@ public class NewInstitutionWizard extends AbstractNewEntityWizard<Institution> {
         */
        @Override
        protected void saveEntity() {
         */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IAgentService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IAgentService.class).save(getEntity());
-           }
+           CdmStore.getService(IAgentService.class).merge(getEntity(), true);
        }
 
        /* (non-Javadoc)
        }
 
        /* (non-Javadoc)
index cfdd27d18fb41f4559b99ca07567dcf9baecd50e..8427ac1d00ae4920199f1caaa4bddd029c26288a 100644 (file)
@@ -49,11 +49,7 @@ public class NewNonViralNameWizard extends AbstractNewEntityWizard<NonViralName>
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(INameService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(INameService.class).save(getEntity());
-           }
+          CdmStore.getService(INameService.class).merge(getEntity(), true);
        }
 
        @Override
        }
 
        @Override
index ab5f7038d644a9df499ff241b833b0d777147968..ad7156859ac3cd1e138daa90a4e00fc1d9832545 100644 (file)
@@ -39,11 +39,7 @@ public class NewPersonWizard extends AbstractNewEntityWizard<Person> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IAgentService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IAgentService.class).save(getEntity());
-           }
+           CdmStore.getService(IAgentService.class).merge(getEntity(), true);
        }
 
        @Override
        }
 
        @Override
index daade68014f9bb41c4229a9533f89d58c70cf284..aaa3fe3ab3d3897821d338c029aa7a91e10fb6d6 100644 (file)
@@ -31,11 +31,7 @@ public class NewPolytomousKeyWizard extends AbstractNewEntityWizard<PolytomousKe
        @Override
        protected void saveEntity() {
            if(!polytomousKeyPage.getPolytomousKeyName().equals("")) {
        @Override
        protected void saveEntity() {
            if(!polytomousKeyPage.getPolytomousKeyName().equals("")) {
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                   CdmStore.getService(IPolytomousKeyService.class).merge(getEntity(), true);
-               } else {
-                   CdmStore.getService(IPolytomousKeyService.class).save(getEntity());
-               }
+               CdmStore.getService(IPolytomousKeyService.class).merge(getEntity(), true);
            }
        }
 
            }
        }
 
index de52e18d14f64ec84e2786057f8796a511366066..8fc7f08a164686fa57ce92e145236c2f314a083d 100644 (file)
@@ -38,11 +38,8 @@ public class NewPrimerWizard  extends AbstractNewEntityWizard<Primer> {
     /** {@inheritDoc} */
     @Override
     protected void saveEntity() {
     /** {@inheritDoc} */
     @Override
     protected void saveEntity() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(IPrimerService.class).merge(getEntity(),true);
-        } else {
-            CdmStore.getService(IPrimerService.class).save(getEntity());
-        }
+       CdmStore.getService(IPrimerService.class).merge(getEntity(),true);
+       
     }
 
     /** {@inheritDoc} */
     }
 
     /** {@inheritDoc} */
index 63ce08f213b54ef45d411fc156f17b8667b10d50..51980556fa8d8c63bd8de9f345d81a2525077c45 100644 (file)
@@ -89,10 +89,9 @@ public class NewTaxonNodeWizard extends AbstractNewEntityWizard<ITaxonTreeNode>{
                             }
                                affectedObjects.add(parentNode);
                         }
                             }
                                affectedObjects.add(parentNode);
                         }
-                        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                            CdmApplicationState.getCurrentDataChangeService()
+                        CdmApplicationState.getCurrentDataChangeService()
                                 .fireChangeEvent(new CdmChangeEvent(Action.Create, affectedObjects, NewTaxonNodeWizard.class), true);
                                 .fireChangeEvent(new CdmChangeEvent(Action.Create, affectedObjects, NewTaxonNodeWizard.class), true);
-                        }
+                        
                     }else{
                         if (!result.isOk()){
                             if (!result.getExceptions().isEmpty()){
                     }else{
                         if (!result.isOk()){
                             if (!result.getExceptions().isEmpty()){
index 1d6e0ae74caef1110bd1c98da2027252b84ba0d1..a6b3afa6bad670277abd80e78899b2b4dedca894 100644 (file)
@@ -50,11 +50,8 @@ public class NewTeamWizard extends AbstractNewEntityWizard<Team> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IAgentService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IAgentService.class).save(getEntity());
-           }
+           CdmStore.getService(IAgentService.class).merge(getEntity(), true);
+           
        }
 
        @Override
        }
 
        @Override
index d14363c33c899f83f9c2fcf07c8c9faeee52b8cc..631872794c034483e46c5e372d320dfbe4c4cecb 100644 (file)
@@ -24,11 +24,8 @@ public class NewUserWizard extends AbstractNewEntityWizard<User> {
 
        @Override
        protected void saveEntity() {
 
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IUserService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IUserService.class).save(getEntity());
-           }
+           CdmStore.getService(IUserService.class).merge(getEntity(), true);
+           
        }
 
        @Override
        }
 
        @Override
index e5cad6866ca04b6a4b26a59a166fb1a31ac28cd7..2ed42b85b4a8abb4419df3ffa335da12fc48b57c 100644 (file)
@@ -265,9 +265,8 @@ public class CdmStore {
     static void setInstance(ICdmApplicationConfiguration applicationController,
             ICdmSource cdmSource) {
         instance = new CdmStore(applicationController, cdmSource);
     static void setInstance(ICdmApplicationConfiguration applicationController,
             ICdmSource cdmSource) {
         instance = new CdmStore(applicationController, cdmSource);
-        if(getCurrentSessionManager().isRemoting()) {
-            CdmApplicationState.setCdmServiceCacher(new CdmServiceCacher());
-        }
+        CdmApplicationState.setCdmServiceCacher(new CdmServiceCacher());
+        
     }
 
     private CdmStore(ICdmApplicationConfiguration applicationController,
     }
 
     private CdmStore(ICdmApplicationConfiguration applicationController,
index 38ae7193bb78ca5a632f2c114595fbd2d8e132e2..c0486d07d83b5a174067655aff90eb1f606781a3 100644 (file)
@@ -69,11 +69,10 @@ public class AuthenticatedUserBar extends WorkbenchWindowControlContribution imp
         if(authenticatedUser == null) {
             text = "Not logged in              " ;
         } else {
         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);
-            }
+            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() + "         ";
         }
 
             text = "Logged in as: " + authenticatedUser.getUsername() + "         ";
         }
 
index 07a3d89d9462f441264b014df546d341dc746636..e70f4a8f53277190d65f02d4461df4e0d64a7300 100644 (file)
@@ -116,13 +116,8 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<F
                int width = image.calculateWidth();
                 IEditGeoService editGeoService;
                List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()});
                int width = image.calculateWidth();
                 IEditGeoService editGeoService;
                List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()});
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                   editGeoService = ((CdmApplicationRemoteController)CdmStore.getCurrentApplicationConfiguration()).getEditGeoService();
-               }else{
-                   editGeoService =(IEditGeoService) CdmStore.getCurrentApplicationConfiguration().getBean(
-                       "editGeoService");
-               }
-
+               editGeoService = ((CdmApplicationRemoteController)CdmStore.getCurrentApplicationConfiguration()).getEditGeoService();
+               
                String parameter = editGeoService.getDistributionServiceRequestParameterString(
                                getTaxonDescriptions(),
                 false,
                String parameter = editGeoService.getDistributionServiceRequestParameterString(
                                getTaxonDescriptions(),
                 false,
index 0bea2ae1e2da31c8f9bc25684feceac1b85372a3..19bd9898a35ee598607b5a8afa3167761bf2df74 100644 (file)
@@ -49,7 +49,7 @@ public class NameRelationshipWizard extends Wizard implements IConversationEnabl
        public NameRelationshipWizard(NameRelationshipDetailSection callingSection) {
                NameRelationshipWizard.callingSection = callingSection;
                rootElement = callingSection.getEntity();
        public NameRelationshipWizard(NameRelationshipDetailSection callingSection) {
                NameRelationshipWizard.callingSection = callingSection;
                rootElement = callingSection.getEntity();
-               if (CdmStore.isActive() && CdmStore.getCurrentSessionManager().isRemoting()) {
+               if (CdmStore.isActive()) {
             previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
             cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
             cdmEntitySession.bind();
             previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
             cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
             cdmEntitySession.bind();
index 5e10262a70108e5e0b32c39543347cab6096b242..279f2faafd85508297201a0f780576f4a2e9c857 100644 (file)
@@ -75,7 +75,7 @@ public class EditFromSelectionWizard extends Wizard implements
        private CdmBase rootElement;
 
        public EditFromSelectionWizard(EntitySelectionElement selectionElement) {
        private CdmBase rootElement;
 
        public EditFromSelectionWizard(EntitySelectionElement selectionElement) {
-        if (CdmStore.isActive() && CdmStore.getCurrentSessionManager().isRemoting()) {
+        if (CdmStore.isActive()) {
             previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
             cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
             cdmEntitySession.bind();
             previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
             cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
             cdmEntitySession.bind();
index a2223117700e5a9b5d22487a7969d3a346904146..b3ca3f46028546d993cc841f357f47cab19b58a0 100644 (file)
@@ -86,6 +86,7 @@ public class SaveImportedSpecimenAction extends Action {
                 Collections.sort(biocaseResponses, getComparator()); 
                 URI dataSetUri = null;
                 Abcd206ImportConfigurator configuratorAbcd;
                 Collections.sort(biocaseResponses, getComparator()); 
                 URI dataSetUri = null;
                 Abcd206ImportConfigurator configuratorAbcd;
+                
                 List<Abcd206ImportConfigurator> abcdConfigurators = new ArrayList<Abcd206ImportConfigurator>();
                 DataSetResponse dataSetResponse;
                 OccurenceQuery bioCaseOccurrenceQuery = null;
                 List<Abcd206ImportConfigurator> abcdConfigurators = new ArrayList<Abcd206ImportConfigurator>();
                 DataSetResponse dataSetResponse;
                 OccurenceQuery bioCaseOccurrenceQuery = null;
@@ -102,6 +103,7 @@ public class SaveImportedSpecimenAction extends Action {
                                        }
                        if (!response.getDataSetUri().equals(dataSetUri)){
                                configuratorAbcd = Abcd206ImportConfigurator.NewInstance(dataSetUri, null, false);
                                        }
                        if (!response.getDataSetUri().equals(dataSetUri)){
                                configuratorAbcd = Abcd206ImportConfigurator.NewInstance(dataSetUri, null, false);
+                               configuratorAbcd.addMediaAsMediaSpecimen(true);
                                if (configuratorAbcd != null){
                                        abcdConfigurators.add(configuratorAbcd);
                                }
                                if (configuratorAbcd != null){
                                        abcdConfigurators.add(configuratorAbcd);
                                }
index 1c16a6fc5ad47d8e9969a04d4554d605456e5a5d..eb01cbb79d91c326f8b7519e2c5a118dcc8f2c84 100644 (file)
@@ -71,15 +71,9 @@ public class SpecimenImportView extends DataImportView<SpecimenOrObservationBase
 //                    new TransientCdmRepository(CdmStore.getCurrentApplicationConfiguration());
             //configurator.setCdmAppController(repo);
             configurator.setAddMediaAsMediaSpecimen(true);
 //                    new TransientCdmRepository(CdmStore.getCurrentApplicationConfiguration());
             //configurator.setCdmAppController(repo);
             configurator.setAddMediaAsMediaSpecimen(true);
-            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();
+            Job job = CdmStore.getImportManager().createIOServiceJob(configurator, resultStream, SOURCE_TYPE.INPUTSTREAM);
+            CdmStore.getImportManager().run(job);
+            
             setResults(results);
         } catch (ClientProtocolException e) {
             logger.error(errorMessage, e);
             setResults(results);
         } catch (ClientProtocolException e) {
             logger.error(errorMessage, e);
index 9ba538987ccf9548ed598ffd3df2ad8a61390024..a33c03d9a169d735278a1ee78804ce9f12984bf3 100644 (file)
@@ -78,62 +78,63 @@ public class SpecimenSearchWizard extends Wizard implements IImportWizard {
         Abcd206ImportConfigurator configurator =  CdmStore.getImportManager().AbcdConfigurator();
         configurator.setOccurenceQuery(query);
         configurator.setSourceUri(providerSelectionPage.getEndPoint());
         Abcd206ImportConfigurator configurator =  CdmStore.getImportManager().AbcdConfigurator();
         configurator.setOccurenceQuery(query);
         configurator.setSourceUri(providerSelectionPage.getEndPoint());
+        configurator.setAddMediaAsMediaSpecimen(true);
         configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
         configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
-        if(CdmStore.getCurrentSessionManager().isRemoting() ) {
-            //Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
-            //CdmStore.getImportManager().run(job);
-            try {
-                serviceWrapper = providerSelectionPage.getQueryServiceWrapper();
-                InputStream stream = null;
-
-                final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-                IWorkbenchPage activePart = window.getActivePage();
-                if (providerSelectionPage.getQueryType().equals(QueryType.BIOCASE)){
-                    stream =((BioCaseQueryServiceWrapper) serviceWrapper).query(query, configurator.getSourceUri());
-                    SpecimenImportReport report = new SpecimenImportReport();
-                    UnitAssociationWrapper unitNodesList = AbcdParseUtility.parseUnitsNodeList(stream, report);
-                    NodeList nodeList = unitNodesList.getAssociatedUnits();
-                    String prefix = unitNodesList.getPrefix();
-                    String associationType = unitNodesList.getAssociationType();
-                    URI uri =AbcdParseUtility.parseFirstUri(nodeList, report);
-                    String content = AbcdParseUtility.parseFirstTextContent(nodeList);
-                    System.out.println(content);
-
-
-                    SpecimenImportView specimenImportView = new SpecimenImportView();
-                    try {
-                        specimenImportView = (SpecimenImportView) activePart.showView(SpecimenImportView.ID);
-                        specimenImportView.setEndpoint(providerSelectionPage.getEndPoint());
-                        specimenImportView.setQuery(query);
-                        dataImportView = specimenImportView;
-                    } catch (PartInitException e) {
-                        // TODO Auto-generated catch block
-                        e.printStackTrace();
-
-                    }
-
-                } else{
-                    try {
-                       
-                        dataImportView = (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""), IWorkbenchPage.VIEW_ACTIVATE);
-                        dataImportView.setQuery(query);                
-                               //      (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID);getWorkbench().getActiveWorkbenchWindow().getActivePage()
-                             // .showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""),IWorkbenchPage.VIEW_ACTIVATE);
-
-                    } catch (PartInitException e) {
-                        // TODO Auto-generated catch block
-                        e.printStackTrace();
-                    }
+      
+        //Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
+        //CdmStore.getImportManager().run(job);
+        try {
+            serviceWrapper = providerSelectionPage.getQueryServiceWrapper();
+            InputStream stream = null;
+
+            final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+            IWorkbenchPage activePart = window.getActivePage();
+            if (providerSelectionPage.getQueryType().equals(QueryType.BIOCASE)){
+                stream =((BioCaseQueryServiceWrapper) serviceWrapper).query(query, configurator.getSourceUri());
+                SpecimenImportReport report = new SpecimenImportReport();
+                UnitAssociationWrapper unitNodesList = AbcdParseUtility.parseUnitsNodeList(stream, report);
+                NodeList nodeList = unitNodesList.getAssociatedUnits();
+                String prefix = unitNodesList.getPrefix();
+                String associationType = unitNodesList.getAssociationType();
+                URI uri =AbcdParseUtility.parseFirstUri(nodeList, report);
+                String content = AbcdParseUtility.parseFirstTextContent(nodeList);
+                System.out.println(content);
+
+
+                SpecimenImportView specimenImportView = new SpecimenImportView();
+                try {
+                    specimenImportView = (SpecimenImportView) activePart.showView(SpecimenImportView.ID);
+                    specimenImportView.setEndpoint(providerSelectionPage.getEndPoint());
+                    specimenImportView.setQuery(query);
+                    dataImportView = specimenImportView;
+                } catch (PartInitException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
 
                 }
 
 
                 }
 
+            } else{
+                try {
+                       
+                    dataImportView = (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""), IWorkbenchPage.VIEW_ACTIVATE);
+                    dataImportView.setQuery(query);            
+                       //      (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID);getWorkbench().getActiveWorkbenchWindow().getActivePage()
+                         // .showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""),IWorkbenchPage.VIEW_ACTIVATE);
+
+                } catch (PartInitException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
 
 
-            } catch (IOException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
             }
             }
-           // CdmStore.getImportManager().run(configurator);
+
+
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
         }
         }
+       // CdmStore.getImportManager().run(configurator);
+    
 //        try {
 //            switch (providerSelectionPage.getQueryType()) {
 //            case BIOCASE:
 //        try {
 //            switch (providerSelectionPage.getQueryType()) {
 //            case BIOCASE: