Class DefaultNamePathResolver
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver
-
- All Implemented Interfaces:
NamePathResolver
,NameResolver
,PathResolver
- Direct Known Subclasses:
NamePathResolverImpl
public class DefaultNamePathResolver extends Object implements NamePathResolver
DefaultNamePathResolver
...
-
-
Constructor Summary
Constructors Constructor Description DefaultNamePathResolver(NamespaceRegistry registry)
DefaultNamePathResolver(Session session)
DefaultNamePathResolver(NameResolver nResolver, PathResolver pResolver)
DefaultNamePathResolver(NamespaceResolver nsResolver)
DefaultNamePathResolver(NamespaceResolver nsResolver, boolean enableCaching)
DefaultNamePathResolver(NamespaceResolver nsResolver, IdentifierResolver idResolver, boolean enableCaching)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getJCRName(Name name)
Returns the qualified JCR name String for the givenName
object.String
getJCRPath(Path path)
Returns the given JCR path string for the given path object.Name
getQName(String name)
Returns theName
for the given JCR name String.Path
getQPath(String path)
Returns the path object for the given JCR path string.Path
getQPath(String path, boolean normalizeIdentifier)
Returns the path object for the given JCR path string.
-
-
-
Constructor Detail
-
DefaultNamePathResolver
public DefaultNamePathResolver(NamespaceResolver nsResolver)
-
DefaultNamePathResolver
public DefaultNamePathResolver(Session session)
-
DefaultNamePathResolver
public DefaultNamePathResolver(NamespaceRegistry registry)
-
DefaultNamePathResolver
public DefaultNamePathResolver(NamespaceResolver nsResolver, boolean enableCaching)
-
DefaultNamePathResolver
public DefaultNamePathResolver(NamespaceResolver nsResolver, IdentifierResolver idResolver, boolean enableCaching)
-
DefaultNamePathResolver
public DefaultNamePathResolver(NameResolver nResolver, PathResolver pResolver)
-
-
Method Detail
-
getQName
public Name getQName(String name) throws IllegalNameException, NamespaceException
Description copied from interface:NameResolver
Returns theName
for the given JCR name String.- Specified by:
getQName
in interfaceNameResolver
- Parameters:
name
- A JCR name String.- Returns:
- A
Name
object. - Throws:
IllegalNameException
- if the JCR name format is invalidNamespaceException
- if the namespace prefix can not be resolved
-
getJCRName
public String getJCRName(Name name) throws NamespaceException
Description copied from interface:NameResolver
Returns the qualified JCR name String for the givenName
object.- Specified by:
getJCRName
in interfaceNameResolver
- Parameters:
name
- AName
object.- Returns:
- The qualified JCR name String consisting of
prefix:localName
orlocalName
in case of the empty namespace. - Throws:
NamespaceException
- if the namespace URI can not be resolved
-
getQPath
public Path getQPath(String path) throws MalformedPathException, IllegalNameException, NamespaceException
Description copied from interface:PathResolver
Returns the path object for the given JCR path string.- Specified by:
getQPath
in interfacePathResolver
- Parameters:
path
- prefixed JCR path- Returns:
- a
Path
object. - Throws:
MalformedPathException
- if the JCR path format is invalid.IllegalNameException
- if any of the JCR names contained in the path are invalid.NamespaceException
- if a namespace prefix can not be resolved.
-
getQPath
public Path getQPath(String path, boolean normalizeIdentifier) throws MalformedPathException, IllegalNameException, NamespaceException
Description copied from interface:PathResolver
Returns the path object for the given JCR path string.- Specified by:
getQPath
in interfacePathResolver
- Parameters:
path
- prefixed JCR path- Returns:
- a
Path
object. - Throws:
MalformedPathException
- if the JCR path format is invalid.IllegalNameException
- if any of the JCR names contained in the path are invalid.NamespaceException
- if a namespace prefix can not be resolved.
-
getJCRPath
public String getJCRPath(Path path) throws NamespaceException
Description copied from interface:PathResolver
Returns the given JCR path string for the given path object.- Specified by:
getJCRPath
in interfacePathResolver
- Parameters:
path
- aPath
object.- Returns:
- a JCR path string
- Throws:
NamespaceException
- if a namespace URI can not be resolved
-
-