org.edg.data.util.naming
Class URIScheme

java.lang.Object
  |
  +--org.edg.data.util.naming.URIScheme

public class URIScheme
extends java.lang.Object

File types understood by the replica manager.

Version:
$Id: URIScheme.java,v 1.11 2004/05/06 09:15:33 jamesc Exp $
Author:
Peter Kunszt, James Casey

Field Summary
static java.lang.String FILE_SCHEME
           
static java.lang.String FTP_SCHEME
           
static java.lang.String GSIFTP_SCHEME
           
static java.lang.String GUID_SCHEME
           
static java.lang.String HTTP_SCHEME
           
static java.lang.String HTTPG_SCHEME
           
static java.lang.String HTTPS_SCHEME
           
static java.lang.String LFN_SCHEME
           
static java.lang.String SFN_SCHEME
           
static java.lang.String SRM_SCHEME
           
 
Constructor Summary
URIScheme()
           
 
Method Summary
static java.net.URI asGsiftp(java.net.URI uri)
          Convert a SURL to a GSIFTP URI.
static java.net.URI asSurl(java.net.URI uri)
          Convert a physical name to a SURL.
static boolean isFile(java.net.URI uri)
          Is this a file URL
static boolean isFtp(java.net.URI uri)
          Is this a http URL
static boolean isGsiftp(java.net.URI uri)
          Is this a GsiFtp URI?
static boolean isGuid(java.lang.String uri)
           
static boolean isGuid(java.net.URI uri)
          Is this a GUID ?
static boolean isHttp(java.net.URI uri)
          Is this a http URL
static boolean isHttpg(java.net.URI uri)
          Is this a httpg URL
static boolean isHttps(java.net.URI uri)
          Is this a https URL
static boolean isLfn(java.lang.String uri)
           
static boolean isLfn(java.net.URI uri)
          Is this a LFN
static boolean isLogical(java.net.URI uri)
          Is this a URI for a logical file (i.e.
static boolean isPhysical(java.net.URI uri)
          Is this a URI fora physical file?
static boolean isSfn(java.net.URI uri)
          Is this a real SFN Storage File Name?
static boolean isSrm(java.net.URI uri)
          Is this a real SRM Storage File Name?
static boolean isSurl(java.lang.String uri)
           
static boolean isSurl(java.net.URI uri)
          Is this a Storage File Name?
static boolean isValidHostname(java.lang.String hostname)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_SCHEME

public static final java.lang.String FILE_SCHEME
See Also:
Constant Field Values

FTP_SCHEME

public static final java.lang.String FTP_SCHEME
See Also:
Constant Field Values

HTTPS_SCHEME

public static final java.lang.String HTTPS_SCHEME
See Also:
Constant Field Values

HTTPG_SCHEME

public static final java.lang.String HTTPG_SCHEME
See Also:
Constant Field Values

HTTP_SCHEME

public static final java.lang.String HTTP_SCHEME
See Also:
Constant Field Values

GSIFTP_SCHEME

public static final java.lang.String GSIFTP_SCHEME
See Also:
Constant Field Values

GUID_SCHEME

public static final java.lang.String GUID_SCHEME
See Also:
Constant Field Values

LFN_SCHEME

public static final java.lang.String LFN_SCHEME
See Also:
Constant Field Values

SFN_SCHEME

public static final java.lang.String SFN_SCHEME
See Also:
Constant Field Values

SRM_SCHEME

public static final java.lang.String SRM_SCHEME
See Also:
Constant Field Values
Constructor Detail

URIScheme

public URIScheme()
Method Detail

isLfn

public static boolean isLfn(java.net.URI uri)
Is this a LFN

Parameters:
uri - the URI to check
Returns:
true if it is

isLfn

public static boolean isLfn(java.lang.String uri)

isGuid

public static boolean isGuid(java.net.URI uri)
Is this a GUID ?

Parameters:
uri - the URI to check
Returns:
true if it is

isGuid

public static boolean isGuid(java.lang.String uri)

isSurl

public static boolean isSurl(java.net.URI uri)
Is this a Storage File Name?

Parameters:
uri - the URI to check
Returns:
true if it is

isSurl

public static boolean isSurl(java.lang.String uri)

isSrm

public static boolean isSrm(java.net.URI uri)
Is this a real SRM Storage File Name?

Parameters:
uri - the URI to check
Returns:
true if it is

isSfn

public static boolean isSfn(java.net.URI uri)
Is this a real SFN Storage File Name?

Parameters:
uri - the URI to check
Returns:
true if it is

isGsiftp

public static boolean isGsiftp(java.net.URI uri)
Is this a GsiFtp URI?

Parameters:
uri - the URI to check
Returns:
true if it is

isHttp

public static boolean isHttp(java.net.URI uri)
Is this a http URL

Parameters:
uri - the URI to check
Returns:
true if it is

isHttps

public static boolean isHttps(java.net.URI uri)
Is this a https URL

Parameters:
uri - the URI to check
Returns:
true if it is

isHttpg

public static boolean isHttpg(java.net.URI uri)
Is this a httpg URL

Parameters:
uri - the URI to check
Returns:
true if it is

isFtp

public static boolean isFtp(java.net.URI uri)
Is this a http URL

Parameters:
uri - the URI to check
Returns:
true if it is

isFile

public static boolean isFile(java.net.URI uri)
Is this a file URL

Parameters:
uri - the URI to check
Returns:
true if it is

isPhysical

public static boolean isPhysical(java.net.URI uri)
Is this a URI fora physical file?

Parameters:
uri - the URI to check
Returns:
true if it is

isLogical

public static boolean isLogical(java.net.URI uri)
Is this a URI for a logical file (i.e. GUID or LFN)

Parameters:
uri - the URI to check
Returns:
true if it is

asSurl

public static java.net.URI asSurl(java.net.URI uri)
Convert a physical name to a SURL. Return null if the uri is a logical name or a file URI (i.e. local) or null

Parameters:
uri - the physical name to convert
Returns:
the URI for the SURL

asGsiftp

public static java.net.URI asGsiftp(java.net.URI uri)
Convert a SURL to a GSIFTP URI. Return null if the uri is not a SURL

Parameters:
uri - the physical name to convert
Returns:
the URI for the SFN

isValidHostname

public static boolean isValidHostname(java.lang.String hostname)