public class RestSerializerFactory {
public static AbstractRestSerializer getSerializer(
HttpServletRequest request, HttpServletResponse response)
throws HBaseRestException {
ContentType ct = ContentType.getContentType(request.getHeader("accept"));
AbstractRestSerializer serializer = null;
// TODO refactor this so it uses reflection to create the new objects.
switch (ct) {
case XML: