org.etlunit.json.validator.CachingSchemaResolver Maven / Gradle / Ivy
The newest version!
package org.etlunit.json.validator;
import org.codehaus.jackson.JsonNode;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
public class CachingSchemaResolver implements SchemaResolver {
private final Map schemaCache = new HashMap();
public final JsonSchema resolveByUri(String uri) throws JsonSchemaValidationException
{
JsonSchema jschema = schemaCache.get(uri);
return jschema == null ? resolveByUriSub(uri) : jschema;
}
protected JsonSchema resolveByUriSub(String uri) throws JsonSchemaValidationException
{
return null;
}
public void registerSchemaByLocalId(String uri, JsonSchema schema)
{
schemaCache.put(uri, schema);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy