Class NSRegistryBasedNamespaceMappings
- java.lang.Object
-
- org.apache.jackrabbit.core.query.lucene.AbstractNamespaceMappings
-
- org.apache.jackrabbit.core.query.lucene.NSRegistryBasedNamespaceMappings
-
- All Implemented Interfaces:
NamespaceMappings
,NamespaceResolver
public class NSRegistryBasedNamespaceMappings extends AbstractNamespaceMappings
NSRegistryBasedNamespaceMappings
implements a namespace mapping based on the stable index prefix provided by the namespace registry.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getPrefix(String uri)
Returns the prefix which is mapped to the given URI.String
getURI(String prefix)
Returns the URI to which the given prefix is mapped.-
Methods inherited from class org.apache.jackrabbit.core.query.lucene.AbstractNamespaceMappings
translateName, translatePath
-
-
-
-
Method Detail
-
getURI
public String getURI(String prefix) throws NamespaceException
Returns the URI to which the given prefix is mapped.- Parameters:
prefix
- namespace prefix- Returns:
- the namespace URI to which the given prefix is mapped.
- Throws:
NamespaceException
- if the prefix is unknown.
-
getPrefix
public String getPrefix(String uri) throws NamespaceException
Returns the prefix which is mapped to the given URI.- Parameters:
uri
- namespace URI- Returns:
- the prefix mapped to the given URI.
- Throws:
NamespaceException
- if the URI is unknown.
-
-