Revision ac1f29b5
Added by Cherian Mathew almost 9 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java | ||
---|---|---|
12 | 12 |
import java.util.Arrays; |
13 | 13 |
import java.util.HashSet; |
14 | 14 |
import java.util.List; |
15 |
import java.util.Map; |
|
15 | 16 |
import java.util.Set; |
16 | 17 |
import java.util.UUID; |
17 | 18 |
|
... | ... | |
93 | 94 |
*/ |
94 | 95 |
private void initForTaxonNode(UUID taxonNodeUuid) { |
95 | 96 |
|
96 |
|
|
97 |
TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid); |
|
97 |
List<String> taxonNodePropertyPaths = Arrays.asList(new String[] { |
|
98 |
"taxon.annotations", |
|
99 |
"taxon.markers", |
|
100 |
"taxon.credits", |
|
101 |
"taxon.extensions", |
|
102 |
"taxon.rights", |
|
103 |
"taxon.sources", |
|
104 |
"taxon.descriptions", |
|
105 |
"taxon.synonymRelations", |
|
106 |
"taxon.relationsToThisTaxon", |
|
107 |
"taxon.relationsFromThisTaxon", |
|
108 |
"taxon.taxonNodes", |
|
109 |
"taxon.name.status", |
|
110 |
"taxon.name.homotypicalGroup.typifiedNames", |
|
111 |
"taxon.name.taxonBases", |
|
112 |
"taxon.name.descriptions.descriptionElements", |
|
113 |
"taxon.name.descriptions.markers" |
|
114 |
|
|
115 |
|
|
116 |
}); |
|
117 |
|
|
118 |
TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid, taxonNodePropertyPaths); |
|
98 | 119 |
|
99 | 120 |
if(taxonNode == null){ |
100 | 121 |
MessagingUtils.warningDialog("Not yet implemented", TaxonEditorInput.class, "Selected element is not type TaxonBase."); |
... | ... | |
453 | 474 |
CdmStore.getService(ITaxonNodeService.class).merge(taxonNode); |
454 | 475 |
} |
455 | 476 |
|
477 |
@Override |
|
478 |
public Map<Object, List<String>> getPropertyPathsMap() { |
|
479 |
// Map<Object, List<String>> propertyPathsMap = new HashMap<Object, List<String>>(); |
|
480 |
// List<String> taxonNameBasePropertyPaths = Arrays.asList(new String[] { |
|
481 |
// "status", |
|
482 |
// "taxonBases.taxonNodes", |
|
483 |
// "homotypicalGroup.typifiedNames.taxonBases.synonymRelations", |
|
484 |
// "taxonBases.relationsToThisTaxon", |
|
485 |
// "taxonBases.relationsFromThisTaxon", |
|
486 |
// "descriptions" |
|
487 |
// }); |
|
488 |
// propertyPathsMap.put(TaxonNameBase.class, taxonNameBasePropertyPaths); |
|
489 |
// |
|
490 |
// List<String> taxonBasePropertyPaths = Arrays.asList(new String[] { |
|
491 |
// "taxon.annotations", |
|
492 |
// "taxon.markers", |
|
493 |
// "taxon.credits", |
|
494 |
// "taxon.extensions", |
|
495 |
// "taxon.rights", |
|
496 |
// "taxon.sources", |
|
497 |
// "taxon.descriptions" |
|
498 |
// }); |
|
499 |
// propertyPathsMap.put(TaxonNode.class, taxonBasePropertyPaths); |
|
500 |
// return propertyPathsMap; |
|
501 |
return null; |
|
502 |
} |
|
503 |
|
|
456 | 504 |
} |
Also available in: Unified diff
Add method to sessionOwner objects to fine tune performance using property paths