Class AbstractConverter
java.lang.Object
org.restlet.engine.Helper
org.restlet.engine.converter.ConverterHelper
net.ontopia.topicmaps.rest.converters.AbstractConverter
- Direct Known Subclasses:
CTMConverter,JTMConverter,LTMConverter,TMXMLConverter,XTMConverter
public abstract class AbstractConverter
extends org.restlet.engine.converter.ConverterHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TopicMapReaderIFgetFragmentReader(InputStream stream, LocatorIF base_address) getObjectClasses(org.restlet.representation.Variant source) List<org.restlet.engine.resource.VariantInfo>getVariants(Class<?> source) protected <T> TobjectFromFragment(TopicMapIF fragment, Class<T> target, org.restlet.resource.Resource resource) floatscore(Object source, org.restlet.representation.Variant target, org.restlet.resource.Resource resource) <T> floatscore(org.restlet.representation.Representation source, Class<T> target, org.restlet.resource.Resource resource) <T> TtoObject(org.restlet.representation.Representation source, Class<T> target, org.restlet.resource.Resource resource) org.restlet.representation.RepresentationtoRepresentation(Object source, org.restlet.representation.Variant target, org.restlet.resource.Resource resource) protected abstract voidwriteFragment(OutputStream outputStream, Object source, org.restlet.data.CharacterSet characterSet) Methods inherited from class org.restlet.engine.converter.ConverterHelper
addObjectClass, addVariant, addVariants, getVariants, updatePreferences, updatePreferences
-
Field Details
-
variants
-
classes
-
-
Constructor Details
-
AbstractConverter
public AbstractConverter()
-
-
Method Details
-
getObjectClasses
- Specified by:
getObjectClassesin classorg.restlet.engine.converter.ConverterHelper
-
getVariants
public List<org.restlet.engine.resource.VariantInfo> getVariants(Class<?> source) throws IOException - Specified by:
getVariantsin classorg.restlet.engine.converter.ConverterHelper- Throws:
IOException
-
score
public float score(Object source, org.restlet.representation.Variant target, org.restlet.resource.Resource resource) - Specified by:
scorein classorg.restlet.engine.converter.ConverterHelper
-
score
public <T> float score(org.restlet.representation.Representation source, Class<T> target, org.restlet.resource.Resource resource) - Specified by:
scorein classorg.restlet.engine.converter.ConverterHelper
-
toObject
public <T> T toObject(org.restlet.representation.Representation source, Class<T> target, org.restlet.resource.Resource resource) throws IOException - Specified by:
toObjectin classorg.restlet.engine.converter.ConverterHelper- Throws:
IOException
-
toRepresentation
public org.restlet.representation.Representation toRepresentation(Object source, org.restlet.representation.Variant target, org.restlet.resource.Resource resource) throws IOException - Specified by:
toRepresentationin classorg.restlet.engine.converter.ConverterHelper- Throws:
IOException
-
getFragmentReader
-
writeFragment
protected abstract void writeFragment(OutputStream outputStream, Object source, org.restlet.data.CharacterSet characterSet) throws IOException - Throws:
IOException
-
objectFromFragment
protected <T> T objectFromFragment(TopicMapIF fragment, Class<T> target, org.restlet.resource.Resource resource)
-