// Not necessarily good code.
String x = action.request.getContentType() ;
if ( x == null )
errorBadRequest("Content-type required for data format") ;
MediaType mediaType = MediaType.create(x) ;
Lang lang = RDFLanguages.contentTypeToLang(mediaType.getContentType()) ;
if ( lang == null )
lang = RDFLanguages.TRIG ;
if ( action.verbose )
log.info(format("[%d] Post: Content-Type=%s, Charset=%s => %s",
action.id, mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ;
if ( RDFLanguages.isQuads(lang) )
doPostQuads(action, lang) ;
else if ( gspMode && RDFLanguages.isTriples(lang) )
doPostTriplesGSP(action, lang) ;