protected static final Object[] NO_CHILDREN = new Object[0];
protected Map<DescriptionBase<?>, FeatureNodeContainerTree> featureNodeContainerCache;
private boolean showOnlyIndividualAssociations;
+ private static FeatureTree defaultFeatureTree = null;
public DescriptiveContentProvider(Map<DescriptionBase<?>, FeatureNodeContainerTree> featureNodeContainerCache) {
this(featureNodeContainerCache, false);
* @return
*/
private FeatureTree getFeatureTree(DescriptionBase description){
- FeatureTree featureTree = null;
+ if(defaultFeatureTree == null) {
+ defaultFeatureTree = FeatureTree.NewInstance(TermStore.getTerms(Feature.class));
+ }
+ FeatureTree featureTree;
// TODO change this to the feature tree associated with this taxon description
if (description.hasStructuredData()){
featureTree = PreferencesUtil.getDefaultFeatureTreeForStructuredDescription();
// create a transient tree with all features if none was selected
if(featureTree == null){
- featureTree = FeatureTree.NewInstance(TermStore.getTerms(Feature.class));
+ featureTree = defaultFeatureTree;
}
return featureTree;