for (RelationDeclaration relationDeclaration : localRelations) {
/*
* Local declarations may be partial definitions, we need to compute
* the complete declaration by refining the ancestor definition.
*/
RelationDefinition base = this.getRelation(relationDeclaration.getIdentifier());
relationDeclaration = (base == null) ? relationDeclaration
: ((RelationDefinitionImpl) base).refinedBy(relationDeclaration);
relDef.put(relationDeclaration.getIdentifier(),
new RelationDefinitionImpl(relationDeclaration));