public class Content extends CommonAttributes
Represents an atom:content element.
Per RFC4287:
The "atom:content" element either contains or links to the content of the entry. The content of atom:content is Language-Sensitive. atomInlineTextContent = element atom:content { atomCommonAttributes, attribute type { "text" | "html" }?, (text)* } atomInlineXHTMLContent = element atom:content { atomCommonAttributes, attribute type { "xhtml" }, xhtmlDiv } atomInlineOtherContent = element atom:content { atomCommonAttributes, attribute type { atomMediaType }?, (text|anyElement)* } atomOutOfLineContent = element atom:content { atomCommonAttributes, attribute type { atomMediaType }?, attribute src { atomUri }, empty } atomContent = atomInlineTextContent | atomInlineXHTMLContent | atomInlineOtherContent | atomOutOfLineContent
Modifier and Type | Field and Description |
---|---|
private org.w3c.dom.Element |
element |
protected JAXBContextFinder |
finder |
private java.lang.Object |
jaxbObject |
private javax.ws.rs.core.MediaType |
mediaType |
private java.net.URI |
src |
private java.lang.String |
text |
private java.lang.String |
type |
private java.util.List<java.lang.Object> |
value |
Constructor and Description |
---|
Content() |
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Element |
getElement()
Get content as an XML Element if the content is XML.
|
java.lang.Object |
getJAXBObject()
Returns previous extracted jaxbobject from a call to getJAXBObject(Class
|
<T> T |
getJAXBObject(java.lang.Class<T> clazz,
java.lang.Class... otherPossibleClasses)
Extract the content as the provided JAXB annotated type.
|
java.lang.String |
getRawType() |
java.net.URI |
getSrc() |
java.lang.String |
getText()
If content is text, return it as a String.
|
javax.ws.rs.core.MediaType |
getType()
Mime type of the content
|
java.util.List<java.lang.Object> |
getValue() |
void |
setElement(org.w3c.dom.Element element)
Set the content to an XML Element
|
protected void |
setFinder(JAXBContextFinder finder) |
void |
setJAXBObject(java.lang.Object obj) |
void |
setRawType(java.lang.String type) |
void |
setSrc(java.net.URI src) |
void |
setText(java.lang.String text)
Set content as text
|
void |
setType(javax.ws.rs.core.MediaType type) |
void |
setValue(java.util.List<java.lang.Object> value) |
getBase, getExtensionAttributes, getLanguage, setBase, setLanguage
private java.lang.String type
private javax.ws.rs.core.MediaType mediaType
private java.lang.String text
private org.w3c.dom.Element element
private java.net.URI src
private java.util.List<java.lang.Object> value
private java.lang.Object jaxbObject
protected JAXBContextFinder finder
protected void setFinder(JAXBContextFinder finder)
public java.util.List<java.lang.Object> getValue()
public void setValue(java.util.List<java.lang.Object> value)
public java.net.URI getSrc()
public void setSrc(java.net.URI src)
public javax.ws.rs.core.MediaType getType()
public void setType(javax.ws.rs.core.MediaType type)
public java.lang.String getRawType()
public void setRawType(java.lang.String type)
public java.lang.String getText()
public void setText(java.lang.String text)
text
- public org.w3c.dom.Element getElement()
public void setElement(org.w3c.dom.Element element)
element
- public <T> T getJAXBObject(java.lang.Class<T> clazz, java.lang.Class... otherPossibleClasses) throws javax.xml.bind.JAXBException
clazz
- class type you are expectingotherPossibleClasses
- Other classe you want to create the JAXBContext withjavax.xml.bind.JAXBException
public java.lang.Object getJAXBObject()
public void setJAXBObject(java.lang.Object obj)