sk.uniba.euromath.tools
Enum URITypeEnum

java.lang.Object
  extended by java.lang.Enum<URITypeEnum>
      extended by sk.uniba.euromath.tools.URITypeEnum
All Implemented Interfaces:
Serializable, Comparable<URITypeEnum>

public enum URITypeEnum
extends Enum<URITypeEnum>

Enumerates types of an URI address.

Author:
Martin Vysny

Enum Constant Summary
INVALID
          The URI is invalid - the construction of the URI Java object failed.
LOCAL_URL
          The URI is a URL pointing into the local filesystem.
NON_LOCAL_URL
          The URI is an URL but it is not on the local filesystem.
OPAQUE
          The URI is opaque, such as mailto:blah@blah.blah hence it does not reference any file resource.
 
Method Summary
static URITypeEnum getURIType(String uri)
          Returns the type of given URI.
static URITypeEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static URITypeEnum[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LOCAL_URL

public static final URITypeEnum LOCAL_URL
The URI is a URL pointing into the local filesystem.


OPAQUE

public static final URITypeEnum OPAQUE
The URI is opaque, such as mailto:blah@blah.blah hence it does not reference any file resource.


INVALID

public static final URITypeEnum INVALID
The URI is invalid - the construction of the URI Java object failed.


NON_LOCAL_URL

public static final URITypeEnum NON_LOCAL_URL
The URI is an URL but it is not on the local filesystem. Example: http://www.blah.com/foo.

Method Detail

values

public static final URITypeEnum[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(URITypeEnum c : URITypeEnum.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static URITypeEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getURIType

public static URITypeEnum getURIType(String uri)
Returns the type of given URI.

Parameters:
uri - the URI address to check.
Returns:
one of the constants.


Copyright © 2003-2006 null. All Rights Reserved.