public static final class MetaSchema.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
MetaSchema.Builder |
addFormatAttribute(String fmt,
FormatAttribute formatAttribute)
Add a format attribute to the metaschema
|
MetaSchema.Builder |
addKeyword(Keyword keyword)
Add a new keyword to that metaschema
|
MetaSchema.Builder |
addKeywordRegistry(KeywordRegistry registry)
Deprecated.
This is
public only because JsonSchemaFactory needs it |
MetaSchema |
build()
Build the metaschema
|
MetaSchema.Builder |
removeFormatAttribute(String fmt)
Remove a format attribute from this metaschema
|
MetaSchema.Builder |
removeKeyword(String name)
Remove a keyword from that metaschema
|
MetaSchema.Builder |
withRawSchema(JsonNode rawSchema)
Assign a JSON representation of that metaschema
|
MetaSchema.Builder |
withURI(String uri)
Set a new URI for the metaschema
|
public MetaSchema.Builder withURI(String uri)
uri - the URI as a stringIllegalArgumentException - provided string is not a URIpublic MetaSchema.Builder withRawSchema(JsonNode rawSchema)
Note: correctness of the representation is not checked
rawSchema - the JSONpublic MetaSchema.Builder addKeyword(Keyword keyword)
Note: if a keyword by the same name already existed, this method overrides it completely without warning.
keyword - the new keywordNullPointerException - keyword is nullpublic MetaSchema.Builder removeKeyword(String name)
If the keyword did not previously exist, this operation has no effect.
name - the name of the keyword to renameNullPointerException - name is nullpublic MetaSchema.Builder addFormatAttribute(String fmt, FormatAttribute formatAttribute)
If a format attribute by that name already existed, this method overrides the previous attribute without warning.
fmt - the name of the attributeformatAttribute - the implementation of the attributeNullPointerException - the attribute name, or implementation,
are nullpublic MetaSchema.Builder removeFormatAttribute(String fmt)
If the format attribute did not exist previously, this method has no effect.
fmt - the attribute name to removeNullPointerException - the attribute name is null@Deprecated public MetaSchema.Builder addKeywordRegistry(KeywordRegistry registry)
registry - the registrypublic MetaSchema build()
NullPointerException - no URI has been provided for that
metaschemaIllegalArgumentException - provided URI for that metaschema
is not an absolute JSON ReferenceCopyright © 2013. All Rights Reserved.