public class

MetadataEntryExtension

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

Class Overview

Handle gm: attributes found in histogram and item types feeds. This object should be accessed using getGoogleBaseMetadata(). The metadata can contain either:

Only one of them can be defined. Which one it is depends on the type of entry/feed that has been read. See also the javadoc for GoogleBaseEntry.

Summary

Fields
private final ItemTypeDescription itemType Item type description information, if it is set.
private final BaseEntry<?> owner
Public Constructors
MetadataEntryExtension(BaseEntry<?> owner)
Creates a MetadataEntryExtension and link it to a BaseEntry (usually a GoogleBaseEntry).
Public Methods
AttributeHistogram getAttributeHistogram()
Gets attribute histogram information.
GmPublishingPriority.Value getGmPublishingPriority()
Returns the publishing priority for the entry or null if the entry doesn't contain this information.
ItemTypeDescription getItemTypeDescription()
Gets the ItemTypeDescription associated with this extension.
Stats getStats()
Gets statistics, if available.
boolean hasAttributeHistogram()
Checks whether an attribute histogram is available in the current entry.
boolean hasGmDisapproved()
Checks whether the entry contains the gm:disapproved tag, marking it as a disapproved item.
boolean hasItemTypeDescription()
Checks whether item type description is available in the current entry.
boolean hasStats()
Checks whether statistics information is available in the current entry.
boolean isEmpty()
Checks whether anything has been defined in this extension.
void setGmPublishingPriority(GmPublishingPriority.Value value)
Sets the publishing priority for the entry.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private final ItemTypeDescription itemType

Item type description information, if it is set. If it is not set, this means that either this extension has not been initialized yet or that this is not an itemtype entry.

private final BaseEntry<?> owner

Public Constructors

public MetadataEntryExtension (BaseEntry<?> owner)

Creates a MetadataEntryExtension and link it to a BaseEntry (usually a GoogleBaseEntry).

Parameters
owner Entry this object is linked to

Public Methods

public AttributeHistogram getAttributeHistogram ()

Gets attribute histogram information.

Returns
  • attribute histogram information fond in the feed
Throws
IllegalStateException if the feed was not an histogram feed.

public GmPublishingPriority.Value getGmPublishingPriority ()

Returns the publishing priority for the entry or null if the entry doesn't contain this information.

Returns
  • the value for the publishing_priority parameter, or null if this information is not available.

public ItemTypeDescription getItemTypeDescription ()

Gets the ItemTypeDescription associated with this extension.

Returns
  • item type description
Throws
IllegalStateException if no item type description could be found in the entry (only item type feeds have item type description information)

public Stats getStats ()

Gets statistics, if available.

public boolean hasAttributeHistogram ()

Checks whether an attribute histogram is available in the current entry.

Returns

public boolean hasGmDisapproved ()

Checks whether the entry contains the gm:disapproved tag, marking it as a disapproved item.

Returns
  • true if the gm:disapproved tag is present in the app:control section, false otherwise.

public boolean hasItemTypeDescription ()

Checks whether item type description is available in the current entry.

Returns

public boolean hasStats ()

Checks whether statistics information is available in the current entry.

Returns
  • true if a call to getStats() would return a Stats object

public boolean isEmpty ()

Checks whether anything has been defined in this extension.

Returns
  • true if there is metadata about locale, histograms or item types in this object

public void setGmPublishingPriority (GmPublishingPriority.Value value)

Sets the publishing priority for the entry.

Parameters
value The value for the publish priority