public static final EnhancementsParser createParser(HttpResponse response) throws EnhancementParserException, IOException {
    	String type = ContentType.getOrDefault(response.getEntity()).getMimeType();
        OutputFormat format = OutputFormat.get(type);

        switch (format) {
//		case XML: 
//		case JSON:
////			FlatEnhancementStructure result = 
////				response.readEntity(FlatEnhancementStructure.class);
////			return new FlatStructureParser(result);
            default:
                return createDefaultParser(response);
        }
    }
public static final EnhancementsParser createParser ( HttpResponse response ) throws EnhancementParserException , IOException { String type = ContentType . getOrDefault ( response . getEntity ( ) ) . getMimeType ( ) ; OutputFormat format = OutputFormat . get ( type ) ; switch ( format ) { default : return createDefaultParser ( response ) ; } }
Create an {@link EnhancementsParser} depending on the {@link HttpResponse} {@link MediaType}. Supported
{@link MediaType}s are enumerated in the class {@link OutputFormat}

@param response
@return
@throws EnhancementParserException