edu.isi.pegasus.planner.common
Class Utility

java.lang.Object
  extended by edu.isi.pegasus.planner.common.Utility

public class Utility
extends Object

A utility class that contains a few common utility/helper functions used in Pegasus. At present they are preliminary URL decomposition functions.

Version:
$Revision: 2567 $
Author:
Karan Vahi, Gaurang Mehta

Constructor Summary
Utility()
           
 
Method Summary
static String getAbsolutePath(String url)
          It returns the absolute path of the url.
static String getHostName(String urlPrefix)
          This returns the host name of the server, given a url prefix.
static String pruneURLPrefix(String url)
          Prunes the url prefix to ensure that only the url prefix as wanted by Pegasus goes through.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utility

public Utility()
Method Detail

getHostName

public static String getHostName(String urlPrefix)
This returns the host name of the server, given a url prefix.

Parameters:
urlPrefix - the urlPrefix of the server.
Returns:
String

pruneURLPrefix

public static String pruneURLPrefix(String url)
Prunes the url prefix to ensure that only the url prefix as wanted by Pegasus goes through. This is due to the different manner in which url prefix was used earlier. For e.g the function when passed a url gsiftp://dataserver.phys.uwm.edu/~/griphyn_test/ligodemo_output/ returns url gsiftp://dataserver.phys.uwm.edu.

Parameters:
url - the url prefix.
Returns:
String

getAbsolutePath

public static String getAbsolutePath(String url)
It returns the absolute path of the url. The absolute path is the directory path in the URL. In the GVDS lingo, it refers to the mount points too.

Parameters:
url - String
Returns:
String


Copyright © 2011 The University of Southern California. All Rights Reserved.