|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.fge.jsonschema.library.LibraryBuilder
public final class LibraryBuilder
Mutable version of a 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.
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public LibraryBuilder addKeyword(Keyword keyword)
keyword - the keyword
NullPointerException - keyword is nullpublic LibraryBuilder removeKeyword(String name)
name - the name
NullPointerException - name is null
public LibraryBuilder addFormatAttribute(String name,
FormatAttribute attribute)
name - the name for this attributeattribute - the format attribute
NullPointerException - the name or attribute is nullpublic LibraryBuilder removeFormatAttribute(String name)
name - the format attribute name
NullPointerException - name is nullpublic Library freeze()
freeze in interface Thawed<Library>LibraryLibrary.Library(LibraryBuilder)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||