Package org.restlet.ext.atom
Class Text
- java.lang.Object
-
- 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getContent()
Returns the content.org.restlet.data.MediaType
getType()
Returns the content type.void
setContent(java.lang.String content)
Sets the content.void
setType(org.restlet.data.MediaType type)
Sets the content type.java.lang.String
toString()
void
writeElement(XmlWriter writer, java.lang.String localName)
Writes the current object as an XML element using the given SAX writer.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.
-
-
-
Constructor Detail
-
Text
public Text(org.restlet.data.MediaType type)
Constructor.- Parameters:
type
- The content type.
-
Text
public Text(org.restlet.data.MediaType type, java.lang.String content)
Constructor.- Parameters:
type
- The content type.content
- The content.
-
Text
public Text(java.lang.String content)
Constructor.- Parameters:
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 org.restlet.data.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(org.restlet.data.MediaType type)
Sets the content type.- Parameters:
type
- The content type.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
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
-
-