@Alternative public class FileNamespaceService extends Object implements NamespaceService
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_NAMESPACES_PATH
The configuration key controlling the path to a JSON-formatted namespace file.
|
| Constructor and Description |
|---|
FileNamespaceService()
Create a JSON-based Namespace service.
|
FileNamespaceService(String path)
Create a JSON-based Namespace service.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getNamespaces()
Fetch the entire namespace mapping.
|
boolean |
setPrefix(String prefix,
String namespace)
Set the namespace for a given prefix.
|
public static final String CONFIG_NAMESPACES_PATH
public FileNamespaceService()
public FileNamespaceService(String path)
path - the path to the JSON filepublic Map<String,String> getNamespaces()
NamespaceServicegetNamespaces in interface NamespaceServicepublic boolean setPrefix(String prefix, String namespace)
NamespaceServicesetPrefix in interface NamespaceServiceprefix - the prefixnamespace - the namespace