@ApplicationScoped public class SimpleNamespaceService extends Object implements NamespaceService
This service will load some standard namespaces/prefixes and read system properties into the namespace maping if they are defined like so: "trellis.ns-myprefix=http://example.com/namespace"
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_NAMESPACES_MAPPING |
| Constructor and Description |
|---|
SimpleNamespaceService()
Create a simple, in-memory 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_MAPPING
public SimpleNamespaceService()
public Map<String,String> getNamespaces()
NamespaceServicegetNamespaces in interface NamespaceServicepublic boolean setPrefix(String prefix, String namespace)
NamespaceServicesetPrefix in interface NamespaceServiceprefix - the prefixnamespace - the namespace