public static final class JsonSchemaFactory.Builder extends Object
JsonSchemaFactory| Constructor and Description |
|---|
JsonSchemaFactory.Builder()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
JsonSchemaFactory.Builder |
addKeywordRegistry(JsonRef schemaURI,
KeywordRegistry keywordRegistry,
boolean byDefault) |
JsonSchemaFactory.Builder |
addRedirection(String from,
String to)
Add an URI redirection
|
JsonSchemaFactory.Builder |
addressingMode(AddressingMode addressingMode) |
JsonSchemaFactory |
build()
Build the factory
|
JsonSchemaFactory.Builder |
registerScheme(String scheme,
URIDownloader downloader)
Register a
URIDownloader for a given scheme |
JsonSchemaFactory.Builder |
setNamespace(String namespace)
Set the schema registry's namespace
|
JsonSchemaFactory.Builder |
unregisterScheme(String scheme)
Unregister a scheme
|
public JsonSchemaFactory.Builder registerScheme(String scheme, URIDownloader downloader)
URIDownloader for a given schemescheme - the URI schemedownloader - the downloaderNullPointerException - scheme is nullIllegalArgumentException - illegal schemepublic JsonSchemaFactory.Builder unregisterScheme(String scheme)
scheme - the scheme to desupportpublic JsonSchemaFactory.Builder addressingMode(AddressingMode addressingMode)
public JsonSchemaFactory.Builder setNamespace(String namespace)
namespace - the namespace, as a stringIllegalArgumentException - invalid URI (see URI.create(String))SchemaRegistrypublic JsonSchemaFactory.Builder addRedirection(String from, String to)
This allows you to add an alias for a schema location so that it point to another of your choice. It may be useful if you have to resolve absolute JSON References normally unreachable, but you have a copy of this schema locally.
Note that both URIs must be absolute.
from - the source URI, as a stringto - the target URI, as a stringIllegalArgumentException - either from or to
is an invalid URI, or it is not an absolute JSON ReferenceJsonRefpublic JsonSchemaFactory.Builder addKeywordRegistry(JsonRef schemaURI, KeywordRegistry keywordRegistry, boolean byDefault)
public JsonSchemaFactory build()
Copyright © 2012. All Rights Reserved.