public final class KeywordBundle extends Object implements Iterable<Map.Entry<String,Keyword>>
You can either create a new, completely empty, keyword bunle, or use one of the default bundles and extend it. For instance:
final KeywordBundle bundle = KeywordBundles.defaultBundle();
final Keyword k1 = ...;
final Keyword k2 = ...;
bundle.registerKeyword(k1);
bundle.registerKeyword(k2);
Keyword,
JsonSchemaFactory| Constructor and Description |
|---|
KeywordBundle() |
| Modifier and Type | Method and Description |
|---|---|
(package private) KeywordBundle |
copy()
Package-private method to generate a full copy of this bundle
|
Iterator<Map.Entry<String,Keyword>> |
iterator()
Iterator over an unmodifiable copy of registered keywords
|
void |
registerKeyword(Keyword keyword)
Register a keyword for this bundle
|
void |
unregisterKeyword(String name)
Unregister a keyword
|
KeywordBundle copy()
public void registerKeyword(Keyword keyword)
Note that it is NOT allowed to register the same keyword twice. If
you must do so, you must call unregisterKeyword(String) first.
keyword - the keyword to registerIllegalArgumentException - a keyword by that name already existsKeyword.Builder,
Keywordpublic void unregisterKeyword(String name)
name - the name of the keyword to unregisterCopyright © 2012. All Rights Reserved.