Class DefaultNamePathResolver
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver
-
- All Implemented Interfaces:
NamePathResolver,NameResolver,PathResolver
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(org.apache.jackrabbit.spi.Name name)Returns the qualified JCR name String for the givenNameobject.StringgetJCRPath(org.apache.jackrabbit.spi.Path path)Returns the given JCR path string for the given path object.org.apache.jackrabbit.spi.NamegetQName(String name)Returns theNamefor the given JCR name String.org.apache.jackrabbit.spi.PathgetQPath(String path)Returns the path object for the given JCR path string.org.apache.jackrabbit.spi.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 org.apache.jackrabbit.spi.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(org.apache.jackrabbit.spi.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 org.apache.jackrabbit.spi.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 org.apache.jackrabbit.spi.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(org.apache.jackrabbit.spi.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
-
-