public class Text extends CommonAttributes
Represents an atomTextConstruct element.
Per RFC4287:
A Text construct contains human-readable text, usually in small quantities. The content of Text constructs is Language-Sensitive. atomPlainTextConstruct = atomCommonAttributes, attribute type { "text" | "html" }?, text atomXHTMLTextConstruct = atomCommonAttributes, attribute type { "xhtml" }, xhtmlDiv atomTextConstruct = atomPlainTextConstruct | atomXHTMLTextConstruct
Modifier and Type | Field and Description |
---|---|
protected JAXBContextFinder |
finder |
Constructor and Description |
---|
Text() |
Text(String text) |
Text(String text,
String type) |
Modifier and Type | Method and Description |
---|---|
Element |
getElement()
Get content as an XML Element if the content is XML.
|
Object |
getJAXBObject()
Returns previous extracted jaxbobject from a call to getJAXBObject(Class
|
<T> T |
getJAXBObject(Class<T> clazz,
Class... otherPossibleClasses)
Extract the content as the provided JAXB annotated type.
|
String |
getRawType() |
String |
getText()
If content is text, return it as a String.
|
MediaType |
getType()
Mime type
|
List<Object> |
getValue() |
void |
setElement(Element element)
Set the content to an XML Element
|
protected void |
setFinder(JAXBContextFinder finder) |
void |
setJAXBObject(Object obj) |
void |
setRawType(String type) |
void |
setText(String text)
Set content as text
|
void |
setType(MediaType type) |
void |
setValue(List<Object> value) |
getBase, getExtensionAttributes, getLanguage, setBase, setLanguage
protected JAXBContextFinder finder
public Text()
public Text(String text)
protected void setFinder(JAXBContextFinder finder)
public MediaType getType()
public void setType(MediaType type)
public String getRawType()
public void setRawType(String type)
public String getText()
public void setText(String text)
text
- public Element getElement()
public void setElement(Element element)
element
- public <T> T getJAXBObject(Class<T> clazz, Class... otherPossibleClasses) throws JAXBException
clazz
- class type you are expectingotherPossibleClasses
- Other classe you want to create the JAXBContext withJAXBException
public Object getJAXBObject()
public void setJAXBObject(Object obj)
Copyright © 2016 JBoss by Red Hat. All rights reserved.