org.restlet.ext.atom
Class Content

java.lang.Object
  extended by org.restlet.ext.atom.Content

public class Content
extends Object

Either contains or links to the content of the entry.

Author:
Jerome Louvel

Constructor Summary
Content()
          Constructor.
 
Method Summary
 Reference getExternalRef()
          Returns the reference to the external representation.
 MediaType getExternalType()
          Returns the expected media type of the external content.
 Representation getInlineContent()
          Returns the representation for inline content.
 boolean isExternal()
          Indicates if the content is available externally.
 boolean isInline()
          Indicates if the content is available inline.
 boolean isToEncode()
          Returns true if the content is to be encoded.
 void setExternalRef(Reference externalRef)
          Sets the reference to the external representation.
 void setExternalType(MediaType externalType)
          Sets the expected media type of the external content.
 void setInlineContent(Representation inlineContent)
          Sets the representation for inline content.
 void setToEncode(boolean toEncode)
          Indicates if the content is to be encoded.
 void writeElement(XmlWriter writer)
          Writes the current object as an XML element using the given SAX writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Content

public Content()
Constructor.

Method Detail

getExternalRef

public Reference getExternalRef()
Returns the reference to the external representation.

Returns:
The reference to the external representation.

getExternalType

public MediaType getExternalType()
Returns the expected media type of the external content.

Returns:
The expected media type of the external content.

getInlineContent

public Representation getInlineContent()
Returns the representation for inline content.

Returns:
The representation for inline content.

isExternal

public boolean isExternal()
Indicates if the content is available externally.

Returns:
True if the content is available externally.

isInline

public boolean isInline()
Indicates if the content is available inline.

Returns:
True if the content is available inline.

isToEncode

public boolean isToEncode()
Returns true if the content is to be encoded.

Returns:
True if the content is to be encoded.

setExternalRef

public void setExternalRef(Reference externalRef)
Sets the reference to the external representation.

Parameters:
externalRef - The reference to the external representation.

setExternalType

public void setExternalType(MediaType externalType)
Sets the expected media type of the external content.

Parameters:
externalType - The expected media type of the external content.

setInlineContent

public void setInlineContent(Representation inlineContent)
Sets the representation for inline content.

Parameters:
inlineContent - The representation for inline content.

setToEncode

public void setToEncode(boolean toEncode)
Indicates if the content is to be encoded.

Parameters:
toEncode - True if the content is to be encoded.

writeElement

public void writeElement(XmlWriter writer)
                  throws SAXException
Writes the current object as an XML element using the given SAX writer.

Parameters:
writer - The SAX writer.
Throws:
SAXException


Copyright © 2005-2013 Restlet.