public Application build(boolean validate) {
        if (application != null) throw new IllegalStateException("Application already built");
        var converter = new ConvertSchemaCollection(mediator,
                                                    documentTypeManager,
                                                    applicationPackage,
                                                    fileRegistry,
                                                    deployLogger,
                                                    properties,
                                                    rankProfileRegistry,
                                                    documentsOnly);
        for (var schema : converter.convertToSchemas())
            add(schema);
        application = new Application(applicationPackage,
                                      schemas,
                                      rankProfileRegistry,
                                      new QueryProfiles(queryProfileRegistry, deployLogger),
                                      properties,
                                      documentsOnly,
                                      validate,
                                      processorsToSkip,
                                      deployLogger);
        return application;
    }
Processes and finalizes the schemas of this.

@throws IllegalStateException thrown if this method has already been called
config-model/src/main/java/com/yahoo/schema/ApplicationBuilder.java