|
||||||||||
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. |
Reader |
getReader()
|
InputStream |
getStream()
|
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 |
---|
append, exhaust, getAvailableSize, getDisposition, getExpirationDate, getRange, getSize, hasKnownSize, isAvailable, isEmpty, isTransient, setAvailable, setDisposition, 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, 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(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 IOException
IOException
public Reader getReader() throws IOException
getReader
in class Representation
IOException
public InputStream getStream() throws IOException
getStream
in class Representation
IOException
public String getText() throws IOException
getText
in class Representation
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 |