@RequestMapping(
     value = MetaDataController.RESOURCE_PATH,
     method = RequestMethod.DELETE,
     consumes = "application/json")
 public void deleteJson(
     ImportOptions importOptions, HttpServletResponse response, HttpServletRequest request)
     throws IOException {
   importOptions.setImportStrategy(ImportStrategy.DELETE);
   importJson(importOptions, response, request);
 }
 @RequestMapping(
     value = {
       MetaDataController.RESOURCE_PATH + ".gz",
       MetaDataController.RESOURCE_PATH + ".xml.gz"
     },
     method = RequestMethod.DELETE,
     consumes = {"application/xml", "text/*"})
 public void deleteGZippedXml(
     ImportOptions importOptions, HttpServletResponse response, HttpServletRequest request)
     throws IOException {
   importOptions.setImportStrategy(ImportStrategy.DELETE);
   importGZippedXml(importOptions, response, request);
 }
  @RequestMapping(
      value = MetaDataController.RESOURCE_PATH,
      method = RequestMethod.POST,
      consumes = "application/json")
  public void importJson(
      ImportOptions importOptions, HttpServletResponse response, HttpServletRequest request)
      throws IOException {
    MetaData metaData = JacksonUtils.fromJson(request.getInputStream(), MetaData.class);

    if (importOptions.isAsync()) {
      startAsyncImport(importOptions, response, request, metaData);
    } else {
      startSyncImportJson(importOptions, response, metaData);
    }
  }
  @RequestMapping(
      value = {
        MetaDataController.RESOURCE_PATH + ".gz",
        MetaDataController.RESOURCE_PATH + ".xml.gz"
      },
      method = RequestMethod.POST,
      consumes = {"application/xml", "text/*"})
  public void importGZippedXml(
      ImportOptions importOptions, HttpServletResponse response, HttpServletRequest request)
      throws IOException {
    GZIPInputStream gzip = new GZIPInputStream(request.getInputStream());
    MetaData metaData = JacksonUtils.fromXml(gzip, MetaData.class);

    if (importOptions.isAsync()) {
      startAsyncImport(importOptions, response, request, metaData);
    } else {
      startSyncImportXml(importOptions, response, metaData);
    }
  }
  @RequestMapping(
      value = {
        MetaDataController.RESOURCE_PATH + ".zip",
        MetaDataController.RESOURCE_PATH + ".json.zip"
      },
      method = RequestMethod.POST,
      consumes = "application/json")
  public void importZippedJson(
      ImportOptions importOptions, HttpServletResponse response, HttpServletRequest request)
      throws IOException {
    ZipInputStream zip = new ZipInputStream(request.getInputStream());
    zip.getNextEntry();

    MetaData metaData = JacksonUtils.fromJson(zip, MetaData.class);

    if (importOptions.isAsync()) {
      startAsyncImport(importOptions, response, request, metaData);
    } else {
      startSyncImportJson(importOptions, response, metaData);
    }
  }