public GlobusResource getResource(String location) {
        GlobusResource returnResource;
        URL resourceURL;
        if (location.startsWith("classpath:")) {
            resourceURL = getClass().getClassLoader().getResource(location.replaceFirst("classpath:/", ""));
            returnResource = new GlobusResource(resourceURL.getPath());
        } else if (location.startsWith("file:")) {
            returnResource = new GlobusResource(location.replaceFirst("file:", ""));
        } else
            returnResource = new GlobusResource(location);
        return returnResource;
    }
public GlobusResource getResource ( String location ) { GlobusResource returnResource ; URL resourceURL ; if ( location . startsWith ( "classpath:" ) ) { resourceURL = getClass ( ) . getClassLoader ( ) . getResource ( location . replaceFirst ( "classpath:/" , "" ) ) ; returnResource = new GlobusResource ( resourceURL . getPath ( ) ) ; } else if ( location . startsWith ( "file:" ) ) { returnResource = new GlobusResource ( location . replaceFirst ( "file:" , "" ) ) ; } else returnResource = new GlobusResource ( location ) ; return returnResource ; }
This method takes a location string and returns a GlobusResource of the
corresponding location.  This method does not accept any patterns for the location string.
@param location An absolute or relative location in the style classpath:/folder/className.class,
file:/folder/fileName.ext, or folder/folder/fileName.ext
@return  A GlobusResource type object of the corresponding location string.