class FormatAnalysis implements SynchronousDataSetAnalyzer {

    public void update(DataSetMetadata original, DataSetMetadata updated) {

        final Marker marker = Markers.dataset(updated.getId());

        FormatFamily formatFamily = formatFamilyFactory.getFormatFamily(original.getContent().getFormatFamilyId());

        if (!formatFamily.getSchemaGuesser().accept(updated)) {
            LOG.debug(marker, "the schema cannot be updated");
            return;
        }

        // update the schema
        Format format = new Format(formatFamily, updated.getEncoding());
        internalUpdateMetadata(updated, format);

        LOG.debug(marker, "format updated for dataset");
    }

}