com.google.gdata.model
Class Schema

java.lang.Object
  extended by com.google.gdata.model.Schema

public final class Schema
extends java.lang.Object

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().


Method Summary
<D> AttributeMetadata<D>
bind(ElementKey<?,?> parent, AttributeKey<D> attribute)
          Returns the default metadata for the given attribute.
<D> AttributeMetadata<D>
bind(ElementKey<?,?> parent, AttributeKey<D> attribute, MetadataContext context)
          Returns the metadata for the attribute, bound to the context.
<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<?,?> parent, ElementKey<D,E> child, MetadataContext context)
          Returns the metadata for the child element in the parent, 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,E extends Element>
ElementMetadata<D,E>
bind(ElementKey<D,E> key, MetadataContext context)
          Returns the metadata for the element key bound to the context.
static MetadataRegistry builder()
          Static factory method to allow the standard code of Schema.builder() to return something useful.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

builder

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


bind

public <D,E extends Element> ElementMetadata<D,E> bind(ElementKey<D,E> key)
Returns the default metadata for the element key.


bind

public <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.


bind

public <D,E extends Element> ElementMetadata<D,E> bind(ElementKey<?,?> parent,
                                                       ElementKey<D,E> child)
Returns the metadata for the child element in the parent.


bind

public <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.


bind

public <D> AttributeMetadata<D> bind(ElementKey<?,?> parent,
                                     AttributeKey<D> attribute)
Returns the default metadata for the given attribute.


bind

public <D> AttributeMetadata<D> bind(ElementKey<?,?> parent,
                                     AttributeKey<D> attribute,
                                     MetadataContext context)
Returns the metadata for the attribute, bound to the context.