edu.indiana.dde.mylead.common
Class MyLeadData

java.lang.Object
  extended byedu.indiana.dde.mylead.common.MyLeadData
Direct Known Subclasses:
MyLeadCollData, MyLeadFileData

public abstract class MyLeadData
extends java.lang.Object

The MyLeadData class is the abstract base class which the MyLeadFileData and MyLeadCollData classes extend. This class contains the code for the static attributes common to the file and collection as well as the list of attributes being added to the file or collection.


Constructor Summary
MyLeadData()
          The default constructor sets the name, description, and global ID to blank strings and creates the array list used to hold dynamic attributes defined for this item.
 
Method Summary
 void addAttribute(MyLeadAttrData leadAttribute)
          This method is used to add attributes as instances of the MyLeadAttrData class to a file or collection.
 java.lang.String getDesc()
          This method returns the description that was set by a prior call to the setDesc method.
 java.lang.String getGUID()
          This method returns the global ID that was set by a prior call to the setGUID method.
 java.lang.String getName()
          This method returns the name that was set by a prior call to the setName method.
 void setDesc(java.lang.String descStr)
          This method allows the description of the file or collection to be set.
 void setGUID(java.lang.String guidStr)
          This method allows the user to set the globaly unique ID.
 void setName(java.lang.String nameStr)
          This method allows the name of the file or collection to be set.
 java.lang.String wrapData()
          This method is called by the classes that extend the MyLeadData class when building an OGSA-DAI perform document for adding an object to the myLEAD metadata catalog.
 java.lang.String wrapParameters()
          Wraps up the data parameters in a string that can then be included in the tagged fragment created by a non-abstract class that inherits from MyLeadData.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyLeadData

public MyLeadData()
The default constructor sets the name, description, and global ID to blank strings and creates the array list used to hold dynamic attributes defined for this item.

This constructor is called by the constructors for the MyLeadFileData and MyLeadCollData classes which extend this class.

Method Detail

setName

public void setName(java.lang.String nameStr)
This method allows the name of the file or collection to be set.

Parameters:
nameStr - String with the name of the file or collection.

getName

public java.lang.String getName()
This method returns the name that was set by a prior call to the setName method. If that method has not previously been called, then the name would be blank as set in the constructor.
If the MyLeadFileData or MyLeadCollData class were used to return query results, this method could be used to get the name.

Returns:
String containing the name given to this file or collection.

setDesc

public void setDesc(java.lang.String descStr)
This method allows the description of the file or collection to be set.


getDesc

public java.lang.String getDesc()
This method returns the description that was set by a prior call to the setDesc method. If that method has not previously been called, then the description returned would be blank as set in the constructor.
If the MyLeadFileData or MyLeadCollData class were used to return query results, this method could be used to get the description.

Returns:
String containing the description given to this file or collection.

setGUID

public void setGUID(java.lang.String guidStr)
This method allows the user to set the globaly unique ID. The calling program is responsible for using a method that generates a unique ID.

Parameters:
guidStr - String with a unique ID to be assigned to the file or collection.

getGUID

public java.lang.String getGUID()
This method returns the global ID that was set by a prior call to the setGUID method. If that method has not previously been called, then the GUID would be blank as set in the constructor.
If the MyLeadFileData or MyLeadCollData class were used to return query results, this method could be used to get the GUID.

Returns:
String containing the ID assigned for this file or collection.

addAttribute

public void addAttribute(MyLeadAttrData leadAttribute)
This method is used to add attributes as instances of the MyLeadAttrData class to a file or collection. Any elements or subattributes of the attribute are contained within the attribute.

Parameters:
leadAttribute - The MyLeadAttrData to be added to the file or collection.

wrapParameters

public java.lang.String wrapParameters()
Wraps up the data parameters in a string that can then be included in the tagged fragment created by a non-abstract class that inherits from MyLeadData. The format of the string validates against the leadActivity.xsd schema used to validate OGSA-DAI perform documents for items being added to a myLEAD metadata catalog.

Returns:
String with the XML fragment with the common parameters and attributes.

wrapData

public java.lang.String wrapData()
This method is called by the classes that extend the MyLeadData class when building an OGSA-DAI perform document for adding an object to the myLEAD metadata catalog. The String returned by this method contains the common static attributes and dynamic attributes to be included in the perform document.

Returns:
String with the common static attributes and dynamic attributes to be included in an OGSA-DAI perform document for adding an object to the myLEAD metadata catalog.