|
||||||||||
| 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
name.pehl.piriti.restlet.xml.client.PiritiXmlRepresentation<T>
T - The model typepublic class PiritiXmlRepresentation<T>
Representation which uses an XmlReader for converting XML to an
instance of T.
TODO Namespace support!
| Field Summary |
|---|
| Fields inherited from class org.restlet.client.representation.Representation |
|---|
UNKNOWN_SIZE |
| Constructor Summary | |
|---|---|
PiritiXmlRepresentation(XmlReader<T> xmlReader,
org.restlet.client.data.MediaType mediaType)
Constructor for an empty document. |
|
PiritiXmlRepresentation(XmlReader<T> xmlReader,
org.restlet.client.data.MediaType mediaType,
name.pehl.totoe.xml.client.Document document)
Constructor from an existing DOM document. |
|
PiritiXmlRepresentation(XmlReader<T> xmlReader,
org.restlet.client.representation.Representation xmlRepresentation)
Constructor. |
|
| Method Summary | |
|---|---|
com.google.gwt.xml.client.Document |
getDocument()
Returns always null. |
T |
getModel()
Converts the XML to an instance of T using the XmlReader given as
constructor argument. |
List<T> |
getModels()
Converts the XML to a list of Ts using the XmlReader given as
constructor argument. |
XmlReader<T> |
getXmlReader()
|
protected name.pehl.totoe.xml.client.Document |
lazyGetDocument()
Returns the wrapped document instance. |
| Methods inherited from class org.restlet.client.ext.xml.DomRepresentation |
|---|
getReader, getStream, getText, release, setDocument |
| 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 PiritiXmlRepresentation(XmlReader<T> xmlReader,
org.restlet.client.data.MediaType mediaType)
xmlReader - The XmlReader for converting the XML to an instance of T.mediaType - The representation's media type.
public PiritiXmlRepresentation(XmlReader<T> xmlReader,
org.restlet.client.data.MediaType mediaType,
name.pehl.totoe.xml.client.Document document)
xmlReader - The XmlReader for converting the XML to an instance of T.mediaType - The representation's media type.document - The source DOM document.
public PiritiXmlRepresentation(XmlReader<T> xmlReader,
org.restlet.client.representation.Representation xmlRepresentation)
xmlReader - The XmlReader for converting the XML to an instance of T.xmlRepresentation - A source XML representation to parse.| Method Detail |
|---|
public XmlReader<T> getXmlReader()
public T getModel()
throws IOException
XmlReader given as
constructor argument. Returns null if getDocument() or
XmlReader is null.
getModel in interface PiritiRepresentation<T>getDocument() or
XmlReader is null.
IOException
public List<T> getModels()
throws IOException
XmlReader given as
constructor argument. Returns null if getDocument() or
XmlReader is null. More precisely the child elements of the
documents root element are converted to instances of T.
getModels in interface PiritiRepresentation<T>getDocument() or
XmlReader is null.
IOException
protected name.pehl.totoe.xml.client.Document lazyGetDocument()
throws IOException
null.
IOException
public com.google.gwt.xml.client.Document getDocument()
throws IOException
null.
getDocument in class org.restlet.client.ext.xml.DomRepresentationnull
IOExceptionDomRepresentation.getDocument()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||