com.auxilii.msgparser
Class RecipientEntry

Object
  extended by com.auxilii.msgparser.RecipientEntry

public class RecipientEntry
extends Object

This class represents a recipient's entry of the parsed .msg file. It provides informations like the email address and the display name.

Author:
thomas.misar, roman.kurmanowytsch

Field Summary
protected  Map<String,Object> properties
          Contains all properties that are not covered by the special properties.
protected  String toEmail
          The address part of To: mail address.
protected  String toName
          The address part of To: name.
 
Constructor Summary
RecipientEntry()
           
 
Method Summary
 Set<String> getProperties()
           
 Object getProperty(String name)
           
 String getToEmail()
           
 String getToName()
           
 void setProperty(String name, Object value)
          Sets the name/value pair in the properties map.
 void setToEmail(String toEmail)
           
 void setToName(String toName)
           
 String toString()
          Provides a short representation of this recipient object
(e.g.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

toEmail

protected String toEmail
The address part of To: mail address.


toName

protected String toName
The address part of To: name.


properties

protected Map<String,Object> properties
Contains all properties that are not covered by the special properties.

Constructor Detail

RecipientEntry

public RecipientEntry()
Method Detail

setProperty

public void setProperty(String name,
                        Object value)
                 throws ClassCastException
Sets the name/value pair in the properties map. Some properties are put into special attributes (e.g., toEmail when the property name is '0076').

Parameters:
name - The property name (i.e., the class of the document entry).
value - The value of the field.
Throws:
ClassCastException - Thrown if the detected data type does not match the expected data type.

getToEmail

public String getToEmail()
Returns:
the to: email

setToEmail

public void setToEmail(String toEmail)
Parameters:
toEmail - the to email to be set

getToName

public String getToName()
Returns:
the to name

setToName

public void setToName(String toName)
Parameters:
toName - the to name to be set

toString

public String toString()
Provides a short representation of this recipient object
(e.g. 'Firstname Lastname <firstname.lastname@domain.tld>').

Overrides:
toString in class Object
See Also:
Object.toString()

getProperties

public Set<String> getProperties()
Returns:
the set of keys that are stored in the properties map.

getProperty

public Object getProperty(String name)
Parameters:
name - the name of the property to be returned.
Returns:
the property that matches the given name.


Copyright © 2007 Roman Kurmanowytsch