while (sourceIter.hasNext()) {
Resource aggregatedSource = sourceIter.nextResource();
Date lastAggregation = getLastAggregationDate((Resource) aggregatedSource
.inModel(logModel));
if (lastAggregation == null) {
result.add(new SourceImpl(aggregatedSource.getURI()));
} else {
int aggregationInterval = aggregatedSource.getProperty(
AGGREGATOR.interval).getInt();
Date aggregationDueDate = new Date(lastAggregation.getTime()
+ aggregationInterval * 1000);
if (!aggregationDueDate.after(now)) {
result.add(new SourceImpl(aggregatedSource.getURI()));
}
}
}
return result;
}