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 StringgetJCRName(Name name)Returns the qualified JCR name String for the givenNameobject.StringgetJCRPath(Path path)Returns the given JCR path string for the given path object.NamegetQName(String name)Returns theNamefor the given JCR name String.PathgetQPath(String path)Returns the path object for the given JCR path string.PathgetQPath(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:NameResolverReturns theNamefor the given JCR name String.- Specified by:
getQNamein interfaceNameResolver- Parameters:
name- A JCR name String.- Returns:
- A
Nameobject. - 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:NameResolverReturns the qualified JCR name String for the givenNameobject.- Specified by:
getJCRNamein interfaceNameResolver- Parameters:
name- ANameobject.- Returns:
- The qualified JCR name String consisting of
prefix:localNameorlocalNamein 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:PathResolverReturns the path object for the given JCR path string.- Specified by:
getQPathin interfacePathResolver- Parameters:
path- prefixed JCR path- Returns:
- a
Pathobject. - 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:PathResolverReturns the path object for the given JCR path string.- Specified by:
getQPathin interfacePathResolver- Parameters:
path- prefixed JCR path- Returns:
- a
Pathobject. - 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:PathResolverReturns the given JCR path string for the given path object.- Specified by:
getJCRPathin interfacePathResolver- Parameters:
path- aPathobject.- Returns:
- a JCR path string
- Throws:
NamespaceException- if a namespace URI can not be resolved
-
-