this.id = id;
}
public R getResponse(ResolverRequest request) throws ResolverException {
R ret = null;
ResolverException storedException = null;
// resolve identifier
for (DataProvider<R> resolver : dataProviders) {
if (request.getIdentifier()
.matches(resolver.getIdentifierPattern())) {
try {
ret = resolver.getResponse(request);
break;
} catch (ResolverException e) {
storedException = e;
}
}
if (storedException != null) {
throw storedException;
}
}
if (ret == null) {
throw new ResolverException(this.id,
ResolverExceptionCode.UNSUPPORTED_IDENTIFIER_SCHEME);
}
return ret;
}