|
||||||||||
| 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(java.io.File file)
Creates NamespaceMappings instance. |
|
| Method Summary | |
|---|---|
java.lang.String |
getPrefix(java.lang.String uri)
Returns a prefix for the namespace uri. |
java.lang.String |
getURI(java.lang.String prefix)
Returns a namespace uri for a prefix. |
java.lang.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(java.io.File file)
throws java.io.IOException
NamespaceMappings instance. Initial mappings are
loaded from file.
file - the File to load initial mappings.
java.io.IOException - if an error occurs while reading initial namespace
mappings from file.| Method Detail |
|---|
public java.lang.String getURI(java.lang.String prefix)
throws javax.jcr.NamespaceException
prefix.
getURI in interface NamespaceResolverprefix - the namespace prefix.
javax.jcr.NamespaceException - if no namespace uri is registered for
prefix.
public java.lang.String getPrefix(java.lang.String uri)
throws javax.jcr.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 NamespaceResolveruri - the namespace uri.
javax.jcr.NamespaceException - if an yet unknown namespace uri / prefix
mapping could not be stored.
public java.lang.String translatePropertyName(Name qName)
throws IllegalNameException
translatePropertyName in interface NamespaceMappingsqName - the property name to translate
IllegalNameException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||