use of eu.etaxonomy.cdm.common.monitor.DefaultProgressMonitor in project cdmlib by cybertaxonomy.
the class TestScriptService method aggregateDDS.
private void aggregateDDS(CdmApplicationController app) {
System.out.println("find dds");
DescriptiveDataSet dds = app.getDescriptiveDataSetService().find(21);
UUID facciniaSubtreeUuid = UUID.fromString("cf0bc346-a203-4ad7-ad25-477098361db6");
UUID arenarioAdamssubtreeUuid = UUID.fromString("0215e668-0a65-42cd-85e0-d97ce78e758b");
TaxonNodeFilter filter = TaxonNodeFilter.NewSubtreeInstance(arenarioAdamssubtreeUuid);
filter.setIncludeUnpublished(true);
DefaultProgressMonitor monitor = DefaultProgressMonitor.NewInstance();
StructuredDescriptionAggregationConfiguration config = StructuredDescriptionAggregationConfiguration.NewInstance(filter, monitor);
config.setDatasetUuid(dds.getUuid());
config.setAggregationMode(AggregationMode.byWithinTaxonAndToParent());
config.setAdaptBatchSize(false);
UpdateResult result = config.getTaskInstance().invoke(config, app);
System.out.println(result);
// app.getLongRunningTasksService().invoke(config);
}
use of eu.etaxonomy.cdm.common.monitor.DefaultProgressMonitor in project cdmlib by cybertaxonomy.
the class TestScriptService method aggregateDistribution.
private void aggregateDistribution(CdmApplicationController app) {
System.out.println("agg distr");
DefaultProgressMonitor monitor = DefaultProgressMonitor.NewInstance();
UUID descriptaceaeUuid = UUID.fromString("5a37c47c-347c-49f8-88ba-2720b194dfb9");
TaxonNodeFilter filter = TaxonNodeFilter.NewSubtreeInstance(descriptaceaeUuid);
filter.setIncludeUnpublished(true);
List<AggregationMode> aggregationModes = AggregationMode.byToParent();
TermTree<PresenceAbsenceTerm> statusOrder = null;
List<UUID> superAreas = new ArrayList<>();
DistributionAggregationConfiguration config = DistributionAggregationConfiguration.NewInstance(aggregationModes, superAreas, filter, statusOrder, monitor);
config.setAdaptBatchSize(false);
UpdateResult result = config.getTaskInstance().invoke(config, app);
System.out.println(result);
}
Aggregations