|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.model.MetadataValueTransform
public class MetadataValueTransform
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.
Constructor Summary | |
---|---|
MetadataValueTransform(MetadataKey<?>... inputSources)
Constructs a simple value transform using the given sources. |
Method Summary | |
---|---|
java.lang.Object |
generate(Element element,
ElementMetadata<?,?> metadata)
Runs this transformation on the given element. |
void |
parse(Element element,
ElementMetadata<?,?> metadata,
java.lang.Object value)
For parsing, we always parse directly into the first source. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetadataValueTransform(MetadataKey<?>... inputSources)
inputSources
- the source keys to pull the values from.Method Detail |
---|
public java.lang.Object generate(Element element, ElementMetadata<?,?> metadata)
generate
in interface Metadata.VirtualValue
element
- the element to transform.metadata
- the metadata of the element being transformed.
public void parse(Element element, ElementMetadata<?,?> metadata, java.lang.Object value) throws ParseException
parse
in interface Metadata.VirtualValue
ParseException
- if parsing fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |