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(NamespaceResolver nsResolver)
           
DefaultNamePathResolver(NamespaceResolver nsResolver, boolean enableCaching)
           
 
Method Summary
 String getJCRName(Name name)
          Returns the prefixed JCR name for the given qualified name.
 String getJCRPath(Path path)
          Returns the prefixed JCR path for the given qualified path.
 Name getQName(String name)
          Returns the qualified name for the given prefixed JCR name.
 Path getQPath(String path)
          Returns the qualified path for the given prefixed JCR path.
 
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(NamespaceResolver nsResolver,
                               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 qualified name for the given prefixed JCR name.

Specified by:
getQName in interface NameResolver
Parameters:
name - prefixed JCR name
Returns:
qualified name
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 prefixed JCR name for the given qualified name.

Specified by:
getJCRName in interface NameResolver
Parameters:
name - qualified name
Returns:
prefixed JCR name
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 qualified path for the given prefixed JCR path.

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

Specified by:
getJCRPath in interface PathResolver
Parameters:
path - qualified path
Returns:
prefixed JCR path
Throws:
NamespaceException - if a namespace URI can not be resolved


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