Revision b2765124
Added by Katja Luther about 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/TaxonEditorInputE4.java | ||
---|---|---|
19 | 19 |
import java.util.Set; |
20 | 20 |
import java.util.UUID; |
21 | 21 |
|
22 |
import org.eclipse.e4.ui.di.UISynchronize; |
|
23 |
|
|
22 | 24 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
23 | 25 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
24 | 26 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
... | ... | |
39 | 41 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
40 | 42 |
import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput; |
41 | 43 |
import eu.etaxonomy.taxeditor.editor.ChooseFromMultipleTaxonNodesDialog; |
44 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
|
42 | 45 |
import eu.etaxonomy.taxeditor.editor.l10n.Messages; |
43 | 46 |
import eu.etaxonomy.taxeditor.model.DataChangeBridge; |
44 | 47 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
48 |
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation; |
|
49 |
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation; |
|
45 | 50 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
46 | 51 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
47 | 52 |
|
... | ... | |
62 | 67 |
|
63 | 68 |
private Map<TaxonBase, TaxonBaseDeletionConfigurator> toDelete = new HashMap<>(); |
64 | 69 |
|
70 |
private Set<AbstractPostTaxonOperation> operations = new HashSet<>(); |
|
71 |
|
|
65 | 72 |
private TaxonEditorInputDataChangeBehaviourE4 dataChangeBehavior; |
66 | 73 |
|
67 | 74 |
private TaxonBase initiallySelectedTaxonBase; |
68 | 75 |
|
76 |
UISynchronize sync; |
|
77 |
|
|
78 |
|
|
79 |
public void setSync(UISynchronize sync) { |
|
80 |
this.sync = sync; |
|
81 |
} |
|
82 |
|
|
69 | 83 |
private enum CdmType { |
70 | 84 |
TAXON_NODE, |
71 | 85 |
TAXON_BASE, |
... | ... | |
272 | 286 |
return initiallySelectedTaxonBase; |
273 | 287 |
} |
274 | 288 |
|
289 |
public Set<AbstractPostTaxonOperation> getOperations() { |
|
290 |
return operations; |
|
291 |
} |
|
292 |
|
|
293 |
public void setOperations(Set<AbstractPostTaxonOperation> operations) { |
|
294 |
this.operations = operations; |
|
295 |
} |
|
296 |
|
|
297 |
public void addOperation(AbstractPostTaxonOperation operation) { |
|
298 |
this.operations.add(operation); |
|
299 |
} |
|
300 |
|
|
275 | 301 |
@Override |
276 | 302 |
public List<TaxonNode> getRootEntities() { |
277 | 303 |
return Arrays.asList(taxonNode); |
... | ... | |
286 | 312 |
delete(entry.getKey(), entry.getValue()); |
287 | 313 |
} |
288 | 314 |
toDelete.clear(); |
315 |
for(AbstractPostOperation entry:operations){ |
|
316 |
EditorUtil.executeOperation(entry,sync); |
|
317 |
} |
|
318 |
operations.clear(); |
|
319 |
|
|
289 | 320 |
CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true); |
290 | 321 |
|
291 | 322 |
} |
... | ... | |
327 | 358 |
"extensions", //$NON-NLS-1$ |
328 | 359 |
"rights", //$NON-NLS-1$ |
329 | 360 |
"sources", //$NON-NLS-1$ |
361 |
"identifiers", |
|
330 | 362 |
"descriptions", //$NON-NLS-1$ |
331 |
"relationsToThisTaxon", //$NON-NLS-1$ |
|
332 |
"relationsFromThisTaxon", //$NON-NLS-1$ |
|
363 |
"relationsToThisTaxon.relatedFrom.name.taxonBases.taxonNodes", //$NON-NLS-1$ |
|
364 |
"relationsToThisTaxon.relatedFrom.name.taxonBases.relationsFromThisTaxon", //$NON-NLS-1$ |
|
365 |
"relationsToThisTaxon.relatedFrom.name.taxonBases.relationsToThisTaxon", //$NON-NLS-1$ |
|
366 |
"relationsFromThisTaxon.relatedTo.name.taxonBases.taxonNodes", //$NON-NLS-1$ |
|
367 |
"relationsFromThisTaxon.relatedTo.name.taxonBases.relationsFromThisTaxon", //$NON-NLS-1$ |
|
368 |
"relationsFromThisTaxon.relatedTo.name.taxonBases.relationsToThisTaxon", //$NON-NLS-1$ |
|
333 | 369 |
"taxonNodes", //$NON-NLS-1$ |
334 | 370 |
"descriptions.descriptionElements.feature", //$NON-NLS-1$ |
335 | 371 |
"descriptions.descriptionElements.area", //$NON-NLS-1$ |
... | ... | |
342 | 378 |
"name.taxonBases.taxonNodes", //$NON-NLS-1$ |
343 | 379 |
"name.relationsFromThisName", //$NON-NLS-1$ |
344 | 380 |
"name.relationsToThisName", //$NON-NLS-1$ |
345 |
"name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.synonym.name.status", //$NON-NLS-1$
|
|
381 |
"name.homotypicalGroup.typifiedNames.taxonBases.synonyms.synonym.name.status", //$NON-NLS-1$ |
|
346 | 382 |
"name.homotypicalGroup.typifiedNames.relationsToThisName.fromName", //$NON-NLS-1$ |
347 |
"synonymRelations.synonym.name.status.type", //$NON-NLS-1$ |
|
348 |
"synonymRelations.synonym.name.relationsToThisName.fromName", //$NON-NLS-1$ |
|
349 |
"synonymRelations.synonym.name.nomenclaturalReference.inReference.authorship", //$NON-NLS-1$ |
|
350 |
"synonymRelations.synonym.name.nomenclaturalReference.authorship", //$NON-NLS-1$ |
|
351 |
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations" //$NON-NLS-1$ |
|
383 |
"synonyms.name.status.type", //$NON-NLS-1$ |
|
384 |
"synonyms.name.relationsToThisName.fromName", //$NON-NLS-1$ |
|
385 |
"synonyms.name.nomenclaturalReference.inReference.authorship", //$NON-NLS-1$ |
|
386 |
"synonyms.name.nomenclaturalReference.authorship", //$NON-NLS-1$ |
|
387 |
// "synonyms.name.homotypicalGroup", //$NON-NLS-1$ |
|
388 |
// "synonyms.synonym.name.homotypicalGroup.typifiedNames", //$NON-NLS-1$ |
|
389 |
"synonyms.name.homotypicalGroup.typifiedNames.taxonBases.synonyms" //$NON-NLS-1$ |
|
352 | 390 |
}); |
353 | 391 |
|
354 | 392 |
return taxonBasePropertyPaths; |
Also available in: Unified diff
ref #7352: adapt property path for synonyms and taxon relations