@Override
    public void validate(Context context) {
        var exceptionMessageCollector = new ExceptionMessageCollector("Invalid constant tensor file(s):");
        for (Schema schema : context.deployState().getSchemas()) {
            for (var constant : schema.declaredConstants().values())
                validate(constant, context.deployState().getApplicationPackage(), exceptionMessageCollector);
            for (var profile : context.deployState().rankProfileRegistry().rankProfilesOf(schema)) {
                for (var constant : profile.declaredConstants().values())
                    validate(constant, context.deployState().getApplicationPackage(), exceptionMessageCollector);
            }
        }

        if (exceptionMessageCollector.exceptionsOccurred)
            context.illegal(exceptionMessageCollector.combinedMessage);
    }
RankingConstantsValidator validates all constant tensors (ranking constants) bundled with an application package

@author Vegard Sjonfjell
config-model/src/main/java/com/yahoo/vespa/model/application/validation/ConstantValidator.java