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
    Modifier and Type
    Field
    Description
    protected List<Class<?>>
     
    protected List<org.restlet.engine.resource.VariantInfo>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract TopicMapReaderIF
    getFragmentReader(InputStream stream, LocatorIF base_address)
     
    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)
     

    Methods inherited from class org.restlet.engine.converter.ConverterHelper

    addObjectClass, addVariant, addVariants, getVariants, updatePreferences, updatePreferences

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • variants

      protected List<org.restlet.engine.resource.VariantInfo> variants
    • classes

      protected List<Class<?>> classes
  • Constructor Details

    • AbstractConverter

      public AbstractConverter()
  • Method Details

    • getObjectClasses

      public List<Class<?>> getObjectClasses(org.restlet.representation.Variant source)
      Specified by:
      getObjectClasses in class org.restlet.engine.converter.ConverterHelper
    • getVariants

      public List<org.restlet.engine.resource.VariantInfo> getVariants(Class<?> source) throws IOException
      Specified by:
      getVariants in class org.restlet.engine.converter.ConverterHelper
      Throws:
      IOException
    • score

      public float score(Object source, org.restlet.representation.Variant target, org.restlet.resource.Resource resource)
      Specified by:
      score in class org.restlet.engine.converter.ConverterHelper
    • score

      public <T> float score(org.restlet.representation.Representation source, Class<T> target, org.restlet.resource.Resource resource)
      Specified by:
      score in class org.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:
      toObject in class org.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:
      toRepresentation in class org.restlet.engine.converter.ConverterHelper
      Throws:
      IOException
    • getFragmentReader

      protected abstract TopicMapReaderIF getFragmentReader(InputStream stream, LocatorIF base_address)
    • 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)