public class ParsingNameResolver extends Object implements NameResolver
NamespaceResolver
is used for resolving the namespace prefixes.Constructor and Description |
---|
ParsingNameResolver(NameFactory nameFactory,
NamespaceResolver resolver)
Creates a parsing name resolver.
|
public ParsingNameResolver(NameFactory nameFactory, NamespaceResolver resolver)
nameFactory
- the name factory.resolver
- namespace resolverpublic Name getQName(String jcrName) throws IllegalNameException, javax.jcr.NamespaceException
Name
object.getQName
in interface NameResolver
jcrName
- A JCR name StringName
object.IllegalNameException
- if the JCR name format is invalidjavax.jcr.NamespaceException
- if the namespace prefix can not be resolved.NameResolver.getQName(String)
public String getJCRName(Name name) throws javax.jcr.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.javax.jcr.NamespaceException
- if the namespace URI can not be resolved.NameResolver.getJCRName(org.apache.jackrabbit.spi.Name)
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.