|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.spi.commons.namespace.NamespaceMapping
public class NamespaceMapping
A Simple Namespace Mapping table. Mappings can be added and then the object can be used as a NamespaceResolver. Additionally, it can be based on a underlying NamespaceResolver
Constructor Summary | |
---|---|
NamespaceMapping()
|
|
NamespaceMapping(NamespaceResolver base)
Constructor |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getPrefix(String uri)
Returns the prefix which is mapped to the given URI. |
Map<String,String> |
getPrefixToURIMapping()
Return a Map of prefix to URI mappings currently registered. |
String |
getURI(String prefix)
Returns the URI to which the given prefix is mapped. |
Map<String,String> |
getURIToPrefixMapping()
Return a Map of URI to prefix mappings currently registered. |
boolean |
hasPrefix(String prefix)
Returns true if prefix is already mapped to some URI. |
void |
setMapping(String prefix,
String uri)
Set a prefix == URI one-to-one mapping |
String |
toString()
Override Object.toString() |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NamespaceMapping()
public NamespaceMapping(NamespaceResolver base)
base
- fallback resolverMethod Detail |
---|
public String getPrefix(String uri) throws NamespaceException
getPrefix
in interface NamespaceResolver
uri
- namespace URI
NamespaceException
- if the URI is unknown.public String getURI(String prefix) throws NamespaceException
getURI
in interface NamespaceResolver
prefix
- namespace prefix
NamespaceException
- if the prefix is unknown.public boolean hasPrefix(String prefix)
prefix
- prefix to check
true
if prefix is mappedpublic void setMapping(String prefix, String uri) throws NamespaceException
prefix
- prefix to mapuri
- uri to map
NamespaceException
- if an error occurspublic Map<String,String> getPrefixToURIMapping()
public Map<String,String> getURIToPrefixMapping()
public boolean equals(Object obj)
equals
in class Object
public String toString()
Object.toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |