Inflection
Morphology Inflection
|
Provides registration capabilities for registering data for Inflection to utilize. More...
#include <DataRegistrationService.hpp>
Static Public Member Functions | |
static void | registerDataPathForLocale (const inflection::util::ULocale &locale, const std::string &path) |
static std::string | getDataPathForLocale (const inflection::util::ULocale &locale) |
Provides registration capabilities for registering data for Inflection to utilize.
This class is used by Inflection to add paths for varying locale's data. It should be used to specify where data exists whenever necessary, for example when using Inflection on client devices (with downloaded data), or when testing with custom data.
Definition at line 17 of file DataRegistrationService.hpp.
|
static |
Returns the filesystem path that was previously registered for a given locale.
locale | The locale. |
|
static |
Register a path on the filesystem for Inflection to use as the backing data for a given locale. Once the path has been set, it can not be changed to any other path. If you must reload the data, you must restart the process using Inflection and set the new path. Inflection is not able to change the path of its caches for several reasons:
locale | The locale to register the data for. |
path | The path on the filesystem (relative or absolute). |
IllegalArgumentException | Thrown when changing the path for a locale after it has already been set. This exception is not thrown if the path is already the current value or when the path is set for the first time. |