# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.extensions
Class PhoneNumber

    java.lang.Object
      com.google.gdata.data.extensions.PhoneNumber

All Implemented Interfaces:
  Extension

    public class PhoneNumber

extends java.lang.Object
implements Extension

GData schema extension describing a phone number.

Nested Class Summary
`static class` `PhoneNumber.Rel` The phone number type.

Field Summary
`protected java.lang.String` `label` Label.
`protected java.lang.String` `phoneNumber` Human-readable phone number.
`protected boolean` `primary` Whether this is the primary phone number
`protected java.lang.String` `rel` The phone number type.
`protected java.lang.String` `uri` "Tel URI" (formal representation of number; see RFC 3966).

Constructor Summary
`PhoneNumber()`

Method Summary
`void` `generate(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile)` Generates an XML representation for the extension.
`static ExtensionDescription` `getDefaultDescription()` Returns the suggested extension description.
`XmlParser.ElementHandler` `getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)` Gets an XML element handler for the extension.
`java.lang.String` `getLabel()`
`java.lang.String` `getPhoneNumber()`
`boolean` `getPrimary()`
`java.lang.String` `getRel()`
`java.lang.String` `getUri()`
`void` `setLabel(java.lang.String v)`
`void` `setPhoneNumber(java.lang.String v)`
`void` `setPrimary(boolean p)`
`void` `setRel(java.lang.String v)`
`void` `setUri(java.lang.String v)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### rel

    protected java.lang.String rel

  The phone number type.

### label

    protected java.lang.String label

  Label.

### uri

    protected java.lang.String uri

  "Tel URI" (formal representation of number; see RFC 3966).

### phoneNumber

    protected java.lang.String phoneNumber

  Human-readable phone number.

### primary

    protected boolean primary

  Whether this is the primary phone number

Constructor Detail

### PhoneNumber

    public PhoneNumber()

Method Detail

### getRel

    public java.lang.String getRel()

### setRel

    public void setRel(java.lang.String v)

### getLabel

    public java.lang.String getLabel()

### setLabel

    public void setLabel(java.lang.String v)

### getUri

    public java.lang.String getUri()

### setUri

    public void setUri(java.lang.String v)

### getPhoneNumber

    public java.lang.String getPhoneNumber()

### setPhoneNumber

    public void setPhoneNumber(java.lang.String v)

### getPrimary

    public boolean getPrimary()

### setPrimary

    public void setPrimary(boolean p)

### getDefaultDescription

    public static ExtensionDescription getDefaultDescription()

  Returns the suggested extension description.

### generate

    public void generate(com.google.gdata.util.common.xml.XmlWriter w,
                         ExtensionProfile extProfile)
                  throws java.io.IOException

  Description copied from interface: `Extension`
  Generates an XML representation for the extension.

  Specified by:
    `generate` in interface `Extension`
  Parameters:
    `w` - XML writer
    `extProfile` - extension profile
  Throws:
    `java.io.IOException`

### getHandler

    public XmlParser.ElementHandler getHandler(ExtensionProfile extProfile,
                                               java.lang.String namespace,
                                               java.lang.String localName,
                                               org.xml.sax.Attributes attrs)

  Description copied from interface: `Extension`
  Gets an XML element handler for the extension.

  Specified by:
    `getHandler` in interface `Extension`
  Parameters:
    `extProfile` - extension profile
    `namespace` - extension namespace
    `localName` - tag name, without the namespace prefix
    `attrs` - tag attributes
  Returns:
    an element handler