assert decl != null;
Map<String, PropertyDeclaration> results = new HashMap<String, PropertyDeclaration>();
for (AstPropertyFolding property : term.folding.properties) {
PropertyDeclaration original = decl.findPropertyDeclaration(property.source.identifier);
if (original == null) {
report(new Diagnostic(
Level.ERROR,
source.getName(),
Messages.getString("DmdlAnalyzer.diagnosticMissingSummarizeFoldingProperty"), //$NON-NLS-1$
property.source.identifier,
source.getName().identifier));
continue;
}
PropertyMappingKind mapping = resolveAggregateFunction(property.aggregator);
if (mapping == null) {
report(new Diagnostic(
Level.ERROR,
property.aggregator,
Messages.getString("DmdlAnalyzer.diagnosticMissingSummarizeAggregateFunction"), //$NON-NLS-1$
property.aggregator.toString()));
continue;
}
Type resolved = original.getType().map(mapping);
if (resolved == null) {
report(new Diagnostic(
Level.ERROR,
property,
Messages.getString(
"DmdlAnalyzer.diagnosticInconsistentSummarizeAggregateFunction"), //$NON-NLS-1$
property.aggregator.toString(),
property.source.identifier,
original.getType()));
continue;
}
PropertyDeclaration declared = model.findPropertyDeclaration(property.target.identifier);
if (declared != null) {
report(new Diagnostic(
Level.ERROR,
property.target,
Messages.getString("DmdlAnalyzer.diagnosticDuplicatedSummarizeProperty"), //$NON-NLS-1$
property.target.identifier));
continue;