public class

MetadataValueTransform

extends Object
implements Metadata.VirtualValue
java.lang.Object
   ↳ com.google.gdata.model.MetadataValueTransform

Class Overview

This class represents a transformation of a value based on a list of keys to use as the value for the element. During generation this will check each of the source keys for a value, using the first value found. During parsing it will place the incoming value into the first key in the list.

Summary

Fields
private final List<MetadataKey<?>> sources
Public Constructors
MetadataValueTransform(MetadataKey...<?> inputSources)
Constructs a simple value transform using the given sources.
Public Methods
Object generate(Element element, ElementMetadata<?, ?> metadata)
Runs this transformation on the given element.
void parse(Element element, ElementMetadata<?, ?> metadata, Object value)
For parsing, we always parse directly into the first source.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gdata.model.Metadata.VirtualValue

Fields

private final List<MetadataKey<?>> sources

Public Constructors

public MetadataValueTransform (MetadataKey...<?> inputSources)

Constructs a simple value transform using the given sources.

Parameters
inputSources The source keys to pull the values from.

Public Methods

public Object generate (Element element, ElementMetadata<?, ?> metadata)

Runs this transformation on the given element.

Parameters
element The element to transform.
metadata The metadata of the element being transformed.
Returns
  • the String representation of the property value.

public void parse (Element element, ElementMetadata<?, ?> metadata, Object value)

For parsing, we always parse directly into the first source.

Parameters
element
metadata
value