Skip to content

Commit

Permalink
Yet more variations on loadSchema.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimblacklercorp committed Sep 25, 2021
1 parent 5fa1499 commit 2982db5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,15 @@ public SchemaStore(UrlRewriter urlRewriter, boolean cacheSchema) {
}

public Schema loadSchema(Object document) throws GenerationException {
return loadSchema(document, new Validator());
}

public Schema loadSchema(Object document, Validator validator) throws GenerationException {
// Every document needs a unique, default canonical URI.
URI uri = URI.create(memorySchemaNumber == 0 ? "" : String.valueOf(memorySchemaNumber));
memorySchemaNumber++;
URI canonicalUri = store(uri, document);
return loadSchema(canonicalUri);
return loadSchema(canonicalUri, validator);
}

public Schema loadSchema(File file) throws GenerationException {
Expand Down

0 comments on commit 2982db5

Please sign in to comment.