net.sourceforge.jsdp
Class Email

java.lang.Object
  extended by net.sourceforge.jsdp.Email
All Implemented Interfaces:
Serializable, Cloneable, Field

public class Email
extends Object
implements Field

An Email represents an e=<field value> field contained in a SDP message. An email field specify contact information for the person responsible for the conference. This is not necessarily the same person that created the conference announcement.

Since:
0.1.0
Version:
1.0
Author:
Claudio Di Vita
See Also:
Serialized Form

Field Summary
protected  Contact contact
          The field contact information
 
Fields inherited from interface net.sourceforge.jsdp.Field
ATTRIBUTE_FIELD, BANDWITH_FIELD, CONNECTION_FIELD, EMAIL_FIELD, END_OF_FIELD, INFORMATION_FIELD, KEY_FIELD, MEDIA_FIELD, ORIGIN_FIELD, PHONE_FIELD, REPEAT_TIME_FIELD, SESSION_NAME_FIELD, TIME_FIELD, TIMEZONE_FIELD, URI_FIELD, VERSION_FIELD
 
Constructor Summary
protected Email()
          Creates a new Email.
  Email(String info)
          Creates a new Email.
 
Method Summary
 Object clone()
          Returns a clone of this field.
 String getEmail()
          Returns the e-mail address of the contact.
 String getPersonal()
          Returns the personal information of the contact.
 char getType()
          Returns the type character for the field.
static Email parse(String field)
          Parse an input string and constructs the equivalent email field.
 void setEmail(String email)
          Sets the e-mail address of the contact.
 void setPersonal(String personal)
          Sets the personal information of the contact
 String toString()
          Returns a string representation of the field.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

contact

protected Contact contact
The field contact information

Constructor Detail

Email

protected Email()
Creates a new Email.


Email

public Email(String info)
      throws SDPException
Creates a new Email.

Parameters:
info - the field contact information
Throws:
SDPException - if the contact information are not valid
Method Detail

parse

public static Email parse(String field)
                   throws SDPParseException
Parse an input string and constructs the equivalent email field.

Parameters:
field - the string to parse
Returns:
a new Email instance
Throws:
SDPParseException - if an error occurs while parsing

clone

public Object clone()
Description copied from interface: Field
Returns a clone of this field.

Specified by:
clone in interface Field
Overrides:
clone in class Object
Returns:
a clone of this field

getEmail

public String getEmail()
Returns the e-mail address of the contact.

Returns:
a string that represensts an e-mail address

getPersonal

public String getPersonal()
Returns the personal information of the contact.

Returns:
the personal information of the contact

getType

public char getType()
Returns the type character for the field.

Specified by:
getType in interface Field
Returns:
the field type character: e

setEmail

public void setEmail(String email)
              throws SDPException
Sets the e-mail address of the contact.

Parameters:
email - the e-mail address to set
Throws:
SDPException - if the em-mail address is not valid

setPersonal

public void setPersonal(String personal)
                 throws SDPException
Sets the personal information of the contact

Parameters:
personal - the personal information to set
Throws:
SDPException - if the personal information are not valid

toString

public String toString()
Returns a string representation of the field. The representation has the form: e=<e-mail> <info>

Specified by:
toString in interface Field
Overrides:
toString in class Object
Returns:
The string representation of the field


Copyright © 2004-2008. All Rights Reserved.