edu.indiana.dde.mylead.client
Class LeadXMLRequest

java.lang.Object
  extended byedu.indiana.dde.mylead.client.LeadXMLRequest

public class LeadXMLRequest
extends java.lang.Object

This class contains methods to build the OGSA-DAI perform documents for the methods contained in the LeadClient class. The parameters included in the body of the perform document are generally passed as parameters and the methods in this class then wrap them in the necessary tags and include the header and footer of the perform document (such as namespace declarations).
The perform documents generated in this class all conform to the leadActivity.xsd schema.


Field Summary
static LeadXMLRequest singletonrequest
           
 
Method Summary
 java.lang.String getAttrDefRequest(java.lang.String dn)
          Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the Lead Attribute definitions query.
 java.lang.String getAttrQueryRequest(java.lang.String dn, int limit, java.lang.String parent, java.util.Vector attrNames, java.lang.String level)
          Deprecated. As of version0.3 Alpha this method and the query it is used for have been replaced by the more general leadQuery method using the TARGET_ATTR filter.
 java.lang.String getCreateLeadRequest(java.lang.String dn, java.lang.String leadItem, java.lang.String parentName, java.lang.String parentType)
          Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the Lead create API.
 java.lang.String getCreateReplicaRequest(java.lang.String dn, java.lang.String leadReplica)
          Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the Lead create API.
 java.lang.String getCreateUserRequest(java.lang.String dn, java.lang.String leadUser)
          Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the myLEAD API.
static LeadXMLRequest getInstance()
          Get the instance of this singleton object.
 java.lang.String getLeadAddAttrRequest(java.lang.String dn, java.lang.String leadItem, java.lang.String parentName, java.lang.String parentType)
          Generate an XML OGSA-DAI perform document conforming to the code>leadActivity.xsd schema for adding an attribute to an existing myLEAD object.
 java.lang.String getLeadGetNotificationRequest(java.lang.String dn, java.lang.String expName)
          Deprecated. As of version 0.3 Alpha the more general leadQuery method should be used with the TARGET_ATTR filter.
 java.lang.String getLeadGetWorkflowInstRequest(java.lang.String dn, java.lang.String expName)
          Deprecated. As of version 0.3 Alpha the more general leadQuery method should be used with the TARGET_ATTR filter.
 java.lang.String getLeadGetWorkflowTempRequest(java.lang.String dn, java.lang.String invName)
          Deprecated. As of version 0.3 Alpha the more general leadQuery method should be used with the TARGET_ATTR filter.
 java.lang.String getQueryLeadReplicaRequest(java.lang.String dn)
          Generate an XML OGSA-DAI perform document for the replica query API.
 java.lang.String getQueryLeadRequest(java.lang.String dn, int limit, java.lang.String qryFilter, java.lang.String target, java.lang.String query)
          Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the myLEAD query API.
 java.lang.String getQueryLeadUserRequest(java.lang.String dn)
          Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the user query API.
 java.lang.String getUpdateReplicaRequest(java.lang.String dn, java.lang.String leadReplica)
          Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the replica update API.
 java.lang.String getUpdateUserRequest(java.lang.String dn, java.lang.String leadUser)
          Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for updating a user's profile.
 java.lang.String getUserExistsRequest(java.lang.String dn)
          Generate an XML request for the myLEAD user exists query in the API.
 void init()
          Intializes the singleton LeadXMLRequest object, but the getInstance method should be used to get the request object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

singletonrequest

public static LeadXMLRequest singletonrequest
Method Detail

getInstance

public static LeadXMLRequest getInstance()
                                  throws org.globus.mcs.client.MCSException
Get the instance of this singleton object.

Returns:
The singleton instance of LeadXMLRequest generated by the private constructor.
Throws:
org.globus.mcs.client.MCSException

init

public void init()
Intializes the singleton LeadXMLRequest object, but the getInstance method should be used to get the request object.


getUserExistsRequest

public java.lang.String getUserExistsRequest(java.lang.String dn)
Generate an XML request for the myLEAD user exists query in the API. This method wraps the distinguished name of the user in a perform document.

Parameters:
dn - String with the distinguished name of the user.
Returns:
String with the OGSA-DAI perform document.

getQueryLeadRequest

public java.lang.String getQueryLeadRequest(java.lang.String dn,
                                            int limit,
                                            java.lang.String qryFilter,
                                            java.lang.String target,
                                            java.lang.String query)
Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the myLEAD query API.

Parameters:
dn - String with the distinguished name of the user issuing the query.
limit - int that is the limit on the number of targets to return.
qryFilter - String with the filter to limit the types of results returned.
target - String with the target parameters as generated from the wrapParameters method of a class that extends the MyLeadQuery base class.
query - String with the optional context for the query based on a query plan or plan set. If no context is needed for the target, then an empty String can be used.
Returns:
String with the OGSA-DAI perform document.
See Also:
LeadClient

getQueryLeadReplicaRequest

public java.lang.String getQueryLeadReplicaRequest(java.lang.String dn)
Generate an XML OGSA-DAI perform document for the replica query API. The query can be based on the distinguished name of a specific user to get the myLEAD replica they are assigned to, or an asterisk can be passed to get metadata on all replicas listed in the myLEAD catalog.

Parameters:
dn - String with the user's distinguished name.
Returns:
String containing the OGSA-DAI perform document for this query.

getQueryLeadUserRequest

public java.lang.String getQueryLeadUserRequest(java.lang.String dn)
Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the user query API. This query can either return the user-specific contact information for a single user based on the distinguished name passed as a parameter or information on all users if an asterisk is passed for the dn parameter.

Parameters:
dn - String with the user's distinguished name.
Returns:
String containing the OGSA-DAI perform document for this query.

getAttrQueryRequest

