|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.client.representation.Variant
org.restlet.client.representation.RepresentationInfo
org.restlet.client.representation.Representation
org.restlet.client.ext.xml.DomRepresentation
public class DomRepresentation
XML representation based on an XML DOM document. DOM is a standard XML object model defined by the W3C.
Field Summary |
---|
Fields inherited from class org.restlet.client.representation.Representation |
---|
UNKNOWN_SIZE |
Constructor Summary | |
---|---|
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 | |
---|---|
Document |
getDocument()
Returns the wrapped DOM document. |
java.io.Reader |
getReader()
|
java.io.InputStream |
getStream()
|
java.lang.String |
getText()
|
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. |
Methods inherited from class org.restlet.client.representation.Representation |
---|
createEmpty, exhaust, getAvailableSize, getDisposition, getDownloadName, getExpirationDate, getRange, getSize, isAvailable, isDownloadable, isTransient, setAvailable, setDisposition, setDownloadable, setDownloadName, setExpirationDate, setRange, setSize, setTransient |
Methods inherited from class org.restlet.client.representation.RepresentationInfo |
---|
getModificationDate, getTag, setModificationDate, setTag |
Methods inherited from class org.restlet.client.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(MediaType mediaType)
mediaType
- The representation's media type.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 |
---|
public Document getDocument() throws java.io.IOException
java.io.IOException
public java.io.Reader getReader() throws java.io.IOException
getReader
in class Representation
java.io.IOException
public java.io.InputStream getStream() throws java.io.IOException
getStream
in class Representation
java.io.IOException
public java.lang.String getText() throws java.io.IOException
getText
in class Representation
java.io.IOException
public void release()
release
in class Representation
public void setDocument(Document dom)
dom
- The wrapped DOM document.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |