org.apache.abdera.model
Interface Document<T extends Element>

All Superinterfaces:
Base, java.lang.Cloneable, java.io.Serializable

public interface Document<T extends Element>
extends Base, java.io.Serializable

The top level artifact of the Feed Object Model. The Parser component processes data from an InputStream and returns a Document instance. The type of Document returned depends on the XML format being parsed. The Feed Object Model supports four basic types of documents: FeedDocument, EntryDocument, ServiceDocument (Atom Publishing Protocol Introspection Documents) and XmlDocument (any arbitrary XML).


Method Summary
 java.net.URI getBaseUri()
          Returns the Base URI of the document.
 java.lang.String getCharset()
          Gets the charset used for this document
 javax.activation.MimeType getContentType()
          Returns the content type of this document
 java.util.Date getLastModified()
          Returns the last modified date for this document
 T getRoot()
          Returns the root element of the document (equivalent to DOM's getDocumentElement)
 void setBaseUri(java.lang.String base)
          Sets the Base URI of the document.
 void setCharset(java.lang.String charset)
          Sets the charset used for this document
 void setContentType(java.lang.String contentType)
          Sets the content type for this document
 void setLastModified(java.util.Date lastModified)
          Sets the last modified date for this document
 void setRoot(T root)
          Sets the root element of the document
 
Methods inherited from interface org.apache.abdera.model.Base
clone, getFactory, writeTo, writeTo
 

Method Detail

getRoot

T getRoot()
Returns the root element of the document (equivalent to DOM's getDocumentElement)


setRoot

void setRoot(T root)
Sets the root element of the document


getBaseUri

java.net.URI getBaseUri()
Returns the Base URI of the document. All relative URI's contained in the document will be resolved according to this base.


setBaseUri

void setBaseUri(java.lang.String base)
                throws java.net.URISyntaxException
Sets the Base URI of the document. All relative URI's contained in the document will be resolved according to this base.

Throws:
java.net.URISyntaxException

getContentType

javax.activation.MimeType getContentType()
Returns the content type of this document


setContentType

void setContentType(java.lang.String contentType)
                    throws javax.activation.MimeTypeParseException
Sets the content type for this document

Throws:
javax.activation.MimeTypeParseException

getLastModified

java.util.Date getLastModified()
Returns the last modified date for this document


setLastModified

void setLastModified(java.util.Date lastModified)
Sets the last modified date for this document


getCharset

java.lang.String getCharset()
Gets the charset used for this document


setCharset

void setCharset(java.lang.String charset)
Sets the charset used for this document