Class ParsingPathResolver
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver
-
- All Implemented Interfaces:
PathResolver
public class ParsingPathResolver extends Object implements PathResolver
Path resolver that parsers and formats prefixed JCR paths. ANameResolveris used for resolving the path element names.
-
-
Constructor Summary
Constructors Constructor Description ParsingPathResolver(org.apache.jackrabbit.spi.PathFactory pathFactory, NameResolver resolver)Creates a parsing path resolver.ParsingPathResolver(org.apache.jackrabbit.spi.PathFactory pathFactory, NameResolver nameResolver, IdentifierResolver idResolver)Creates a parsing path resolver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetJCRPath(org.apache.jackrabbit.spi.Path path)Returns the JCR path representation for the givenPathobject.org.apache.jackrabbit.spi.PathgetQPath(String jcrPath)Parses the given JCR path into aPathobject.org.apache.jackrabbit.spi.PathgetQPath(String jcrPath, boolean normalizeIdentifier)CallsPathParser.parse(String, NameResolver, IdentifierResolver, org.apache.jackrabbit.spi.PathFactory)from the givenjcrPath.
-
-
-
Constructor Detail
-
ParsingPathResolver
public ParsingPathResolver(org.apache.jackrabbit.spi.PathFactory pathFactory, NameResolver resolver)Creates a parsing path resolver.- Parameters:
pathFactory- path factory.resolver- name resolver
-
ParsingPathResolver
public ParsingPathResolver(org.apache.jackrabbit.spi.PathFactory pathFactory, NameResolver nameResolver, IdentifierResolver idResolver)Creates a parsing path resolver.- Parameters:
pathFactory- path factory.nameResolver- name resolver.idResolver- identifier resolver.- Since:
- JCR 2.0
-
-
Method Detail
-
getQPath
public org.apache.jackrabbit.spi.Path getQPath(String jcrPath) throws MalformedPathException, IllegalNameException, NamespaceException
Parses the given JCR path into aPathobject.- Specified by:
getQPathin interfacePathResolver- Parameters:
jcrPath- A JCR path String.- 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 jcrPath, boolean normalizeIdentifier) throws MalformedPathException, IllegalNameException, NamespaceException
CallsPathParser.parse(String, NameResolver, IdentifierResolver, org.apache.jackrabbit.spi.PathFactory)from the givenjcrPath.- Specified by:
getQPathin interfacePathResolver- Parameters:
jcrPath- 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.- See Also:
PathResolver.getQPath(String, boolean)
-
getJCRPath
public String getJCRPath(org.apache.jackrabbit.spi.Path path) throws NamespaceException
Returns the JCR path representation for the givenPathobject.- Specified by:
getJCRPathin interfacePathResolver- Parameters:
path- APathobject.- Returns:
- A JCR path String in the standard form.
- Throws:
NamespaceException- if a namespace URI can not be resolved.- See Also:
PathResolver.getJCRPath(org.apache.jackrabbit.spi.Path)
-
-