org.xmlecho.palomar.xfs
Class RepositoryUtil

java.lang.Object
  extended byorg.xmlecho.palomar.xfs.RepositoryUtil

public class RepositoryUtil
extends java.lang.Object

Repository utility class.


Constructor Summary
RepositoryUtil()
           
 
Method Summary
static java.lang.String getObjectName(java.lang.String uri)
           
static java.lang.String getParentUri(java.lang.String uri)
           
static java.lang.String normalizePath(java.lang.String path, java.lang.String name)
          Normalize path for a repository object.
static java.lang.String normalizePathString(java.lang.String cat)
          returns a normalized string representing a file / folder path, eliminating "." and ".." components as appropriate
static byte[] readFromStream(java.io.InputStream inputStream)
          Read bytes from input stream.
static java.lang.String[] splitPath(java.lang.String normalizedPath)
          splits a normalized path string into two components, strs[0] == the path component and strs[1] == the name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryUtil

public RepositoryUtil()
Method Detail

normalizePath

public static java.lang.String normalizePath(java.lang.String path,
                                             java.lang.String name)
Normalize path for a repository object.


normalizePathString

public static java.lang.String normalizePathString(java.lang.String cat)
returns a normalized string representing a file / folder path, eliminating "." and ".." components as appropriate


getParentUri

public static java.lang.String getParentUri(java.lang.String uri)
Returns:
parent URI of the given URI.

getObjectName

public static java.lang.String getObjectName(java.lang.String uri)
Returns:
object name from a given object URI.

readFromStream

public static byte[] readFromStream(java.io.InputStream inputStream)
                             throws java.io.IOException
Read bytes from input stream.

Throws:
java.io.IOException

splitPath

public static java.lang.String[] splitPath(java.lang.String normalizedPath)
splits a normalized path string into two components, strs[0] == the path component and strs[1] == the name