public java.lang.String getAttrQueryRequest(java.lang.String dn,
                                            int limit,
                                            java.lang.String parent,
                                            java.util.Vector attrNames,
                                            java.lang.String level)
Deprecated. As of version0.3 Alpha this method and the query it is used for have been replaced by the more general leadQuery method using the TARGET_ATTR filter.

Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the myLEAD attribute query API.

Parameters:
dn - String with the distinguished name of the user making the query.
limit - int
parent - String containing the name of the file or collection for which attributes are sought.
attrNames - Vector of Strings containing the names of the attribute(s) being sought.
level - String indicating the level of the parent,such as FILE or COLLECTION. Must match a level specified in the database.
Returns:
String with the OGSA-DAI perform document.
See Also:
LeadClient

getAttrDefRequest

public java.lang.String getAttrDefRequest(java.lang.String dn)
Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the Lead Attribute definitions query. The attribute definition query will return an XML document that contains the hierarchy of all attributes and elements defined in the myLEAD catalog.

Parameters:
dn - String with the distinguished name of the user making the request.
Returns:
String containing the OGSA-DAI perform document.

getCreateLeadRequest

public java.lang.String getCreateLeadRequest(java.lang.String dn,
                                             java.lang.String leadItem,
                                             java.lang.String parentName,
                                             java.lang.String parentType)
Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the Lead create API. The create method is overloaded to be used for creating myLEAD objects such as files and collections, user profiles, and myLEAD replica definitions. This method generates the perform document for the create method used to add myLEAD objects.

Parameters:
dn - String with distinguished name of the user adding the object.
leadItem - String with wrapped up parameters for the object.
parentName - String with the unique name of the parent of the experiment, collection, or file.
parentType - String with the parent type as defined in the lead_type_definition table.
Returns:
String containing the OGSA-DAI perform document.
See Also:
MyLeadData

getCreateReplicaRequest

public java.lang.String getCreateReplicaRequest(java.lang.String dn,
                                                java.lang.String leadReplica)
Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the Lead create API. The create method is overloaded to be used for creating myLEAD objects such as files and collections, user profiles, and myLEAD replica definitions. This method generates the perform document for the create method used to add a replica definition to the myLEAD catalog.

Parameters:
dn - String with distinguished name of the user defining the replica.
leadReplica - String with wrapped up parameters for the replica record.
Returns:
String containing the OGSA-DAI perform document.
See Also:
MyLeadReplica

getUpdateReplicaRequest

public java.lang.String getUpdateReplicaRequest(java.lang.String dn,
                                                java.lang.String leadReplica)
Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the replica update API.

Parameters:
dn - String with distinguished name of the user updating the replica definition.
leadReplica - String with wrapped up parameters for the replica record.
Returns:
String containing the OGSA-DAI perform document.
See Also:
MyLeadReplica

getCreateUserRequest

public java.lang.String getCreateUserRequest(java.lang.String dn,
                                             java.lang.String leadUser)
Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for the myLEAD API. The create method is overloaded to be used for creating myLEAD objects such as files and collections, user profiles, and myLEAD replica definitions. This method generates the perform document for the create method used to add a user profile to the myLEAD catalog.

Parameters:
dn - String with distinguished name of the existing user who is creating the new user.
leadUser - String with wrapped up parameters for the new user's profile.
Returns:
String containing the OGSA-DAI perform document.
See Also:
MyLeadUser

getUpdateUserRequest

public java.lang.String getUpdateUserRequest(java.lang.String dn,
                                             java.lang.String leadUser)
Generate an XML OGSA-DAI perform document conforming to the leadActivity.xsd schema for updating a user's profile.

Parameters:
dn - String with distinguished name of the user doing the update.
leadUser - String with wrapped up parameters for the user profile.
Returns:
String containing the OGSA-DAI perform document.
See Also:
MyLeadUser

getLeadAddAttrRequest

public java.lang.String getLeadAddAttrRequest(java.lang.String dn,
                                              java.lang.String leadItem,
                                              java.lang.String parentName,
                                              java.lang.String parentType)
Generate an XML OGSA-DAI perform document conforming to the code>leadActivity.xsd schema for adding an attribute to an existing myLEAD object.

Parameters:
dn - String with distinguished name of the user adding the attribute.
leadItem - String with wrapped up attrribute parameters.
parentName - String with the name of the parent object containing the attribute.
parentType - String with the type for the parent as defined in the lead_type_definition table.
Returns:
String containing the OGSA-DAI perform document.
See Also:
MyLeadAttrData

getLeadGetWorkflowTempRequest

public java.lang.String getLeadGetWorkflowTempRequest(java.lang.String dn,
                                                      java.lang.String invName)
Deprecated. As of version 0.3 Alpha the more general leadQuery method should be used with the TARGET_ATTR filter.

Generate an XML request for the myLEAD get workflow template API.

Parameters:
dn - String with distinguished name of the user.
invName - String with the name of the investigation.
Returns:
String

getLeadGetWorkflowInstRequest

public java.lang.String getLeadGetWorkflowInstRequest(java.lang.String dn,
                                                      java.lang.String expName)
Deprecated. As of version 0.3 Alpha the more general leadQuery method should be used with the TARGET_ATTR filter.

Generate an XML request for the myLEAD get workflow instance API.

Parameters:
dn - String with distinguished name of the user.
expName - String with the name of the experiment.
Returns:
String

getLeadGetNotificationRequest

public java.lang.String getLeadGetNotificationRequest(java.lang.String dn,
                                                      java.lang.String expName)
Deprecated. As of version 0.3 Alpha the more general leadQuery method should be used with the TARGET_ATTR filter.

Generate an XML request for the myLEAD get notification API.

Parameters:
dn - String with distinguished name of the user.
expName - String with the name of the experiment.
Returns:
String