| java.lang.Object | |
| ↳ | com.google.gdata.model.MetadataContext |
A context that metadata is operating under. Currently this contains the alt format, projection and version of the current request. Immutable.
This class also contains static initializers for the transforms required by each of our alt formats, which guarantees they will be loaded. We may want to put them somewhere else, but we need to move the constants for the contexts along with them.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ATOM | The ATOM metadata context. | ||||||||||
| RSS | The RSS metadata context. | ||||||||||
| altFormat | |||||||||||
| projection | |||||||||||
| version | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Compare two context objects to order them.
| |||||||||||
Checks that the other object is a metadata context with the same alt type
and version.
| |||||||||||
Creates a new immutable metadata context with just an alt format.
| |||||||||||
Creates a new immutable metadata context.
| |||||||||||
Creates a new immutable metadata context with just projection.
| |||||||||||
Constructs a new immutable metadata context with just version.
| |||||||||||
The alt format the context represents.
| |||||||||||
The projection the context represents.
| |||||||||||
The version the context represents.
| |||||||||||
The hashCode for a context is just the hashcode of its parts.
| |||||||||||
Returns true if this context is a match for the given context.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.lang.Comparable
| |||||||||||
Compare two context objects to order them. A null value for any field is
treated as a low value. Otherwise we use the normal string comparison. If
the given context object is null a NullPointerException
will be thrown.
| other |
|---|
Checks that the other object is a metadata context with the same alt type and version.
| obj |
|---|
Creates a new immutable metadata context with just an alt format. The format must not be null or this will throw a null pointer exception.
| format | The alt format for the context, not null. |
|---|
Creates a new immutable metadata context. If version, projection and alt type are all null this method will return null, which is the default context.
| format | The alt format of the context. |
|---|---|
| projection | The projection for the context. |
| version | The version of the context. |
Creates a new immutable metadata context with just projection. If the projection is null this will return null, which is the default context.
| projection | The projection of the context. |
|---|
Constructs a new immutable metadata context with just version. If version is null this will return null, which is the default context.
| version | The version of the context. |
|---|
The alt format the context represents.
The projection the context represents.
The version the context represents.
The hashCode for a context is just the hashcode of its parts.
Returns true if this context is a match for the given context. A context is a match for another context if it is a subset of that context. Null properties are ignored, but any properties that are set must match the same property on the other context.
| other |
|---|