public class

Property

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.analytics.Property

Class Overview

Generic account-level property.

Summary

Constants
String NAME XML "name" attribute name
String VALUE XML "value" attribute name
String XML_NAME XML element name
Fields
private String name Name of the property
private String value Value of the property
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
Property()
Default mutable constructor.
Property(String name, String value)
Immutable constructor.
Public Methods
boolean equals(Object obj)
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
String getName()
Returns the name of the property.
String getValue()
Returns the value of the property.
boolean hasName()
Returns whether it has the name of the property.
boolean hasValue()
Returns whether it has the value of the property.
int hashCode()
void setName(String name)
Sets the name of the property.
void setValue(String value)
Sets the value of the property.
String toString()
Protected Methods
void consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper.
void putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
void validate()
Checks the attributes to see if there are any problems.
[Expand]
Inherited Methods
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

private static final String NAME

XML "name" attribute name

Constant Value: "name"

private static final String VALUE

XML "value" attribute name

Constant Value: "value"

static final String XML_NAME

XML element name

Constant Value: "property"

Fields

private String name

Name of the property

private String value

Value of the property

Public Constructors

public Property ()

Default mutable constructor.

public Property (String name, String value)

Immutable constructor.

Parameters
name Name of the property.
value Value of the property.

Public Methods

public boolean equals (Object obj)

Parameters
obj

public static ExtensionDescription getDefaultDescription (boolean required, boolean repeatable)

Returns the extension description, specifying whether it is required, and whether it is repeatable.

Parameters
required Whether it is required
repeatable Whether it is repeatable
Returns
  • extension description

public String getName ()

Returns the name of the property.

Returns
  • name of the property

public String getValue ()

Returns the value of the property.

Returns
  • value of the property

public boolean hasName ()

Returns whether it has the name of the property.

Returns
  • whether it has the name of the property

public boolean hasValue ()

Returns whether it has the value of the property.

Returns
  • whether it has the value of the property

public int hashCode ()

public void setName (String name)

Sets the name of the property.

Parameters
name Name of the property or null to reset

public void setValue (String value)

Sets the value of the property.

Parameters
value Value of the property or null to reset

public String toString ()

Protected Methods

protected void consumeAttributes (AttributeHelper helper)

Consumes attributes from the attribute helper. May also use consumeContent(boolean) to consume the element's text content. Called from getHandler(ExtensionProfile, String, String, Attributes). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
helper Attribute helper

protected void putAttributes (AttributeGenerator generator)

Puts attributes into the attribute generator. Called from generate(XmlWriter, ExtensionProfile). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
generator Attribute generator

protected void validate ()

Checks the attributes to see if there are any problems. Default implementation does nothing, though generally this is discouraged unless there really are no restrictions.