|
Restlet Framework 2.2.3 OSGi Environments |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.engine.Helper
org.restlet.engine.converter.ConverterHelper
org.restlet.ext.emf.EmfConverter
public class EmfConverter
Converter between the XML/XMI/ECore and representation classes based on EMF.
Constructor Summary | |
---|---|
EmfConverter()
|
Method Summary | ||
---|---|---|
protected
|
create(MediaType mediaType,
T source)
Creates the marshaling EmfRepresentation . |
|
protected
|
create(Representation source)
Creates the unmarshaling EmfRepresentation . |
|
List<Class<?>> |
getObjectClasses(Variant source)
|
|
List<VariantInfo> |
getVariants(Class<?> source)
|
|
protected boolean |
isCompatible(Variant variant)
Indicates if the given variant is compatible with the media types supported by this converter. |
|
float |
score(Object source,
Variant target,
Resource resource)
|
|
|
score(Representation source,
Class<T> target,
Resource resource)
|
|
|
toObject(Representation source,
Class<T> target,
Resource resource)
|
|
Representation |
toRepresentation(Object source,
Variant target,
Resource resource)
|
|
|
updatePreferences(List<Preference<MediaType>> preferences,
Class<T> entity)
|
Methods inherited from class org.restlet.engine.converter.ConverterHelper |
---|
addObjectClass, addVariant, addVariants, getVariants, updatePreferences |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmfConverter()
Method Detail |
---|
protected <T extends EObject> EmfRepresentation<T> create(MediaType mediaType, T source)
EmfRepresentation
.
T
- mediaType
- The target media type.source
- The source object to marshal.
EmfRepresentation
.protected <T extends EObject> EmfRepresentation<T> create(Representation source)
EmfRepresentation
.
T
- source
- The source representation to unmarshal.
EmfRepresentation
.public List<Class<?>> getObjectClasses(Variant source)
getObjectClasses
in class ConverterHelper
public List<VariantInfo> getVariants(Class<?> source)
getVariants
in class ConverterHelper
protected boolean isCompatible(Variant variant)
variant
- The variant.
public float score(Object source, Variant target, Resource resource)
score
in class ConverterHelper
public <T> float score(Representation source, Class<T> target, Resource resource)
score
in class ConverterHelper
public <T> T toObject(Representation source, Class<T> target, Resource resource) throws IOException
toObject
in class ConverterHelper
IOException
public Representation toRepresentation(Object source, Variant target, Resource resource)
toRepresentation
in class ConverterHelper
public <T> void updatePreferences(List<Preference<MediaType>> preferences, Class<T> entity)
updatePreferences
in class ConverterHelper
|
Restlet Framework 2.2.3 OSGi Environments |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |