public final class SchemaLoader extends Object
All schema registering and downloading is done through this class.
Note that if the id of a schema is not absolute (that is, the URI itself is absolute and it has no fragment part, or an empty fragment), then the whole schema will be considered anonymous.
This class is thread safe.
| Constructor and Description |
|---|
SchemaLoader(URIManager manager,
Dereferencing dereferencing) |
SchemaLoader(URIManager manager,
URI namespace,
Dereferencing dereferencing)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBundle(SchemaBundle bundle)
Load a schema bundle into this registry
|
SchemaTree |
get(URI uri)
Get a schema tree from the given URI
|
SchemaTree |
load(JsonNode schema) |
String |
toString() |
public SchemaLoader(URIManager manager, URI namespace, Dereferencing dereferencing)
manager - the URI manager to usenamespace - this registry's namespacedereferencing - our Dereferencing modepublic SchemaLoader(URIManager manager, Dereferencing dereferencing)
public SchemaTree load(JsonNode schema)
public SchemaTree get(URI uri) throws ProcessingException
Note that if the URI is relative, it will be resolved against this registry's namespace, if any.
uri - the URIProcessingExceptionpublic void addBundle(SchemaBundle bundle)
As a schema bundle is guaranteed to have well-formed locators, schemas from a bundle can be directly injected into the cache.
Copyright © 2013. All Rights Reserved.