| java.lang.Object org.purl.sword.base.XmlElement org.w3.atom.TextConstruct
All known Subclasses: org.w3.atom.Title, org.w3.atom.Rights, org.w3.atom.Summary,
TextConstruct | public class TextConstruct extends XmlElement implements SwordElementInterface(Code) | | Represents a text construct in the ATOM elements. This is a superclass of
several elements within this implementation.
author: Neil Taylor |
Method Summary | |
public String | getContent() Get the content in this TextConstruct. | public ContentType | getType() Get the type. | public Element | marshall() Marshall the data in this object to an Element object. | public void | setContent(String content) Set the content. | public void | setType(ContentType type) Set the type. | public void | unmarshall(Element text) Unmarshall the text element into this object.
This unmarshaller only handles plain text content, although it can
recognise the three different type elements of text, html and xhtml. |
TextConstruct | public TextConstruct(String prefix, String name)(Code) | | Create a new instance, specifying the prefix and local name.
Parameters: prefix - The prefix. Parameters: name - The local name. |
TextConstruct | public TextConstruct(String name)(Code) | | Create a new instance. Set the default type to TextConstructType.TEXT.
Parameters: name - The name that will be applied. |
getContent | public String getContent()(Code) | | Get the content in this TextConstruct.
The content, expressed as a string. |
marshall | public Element marshall()(Code) | | Marshall the data in this object to an Element object.
The data expressed in an Element. |
setContent | public void setContent(String content)(Code) | | Set the content. This only supports text content.
Parameters: content - The content. |
setType | public void setType(ContentType type)(Code) | | Set the type.
Parameters: type - The type. |
unmarshall | public void unmarshall(Element text) throws UnmarshallException(Code) | | Unmarshall the text element into this object.
This unmarshaller only handles plain text content, although it can
recognise the three different type elements of text, html and xhtml. This
is an area that can be improved in a future implementation, if necessary.
Parameters: text - The text element. throws: UnmarshallException - If the specified element is not ofthe correct type, where the localname is usedto specify the valid name. Also thrown if there is an issue accessing the data. |
|
|