public class DefaultNamePathResolver extends Object implements NamePathResolver
DefaultNamePathResolver
...Constructor and Description |
---|
DefaultNamePathResolver(NameResolver nResolver,
PathResolver pResolver) |
DefaultNamePathResolver(javax.jcr.NamespaceRegistry registry) |
DefaultNamePathResolver(NamespaceResolver nsResolver) |
DefaultNamePathResolver(NamespaceResolver nsResolver,
boolean enableCaching) |
DefaultNamePathResolver(NamespaceResolver nsResolver,
IdentifierResolver idResolver,
boolean enableCaching) |
DefaultNamePathResolver(javax.jcr.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(javax.jcr.Session session)
public DefaultNamePathResolver(javax.jcr.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, javax.jcr.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 invalidjavax.jcr.NamespaceException
- if the namespace prefix can not be resolvedpublic String getJCRName(Name name) throws javax.jcr.NamespaceException
NameResolver
Name
object.getJCRName
in interface NameResolver
name
- A Name
object.prefix:localName
or
localName
in case of the empty namespace.javax.jcr.NamespaceException
- if the namespace URI can not be resolvedpublic Path getQPath(String path) throws MalformedPathException, IllegalNameException, javax.jcr.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.javax.jcr.NamespaceException
- if a namespace prefix can not be resolved.public Path getQPath(String path, boolean normalizeIdentifier) throws MalformedPathException, IllegalNameException, javax.jcr.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.javax.jcr.NamespaceException
- if a namespace prefix can not be resolved.public String getJCRPath(Path path) throws javax.jcr.NamespaceException
PathResolver
getJCRPath
in interface PathResolver
path
- a Path
object.javax.jcr.NamespaceException
- if a namespace URI can not be resolvedCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.