public interface

MetadataCreator

com.google.gdata.model.MetadataCreator
Known Indirect Subclasses

Class Overview

Shared interface for metadata creators. Extended by AttributeCreator and ElementCreator, this is used to create both elements and attributes, which we refer to as properties.

Summary

Public Methods
abstract MetadataCreator setName(QName name)
Sets the name of the property.
abstract MetadataCreator setRequired(boolean required)
Sets the requiredness of this property.
abstract MetadataCreator setVirtualValue(Metadata.VirtualValue virtualValue)
Sets the virtual value for the property.
abstract MetadataCreator setVisible(boolean visible)
Sets whether this property is visible.

Public Methods

public abstract MetadataCreator setName (QName name)

Sets the name of the property. This is used on parsing to decide which field to place a property in, and during generation to choose the display name of the property. This should only be set to override the default name, which is the ID specified in the MetadataKey.

Parameters
name The new name to use for the property.
Returns
  • this metadata creator for chaining.

public abstract MetadataCreator setRequired (boolean required)

Sets the requiredness of this property. If set to true, this property must appear in both the input and output or a validation error will occur. If set to false, this property is optional.

Parameters
required True to set the property to required, false to set it to optional (the default).
Returns
  • this metadata creator for chaining.

public abstract MetadataCreator setVirtualValue (Metadata.VirtualValue virtualValue)

Sets the virtual value for the property. This is used as the value of the property during parsing and generation.

Parameters
virtualValue

public abstract MetadataCreator setVisible (boolean visible)

Sets whether this property is visible. If the property is not visible then it will not be included in the output. This can be used to hide an property in particular contexts (such as RSS or JSON output). It can also be used to explicitly set a property to visible that may be hidden by other metadata rules.

Parameters
visible True to make the property visible (the default), false to hide it from the output.
Returns
  • this metadata creator for chaining.