Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify javadoc of NamespaceResolver.getPrefix() to make it clear that #89

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class NameParser {
* @param jcrName the name to be parsed. The jcrName may either be in the
* qualified or in the expanded form.
* @param resolver <code>NamespaceResolver</code> use to retrieve the
* namespace URI from the prefix contained in the given JCR name.
* namespace URI from the prefix contained in the given JCR name. Must resolve the empty prefix "" as well.
* @return qName the new <code>Name</code>
* @throws IllegalNameException If <code>jcrName</code> is not a valid
* JCR-style name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import javax.jcr.NamespaceException;

import org.apache.jackrabbit.spi.commons.conversion.NameParser;

/**
* Interface for resolving namespace URIs and prefixes. Unlike the JCR
* {@link javax.jcr.NamespaceRegistry} interface, this interface contains
Expand All @@ -30,9 +32,10 @@ public interface NamespaceResolver {

/**
* Returns the URI to which the given prefix is mapped.
* For the empty prefix the default namespace uri should be returned as the {@link NameParser} relies on that.
*
* @param prefix namespace prefix
* @return the namespace URI to which the given prefix is mapped.
* @return the namespace URI to which the given prefix is mapped (never {@code null}).
* @throws NamespaceException if the prefix is unknown.
*/
String getURI(String prefix) throws NamespaceException;
Expand All @@ -41,7 +44,7 @@ public interface NamespaceResolver {
* Returns the prefix which is mapped to the given URI.
*
* @param uri namespace URI
* @return the prefix mapped to the given URI.
* @return the prefix mapped to the given URI (never {@code null}).
* @throws NamespaceException if the URI is unknown.
*/
String getPrefix(String uri) throws NamespaceException;
Expand Down