public class ParsingNameResolver extends java.lang.Object implements NameResolver
NamespaceResolver
is used for resolving the namespace prefixes.Constructor and Description |
---|
ParsingNameResolver(NameFactory nameFactory,
NamespaceResolver resolver)
Creates a parsing name resolver.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getJCRName(Name name)
Returns the qualified JCR name for the given
Name object. |
Name |
getQName(java.lang.String jcrName)
Parses the given JCR name and returns the resolved
Name object. |
public ParsingNameResolver(NameFactory nameFactory, NamespaceResolver resolver)
nameFactory
- the name factory.resolver
- namespace resolverpublic Name getQName(java.lang.String jcrName) throws IllegalNameException, NamespaceException
Name
object.getQName
in interface NameResolver
jcrName
- A JCR name StringName
object.IllegalNameException
- if the JCR name format is invalidNamespaceException
- if the namespace prefix can not be resolved.NameResolver.getQName(String)
public java.lang.String getJCRName(Name name) throws NamespaceException
Name
object.
If the name is in the default namespace, then the local name
is returned without a prefix. Otherwise the prefix for the
namespace is resolved and used to construct the JCR name.getJCRName
in interface NameResolver
name
- A Name
object.NamespaceException
- if the namespace URI can not be resolved.NameResolver.getJCRName(org.apache.jackrabbit.spi.Name)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"