public class

Kind

extends Object
java.lang.Object
   ↳ com.google.gdata.data.Kind

Class Overview

The Kind class defines annotation types, interfaces and static helper methods for GData Kind extension handling. A GData Kind refers to a specific extension profile configuration for an Atom feed/entry or RSS channel/item.

Summary

Nested Classes
interface Kind.Adaptable The Adaptable interface is implemented by GData ExtensionPoint types that can be flexible adapted based upon the presence of GData kind category elements. 
class Kind.AdaptableHelper A simple helper class implementation of the Kind.Adaptable interface. 
interface Kind.Adaptor The Adaptor interface is implemented by Extension classes that provide extension declaration and data modeling support for specific GData kinds. 
class Kind.AdaptorException The AdaptorException class defines a simple ServiceException type that is thrown on kind adaptation failures. 
@interface Kind.Term The Term annnotation type is used to annotate Kind.Adaptor classes to declare the GData kind Category term value(s) implemented by the adaptor type. 
Constants
String META_DIRECTORY The location of the META-INF jar directory where GData kind mapping information is stored.
Fields
private static Map<String, List<Class<Kind.Adaptor>>> kindAdaptors Caches the mappings from a kind term to the Kind.Adaptor classes that handle the kind.
Public Constructors
Kind()
Public Methods
static Kind.Adaptor getAdaptor(String kindTerm, Kind.Adaptable adaptable)
Returns an Kind.Adaptor instance associated with the specified kind that is associated with the target Kind.Adaptable.
static Class<Kind.Adaptor> getAdaptorClass(String kindTerm, Kind.Adaptable adaptable)
Returns that Kind.Adaptor class that handles the declaration of extensions within an ExtensionProfile based upon the kind term value.
static String getKindServiceName(String kindTerm)
Returns the kind service name associatd with a particular Kind category term value.
static boolean isKindCategory(Category category)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String META_DIRECTORY

The location of the META-INF jar directory where GData kind mapping information is stored.

Constant Value: "META-INF/gdata/kinds/"

Fields

private static Map<String, List<Class<Kind.Adaptor>>> kindAdaptors

Caches the mappings from a kind term to the Kind.Adaptor classes that handle the kind. Since these are configured by JAR-based metadata, they are guaranteed to be constant once loaded unless/until the classloader for GData java library is bounced.

Public Constructors

public Kind ()

Public Methods

public static Kind.Adaptor getAdaptor (String kindTerm, Kind.Adaptable adaptable)

Returns an Kind.Adaptor instance associated with the specified kind that is associated with the target Kind.Adaptable. Returns null if no Adaptor can be found.

Parameters
kindTerm
adaptable

public static Class<Kind.Adaptor> getAdaptorClass (String kindTerm, Kind.Adaptable adaptable)

Returns that Kind.Adaptor class that handles the declaration of extensions within an ExtensionProfile based upon the kind term value. A return value of null indicates that no adaptor class could be located for this cobintation of kind and Kind.Adaptable type.

Parameters
kindTerm
adaptable

public static String getKindServiceName (String kindTerm)

Returns the kind service name associatd with a particular Kind category term value. It converts a kind term URI to a service file name that is used for dynamic discovery of Kind.Adaptor class implementations for the kind.

Parameters
kindTerm

public static boolean isKindCategory (Category category)

Parameters
category