public class

GoogleBaseAttributeType

extends Object
java.lang.Object
   ↳ com.google.api.gbase.client.GoogleBaseAttributeType

Class Overview

Attribute types. This is an open type enumeration. Use getInstance(String) to convert a string into a GoogleBaseAttributeType. When not parsing XML streams, always use the constants defined in this class when referring to a specific type. Use equality (A.equals(B)) and not identity (A == B) when comparing types.

Summary

Fields
public static final GoogleBaseAttributeType BOOLEAN Either true or false.
public static final GoogleBaseAttributeType DATE Date for an event, in format YYYY-MM-DD (RFC3339).
public static final GoogleBaseAttributeType DATE_TIME Date and time for an event, in format YYYY-MM-DDThh:mm:ss (RFC3339).
public static final GoogleBaseAttributeType DATE_TIME_RANGE Start and end dates for an event.
public static final GoogleBaseAttributeType FLOAT Numbers with decimal digits.
public static final GoogleBaseAttributeType FLOAT_UNIT Numbers with decimal digits and a string.
public static final GoogleBaseAttributeType GROUP Group of related attributes.
public static final GoogleBaseAttributeType INT Whole number values.
public static final GoogleBaseAttributeType INT_UNIT Whole number value and a string.
private static final Map<String, GoogleBaseAttributeType> KNOWN_TYPES All known types, for getInstance(String).
public static final GoogleBaseAttributeType LOCATION A location, a string describing the address.
public static final GoogleBaseAttributeType NUMBER Any kind of number.
public static final GoogleBaseAttributeType NUMBER_UNIT A number and a string.
public static final GoogleBaseAttributeType REFERENCE A reference to another Google Base Item.
public static final GoogleBaseAttributeType SHIPPING Shipping information.
public static final GoogleBaseAttributeType TAX Tax information.
public static final GoogleBaseAttributeType TEXT Text values.
public static final GoogleBaseAttributeType URL HTTP URL.
private final String name Type name
private final GoogleBaseAttributeType supertype Supertype (if there is any.)
Public Methods
boolean equals(Object o)
static GoogleBaseAttributeType getInstance(String typeName)
Get a type instance.
String getName()
Gets the type name.
GoogleBaseAttributeType getSupertype()
Gets the supertype or null.
int hashCode()
boolean isSupertypeOf(GoogleBaseAttributeType subtype)
Checks whether the given type is the same as this type or a subtype.
String toString()
Gets the type name.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final GoogleBaseAttributeType BOOLEAN

Either true or false.

public static final GoogleBaseAttributeType DATE

Date for an event, in format YYYY-MM-DD (RFC3339).

public static final GoogleBaseAttributeType DATE_TIME

Date and time for an event, in format YYYY-MM-DDThh:mm:ss (RFC3339).

public static final GoogleBaseAttributeType DATE_TIME_RANGE

Start and end dates for an event. An attribute of this type is represented by two date strings in format YYYY-MM-DD (RFC3339)separated by a space. Example:

1975-09-25 1975-09-25

See Also

public static final GoogleBaseAttributeType FLOAT

Numbers with decimal digits.

public static final GoogleBaseAttributeType FLOAT_UNIT

Numbers with decimal digits and a string. Example: 1.5 m

public static final GoogleBaseAttributeType GROUP

Group of related attributes.

public static final GoogleBaseAttributeType INT

Whole number values.

public static final GoogleBaseAttributeType INT_UNIT

Whole number value and a string. Example: 10 km)

private static final Map<String, GoogleBaseAttributeType> KNOWN_TYPES

All known types, for getInstance(String).

public static final GoogleBaseAttributeType LOCATION

A location, a string describing the address.

public static final GoogleBaseAttributeType NUMBER

Any kind of number. Example: 10, 3.14. This is a supertype of INT and NUMBER.

public static final GoogleBaseAttributeType NUMBER_UNIT

A number and a string. Example: 1.5 m, 12 lb. This is a supertype of INT_UNIT and FLOAT_UNIT.

public static final GoogleBaseAttributeType REFERENCE

A reference to another Google Base Item.

public static final GoogleBaseAttributeType SHIPPING

Shipping information. Example:

<country>DE</country>
 <region>Munich</region>
 <price>12.50 eur</price>
 <service>Deutsche Post</service>
 

public static final GoogleBaseAttributeType TAX

Tax information. Example:

<country>DE</country>
 <region>Munich</region>
 <rate>12.50 eur</rate>
 <tax_ship>true</tax_ship>
 

public static final GoogleBaseAttributeType TEXT

Text values.

public static final GoogleBaseAttributeType URL

HTTP URL.

private final String name

Type name

private final GoogleBaseAttributeType supertype

Supertype (if there is any.)

Public Methods

public boolean equals (Object o)

Parameters
o

public static GoogleBaseAttributeType getInstance (String typeName)

Get a type instance.

Parameters
typeName Name of a type found in a feed. Current version of the API will always return one of the types listed in this class but future versions might support new types, so getInstance accepts any type name
Returns
  • an instance of GoogleBaseAttributeType, or null if typeName was null

public String getName ()

Gets the type name.

Returns
  • type name

public GoogleBaseAttributeType getSupertype ()

Gets the supertype or null.

Returns
  • supertype, if one has been defined

public int hashCode ()

public boolean isSupertypeOf (GoogleBaseAttributeType subtype)

Checks whether the given type is the same as this type or a subtype.

Parameters
subtype
Returns
  • true if subtype is the same type or a subtype of the current type

public String toString ()

Gets the type name.

Returns
  • type name