public class

FeedURLFactory

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

Class Overview

Provides feed URLs that can be used with a GoogleBase server.

Summary

Constants
String DEFAULT_BASE_URL URL of the server to connect to by default.
Fields
private URL baseUrl The url used as a base when creating urls.
private URL feedAttributes
private URL feedItems
private URL feedItemsBatch
private URL feedLocales
private URL feedSnippets
private URL feedSnippetsBatch
private static final FeedURLFactory instance The default FeedURLFactory instance targeted to the default URL.
Public Constructors
FeedURLFactory(String url)
Creates an URL factory targeted to a server.
Public Methods
URL getAttributesFeedURL()
Gets an URL for the list of the most used attributes and their most used values.
URL getBaseURL()
Returns the URL used as a base for the generated URLs.
static FeedURLFactory getDefault()
Gets the default instance of this factory, targeted to {@value #DEFAULT_BASE_URL}.
URL getItemTypesEntryURL(String locale, String itemType)
Gets an URL for getting the item types Google suggest using for a given itemtype for a given locale.
URL getItemTypesFeedURL(String locale)
Gets an URL for querying the item types Google suggest using for a given locale.
URL getItemsBatchFeedURL()
Gets an URL for posting batch operations to the customer feed.
URL getItemsEntryURL(String entryId)
Gets an URL for accessing an item.
URL getItemsFeedURL()
Gets an URL for accessing a customer feed, which allows users to query, insert, update and delete their own items.
URL getLocalesFeedURL()
Gets the URL of the list of all the supported locales.
URL getSnippetsBatchFeedURL()
Gets an URL for accessing a public batch feed, which allows users to get a series of entries.
URL getSnippetsEntryURL(String id)
Gets an URL for accessing a snippet.
URL getSnippetsFeedURL()
Gets an URL for accessing a public feed, which allows users to perform queries.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String DEFAULT_BASE_URL

URL of the server to connect to by default. Currently {@value #DEFAULT_BASE_URL}.

Constant Value: "http://www.google.com/base/"

Fields

private URL baseUrl

The url used as a base when creating urls.

private URL feedAttributes

private URL feedItems

private URL feedItemsBatch

private URL feedLocales

private URL feedSnippets

private URL feedSnippetsBatch

private static final FeedURLFactory instance

The default FeedURLFactory instance targeted to the default URL.

Public Constructors

public FeedURLFactory (String url)

Creates an URL factory targeted to a server. As long as you don't need to connect to a nonstandard URL, different from {@value #DEFAULT_BASE_URL}, you should consider calling getDefault() instead.

Parameters
url An URL used as a base for the generated URLs
Throws
MalformedURLException

Public Methods

public URL getAttributesFeedURL ()

Gets an URL for the list of the most used attributes and their most used values.

Returns

public URL getBaseURL ()

Returns the URL used as a base for the generated URLs.

public static FeedURLFactory getDefault ()

Gets the default instance of this factory, targeted to {@value #DEFAULT_BASE_URL}.

Returns
  • the default FeedURLFactory

public URL getItemTypesEntryURL (String locale, String itemType)

Gets an URL for getting the item types Google suggest using for a given itemtype for a given locale. The feed is read-only and unauthenticated.

Parameters
locale A locale, for example "de_DE", "en_GB", "en_US"
itemType The item type to be analysed
Returns
  • an URL of a feed containing item types
Throws
MalformedURLException

public URL getItemTypesFeedURL (String locale)

Gets an URL for querying the item types Google suggest using for a given locale. The feed is read-only and unauthenticated.

Parameters
locale A locale, for example "de_DE", "en_GB", "en_US"
Returns
  • an URL of a feed containing item types
Throws
MalformedURLException

public URL getItemsBatchFeedURL ()

Gets an URL for posting batch operations to the customer feed.

Returns
  • an URL to be passed to com.google.gdata.client.Service#batch(java.net.URL, com.google.gdata.data.BaseFeed)

public URL getItemsEntryURL (String entryId)

Gets an URL for accessing an item.

Parameters
entryId
Returns
  • an URL to be used when reading an item or when performing an update or delete operation with a GoogleBaseService
Throws
MalformedURLException

public URL getItemsFeedURL ()

Gets an URL for accessing a customer feed, which allows users to query, insert, update and delete their own items. The textual attributes of the items are returned in their original format. This is a read/write feed that is only accessible to authenticated users.

Returns

public URL getLocalesFeedURL ()

Gets the URL of the list of all the supported locales. The feed is read-only and unauthenticated.

Returns
  • an URL of a feed containing the supported locales

public URL getSnippetsBatchFeedURL ()

Gets an URL for accessing a public batch feed, which allows users to get a series of entries. A query on this batch feed returns the same result as a series of calls to getSnippetsFeedURL() in one HTTP request.

Returns
  • an URL to post a batch query to.

public URL getSnippetsEntryURL (String id)

Gets an URL for accessing a snippet.

Parameters
id The id of the snippet
Returns
Throws
MalformedURLException

public URL getSnippetsFeedURL ()

Gets an URL for accessing a public feed, which allows users to perform queries. The formatting of the textual attributes returned by this feed is not guaranteed. This is an unauthenticated read-only feed.

Returns