public abstract class AbstractConverter
extends org.restlet.engine.converter.ConverterHelper
Modifier and Type | Field and Description |
---|---|
protected List<Class<?>> |
classes |
protected List<org.restlet.engine.resource.VariantInfo> |
variants |
Constructor and Description |
---|
AbstractConverter() |
Modifier and Type | Method and Description |
---|---|
protected abstract TopicMapReaderIF |
getFragmentReader(InputStream stream,
LocatorIF base_address) |
List<Class<?>> |
getObjectClasses(org.restlet.representation.Variant source) |
List<org.restlet.engine.resource.VariantInfo> |
getVariants(Class<?> source) |
protected <T> T |
objectFromFragment(TopicMapIF fragment,
Class<T> target,
org.restlet.resource.Resource resource) |
float |
score(Object source,
org.restlet.representation.Variant target,
org.restlet.resource.Resource resource) |
<T> float |
score(org.restlet.representation.Representation source,
Class<T> target,
org.restlet.resource.Resource resource) |
<T> T |
toObject(org.restlet.representation.Representation source,
Class<T> target,
org.restlet.resource.Resource resource) |
org.restlet.representation.Representation |
toRepresentation(Object source,
org.restlet.representation.Variant target,
org.restlet.resource.Resource resource) |
protected abstract void |
writeFragment(OutputStream outputStream,
Object source,
org.restlet.data.CharacterSet characterSet) |
protected List<org.restlet.engine.resource.VariantInfo> variants
public List<Class<?>> getObjectClasses(org.restlet.representation.Variant source)
getObjectClasses
in class org.restlet.engine.converter.ConverterHelper
public List<org.restlet.engine.resource.VariantInfo> getVariants(Class<?> source) throws IOException
getVariants
in class org.restlet.engine.converter.ConverterHelper
IOException
public float score(Object source, org.restlet.representation.Variant target, org.restlet.resource.Resource resource)
score
in class org.restlet.engine.converter.ConverterHelper
public <T> float score(org.restlet.representation.Representation source, Class<T> target, org.restlet.resource.Resource resource)
score
in class org.restlet.engine.converter.ConverterHelper
public <T> T toObject(org.restlet.representation.Representation source, Class<T> target, org.restlet.resource.Resource resource) throws IOException
toObject
in class org.restlet.engine.converter.ConverterHelper
IOException
public org.restlet.representation.Representation toRepresentation(Object source, org.restlet.representation.Variant target, org.restlet.resource.Resource resource) throws IOException
toRepresentation
in class org.restlet.engine.converter.ConverterHelper
IOException
protected abstract TopicMapReaderIF getFragmentReader(InputStream stream, LocatorIF base_address)
protected abstract void writeFragment(OutputStream outputStream, Object source, org.restlet.data.CharacterSet characterSet) throws IOException
IOException
protected <T> T objectFromFragment(TopicMapIF fragment, Class<T> target, org.restlet.resource.Resource resource)