@Override
    public void validate(ChangeContext context) {
        for (ContentCluster currentCluster : context.previousModel().getContentClusters().values()) {
            ContentCluster nextCluster = context.model().getContentClusters().get(currentCluster.getSubId());
            if (nextCluster == null) continue; // validated elsewhere

            for (NewDocumentType type : currentCluster.getDocumentDefinitions().values()) {
                if ( ! nextCluster.getDocumentDefinitions().containsKey(type.getName())) {
                    context.invalid(ValidationId.contentTypeRemoval,
                                    "Schema '" + type.getName() + "' is removed " +
                                    "in content cluster '" + currentCluster.getName() + "'. " +
                                    "This will cause loss of all data in this schema");
                }
            }
        }
    }
Checks that this does not remove a data type in a cluster, as that causes deletion
of all data of that type.

@author bratseth
config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/ContentTypeRemovalValidator.java