private FullData buildData(final JsonNode schema, final JsonNode instance, final boolean deepCheck) { BUNDLE.checkNotNull(schema, "nullSchema"); BUNDLE.checkNotNull(instance, "nullInstance"); final SchemaTree schemaTree = loader.load(schema); final JsonTree tree = new SimpleJsonTree(instance); return new FullData(schemaTree, tree, deepCheck); } }
/** * Build a {@link JsonSchema} instance * * @param schema the schema * @param pointer the pointer into the schema * @return a new {@link JsonSchema} * @throws ProcessingException resolving the pointer against the schema * leads to a {@link MissingNode} * @throws NullPointerException the schema or pointer is null */ JsonSchema buildJsonSchema(final JsonNode schema, final JsonPointer pointer) throws ProcessingException { final SchemaTree tree = loader.load(schema).setPointer(pointer); if (tree.getNode().isMissingNode()) throw new JsonReferenceException(new ProcessingMessage() .setMessage(BUNDLE.getMessage("danglingRef"))); return new JsonSchemaImpl(processor, tree, reportProvider); }