class JsonSchemaValidator {

    public static JsonSchemaValidator forUserSchema(String schemaJsonAsString) throws InvalidJsonSchemaException {
        try {
            JsonNode schemaAsJson = JsonHandler.getFromString(schemaJsonAsString);
            ProcessingReport pr = JSON_SCHEMA_FACTORY.getSyntaxValidator().validateSchema(schemaAsJson);
            if (!pr.isSuccess()) {
                throw new InvalidJsonSchemaException("External Schema is not valid");
            }
            JsonSchema jsonSchema = JSON_SCHEMA_FACTORY.getJsonSchema(schemaAsJson);
            return new JsonSchemaValidator(jsonSchema);
        } catch (InvalidParseOperationException | ProcessingException e) {
            throw new InvalidJsonSchemaException("External Schema is not valid", e);
        }
    }

    private  JsonSchemaValidator(JsonSchema jsonSchema);

}