|
||||||||||
| 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.jibx.JibxRepresentation<T>
T - The type to wrap.public class JibxRepresentation<T>
An XML representation based on JiBX that provides easy translation between XML representations and Java objects with JiBX bindings.
| Field Summary |
|---|
| Fields inherited from class org.restlet.representation.Representation |
|---|
UNKNOWN_SIZE |
| Constructor Summary | |
|---|---|
JibxRepresentation(MediaType mediaType,
T object)
Creates a JIBX representation from an existing Java object. |
|
JibxRepresentation(MediaType mediaType,
T object,
String bindingName)
Creates a JIBX representation from an existing Java object. |
|
JibxRepresentation(Representation xmlRepresentation,
Class<?> bindingClass)
Creates a new JIBX representation, that can be used to convert the input XML into a Java object. |
|
JibxRepresentation(Representation xmlRepresentation,
Class<?> bindingClass,
String bindingName)
Creates a new JIBX representation, that can be used to convert the input XML into a Java object. |
|
| Method Summary | |
|---|---|
T |
getObject()
Returns the wrapped Java object. |
void |
setObject(T object)
Sets the wrapped Java object. |
void |
write(Writer writer)
Marshals the document and writes the representation to a stream of characters. |
| 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, release, 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 JibxRepresentation(MediaType mediaType,
T object)
mediaType - The representation's media type (usually
MediaType.APPLICATION_XML or MediaType.TEXT_XML).object - The Java object.
public JibxRepresentation(MediaType mediaType,
T object,
String bindingName)
mediaType - The representation's media type (usually
MediaType.APPLICATION_XML or MediaType.TEXT_XML).object - The Java object.bindingName - The name of the JIBX binding to use.
public JibxRepresentation(Representation xmlRepresentation,
Class<?> bindingClass)
xmlRepresentation - The XML wrapped in a representation.bindingClass - The Target Java class for binding.
public JibxRepresentation(Representation xmlRepresentation,
Class<?> bindingClass,
String bindingName)
xmlRepresentation - The XML wrapped in a representation.bindingClass - The Target Java class for binding.bindingName - The name of the JIBX binding to use.| Method Detail |
|---|
public T getObject()
throws JiBXException,
IOException
JiBXException - If unmarshalling XML with JIBX fails.
IOException - If any error occurs attempting to get the stream of the
xmlRepresentation.public void setObject(T object)
object - The Java object to set.
public void write(Writer writer)
throws IOException
write in class Representationwriter - The writer to use when writing.
IOException - If any error occurs attempting to write the stream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||