|
||||||||||
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,
Document xmlDocument)
Constructor from an existing DOM document. |
|
DomRepresentation(Representation xmlRepresentation)
Constructor. |
Method Summary | |
---|---|
protected Transformer |
createTransformer()
Creates a new JAXP Transformer object that will be used to serialize this DOM. |
Document |
getDocument()
Returns the wrapped DOM document. |
DOMSource |
getDomSource()
Returns a DOM source. |
InputSource |
getInputSource()
Returns the XML representation as a SAX input source. |
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(Document dom)
Sets the wrapped DOM document. |
void |
setIndenting(boolean indenting)
Indicates if the XML serialization should be indented. |
void |
write(Writer writer)
|
Methods inherited from class org.restlet.representation.WriterRepresentation |
---|
getReader |
Methods inherited from class org.restlet.representation.CharacterRepresentation |
---|
getChannel, getStream, write, write |
Methods inherited from class org.restlet.representation.Representation |
---|
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, 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, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, 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 IOException
MediaType.TEXT_XML
media type.
IOException
public DomRepresentation(MediaType mediaType) throws IOException
mediaType
- The representation's media type.
IOException
public DomRepresentation(MediaType mediaType, 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 |
---|
protected Transformer createTransformer() throws IOException
IOException
public Document getDocument() throws IOException
getDocument
in class XmlRepresentation
IOException
public DOMSource getDomSource() throws IOException
getDomSource
in class XmlRepresentation
IOException
public InputSource getInputSource() throws IOException
XmlRepresentation
getInputSource
in class XmlRepresentation
IOException
public boolean isIndenting()
public void release()
release
in class XmlRepresentation
public void setDocument(Document dom)
dom
- The wrapped DOM document.public void setIndenting(boolean indenting)
indenting
- True if the XML serialization should be indented.public void write(Writer writer) throws IOException
write
in class Representation
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |