return w;
}
@Override
public Link getLink(String relName) {
Component group = this;
while (group != null) {
for (Link link : ((ComponentImpl) group).getLocalLinks()) {
if (link.getName().equals(relName)) {
return link;
}
}
group = group.getGroup();
}
// None are present. Try to resolve
RelationDefinition rel = getRelation(relName);
if (rel == null) {
logger.error("relation " + relName + " undefined for " + this);
return null;
}
Component source = rel.getRelSource(this);
CST.apamResolver.resolveLink(source, rel);
return getExistingLink(relName);
}