public final class

Schema

extends Object
java.lang.Object
   ↳ com.google.gdata.model.Schema

Class Overview

An immutable set of metadata. Stores an entire tree of metadata about a service or feed provider in a fast, cached, immutable form, so that runtime use of metadata is very cheap. Schemas can be created by using a MetadataRegistry, which can be created using builder().

Summary

Fields
private final Map<Schema.RootKey, AttributeMetadataRegistry> attributes
private final Map<Schema.RootKey, ElementMetadataRegistry> elements
Public Methods
<D, E extends Element> ElementMetadata<D, E> bind(ElementKey<?, ?> parent, ElementKey<D, E> child)
Returns the metadata for the child element in the parent.
<D, E extends Element> ElementMetadata<D, E> bind(ElementKey<D, E> key, MetadataContext context)
Returns the metadata for the element key bound to the context.
<D, E extends Element> ElementMetadata<D, E> bind(ElementKey<D, E> key)
Returns the default metadata for the element key.
<D> AttributeMetadata<D> bind(ElementKey<?, ?> parent, AttributeKey<D> attribute, MetadataContext context)
Returns the metadata for the attribute, bound to the context.
<D> AttributeMetadata<D> bind(ElementKey<?, ?> parent, AttributeKey<D> attribute)
Returns the default metadata for the given attribute.
<D, E extends Element> ElementMetadata<D, E> bind(ElementKey<?, ?> parent, ElementKey<D, E> child, MetadataContext context)
Returns the metadata for the child element in the parent, bound to the context.
static MetadataRegistry builder()
Static factory method to allow the standard code of Schema.builder() to return something useful.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private final Map<Schema.RootKey, AttributeMetadataRegistry> attributes

private final Map<Schema.RootKey, ElementMetadataRegistry> elements

Public Methods

public ElementMetadata<D, E> bind (ElementKey<?, ?> parent, ElementKey<D, E> child)

Returns the metadata for the child element in the parent.

Parameters
parent
child

public ElementMetadata<D, E> bind (ElementKey<D, E> key, MetadataContext context)

Returns the metadata for the element key bound to the context.

Parameters
key
context

public ElementMetadata<D, E> bind (ElementKey<D, E> key)

Returns the default metadata for the element key.

Parameters
key

public AttributeMetadata<D> bind (ElementKey<?, ?> parent, AttributeKey<D> attribute, MetadataContext context)

Returns the metadata for the attribute, bound to the context.

Parameters
parent
attribute
context

public AttributeMetadata<D> bind (ElementKey<?, ?> parent, AttributeKey<D> attribute)

Returns the default metadata for the given attribute.

Parameters
parent
attribute

public ElementMetadata<D, E> bind (ElementKey<?, ?> parent, ElementKey<D, E> child, MetadataContext context)

Returns the metadata for the child element in the parent, bound to the context.

Parameters
parent
child
context

public static MetadataRegistry builder ()

Static factory method to allow the standard code of Schema.builder() to return something useful.