org.jcrom.util
Class PathUtils

java.lang.Object
  extended by org.jcrom.util.PathUtils

public class PathUtils
extends java.lang.Object

Contains utilities used for JCR node names and paths.

Author:
Olafur Gauti Gudmundsson

Constructor Summary
PathUtils()
           
 
Method Summary
static java.lang.String createValidName(java.lang.String str)
          Creates a valid JCR node name from the String supplied, by replacing all non-alphanumeric chars.
static java.lang.String replaceNonAlphanumeric(java.lang.String str, char subst)
          Replaces occurences of non-alphanumeric characters with a supplied char.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathUtils

public PathUtils()
Method Detail

replaceNonAlphanumeric

public static java.lang.String replaceNonAlphanumeric(java.lang.String str,
                                                      char subst)
Replaces occurences of non-alphanumeric characters with a supplied char. A non-alphanumeric character at the beginning or end is replaced with ''.


createValidName

public static java.lang.String createValidName(java.lang.String str)
Creates a valid JCR node name from the String supplied, by replacing all non-alphanumeric chars.

Parameters:
str - the input String
Returns:
a valid JCR node name for the String


Copyright © 2009. All Rights Reserved.