*/
package eu.etaxonomy.cdm.api.application;
+import java.util.HashSet;
import java.util.Set;
import eu.etaxonomy.cdm.model.common.CdmBase;
}
private final Action action;
- private final Set<? extends CdmBase> changedObjects;
+ private final Set<CdmBase> changedObjects;
private final Class sourceType;
private Object source;
- public CdmChangeEvent(Action action, Set<? extends CdmBase> changedObjects, Class sourceType) {
+ public CdmChangeEvent(Action action, Set<CdmBase> changedObjects, Class sourceType) {
this.action = action;
this.changedObjects = changedObjects;
this.sourceType = sourceType;
}
- public CdmChangeEvent(Action action, Set<? extends CdmBase> changedObjects, Object source) {
+ 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, Object source) {
this(action, changedObjects, source.getClass());
this.source = source;
}
if(currentRemoteInvocation.getMethodName().equals("merge")) {
rir = new RemoteInvocationResult(cdmEntitySessionManager.load(rir.getValue(), true));
} else if(rir.getValue() instanceof UpdateResult){
- UpdateResult result = (UpdateResult)rir.getValue();
- if(result.isOk()){
- cdmEntitySessionManager.update(result.getCdmEntity(), result.getUpdatedObjects());
- }
+ //FIXME:Remoting if the new handler / operation architecture works then this is not required
+// UpdateResult result = (UpdateResult)rir.getValue();
+// if(result.isOk()){
+// //FIXME:Remoting replace with call to CdmApplicationState if required
+// }
} else {
rir = new RemoteInvocationResult(cdmEntitySessionManager.load(rir.getValue(), false));
}
import eu.etaxonomy.cdm.api.service.IService;
import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmPostDataChangeObservableListener;
import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher;
import eu.etaxonomy.taxeditor.remoting.cache.EntityCacherDebugResult;
}
}
- @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);
- }
+// @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);
+// }
// }
}
-// /**
-// * Register to get updated after any interaction with the datastore
-// */
-// @Override
-// public void registerForDataStoreChanges(ICdmEntitySessionEnabled observer) {
-// CdmPostDataChangeObservableListener.getDefault().register(observer);
-// }
-//
-// /**
-// * Register to get updated after any interaction with the datastore
-// */
-// @Override
-// public void unregisterForDataStoreChanges(ICdmEntitySessionEnabled observer) {
-// CdmPostDataChangeObservableListener.getDefault().unregister(observer);
-// }
-
-
@Override
public void bind() {
}
- /* (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#notify(java.util.Collection, eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType)
- */
- @Override
- public <T extends ICdmBase> void addEvent(Collection <T> cdmBases, Set<CdmBase> affectedObjects, EventType eventType) {
- affectedObjects = (Set<CdmBase>) load(affectedObjects, true);
- for(ICdmBase cdmBase : cdmBases) {
- CdmDataChangeEvent cdce = CdmDataChangeEvent.NewInstance((CdmBase)cdmBase, affectedObjects, eventType);
- CdmPostDataChangeObservableListener.getDefault().notifyObservers(cdce);
- }
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#commit()
- */
- @Override
- public void fireNotifications() {
- CdmPostDataChangeObservableListener.getDefault().delayedNotify();
- }
+// /* (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)
import org.springframework.stereotype.Component;
import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType;
/**
* @author cmathew
}
}
- @Override
- public <T extends CdmBase> void update(T cdmBase, Set<CdmBase> affectedObjects) {
- if(activeSession != null) {
- activeSession.addEvent(cdmBase, affectedObjects, EventType.UPDATE);
- }
- }
@Override
public <T extends CdmBase> void update() {
import java.util.Collection;
import java.util.List;
-import java.util.Set;
import java.util.UUID;
import net.sf.ehcache.statistics.LiveCacheStatistics;
import eu.etaxonomy.cdm.api.service.IService;
import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType;
import eu.etaxonomy.taxeditor.remoting.cache.EntityCacherDebugResult;
public interface ICdmEntitySession {
public void bind();
-// public void registerForDataStoreChanges(ICdmEntitySessionEnabled observer);
-//
-// public void unregisterForDataStoreChanges(ICdmEntitySessionEnabled observer);
-
- public void addEvent(ICdmBase cdmBase, Set<CdmBase> affectedObjects, EventType eventType);
-
- public <T extends ICdmBase> void addEvent(Collection <T> cdmBases, Set<CdmBase> affectedObjects, EventType eventType);
+// 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 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);
+// /**
+// * @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 void fireNotifications();
public boolean isActive();
- /**
- * @param cdmBase
- * @param affectedObject
- */
- public <T extends ICdmBase> void update(T cdmBase, CdmBase affectedObject);
+// /**
+// * @param cdmBase
+// * @param affectedObject
+// */
+// public <T extends ICdmBase> void update(T cdmBase, CdmBase affectedObject);
/**
*
package eu.etaxonomy.taxeditor.session;
import java.util.Collection;
-import java.util.Set;
import eu.etaxonomy.cdm.model.common.CdmBase;
*/
public void disposeAll();
- /**
- * @param cdmBase
- * @param affectedObjects
- */
- public <T extends CdmBase> void update(T cdmBase, Set<CdmBase> affectedObjects);
/**
*
import java.util.Collection;
import java.util.List;
-import java.util.Set;
import java.util.UUID;
import net.sf.ehcache.statistics.LiveCacheStatistics;
import eu.etaxonomy.cdm.api.service.IService;
import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType;
import eu.etaxonomy.taxeditor.remoting.cache.EntityCacherDebugResult;
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
}
-// /* (non-Javadoc)
-// * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#registerForDataStoreChanges(eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled)
-// */
-// @Override
-// public void registerForDataStoreChanges(ICdmEntitySessionEnabled observer) {
-//
-//
-// }
-//
-// /* (non-Javadoc)
-// * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#unregisterForDataStoreChanges(eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled)
-// */
-// @Override
-// public void unregisterForDataStoreChanges(ICdmEntitySessionEnabled observer) {
-//
-// }
-
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#commit()
- */
- @Override
- public void fireNotifications() {
-
-
- }
-
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#debug(eu.etaxonomy.cdm.model.common.CdmBase)
*/
return new EntityCacherDebugResult();
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#addEvent(eu.etaxonomy.cdm.model.common.ICdmBase, eu.etaxonomy.cdm.model.common.CdmBase[], eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType)
- */
- @Override
- public void addEvent(ICdmBase cdmBase, Set<CdmBase> affectedObjects, EventType eventType) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#addEvent(java.util.Collection, eu.etaxonomy.cdm.model.common.CdmBase[], eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType)
- */
- @Override
- public <T extends ICdmBase> void addEvent(Collection<T> cdmBases, Set<CdmBase> affectedObjects, EventType eventType) {
- // TODO Auto-generated method stub
-
- }
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#load(java.util.UUID, eu.etaxonomy.cdm.api.service.IService)
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#update(eu.etaxonomy.cdm.model.common.ICdmBase, java.util.Set)
- */
- @Override
- public <T extends ICdmBase> void update(T cdmBase, Set<CdmBase> affectedObjects) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#delete(eu.etaxonomy.cdm.model.common.ICdmBase, java.util.Set)
- */
- @Override
- public <T extends ICdmBase> void delete(T cdmBase, Set<CdmBase> affectedObjects) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#delete(java.util.Set, java.util.Set)
- */
- @Override
- public <T extends ICdmBase> void delete(Set<T> cdmBases, Set<CdmBase> affectedObjects) {
- // TODO Auto-generated method stub
-
- }
-
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#getOwner()
*/
return null;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#update(eu.etaxonomy.cdm.model.common.ICdmBase, eu.etaxonomy.cdm.model.common.CdmBase)
- */
- @Override
- public <T extends ICdmBase> void update(T cdmBase, CdmBase affectedObject) {
-
- }
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.session.ICdmEntitySession#update()
package eu.etaxonomy.taxeditor.session.mock;
import java.util.Collection;
-import java.util.Set;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#update(eu.etaxonomy.cdm.model.common.CdmBase, java.util.Set)
- */
- @Override
- public <T extends CdmBase> void update(T cdmBase, Set<CdmBase> affectedObjects) {
-
- }
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager#update()
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;
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;
+ }
}
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.TaxonComparatorSearch;
import eu.etaxonomy.cdm.model.taxon.TaxonNaturalComparator;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
getConversationHolder().commit();
}
}
- if (cdmEntitySession != null) {
- cdmEntitySession.fireNotifications();
- }
getCommonViewer().refresh();
}
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.";
--- /dev/null
+// $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();
+ Set<ITaxonTreeNode> 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(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the selected node?")){
+ 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 RemotingDeleteTaxonNodeOperation(event.getTrigger(),
+ false,
+ treeNodes,
+ config);
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete()
+ */
+ @Override
+ public void onComplete() {
+ // TODO Auto-generated method stub
+
+ }
+
+}
--- /dev/null
+// $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) {
+ 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;
+ }
+
+}
// $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;
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
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.ITaxonTreeNode;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
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());
- taxonNode = CdmStore.getService(ITaxonNodeService.class).merge(taxonNode);
- generatedTaxonNodeUuid = taxonNode.getUuid();
- Set<CdmBase> affectedObjects = new HashSet<CdmBase>();
- affectedObjects.add((TaxonNode)parent);
- CdmStore.getCurrentSessionManager().getActiveSession().addEvent(taxonNode, affectedObjects, EventType.INSERT);
- CdmStore.getCurrentSessionManager().getActiveSession().fireNotifications();
- }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>();
+ affectedObjects.add((TaxonNode)parent);
+
+ 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
conversationEnabled.getConversationHolder().bind();
conversationEnabled.getConversationHolder().commit(true);
}
- if(getCdmEntitySessionEnabled() != null) {
- getCdmEntitySessionEnabled().getCdmEntitySession().fireNotifications();
- }
IStatus status = super.postExecute(objectAffectedByOperation);
return status;
package eu.etaxonomy.cdm.model;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
import java.util.UUID;
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;
import eu.etaxonomy.taxeditor.operations.BaseOperationTest;
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();
+ 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(TaxonNode childNode : childNodes) {
+ TaxonNode reloadedChildNode = taxonNodeService.load(childNode.getUuid());
+ 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();
+ 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();
+ Assert.assertTrue(parentChildNodes.containsAll(childNodes));
+ }
+
+ @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);
+
+ }
+
}
public MockSessionOwner() {
this.rootEntities = null;
+ updatedObjects = new HashSet<T>();
}
public MockSessionOwner(Set<T> updatedObjects) {
}
public void addExpectedUpdatedObject(T updatedObject) {
- if(updatedObjects == null) {
- updatedObjects = new HashSet<T>();
- }
updatedObjects.add(updatedObject);
}
Assert.assertTrue(event.getChangedObjects().contains(cb));
}
}
+ updatedObjects.clear();
}
}
--- /dev/null
+<?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>
<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="1"/>
+ <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="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="2" classification_id="10" treeIndex="#t10#4032#"/>
+ <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"/>