public final class GrammarRepository extends Object
loadGrammar(String, String)
method. All language variations will be loaded too.getFromId(String, String)
method.Modifier and Type | Method and Description |
---|---|
static Grammar |
getFromId(String id)
Searches loaded grammar to find the one corresponding to the provided id and default locale.
|
static Grammar |
getFromId(String id,
String locale)
Searches loaded grammar to find the one corresponding to the provided id and local.
|
static List<String> |
listGrammarIds()
Searches loaded grammar to retrieve all loaded grammars IDs.
|
static List<String> |
listGrammarLocales(String id)
Searches loaded grammar to retrieve all local for the provided grammar id.
|
static void |
loadGrammar(String path,
String fileName)
Loads a grammar and its language variation.
|
public static void loadGrammar(String path, String fileName) throws IOException, XMLUtilsException, DslException
path
- fileName
- IOException
DslException
XMLUtilsException
public static Grammar getFromId(String id)
public static Grammar getFromId(String id, String locale)
public static List<String> listGrammarIds()