uk.org.ogsadai.client.toolkit
Class ServiceType

java.lang.Object
  extended byuk.org.ogsadai.client.toolkit.ServiceType

public final class ServiceType
extends java.lang.Object

A class representing the type of a service - OGSA-DAI WSI, OGSA-DAI WSRF or unknown.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  java.lang.String mType
          Current type as a string
static ServiceType UNKNOWN
          Unknown service
private static java.lang.String UNKNOWN_STRING
          String used to represent unknown services.
static ServiceType WSI
          OGSA-DAI WSI service
private static java.lang.String WSI_STRING
          String used to represent OGSA-DAI WSI services.
static ServiceType WSRF
          OGSA-DAI WSRF service
private static java.lang.String WSRF_STRING
          String used to represent OGSA-DAI WSRF services.
 
Constructor Summary
private ServiceType(java.lang.String type)
          Create a ServiceType of the specified type.
 
Method Summary
 java.lang.String getAsString()
          Return the service type as a string - either wsi or wsrf or unknown.
 boolean isUnknown()
          Is the current type unknown?
 boolean isWSI()
          Is the current type OGSA-DAI WSI?
 boolean isWSRF()
          Is the current type OGSA-DAI WSRF?
 void setType(java.lang.String type)
          Set the service type.
 void setUnknown()
          Set the service type to be unknown
 void setWSI()
          Set the service type to be OGSA-DAI WSI
 void setWSRF()
          Set the service type to be OGSA-DAI WSRF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

WSI_STRING

private static final java.lang.String WSI_STRING
String used to represent OGSA-DAI WSI services.

See Also:
Constant Field Values

WSRF_STRING

private static final java.lang.String WSRF_STRING
String used to represent OGSA-DAI WSRF services.

See Also:
Constant Field Values

UNKNOWN_STRING

private static final java.lang.String UNKNOWN_STRING
String used to represent unknown services.

See Also:
Constant Field Values

WSI

public static final ServiceType WSI
OGSA-DAI WSI service


WSRF

public static final ServiceType WSRF
OGSA-DAI WSRF service


UNKNOWN

public static final ServiceType UNKNOWN
Unknown service


mType

private java.lang.String mType
Current type as a string

Constructor Detail

ServiceType

private ServiceType(java.lang.String type)
Create a ServiceType of the specified type.

Parameters:
type - Type of service. Must be one of ServiceType.WSI_STRING, ServiceType.WSRF_STRING or ServiceType.UNKNOWN_STRING.
Throws:
java.lang.IllegalArgumentException - if type is none of the three values above.
Method Detail

setType

public void setType(java.lang.String type)
Set the service type.

Parameters:
type - Type of service. Must be one of ServiceType.WSI_STRING, ServiceType.WSRF_STRING or ServiceType.UNKNOWN_STRING.
Throws:
java.lang.IllegalArgumentException - if type is none of the three values above.

setWSI

public void setWSI()
Set the service type to be OGSA-DAI WSI


setWSRF

public void setWSRF()
Set the service type to be OGSA-DAI WSRF


setUnknown

public void setUnknown()
Set the service type to be unknown


isWSI

public boolean isWSI()
Is the current type OGSA-DAI WSI?

Returns:
true if so else false.

isWSRF

public boolean isWSRF()
Is the current type OGSA-DAI WSRF?

Returns:
true if so else false.

isUnknown

public boolean isUnknown()
Is the current type unknown?

Returns:
true if so else false.

getAsString

public java.lang.String getAsString()
Return the service type as a string - either wsi or wsrf or unknown.

Returns:
string