public final class LibraryBuilder extends Object implements com.github.fge.jsonschema.util.Thawed<Library>
This is what you will use when you wish to create your own metaschema and add either new keywords or format attributes to it.
Important note: if you add a keyword which already existed in this builder, all traces of its previous definition, if any, will be removed.
| Modifier and Type | Method and Description |
|---|---|
LibraryBuilder |
addFormatAttribute(String name,
FormatAttribute attribute)
Add a format attribute
|
LibraryBuilder |
addKeyword(Keyword keyword)
Add a new keyword to this library
|
Library |
freeze()
Return a frozen version of this builder
|
LibraryBuilder |
removeFormatAttribute(String name)
Remove a format attribute by its name
|
LibraryBuilder |
removeKeyword(String name)
Remove a keyword by its name
|
public LibraryBuilder addKeyword(Keyword keyword)
keyword - the keywordValidationConfigurationError - keyword is nullpublic LibraryBuilder removeKeyword(String name)
name - the nameValidationConfigurationError - name is nullpublic LibraryBuilder addFormatAttribute(String name, FormatAttribute attribute)
name - the name for this attributeattribute - the format attributeValidationConfigurationError - the name or attribute is nullpublic LibraryBuilder removeFormatAttribute(String name)
name - the format attribute nameValidationConfigurationError - name is nullpublic Library freeze()
freeze in interface com.github.fge.jsonschema.util.Thawed<Library>LibraryLibrary.Library(LibraryBuilder)Copyright © 2014. All Rights Reserved.