Google Data APIs Client Library (1.41.1)



com.google.api.gbase.client
Class MetadataEntryExtension

java.lang.Object
  extended by com.google.api.gbase.client.MetadataEntryExtension

public class MetadataEntryExtension
extends java.lang.Object

Handle gm: attributes found in histogram and item types feeds. This object should be accessed using GoogleBaseEntry.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.


Constructor Summary
MetadataEntryExtension(BaseEntry<?> owner)
          Creates a MetadataEntryExtension and link it to a BaseEntry (usually a GoogleBaseEntry).
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataEntryExtension

public MetadataEntryExtension(BaseEntry<?> owner)
Creates a MetadataEntryExtension and link it to a BaseEntry (usually a GoogleBaseEntry).

Parameters:
owner - entry this object is linked to
Method Detail

getAttributeHistogram

public AttributeHistogram getAttributeHistogram()
Gets attribute histogram information.

Returns:
attribute histogram information fond in the feed
Throws:
java.lang.IllegalStateException - if the feed was not an histogram feed.

getStats

public Stats getStats()
Gets statistics, if available.


isEmpty

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

hasStats

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

hasAttributeHistogram

public boolean hasAttributeHistogram()
Checks whether an attribute histogram is available in the current entry.

Returns:
true if a call to getAttributeHistogram() would work

getItemTypeDescription

public ItemTypeDescription getItemTypeDescription()
Gets the ItemTypeDescription associated with this extension.

Returns:
item type description
Throws:
java.lang.IllegalStateException - if no item type description could be found in the entry (only item type feeds have item type description information)

hasItemTypeDescription

public boolean hasItemTypeDescription()
Checks whether item type description is available in the current entry.

Returns:
true if a call to getItemTypeDescription() would work

hasGmDisapproved

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.

getGmPublishingPriority

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.

setGmPublishingPriority

public void setGmPublishingPriority(GmPublishingPriority.Value value)
Sets the publishing priority for the entry.

Parameters:
value - the value for the publish priority