Class ParsingNameResolver
java.lang.Object
org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver
- All Implemented Interfaces:
NameResolver
Name resolver that parsers and formats prefixed JCR names.
A
NamespaceResolver is used for resolving the namespace prefixes.-
Constructor Summary
ConstructorsConstructorDescriptionParsingNameResolver(NameFactory nameFactory, NamespaceResolver resolver) Creates a parsing name resolver. -
Method Summary
-
Constructor Details
-
ParsingNameResolver
Creates a parsing name resolver.- Parameters:
nameFactory- the name factory.resolver- namespace resolver
-
-
Method Details
-
getQName
Parses the given JCR name and returns the resolvedNameobject.- Specified by:
getQNamein interfaceNameResolver- Parameters:
jcrName- A JCR name String- Returns:
- A
Nameobject. - Throws:
IllegalNameException- if the JCR name format is invalidNamespaceException- if the namespace prefix can not be resolved.- See Also:
-
getJCRName
Returns the qualified JCR name for the givenNameobject. 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.- Specified by:
getJCRNamein interfaceNameResolver- Parameters:
name- ANameobject.- Returns:
- A qualified JCR name string.
- Throws:
NamespaceException- if the namespace URI can not be resolved.- See Also:
-