// validate request
if (request == null) {
throw new MissingRequest(FIND_EQUIVALENCES_REQUEST);
}
final NamespaceValue sourceNsValue = verifyNamespaceValue(request
.getNamespaceValue());
try {
final List<NamespaceValue> equivalences = equivalencerService
.findEquivalences(sourceNsValue);
FindEquivalencesResponse response =
OBJECT_FACTORY.createFindEquivalencesResponse();
response.getNamespaceValues().addAll(equivalences);
return response;
} catch (EquivalencerException e) {
final String fmt = "error equivalencing %s";
final String msg = format(fmt, sourceNsValue.getValue());
throw new RequestException(msg, e);
}
}