|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.wireformats.AltFormat
public class AltFormat
The AltFormat class represents an alternate representation format for a GData
resources. An alternate format has a name (which may be used as the alt
query parameter for GData requests), a primary MIME content type (which
may act as an alias for the name if unique to the representation), and
several other attributes.
Two AltFormat instances are considered to be equal if they have the same name.
This class also exposes static constants for common GData alternate representation formats that are available across multiple GData services.
Nested Class Summary | |
---|---|
static class |
AltFormat.Builder
A builder for AltFormat. |
Field Summary | |
---|---|
static AltFormat |
APPLICATION_XML
Constant value representing application/xml document |
static AltFormat |
ATOM
Constant value representing the Atom Syndication Format, as defined by RFC 4287. |
static AltFormat |
ATOM_SERVICE
Constant value representing the AtomPub Service Document, as described by RFC 5023. |
static AltFormat |
MEDIA
Constant value representing the media content associated with a GData resource. |
static AltFormat |
MEDIA_MULTIPART
Constant value representing the MIME Multipart Document format, as described by RFC 2045. |
static AltFormat |
OPENSEARCH
Constant value representing the OpenSearch Description Document, as described by OpenSearch 1.1. |
static AltFormat |
RSS
Constant value representing the Really Simple Syndication (RSS) format, as defined by RSS 2.0 . |
Constructor Summary | |
---|---|
AltFormat(java.lang.String name,
WireFormat wireFormat,
ContentType contentType,
java.util.List<ContentType> acceptList,
boolean isSelectableByType)
Deprecated. Please use the AltFormat.Builder instead. See builder() . |
Method Summary | |
---|---|
boolean |
allowInputFormat(AltFormat inputFormat)
Returns true if inputFormat is allowed as input format when
this format with this format as the output format. |
static AltFormat.Builder |
builder()
Creates a builder for a new AltFormat. |
static AltFormat.Builder |
builder(AltFormat format)
Creates a builder for a new AltFormat. |
boolean |
equals(java.lang.Object o)
|
AltFormat |
getBaseFormat()
Returns the base format, if this format is a variant. |
ContentType |
getContentType()
Returns the primary MIME content type used for the representation. |
java.util.List<ContentType> |
getMatchingTypes()
Returns a list of all MIME types that will be considered to potentially match the representation for the purposes of content negotiation. |
java.lang.String |
getName()
Returns the short name for this format. |
WireFormat |
getWireFormat()
Returns the WireFormat that is used to parse and generate the
representation or null if no supporting wire format exists. |
boolean |
hasBaseFormat()
Returns true if this format is a variant, such as *-in-script. |
int |
hashCode()
|
boolean |
isSelectableByType()
Returns true , indicates that the MIME content type can be used as
an alias to select the representation. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final AltFormat RSS
public static final AltFormat OPENSEARCH
public static final AltFormat ATOM_SERVICE
public static final AltFormat APPLICATION_XML
public static final AltFormat MEDIA
public static final AltFormat MEDIA_MULTIPART
public static final AltFormat ATOM
Constructor Detail |
---|
@Deprecated public AltFormat(java.lang.String name, WireFormat wireFormat, ContentType contentType, java.util.List<ContentType> acceptList, boolean isSelectableByType)
AltFormat.Builder
instead. See builder()
.
name
- the short name for this format. This values is suitable for use
as the value of the alt
query parameter.wireFormat
- the content wire format or null
if there is no
associated wire format for the representation.contentType
- the primary MIME content type used for the
representation.acceptList
- a list of all MIME types that will be considered to
potentially match the representation for the purposes of content
negotiation. A value of null
is equivalent to a single item
list containing only the primary content type.isSelectableByType
- if true
, indicates that the MIME content
type can be used as an alias to select the representation.Method Detail |
---|
public static AltFormat.Builder builder()
public static AltFormat.Builder builder(AltFormat format)
public java.lang.String getName()
alt
query parameter.
public WireFormat getWireFormat()
WireFormat
that is used to parse and generate the
representation or null
if no supporting wire format exists.
public ContentType getContentType()
public java.util.List<ContentType> getMatchingTypes()
public boolean isSelectableByType()
true
, indicates that the MIME content type can be used as
an alias to select the representation.
public boolean allowInputFormat(AltFormat inputFormat)
true
if inputFormat
is allowed as input format when
this format with this format as the output format.
public boolean hasBaseFormat()
true
if this format is a variant, such as *-in-script.
public AltFormat getBaseFormat()
null
.
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |