public class

CustomProperty

extends Element
java.lang.Object
   ↳ com.google.gdata.model.Element
     ↳ com.google.gdata.model.gd.CustomProperty

Class Overview

Name-value pair with optional type and unit.

Summary

Fields
public static final ElementKey<String, CustomProperty> KEY The key for this element.
public static final AttributeKey<String> NAME Can be a URI to indicate a specific ontology.
public static final AttributeKey<String> TYPE Datatype such as string, integer, and date, or an ontology-specific URI.
public static final AttributeKey<String> UNIT Units of data - can also be a URI to indicate a specific ontology.
[Expand]
Inherited Fields
From class com.google.gdata.model.Element
Public Constructors
CustomProperty()
Constructs an instance using the default key.
CustomProperty(String value)
Constructs a new instance with the given value.
Protected Constructors
CustomProperty(ElementKey<String, ? extends CustomProperty> key)
Subclass constructor, allows subclasses to supply their own element key.
CustomProperty(ElementKey<String, ? extends CustomProperty> key, Element source)
Constructs a new instance by doing a shallow copy of data from an existing Element instance.
Public Methods
boolean equals(Object obj)
String getName()
Returns the can be a URI to indicate a specific ontology.
String getType()
Returns the datatype such as string, integer, and date, or an ontology-specific URI.
String getUnit()
Returns the units of data - can also be a URI to indicate a specific ontology.
String getValue()
Returns the value.
boolean hasName()
Returns whether it has the can be a URI to indicate a specific ontology.
boolean hasType()
Returns whether it has the datatype such as string, integer, and date, or an ontology-specific URI.
boolean hasUnit()
Returns whether it has the units of data - can also be a URI to indicate a specific ontology.
boolean hasValue()
Returns whether it has the value.
int hashCode()
CustomProperty lock()
Locks this element.
static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
CustomProperty setName(String name)
Sets the can be a URI to indicate a specific ontology.
CustomProperty setType(String type)
Sets the datatype such as string, integer, and date, or an ontology-specific URI.
CustomProperty setUnit(String unit)
Sets the units of data - can also be a URI to indicate a specific ontology.
CustomProperty setValue(String value)
Sets the value.
[Expand]
Inherited Methods
From class com.google.gdata.model.Element
From class java.lang.Object

Fields

public static final ElementKey<String, CustomProperty> KEY

The key for this element.

public static final AttributeKey<String> NAME

Can be a URI to indicate a specific ontology.

public static final AttributeKey<String> TYPE

Datatype such as string, integer, and date, or an ontology-specific URI.

public static final AttributeKey<String> UNIT

Units of data - can also be a URI to indicate a specific ontology.

Public Constructors

public CustomProperty ()

Constructs an instance using the default key.

public CustomProperty (String value)

Constructs a new instance with the given value.

Parameters
value Value.

Protected Constructors

protected CustomProperty (ElementKey<String, ? extends CustomProperty> key)

Subclass constructor, allows subclasses to supply their own element key.

Parameters
key

protected CustomProperty (ElementKey<String, ? extends CustomProperty> 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 createElement(ElementKey, Element).

Parameters
key The key to use for this element.
source Source element

Public Methods

public boolean equals (Object obj)

Parameters
obj

public String getName ()

Returns the can be a URI to indicate a specific ontology.

Returns
  • can be a URI to indicate a specific ontology

public String getType ()

Returns the datatype such as string, integer, and date, or an ontology-specific URI.

Returns
  • datatype such as string, integer, and date, or an ontology-specific URI

public String getUnit ()

Returns the units of data - can also be a URI to indicate a specific ontology.

Returns
  • units of data - can also be a URI to indicate a specific ontology

public String getValue ()

Returns the value.

Returns
  • value

public boolean hasName ()

Returns whether it has the can be a URI to indicate a specific ontology.

Returns
  • whether it has the can be a URI to indicate a specific ontology

public boolean hasType ()

Returns whether it has the datatype such as string, integer, and date, or an ontology-specific URI.

Returns
  • whether it has the datatype such as string, integer, and date, or an ontology-specific URI

public boolean hasUnit ()

Returns whether it has the units of data - can also be a URI to indicate a specific ontology.

Returns
  • whether it has the units of data - can also be a URI to indicate a specific ontology

public boolean hasValue ()

Returns whether it has the value.

Returns
  • whether it has the value

public int hashCode ()

public CustomProperty lock ()

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.

public static void registerMetadata (MetadataRegistry registry)

Registers the metadata for this element.

Parameters
registry

public CustomProperty setName (String name)

Sets the can be a URI to indicate a specific ontology.

Parameters
name Can be a URI to indicate a specific ontology or null to reset
Returns
  • this to enable chaining setters

public CustomProperty setType (String type)

Sets the datatype such as string, integer, and date, or an ontology-specific URI.

Parameters
type Datatype such as string, integer, and date, or an ontology-specific URI or null to reset
Returns
  • this to enable chaining setters

public CustomProperty setUnit (String unit)

Sets the units of data - can also be a URI to indicate a specific ontology.

Parameters
unit Units of data - can also be a URI to indicate a specific ontology or null to reset
Returns
  • this to enable chaining setters

public CustomProperty setValue (String value)

Sets the value.

Parameters
value Value or null to reset
Returns
  • this to enable chaining setters