nan.model
Class License

java.lang.Object
  extended bynan.model.License
All Implemented Interfaces:
Transposer, XMLSerializable

public class License
extends java.lang.Object
implements XMLSerializable, Transposer

A representation of a License agreement.

Version:
1.2, 1/2/04
Author:
John David Ratliff

Field Summary
static java.lang.String XML_ACCEPTED
          XML tag for the acceptance property.
static java.lang.String XML_DATE
          XML tag for the date property.
static java.lang.String XML_NAME
          XML tag for the name property.
static java.lang.String XML_TAG
          XML tag used for serialization.
 
Constructor Summary
protected License()
          Creates a new License object.
  License(java.lang.String name, boolean accepted, java.util.Date date)
          Creates a new License object.
 
Method Summary
 java.util.Date getDate()
          Gets the date of this license agreement.
 java.lang.String getName()
          Gets the name of this License.
 void setAccepted(boolean accepted)
          Sets if this License has been accepted or not.
 void setDate(java.util.Date date)
          Sets the date of this license agreement.
 void setName(java.lang.String name)
          Sets the name of this License.
 java.lang.String toString()
          Returns a String representation of this license.
 org.dom4j.Document toXML()
          Converts an object into an XML Document.
 void transpose(java.lang.Object object)
          Transposes (copies over) the values of another object of the same type onto this one.
 boolean wasAccepted()
          Asks if this License has been accepted or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XML_TAG

public static final java.lang.String XML_TAG
XML tag used for serialization.

See Also:
Constant Field Values

XML_NAME

public static final java.lang.String XML_NAME
XML tag for the name property.

See Also:
Constant Field Values

XML_ACCEPTED

public static final java.lang.String XML_ACCEPTED
XML tag for the acceptance property.

See Also:
Constant Field Values

XML_DATE

public static final java.lang.String XML_DATE
XML tag for the date property.

See Also:
Constant Field Values
Constructor Detail

License

public License(java.lang.String name,
               boolean accepted,
               java.util.Date date)
Creates a new License object.

Parameters:
name - The name of the license.
accepted - Whether the license has been accepted or not.
date - The date of the agreement.

License

protected License()
Creates a new License object.

Method Detail

getName

public java.lang.String getName()
Gets the name of this License.

Returns:
The name.

setName

public void setName(java.lang.String name)
Sets the name of this License.

Parameters:
name - The name.

wasAccepted

public boolean wasAccepted()
Asks if this License has been accepted or not.

Returns:
true if the License is accepted; false otherwise.

setAccepted

public void setAccepted(boolean accepted)
Sets if this License has been accepted or not.

Parameters:
accepted - true if the License is accepted; false otherwise.

getDate

public java.util.Date getDate()
Gets the date of this license agreement.

Returns:
The date.

setDate

public void setDate(java.util.Date date)
Sets the date of this license agreement.

Parameters:
date - The date.

toXML

public org.dom4j.Document toXML()
Converts an object into an XML Document.

Specified by:
toXML in interface XMLSerializable
Returns:
The XML Document.

transpose

public void transpose(java.lang.Object object)
Transposes (copies over) the values of another object of the same type onto this one. If the object is not the same type as the invoked object, it will be ignored.

Specified by:
transpose in interface Transposer
Parameters:
object - The object to transpose over this one.

toString

public java.lang.String toString()
Returns a String representation of this license.

Returns:
A String representation.