|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.representation.Variant
org.restlet.representation.RepresentationInfo
org.restlet.representation.Representation
org.restlet.representation.CharacterRepresentation
org.restlet.representation.WriterRepresentation
org.restlet.ext.xml.XmlRepresentation
org.restlet.ext.xml.DomRepresentation
public class DomRepresentation
XML representation based on a DOM document. DOM is a standard XML object model defined by the W3C.
Field Summary |
---|
Fields inherited from class org.restlet.representation.Representation |
---|
UNKNOWN_SIZE |
Constructor Summary | |
---|---|
DomRepresentation()
Default constructor. |
|
DomRepresentation(MediaType mediaType)
Constructor for an empty document. |
|
DomRepresentation(MediaType mediaType,
org.w3c.dom.Document xmlDocument)
Constructor from an existing DOM document. |
|
DomRepresentation(Representation xmlRepresentation)
Constructor. |
Method Summary | |
---|---|
org.w3c.dom.Document |
getDocument()
Returns the wrapped DOM document. |
org.xml.sax.InputSource |
getInputSource()
Returns the XML representation as a SAX input source. |
boolean |
isIndent()
Deprecated. Use isIndenting() instead. |
boolean |
isIndenting()
Indicates if the XML serialization should be indented. |
void |
release()
Releases the wrapped DOM document and the source XML representation if they have been defined. |
void |
setDocument(org.w3c.dom.Document dom)
Sets the wrapped DOM document. |
void |
setIndent(boolean indenting)
Deprecated. Use setIndenting(boolean) instead. |
void |
setIndenting(boolean indenting)
Indicates if the XML serialization should be indented. |
void |
write(java.io.Writer writer)
|
Methods inherited from class org.restlet.representation.WriterRepresentation |
---|
getReader, write |
Methods inherited from class org.restlet.representation.CharacterRepresentation |
---|
getChannel, getStream, write |
Methods inherited from class org.restlet.representation.Representation |
---|
checkDigest, checkDigest, computeDigest, createEmpty, exhaust, getAvailableSize, getDigest, getDisposition, getDownloadName, getExpirationDate, getRange, getSize, getText, isAvailable, isDownloadable, isTransient, setAvailable, setDigest, setDisposition, setDownloadable, setDownloadName, setExpirationDate, setRange, setSize, setTransient |
Methods inherited from class org.restlet.representation.RepresentationInfo |
---|
getModificationDate, getTag, setModificationDate, setTag |
Methods inherited from class org.restlet.representation.Variant |
---|
createClientInfo, equals, getCharacterSet, getEncodings, getIdentifier, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setIdentifier, setIdentifier, setLanguages, setLocationRef, setLocationRef, setMediaType, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DomRepresentation() throws java.io.IOException
MediaType.TEXT_XML
media type.
java.io.IOException
public DomRepresentation(MediaType mediaType) throws java.io.IOException
mediaType
- The representation's media type.
java.io.IOException
public DomRepresentation(MediaType mediaType, org.w3c.dom.Document xmlDocument)
mediaType
- The representation's media type.xmlDocument
- The source DOM document.public DomRepresentation(Representation xmlRepresentation)
xmlRepresentation
- A source XML representation to parse.Method Detail |
---|
public org.w3c.dom.Document getDocument() throws java.io.IOException
getDocument
in class XmlRepresentation
java.io.IOException
public org.xml.sax.InputSource getInputSource() throws java.io.IOException
XmlRepresentation
getInputSource
in class XmlRepresentation
java.io.IOException
@Deprecated public boolean isIndent()
isIndenting()
instead.
public boolean isIndenting()
public void release()
release
in class XmlRepresentation
public void setDocument(org.w3c.dom.Document dom)
dom
- The wrapped DOM document.@Deprecated public void setIndent(boolean indenting)
setIndenting(boolean)
instead.
indenting
- True if the XML serialization should be indented.public void setIndenting(boolean indenting)
indenting
- True if the XML serialization should be indented.public void write(java.io.Writer writer) throws java.io.IOException
write
in class Representation
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |