}
});
if (!optional.isPresent()) {
return Response.status(Response.Status.NOT_FOUND).build();
}
final Introspectable introspectable = optional.get();
final String format = "%s:%s\n";
Iterable<String> report =
Iterables.transform(introspectable.getIntrospectableFieldNames(),
new Function<String, String>() {
@Override
public String apply(String fieldName) {
return String.format(format, fieldName,
introspectable.getFieldValueAsString(
fieldName));
}
});
return Response
.ok()
.entity(introspectable.getIntrospectableId() + "{"
+ Iterables.toString(report) + "}").build();
}