com.google.gdata.model.gd
Class Im

java.lang.Object
  extended by com.google.gdata.model.Element
      extended by com.google.gdata.model.gd.Im

public class Im
extends Element

Describes an instant messaging address.


Nested Class Summary
static class Im.Protocol
          Im protocol.
static class Im.Rel
          Im type.
 
Field Summary
static AttributeKey<java.lang.String> ADDRESS
          IM address.
static ElementKey<java.lang.Void,Im> KEY
          The key for this element.
static AttributeKey<java.lang.String> LABEL
          Label.
static AttributeKey<java.lang.Boolean> PRIMARY
          Whether this is the primary instant messaging address.
static AttributeKey<java.lang.String> PROTOCOL
          Im protocol.
static AttributeKey<java.lang.String> REL
          Im type.
 
Constructor Summary
  Im()
          Constructs an instance using the default key.
protected Im(ElementKey<?,? extends Im> key)
          Subclass constructor, allows subclasses to supply their own element key.
protected Im(ElementKey<?,? extends Im> key, Element source)
          Constructs a new instance by doing a shallow copy of data from an existing Element instance.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAddress()
          Returns the IM address.
 java.lang.String getLabel()
          Returns the label.
 java.lang.Boolean getPrimary()
          Returns the whether this is the primary instant messaging address.
 java.lang.String getProtocol()
          Returns the im protocol.
 java.lang.String getRel()
          Returns the im type.
 boolean hasAddress()
          Returns whether it has the IM address.
 int hashCode()
           
 boolean hasLabel()
          Returns whether it has the label.
 boolean hasPrimary()
          Returns whether it has the whether this is the primary instant messaging address.
 boolean hasProtocol()
          Returns whether it has the im protocol.
 boolean hasRel()
          Returns whether it has the im type.
 Im lock()
          Locks this element.
static void registerMetadata(MetadataRegistry registry)
          Registers the metadata for this element.
 Im setAddress(java.lang.String address)
          Sets the IM address.
 Im setLabel(java.lang.String label)
          Sets the label.
 Im setPrimary(java.lang.Boolean primary)
          Sets the whether this is the primary instant messaging address.
 Im setProtocol(java.lang.String protocol)
          Sets the im protocol.
 Im setRel(java.lang.String rel)
          Sets the im type.
 
Methods inherited from class com.google.gdata.model.Element
adapt, adapt, addElement, addElement, addElement, clear, createElement, createElement, eq, 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, hasTextValue, isLocked, 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,Im> KEY
The key for this element.


ADDRESS

public static final AttributeKey<java.lang.String> ADDRESS
IM address.


LABEL

public static final AttributeKey<java.lang.String> LABEL
Label.


PRIMARY

public static final AttributeKey<java.lang.Boolean> PRIMARY
Whether this is the primary instant messaging address.


PROTOCOL

public static final AttributeKey<java.lang.String> PROTOCOL
Im protocol.


REL

public static final AttributeKey<java.lang.String> REL
Im type.

Constructor Detail

Im

public Im()
Constructs an instance using the default key.


Im

protected Im(ElementKey<?,? extends Im> key)
Subclass constructor, allows subclasses to supply their own element key.


Im

protected Im(ElementKey<?,? extends Im> 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. This constructor is used when adapting from one element key to another. You cannot call this constructor directly, instead use Element.createElement(ElementKey, Element).

Parameters:
key - The key to use for this element.
source - source element
Method Detail

registerMetadata

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


lock

public Im lock()
Description copied from class: Element
Locks this element. A locked element cannot have any changes made to its content or its attributes or child elements. This will also lock all attributes and child elements as well. Once this method has been called, this element can be safely published to other threads.

Overrides:
lock in class Element

getAddress

public java.lang.String getAddress()
Returns the IM address.

Returns:
IM address

setAddress

public Im setAddress(java.lang.String address)
Sets the IM address.

Parameters:
address - IM address or null to reset
Returns:
this to enable chaining setters

hasAddress

public boolean hasAddress()
Returns whether it has the IM address.

Returns:
whether it has the IM address

getLabel

public java.lang.String getLabel()
Returns the label.

Returns:
label

setLabel

public Im setLabel(java.lang.String label)
Sets the label.

Parameters:
label - label or null to reset
Returns:
this to enable chaining setters

hasLabel

public boolean hasLabel()
Returns whether it has the label.

Returns:
whether it has the label

getPrimary

public java.lang.Boolean getPrimary()
Returns the whether this is the primary instant messaging address.

Returns:
whether this is the primary instant messaging address

setPrimary

public Im setPrimary(java.lang.Boolean primary)
Sets the whether this is the primary instant messaging address.

Parameters:
primary - whether this is the primary instant messaging address or null to reset
Returns:
this to enable chaining setters

hasPrimary

public boolean hasPrimary()
Returns whether it has the whether this is the primary instant messaging address.

Returns:
whether it has the whether this is the primary instant messaging address

getProtocol

public java.lang.String getProtocol()
Returns the im protocol.

Returns:
im protocol

setProtocol

public Im setProtocol(java.lang.String protocol)
Sets the im protocol.

Parameters:
protocol - im protocol or null to reset
Returns:
this to enable chaining setters

hasProtocol

public boolean hasProtocol()
Returns whether it has the im protocol.

Returns:
whether it has the im protocol

getRel

public java.lang.String getRel()
Returns the im type.

Returns:
im type

setRel

public Im setRel(java.lang.String rel)
Sets the im type.

Parameters:
rel - im type or null to reset
Returns:
this to enable chaining setters

hasRel

public boolean hasRel()
Returns whether it has the im type.

Returns:
whether it has the im type

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Element

hashCode

public int hashCode()
Overrides:
hashCode in class Element