public class DefaultNamePathResolver extends Object implements NamePathResolver
DefaultNamePathResolver
...Constructor and Description |
---|
DefaultNamePathResolver(NameResolver nResolver,
PathResolver pResolver) |
DefaultNamePathResolver(NamespaceRegistry registry) |
DefaultNamePathResolver(NamespaceResolver nsResolver) |
DefaultNamePathResolver(NamespaceResolver nsResolver,
boolean enableCaching) |
DefaultNamePathResolver(NamespaceResolver nsResolver,
IdentifierResolver idResolver,
boolean enableCaching) |
DefaultNamePathResolver(Session session) |
Modifier and Type | Method and Description |
---|---|
String |
getJCRName(Name name)
Returns the qualified JCR name String for the given
Name object. |
String |
getJCRPath(Path path)
Returns the given JCR path string for the given path object.
|
Name |
getQName(String name)
Returns the
Name 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.
|
public DefaultNamePathResolver(NamespaceResolver nsResolver)
public DefaultNamePathResolver(Session session)
public DefaultNamePathResolver(NamespaceRegistry registry)
public DefaultNamePathResolver(NamespaceResolver nsResolver, boolean enableCaching)
public DefaultNamePathResolver(NamespaceResolver nsResolver, IdentifierResolver idResolver, boolean enableCaching)
public DefaultNamePathResolver(NameResolver nResolver, PathResolver pResolver)
public Name getQName(String name) throws IllegalNameException, NamespaceException
NameResolver
Name
for the given JCR name String.getQName
in interface NameResolver
name
- A JCR name String.Name
object.IllegalNameException
- if the JCR name format is invalidNamespaceException
- if the namespace prefix can not be resolvedpublic String getJCRName(Name name) throws NamespaceException
NameResolver
Name
object.getJCRName
in interface NameResolver
name
- A Name
object.prefix:localName
or
localName
in case of the empty namespace.NamespaceException
- if the namespace URI can not be resolvedpublic Path getQPath(String path) throws MalformedPathException, IllegalNameException, NamespaceException
PathResolver
getQPath
in interface PathResolver
path
- prefixed JCR pathPath
object.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.public Path getQPath(String path, boolean normalizeIdentifier) throws MalformedPathException, IllegalNameException, NamespaceException
PathResolver
getQPath
in interface PathResolver
path
- prefixed JCR pathPath
object.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.public String getJCRPath(Path path) throws NamespaceException
PathResolver
getJCRPath
in interface PathResolver
path
- a Path
object.NamespaceException
- if a namespace URI can not be resolvedCopyright © 2004–2021 The Apache Software Foundation. All rights reserved.