org.restlet.ext.atom
Class Text

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

public class Text
extends java.lang.Object

A Text construct contains human-readable text, usually in small quantities. The content of Text constructs is Language-Sensitive.

Author:
Jerome Louvel

Constructor Summary
Text(MediaType type)
          Constructor.
Text(MediaType type, java.lang.String content)
          Constructor.
 
Method Summary
 java.lang.String getContent()
          Returns the content.
 MediaType getType()
          Returns the content type.
 void setContent(java.lang.String content)
          Sets the content.
 void setType(MediaType type)
          Sets the content type.
static void writeElement(XmlWriter writer, java.util.Date date, java.lang.String namespace, java.lang.String localName)
          Writes the current object as an XML element using the given SAX writer.
 void writeElement(XmlWriter writer, java.lang.String localName)
          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

Text

public Text(MediaType type)
Constructor.

Parameters:
type - The content type.

Text

public Text(MediaType type,
            java.lang.String content)
Constructor.

Parameters:
type - The content type.
content - The content.
Method Detail

writeElement

public static void writeElement(XmlWriter writer,
                                java.util.Date date,
                                java.lang.String namespace,
                                java.lang.String localName)
                         throws org.xml.sax.SAXException
Writes the current object as an XML element using the given SAX writer.

Parameters:
writer - The SAX writer.
namespace - The element namespace URI.
localName - The local name of the element.
Throws:
org.xml.sax.SAXException

getContent

public java.lang.String getContent()
Returns the content.

Returns:
The content.

getType

public MediaType getType()
Returns the content type.

Returns:
The content type.

setContent

public void setContent(java.lang.String content)
Sets the content.

Parameters:
content - The content.

setType

public void setType(MediaType type)
Sets the content type.

Parameters:
type - The content type.

writeElement

public void writeElement(XmlWriter writer,
                         java.lang.String localName)
                  throws org.xml.sax.SAXException
Writes the current object as an XML element using the given SAX writer.

Parameters:
writer - The SAX writer.
localName - The local name of the element.
Throws:
org.xml.sax.SAXException


Copyright © 2005-2008 Noelios Technologies.