public static String whichMediaType(String method){
  if (method.equalsIgnoreCase(Method.XML))   return "text/xml";
  if (method.equalsIgnoreCase(Method.HTML))   return "text/html";
  if (method.equalsIgnoreCase(Method.XHTML))   return "text/html";
  if (method.equalsIgnoreCase(Method.TEXT))   return "text/plain";
  if (method.equalsIgnoreCase(Method.FOP))   return "application/pdf";
  return null;
}

public static String whichMediaType ( String method ) { if ( method . equalsIgnoreCase ( Method . XML ) ) return "text/xml" ; if ( method . equalsIgnoreCase ( Method . HTML ) ) return "text/html" ; if ( method . equalsIgnoreCase ( Method . XHTML ) ) return "text/html" ; if ( method . equalsIgnoreCase ( Method . TEXT ) ) return "text/plain" ; if ( method . equalsIgnoreCase ( Method . FOP ) ) return "application/pdf" ; return null ; }
returns the suitable media format for a document output with the specified method .
