public final class SchemaBundle extends Object
You can use this class to register a set of schemas and pass it to your schema factory. The first schema you will put into a bundle will be considered to be the main schema, so insertion order is significant.
A bundle associates URIs with schemas using the following rules:
id member, and that the value of this member is a URI
following the same rules as above.The set of schemas in a bundle will be injected into the schema registry associated to the factory.
JsonSchemaFactory,
SchemaRegistry| Modifier and Type | Method and Description |
|---|---|
void |
addSchema(JsonNode schema) |
void |
addSchema(String uriAsString,
JsonNode schema) |
void |
addSchema(URI uri,
JsonNode schema) |
JsonNode |
getRootSchema() |
Map<URI,JsonNode> |
getSchemas() |
static SchemaBundle |
withRootSchema(JsonNode schema) |
static SchemaBundle |
withRootSchema(String uriAsString,
JsonNode schema) |
static SchemaBundle |
withRootSchema(URI uri,
JsonNode schema) |
public static SchemaBundle withRootSchema(URI uri, JsonNode schema)
public static SchemaBundle withRootSchema(String uriAsString, JsonNode schema)
public static SchemaBundle withRootSchema(JsonNode schema)
public void addSchema(JsonNode schema)
public JsonNode getRootSchema()
Copyright © 2012. All Rights Reserved.