org.apache.jackrabbit.spi.commons.conversion
Class DefaultNamePathResolver

java.lang.Object
  extended by 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
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)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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: NameResolver
Returns the Name for the given JCR name String.

Specified by:
getQName in interface NameResolver
Parameters:
name - A JCR name String.
Returns:
A Name object.
Throws:
IllegalNameException - if the JCR name format is invalid
NamespaceException - if the namespace prefix can not be resolved

getJCRName

public String getJCRName(Name name)
                  throws NamespaceException
Description copied from interface: NameResolver
Returns the qualified JCR name String for the given Name object.

Specified by:
getJCRName in interface NameResolver
Parameters:
name - A Name object.
Returns:
The qualified JCR name String consisting of prefix:localName or localName in 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: PathResolver
Returns the path object for the given JCR path string.

Specified by:
getQPath in interface PathResolver
Parameters:
path - prefixed JCR path
Returns:
a Path object.
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: PathResolver
Returns the path object for the given JCR path string.

Specified by:
getQPath in interface PathResolver
Parameters:
path - prefixed JCR path
Returns:
a Path object.
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: PathResolver
Returns the given JCR path string for the given path object.

Specified by:
getJCRPath in interface PathResolver
Parameters:
path - a Path object.
Returns:
a JCR path string
Throws:
NamespaceException - if a namespace URI can not be resolved


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.