|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.dna.graph.properties.basic.BasicNamespaceRegistry
@ThreadSafe public class BasicNamespaceRegistry

| Field Summary | |
|---|---|
static String |
DEFAULT_NAMESPACE_URI
|
static String |
DEFAULT_PREFIX_NUMBER_FORMAT
|
static String |
DEFAULT_PREFIX_TEMPLATE
|
| Constructor Summary | |
|---|---|
BasicNamespaceRegistry()
|
|
BasicNamespaceRegistry(String defaultNamespaceUri)
|
|
| Method Summary | |
|---|---|
String |
getDefaultNamespaceUri()
Return the namespace URI that is currently mapped to the empty prefix, or null if there is no current default namespace. |
String |
getGeneratedPrefixTemplate()
|
String |
getNamespaceForPrefix(String prefix)
Get the namespace URI for the supplied prefix. |
String |
getPrefixForNamespaceUri(String namespaceUri,
boolean generateIfMissing)
Return the prefix used for the supplied namespace URI. |
Set<String> |
getRegisteredNamespaceUris()
Obtain the set of namespaces that are registered. |
boolean |
isRegisteredNamespaceUri(String namespaceUri)
Return whether there is a registered prefix for the supplied namespace URI. |
String |
register(String prefix,
String namespaceUri)
Register a new namespace using the supplied prefix, returning the namespace URI previously registered under that prefix. |
void |
setGeneratedPrefixTemplate(String prefixTemplate)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_NAMESPACE_URI
public static final String DEFAULT_PREFIX_TEMPLATE
public static final String DEFAULT_PREFIX_NUMBER_FORMAT
| Constructor Detail |
|---|
public BasicNamespaceRegistry()
public BasicNamespaceRegistry(String defaultNamespaceUri)
defaultNamespaceUri - the namespace URI to use for the default prefix| Method Detail |
|---|
public String getGeneratedPrefixTemplate()
public void setGeneratedPrefixTemplate(String prefixTemplate)
prefixTemplate - Sets prefixTemplate to the specified value.public String getNamespaceForPrefix(String prefix)
getNamespaceForPrefix in interface NamespaceRegistryprefix - the namespace prefix
public String getPrefixForNamespaceUri(String namespaceUri,
boolean generateIfMissing)
getPrefixForNamespaceUri in interface NamespaceRegistrynamespaceUri - the namespace URIgenerateIfMissing - true if the namespace URI has not already been registered and the method should auto-register the
namespace with a generated prefix, or false if the method should never auto-register the namespace
null if the namespace has not been registered
and generateIfMissing is falseNamespaceRegistry.isRegisteredNamespaceUri(String)public boolean isRegisteredNamespaceUri(String namespaceUri)
isRegisteredNamespaceUri in interface NamespaceRegistrynamespaceUri - the namespace URI
public String getDefaultNamespaceUri()
getDefaultNamespaceUri in interface NamespaceRegistry
public String register(String prefix,
String namespaceUri)
register in interface NamespaceRegistryprefix - the prefix for the namespace, or null if a namesapce prefix should be generated automaticallynamespaceUri - the namespace URI
public Set<String> getRegisteredNamespaceUris()
getRegisteredNamespaceUris in interface NamespaceRegistry
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||