org.intabulas.sandler.elements.impl
Class ContentImpl

java.lang.Object
  extended by org.intabulas.sandler.elements.impl.ContentImpl
All Implemented Interfaces:
AtomElement, Content, ParseableEntity

public class ContentImpl
extends Object
implements Content, AtomElement

ContentImpl

Version:
$Id: ContentImpl.java,v 1.7 2004/01/02 01:43:57 intabulas Exp $
Author:
Mark Lussier

Field Summary
 
Fields inherited from interface org.intabulas.sandler.elements.AtomElement
ATOM_NAMESPACE, ATOM_VERSION, ATTRIBUTE_HREF, ATTRIBUTE_LANG, ATTRIBUTE_LANG_NP, ATTRIBUTE_MODE, ATTRIBUTE_NAME, ATTRIBUTE_REL, ATTRIBUTE_TITLE, ATTRIBUTE_TYPE, ATTRIBUTE_URL, ATTRIBUTE_VERSION, ATTRIBUTE_XMLNS, CDATA_END, CDATA_START, ELEMENT_AUTHOR, ELEMENT_CONTENT, ELEMENT_CONTRIBUTOR, ELEMENT_COPYRIGHT, ELEMENT_CREATED, ELEMENT_EMAIL, ELEMENT_ENTRY, ELEMENT_FEED, ELEMENT_GENERATOR, ELEMENT_HOMEPAGE, ELEMENT_ID, ELEMENT_INFO, ELEMENT_ISSUED, ELEMENT_LINK, ELEMENT_MODIFIED, ELEMENT_NAME, ELEMENT_SUMMARY, ELEMENT_TAGLINE, ELEMENT_TITLE, ELEMENT_URL, FORMAT_COMMENT, FORMAT_ENDELEMENT, FORMAT_FEEDATTRIBUTES, FORMAT_NAMEATTRIBUTE, FORMAT_STARTELEMENT, FORMAT_STRINGELEMENT, HTMLTAG_BEGIN, HTMLTAG_CLOSE, HTMLTAG_END, HTMLTAG_START, SPACE, XML_STARTDOC
 
Constructor Summary
ContentImpl()
           
ContentImpl(String tagname)
           
ContentImpl(String content, String tagname)
           
 
Method Summary
 String getBody()
          Returns the actual entry content
 String getLanguage()
          Retutns the language of the body content (xml:lang)
 String getMimeType()
          Returns the MIME Type format of the body content
 String getMode()
          Returns the method used to encode the body content (ie: xml, escaped, base64)
 void loadDocument(org.xmlpull.v1.XmlPullParser parser)
          Extract relevant content from the parser stream
 void setBody(String content)
          Set's the entry content
 void setLanguage(String language)
          Sets the language of the body content (xml:lang)
 void setMimeType(String mimeType)
          Set's the MIME Type format of the body content
 void setMode(String mode)
          Set's the method used to encode the body content (ie: xml, escaped, base64)
 void setTagName(String tagame)
          Set's the content tag name
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentImpl

public ContentImpl()

ContentImpl

public ContentImpl(String tagname)

ContentImpl

public ContentImpl(String content,
                   String tagname)
Method Detail

getMimeType

public String getMimeType()
Returns the MIME Type format of the body content

Specified by:
getMimeType in interface Content
Returns:
a String representing the MIME Type

setMimeType

public void setMimeType(String mimeType)
Set's the MIME Type format of the body content

Specified by:
setMimeType in interface Content
Parameters:
mimeType - a String representing the MIME Type

getMode

public String getMode()
Returns the method used to encode the body content (ie: xml, escaped, base64)

Specified by:
getMode in interface Content
Returns:
a String representing the encoding

setMode

public void setMode(String mode)
Set's the method used to encode the body content (ie: xml, escaped, base64)

Specified by:
setMode in interface Content
Parameters:
mode - a String representing the encoding

getLanguage

public String getLanguage()
Retutns the language of the body content (xml:lang)

Specified by:
getLanguage in interface Content
Returns:
a String representing the content language

setLanguage

public void setLanguage(String language)
Sets the language of the body content (xml:lang)

Specified by:
setLanguage in interface Content
Parameters:
language - a String representing the content language

getBody

public String getBody()
Returns the actual entry content

Specified by:
getBody in interface Content
Returns:
content a String representing the body content

setBody

public void setBody(String content)
Set's the entry content

Specified by:
setBody in interface Content
Parameters:
content - a String representing the body content

setTagName

public void setTagName(String tagame)
Set's the content tag name

Specified by:
setTagName in interface Content
Parameters:
tagame -

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a String representation of the object.

loadDocument

public void loadDocument(org.xmlpull.v1.XmlPullParser parser)
                  throws org.xmlpull.v1.XmlPullParserException
Extract relevant content from the parser stream

Specified by:
loadDocument in interface ParseableEntity
Parameters:
parser - the XML Pull Parser instabce
Throws:
org.xmlpull.v1.XmlPullParserException


Copyright © 2003-2004 Mark Lussier. All Rights Reserved.