|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.query.lucene.FileBasedNamespaceMappings
public class FileBasedNamespaceMappings
The class NamespaceMappings
implements a org.apache.jackrabbit.core.NamespaceResolver
that holds a namespace
mapping that is used internally in the search index. Storing paths with the
full uri of a namespace would require too much space in the search index.
Constructor Summary | |
---|---|
FileBasedNamespaceMappings(File file)
Creates NamespaceMappings instance. |
Method Summary | |
---|---|
String |
getPrefix(String uri)
Returns a prefix for the namespace uri . |
String |
getURI(String prefix)
Returns a namespace uri for a prefix . |
String |
translatePropertyName(Name qName)
Translates a property name from a session local namespace mapping into a search index private namespace mapping. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileBasedNamespaceMappings(File file) throws IOException
NamespaceMappings
instance. Initial mappings are
loaded from file
.
file
- the File
to load initial mappings.
IOException
- if an error occurs while reading initial namespace
mappings from file
.Method Detail |
---|
public String getURI(String prefix) throws NamespaceException
prefix
.
getURI
in interface NamespaceResolver
prefix
- the namespace prefix.
NamespaceException
- if no namespace uri is registered for
prefix
.public String getPrefix(String uri) throws NamespaceException
uri
. If a namespace
mapping exists, the already known prefix is returned; otherwise a new
prefix is created and assigned to the namespace uri.
getPrefix
in interface NamespaceResolver
uri
- the namespace uri.
NamespaceException
- if an yet unknown namespace uri / prefix
mapping could not be stored.public String translatePropertyName(Name qName) throws IllegalNameException
translatePropertyName
in interface NamespaceMappings
qName
- the property name to translate
IllegalNameException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |