de.unihalle.informatik.Alida.helpers
Class ALDFilePathManipulator

java.lang.Object
  extended by de.unihalle.informatik.Alida.helpers.ALDFilePathManipulator

public class ALDFilePathManipulator
extends java.lang.Object

Class providing helpers to manipulate file and directory path names.

Author:
moeller, posch, misiak

Constructor Summary
ALDFilePathManipulator()
           
 
Method Summary
static java.lang.String getExtension(java.lang.String str)
          Gets extension from the filename, if any.
static java.lang.String getFileName(java.lang.String str)
          Returns name without leading directories or file description (extension).
static java.lang.String getPath(java.lang.String str)
          Get path.
static java.lang.String removeExtension(java.lang.String str)
          Removes prceding path elements and extension from filename, if any.
static java.lang.String removeLeadingDirectories(java.lang.String str)
          Remove all leading pathname components from a filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ALDFilePathManipulator

public ALDFilePathManipulator()
Method Detail

getExtension

public static java.lang.String getExtension(java.lang.String str)
Gets extension from the filename, if any.

Parameters:
str - Filename to be processed.
Returns:
Extension or empty string, if no extension present.

getFileName

public static java.lang.String getFileName(java.lang.String str)
Returns name without leading directories or file description (extension).

Parameters:
str - Filename to be processed.
Returns:
Filename without leading directories and file extension.

getPath

public static java.lang.String getPath(java.lang.String str)
Get path.

Parameters:
str - Filename to be processed.
Returns:
Path of provided filename.

removeExtension

public static java.lang.String removeExtension(java.lang.String str)
Removes prceding path elements and extension from filename, if any.

Parameters:
str - Filename to process.
Returns:
Filename without extension.

removeLeadingDirectories

public static java.lang.String removeLeadingDirectories(java.lang.String str)
Remove all leading pathname components from a filename.

Parameters:
str - Filename to be processed.
Returns:
Tail of the filename.