org.apache.jackrabbit.name
Class PathFormat

java.lang.Object
  extended by org.apache.jackrabbit.name.PathFormat

Deprecated. Use the PathResolver interface from the org.apache.jackrabbit.spi.commons.conversion package of the jackrabbit-spi-commons component.

public class PathFormat
extends Object

PathFormat formats a Path using a NamespaceResolver.


Constructor Summary
PathFormat()
          Deprecated.  
 
Method Summary
static void checkFormat(String jcrPath)
          Deprecated. Checks if jcrPath is a valid JCR-style absolute or relative path.
static String format(Path path, NamespaceResolver resolver)
          Deprecated. Returns a string representation of the qualified path in the JCR path format.
static Path parse(Path parent, String jcrPath, NamespaceResolver resolver)
          Deprecated. Parses the give jcrPath and returns a Path.
static Path parse(String jcrPath, NamespaceResolver resolver)
          Deprecated. Parses jcrPath into a qualified path using resolver to convert prefixes into namespace URI's.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathFormat

public PathFormat()
Deprecated. 
Method Detail

parse

public static Path parse(String jcrPath,
                         NamespaceResolver resolver)
                  throws MalformedPathException
Deprecated. 
Parses jcrPath into a qualified path using resolver to convert prefixes into namespace URI's.

Parameters:
jcrPath - the jcr path.
resolver - the namespace resolver.
Returns:
qualified path.
Throws:
MalformedPathException - if jcrPath is malformed.

parse

public static Path parse(Path parent,
                         String jcrPath,
                         NamespaceResolver resolver)
                  throws MalformedPathException
Deprecated. 
Parses the give jcrPath and returns a Path. If parent is not null, it is prepended to the returned list. If resolver is null, this method only checks the format of the string and returns null.

Parameters:
parent - the parent path
jcrPath - the JCR path
resolver - the namespace resolver to get prefixes for namespace URI's.
Returns:
the fully qualified Path.
Throws:
MalformedPathException - if jcrPath is malformed.

checkFormat

public static void checkFormat(String jcrPath)
                        throws MalformedPathException
Deprecated. 
Checks if jcrPath is a valid JCR-style absolute or relative path.

Parameters:
jcrPath - the path to be checked
Throws:
MalformedPathException - If jcrPath is not a valid JCR-style path.

format

public static String format(Path path,
                            NamespaceResolver resolver)
                     throws NoPrefixDeclaredException
Deprecated. 
Returns a string representation of the qualified path in the JCR path format.

Parameters:
path - the qualified path to resolve.
resolver - the namespace resolver.
Returns:
JCR the formatted path.
Throws:
NoPrefixDeclaredException - if a namespace can not be resolved


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