StructuredDescriptionResultHolder descriptiveResultHolder = (StructuredDescriptionResultHolder)resultHolder;
Set<SpecimenDescription> specimenDescriptions = getSpecimenDescriptions(taxon, dataSet);
addDescriptionElement(descriptiveResultHolder, specimenDescriptions);
- Set<TaxonDescription> literatureDescriptions = getLiteratureDescriptions(taxon, dataSet);
- addDescriptionElement(descriptiveResultHolder, literatureDescriptions);
+ if (getConfig().isIncludeLiterature()){
+ Set<TaxonDescription> literatureDescriptions = getLiteratureDescriptions(taxon, dataSet);
+ addDescriptionElement(descriptiveResultHolder, literatureDescriptions);
+ }
//TODO add defaultDescriptions
}
testStatusOk(result);
testAggregatedDescription();
- dataSet = datasetService.find(dataSet.getId());
- addLiterature(dataSet);
+ config.setIncludeLiterature(true);
commitAndStartNewTransaction();
result = engine.invoke(config, repository);
config.setDatasetUuid(dataSet.getUuid());
config.setAggregateToHigherRanks(true);
config.setAggregationMode(AggregationMode.byWithinTaxonAndToParent());
+ config.setIncludeLiterature(false);
return config;
}
@SuppressWarnings("unchecked")
TermTree<Feature> descriptiveSystem = termTreeService.find(uuidFeatureTree);
dataSet.setDescriptiveSystem(descriptiveSystem);
+
+ addLiterature(dataSet);
return dataSet;
}