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).
Modifier and Type | Method and Description |
---|---|
Document<T> |
addProcessingInstruction(java.lang.String target,
java.lang.String value)
Add a processing instruction to the document
|
Document<T> |
addStylesheet(java.lang.String href,
java.lang.String media)
Add a xml-stylesheet processing instruction to the document
|
IRI |
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
|
EntityTag |
getEntityTag()
Return the entity tag for this document
|
java.lang.String |
getLanguage()
Get the language
|
Lang |
getLanguageTag()
Returns the value of the xml:lang attribute as a Lang object
|
java.util.Date |
getLastModified()
Returns the last modified date for this document
|
boolean |
getMustPreserveWhitespace()
Return true if insignificant whitespace must be preserved
|
java.lang.String[] |
getProcessingInstruction(java.lang.String target)
Get the values for the given processing instruction
|
T |
getRoot()
Returns the root element of the document (equivalent to DOM's getDocumentElement)
|
java.lang.String |
getSlug()
Get the slug for this document
|
XmlUtil.XMLVersion |
getXmlVersion()
Get the XMLVersion used by this document
|
Document<T> |
setBaseUri(java.lang.String base)
Sets the Base URI of the document.
|
Document<T> |
setCharset(java.lang.String charset)
Sets the charset used for this document
|
Document<T> |
setContentType(java.lang.String contentType)
Sets the content type for this document
|
Document<T> |
setEntityTag(EntityTag tag)
Set the entity tag for this document
|
Document<T> |
setEntityTag(java.lang.String tag)
Set the entity tag for this document
|
Document<T> |
setLanguage(java.lang.String lang)
set the base language
|
Document<T> |
setLastModified(java.util.Date lastModified)
Sets the last modified date for this document
|
Document<T> |
setMustPreserveWhitespace(boolean preserve)
Set to true to preserve insignificant whitespace
|
Document<T> |
setRoot(T root)
Sets the root element of the document
|
Document<T> |
setSlug(java.lang.String slug)
Set the slug for this document
|
T getRoot()
Document<T> setRoot(T root)
root
- Set the root element of the documentIRI getBaseUri()
Document<T> setBaseUri(java.lang.String base)
base
- The Base URIIRISyntaxException
- if the IRI is malformedjavax.activation.MimeType getContentType()
Document<T> setContentType(java.lang.String contentType)
contentType
- The content type of documentMimeTypeParseException
- if the content type is malformedjava.util.Date getLastModified()
Document<T> setLastModified(java.util.Date lastModified)
lastModified
- the last-modified datejava.lang.String getCharset()
Document<T> setCharset(java.lang.String charset)
charset
- The character encoding to useDocument<T> addProcessingInstruction(java.lang.String target, java.lang.String value)
target
- The processing instruction targetvalue
- The processing instruction valuejava.lang.String[] getProcessingInstruction(java.lang.String target)
Document<T> addStylesheet(java.lang.String href, java.lang.String media)
href
- The href of the stylesheetmedia
- The media target for this stylesheet or null if noneEntityTag getEntityTag()
java.lang.String getLanguage()
Lang getLanguageTag()
java.lang.String getSlug()
boolean getMustPreserveWhitespace()
Document<T> setMustPreserveWhitespace(boolean preserve)
XmlUtil.XMLVersion getXmlVersion()
Copyright © 2010 - 2020 Adobe. All Rights Reserved