|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.resource.Variant
public class Variant
Descriptor for available representations of a resource. It contains all the important metadata about a representation but is not able to actually serve the representation's content itself. For this, you need to use the Representation subclass.
Field Summary | |
---|---|
static long |
UNKNOWN_SIZE
Indicates that the size of the representation can't be known in advance. |
Constructor Summary | |
---|---|
Variant()
Default constructor. |
|
Variant(MediaType mediaType)
Constructor. |
Method Summary | |
---|---|
CharacterSet |
getCharacterSet()
Returns the character set or null if not applicable. |
List<Encoding> |
getEncodings()
Returns the list of encodings applied to the entity-body. |
Date |
getExpirationDate()
Returns the future date when this representation expire. |
Reference |
getIdentifier()
Returns an optional identifier. |
List<Language> |
getLanguages()
Returns the list of languages. |
MediaType |
getMediaType()
Returns the media type. |
Date |
getModificationDate()
Returns the last date when this representation was modified. |
long |
getSize()
Returns the size in bytes if known, UNKNOWN_SIZE (-1) otherwise. |
Tag |
getTag()
Returns the tag. |
void |
setCharacterSet(CharacterSet characterSet)
Sets the character set or null if not applicable. |
void |
setExpirationDate(Date expirationDate)
Sets the future date when this representation expire. |
void |
setIdentifier(Reference identifier)
Sets the optional identifier. |
void |
setIdentifier(String identifierUri)
Sets the identifier from a URI string. |
void |
setMediaType(MediaType mediaType)
Sets the media type. |
void |
setModificationDate(Date modificationDate)
Sets the last date when this representation was modified. |
void |
setSize(long expectedSize)
Sets the expected size in bytes if known, -1 otherwise. |
void |
setTag(Tag tag)
Sets the tag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long UNKNOWN_SIZE
Constructor Detail |
---|
public Variant()
public Variant(MediaType mediaType)
mediaType
- The media type.Method Detail |
---|
public CharacterSet getCharacterSet()
public List<Encoding> getEncodings()
public Date getExpirationDate()
public List<Language> getLanguages()
public MediaType getMediaType()
public Date getModificationDate()
public long getSize()
public Tag getTag()
public void setCharacterSet(CharacterSet characterSet)
characterSet
- The character set or null if not applicable.public void setExpirationDate(Date expirationDate)
expirationDate
- The expiration date.public void setMediaType(MediaType mediaType)
mediaType
- The media type.public void setModificationDate(Date modificationDate)
modificationDate
- The modification date.public void setSize(long expectedSize)
expectedSize
- The expected size in bytes if known, -1 otherwise.public void setTag(Tag tag)
tag
- The tag.public Reference getIdentifier()
public void setIdentifier(Reference identifier)
identifier
- The identifier.public void setIdentifier(String identifierUri)
identifierUri
- The identifier to parse.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |