uk.org.ogsadai.client.databrowser
Class DBDataResource

java.lang.Object
  |
  +--uk.org.ogsadai.client.databrowser.DBDataResource

public class DBDataResource
extends java.lang.Object

Wrapper class to the OGSADAI client toolkit DataService with a fixed resource.

Author:
Paul J Graham, EPCC, The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  DBDataService mDataService
          GUI client data service which is associated with this data service resource
private  boolean mMLSEnabled
          Indicates whether message level security has been configured
private  ResourceID mResourceID
          ID of the resource
private  DataService mService
          OGSA-DAI data service
private  java.util.Vector mSupportedActivities
          Activities supported by this data service resource
private  boolean mTLSEncryptionEnabled
          Indicates whether transport level security is enabled with encryption
 
Constructor Summary
DBDataResource(DBDataService service, ResourceID resourceID)
          Construct a data resource object.
 
Method Summary
 void enableTransportLevelEncryption()
          Enables encryption for transport level security on this service.
 DatabaseSchemaMetaData getDatabaseSchema()
          Gets a relational database schema from the data service resource.
 DBDataService getDataService()
          Returns the service associated with this data service resource.
 ResourceID getResourceID()
          Returns the fixed resource ID of this data service resource.
 java.util.Vector getSupportedActivities()
          Obtains activities supported by the data service resource.
 boolean isMLSEnabled()
          Indicates whether message level security is being used for communications with this data service resource.
 boolean isSQLQuerySupported()
          Indicates whether the database supports the SQL query activity.
 boolean isSQLUpdateSupported()
          Indicates whether the database supports the SQLUpdate activity.
 boolean isTLSEncryptionEnabled()
          Indicates whether encryption is being used when connecting to this service.
 boolean isXPathQuerySupported()
          Indicates whether the database supports XPath queries.
 Response perform(ActivityRequest request)
          Performs a request on this data service resource.
 Response perform(RequestComponent component)
          Performs a request containing a single request component on this data service resource.
 void setMessageLevelSecurity(java.io.File descriptor)
          Enables message level security for all messages on this service.
 void setTimeOut(int milliseconds)
          Sets the timeout property of the service.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

mDataService

private DBDataService mDataService
GUI client data service which is associated with this data service resource


mResourceID

private ResourceID mResourceID
ID of the resource


mService

private DataService mService
OGSA-DAI data service


mSupportedActivities

private java.util.Vector mSupportedActivities
Activities supported by this data service resource


mMLSEnabled

private boolean mMLSEnabled
Indicates whether message level security has been configured


mTLSEncryptionEnabled

private boolean mTLSEncryptionEnabled
Indicates whether transport level security is enabled with encryption

Constructor Detail

DBDataResource

public DBDataResource(DBDataService service,
                      ResourceID resourceID)
               throws java.lang.Exception
Construct a data resource object.

Parameters:
service - the service where this resource belongs to
resourceID - ID of the resource.
Throws:
java.lang.Exception - if there was a problem connecting to the service
Method Detail

getResourceID

public ResourceID getResourceID()
Returns the fixed resource ID of this data service resource.

Returns:
The resource ID of this data service resource.

getDataService

public DBDataService getDataService()
Returns the service associated with this data service resource.

Returns:
The service associated with this resource

setTimeOut

public void setTimeOut(int milliseconds)
Sets the timeout property of the service.

Parameters:
milliseconds - The time in milliseconds until timeout

setMessageLevelSecurity

public void setMessageLevelSecurity(java.io.File descriptor)
Enables message level security for all messages on this service.

Parameters:
descriptor - a message level security descriptor

enableTransportLevelEncryption

public void enableTransportLevelEncryption()
Enables encryption for transport level security on this service.


getSupportedActivities

public java.util.Vector getSupportedActivities()
Obtains activities supported by the data service resource.

Returns:
Vector of Strings containing names of supported activities

isSQLQuerySupported

public boolean isSQLQuerySupported()
Indicates whether the database supports the SQL query activity.

Returns:
true if the database supports the sqlQueryStatement activity, false otherwise

isSQLUpdateSupported

public boolean isSQLUpdateSupported()
Indicates whether the database supports the SQLUpdate activity.

Returns:
true if the database supports the sqlUpdateStatement activity, false otherwise

isXPathQuerySupported

public boolean isXPathQuerySupported()
Indicates whether the database supports XPath queries.

Returns:
true if the database supports an xPathStatement activity, false otherwise

getDatabaseSchema

public DatabaseSchemaMetaData getDatabaseSchema()
                                         throws java.lang.Exception
Gets a relational database schema from the data service resource.

Returns:
a database schema
Throws:
java.lang.Exception

perform

public Response perform(RequestComponent component)
                 throws java.lang.Exception
Performs a request containing a single request component on this data service resource.

Parameters:
component - The request component to send to the server.
Returns:
The response received from the OGSDA-DAI server.
Throws:
java.lang.Exception - If a problem occurs when executing the action.

perform

public Response perform(ActivityRequest request)
                 throws java.lang.Exception
Performs a request on this data service resource.

Parameters:
request - Request to perform
Returns:
The response received from the OGSDA-DAI server.
Throws:
java.lang.Exception - If a problem occurs when executing the action.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isMLSEnabled

public boolean isMLSEnabled()
Indicates whether message level security is being used for communications with this data service resource.

Returns:
true if message level security is switched on and false otherwise.

isTLSEncryptionEnabled

public boolean isTLSEncryptionEnabled()
Indicates whether encryption is being used when connecting to this service.

Returns:
true if encryption is enabled and false otherwise.