@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()
NamespaceService
getNamespaces
in interface NamespaceService
public boolean setPrefix(String prefix, String namespace)
NamespaceService
setPrefix
in interface NamespaceService
prefix
- the prefixnamespace
- the namespace