com.google.gdata.model.atom
Class Person

java.lang.Object
  extended by com.google.gdata.model.Element
      extended by com.google.gdata.model.atom.Person
All Implemented Interfaces:
IPerson
Direct Known Subclasses:
Author, Contributor, LastModifiedBy

public class Person
extends Element
implements IPerson

Base class for Atom person constructs.


Field Summary
static ElementKey<java.lang.String,Element> EMAIL
          The atom:email element.
static ElementKey<java.lang.Void,Person> KEY
          The key for person constructs.
static ElementKey<java.lang.String,Element> NAME
          The atom:name element.
static ElementKey<java.net.URI,Element> URI
          The atom:uri.
 
Constructor Summary
  Person()
          Constructs a new Person instance.
protected Person(ElementKey<?,?> key)
          Lets subclasses create an instance using custom metadata.
  Person(ElementKey<?,?> key, java.lang.String name)
          Constructs a new Person instance with the specified name and key.
  Person(ElementKey<?,?> key, java.lang.String name, java.net.URI uri, java.lang.String email)
          Constructs a new Person instance with the specified name, URI, and email address.
protected Person(ElementKey<?,? extends Person> key, Element source)
          Constructs a new instance by doing a shallow copy of data from an existing Element instance.
 
Method Summary
 java.lang.String getEmail()
          Email address.
 java.lang.String getName()
          Human-readable name.
 java.lang.String getNameLang()
          Language of name.
 java.lang.String getUri()
          Deprecated. Use getUriUri() instead.
 java.net.URI getUriUri()
          Gets URI associated with the person.
static void registerMetadata(MetadataRegistry registry)
          Registers the metadata for this element.
 void setEmail(java.lang.String v)
           
 void setName(java.lang.String v)
           
 void setNameLang(java.lang.String v)
           
 void setUri(java.lang.String v)
          Deprecated. Use setUri(URI) instead.
 void setUri(java.net.URI v)
          Sets URI associated with the person.
 
Methods inherited from class com.google.gdata.model.Element
adapt, adapt, addElement, addElement, addElement, clear, createElement, createElement, eq, equals, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hashCode, hasTextValue, isLocked, lock, narrow, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, sameClassAs, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, validate, visit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY

public static final ElementKey<java.lang.Void,Person> KEY
The key for person constructs.


EMAIL

public static final ElementKey<java.lang.String,Element> EMAIL
The atom:email element.


NAME

public static final ElementKey<java.lang.String,Element> NAME
The atom:name element.


URI

public static final ElementKey<java.net.URI,Element> URI
The atom:uri.

Constructor Detail

Person

public Person()
Constructs a new Person instance. Default metadata without an ID is associated with this instance.


Person

protected Person(ElementKey<?,?> key)
Lets subclasses create an instance using custom metadata.

Parameters:
key - element key for this element

Person

protected Person(ElementKey<?,? extends Person> key,
                 Element source)
Constructs a new instance by doing a shallow copy of data from an existing Element instance. Will use the given ElementKey as the key for the element.

Parameters:
key - the key to use for this element.
source - source element

Person

public Person(ElementKey<?,?> key,
              java.lang.String name)
Constructs a new Person instance with the specified name and key.


Person

public Person(ElementKey<?,?> key,
              java.lang.String name,
              java.net.URI uri,
              java.lang.String email)
Constructs a new Person instance with the specified name, URI, and email address.

Parameters:
key - the element key
name - person's name
uri - person's URI
email - person's email address
Method Detail

registerMetadata

public static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.


getName

public java.lang.String getName()
Human-readable name.

Specified by:
getName in interface IPerson

setName

public void setName(java.lang.String v)

getNameLang

public java.lang.String getNameLang()
Language of name. Derived from the current state of xml:lang.

Specified by:
getNameLang in interface IPerson

setNameLang

public void setNameLang(java.lang.String v)

getUri

@Deprecated
public java.lang.String getUri()
Deprecated. Use getUriUri() instead.

Gets URI associated with the person.

Specified by:
getUri in interface IPerson
Returns:
URI

getUriUri

public java.net.URI getUriUri()
Gets URI associated with the person.

Returns:
URI

setUri

@Deprecated
public void setUri(java.lang.String v)
Deprecated. Use setUri(URI) instead.

Sets URI associated with the person.

Parameters:
v - URI

setUri

public void setUri(java.net.URI v)
Sets URI associated with the person.

Parameters:
v - URI

getEmail

public java.lang.String getEmail()
Email address.

Specified by:
getEmail in interface IPerson

setEmail

public void setEmail(java.lang.String v)