def __init__(self, resource_class, parser_factory): """ Constructor. :param resource_class: the class of the resource to generate from incoming representations :param parser_factory: a callable that generates a new parser. All options set with the :meth:`configure` method are passed to the factory call. """ ResourceRepresenter.__init__(self, resource_class) self.__parser_factory = parser_factory self.__parser_options = {}
def resource_to_data(self, resource): ResourceRepresenter.resource_to_data(self, resource)
def data_to_stream(self, resource, stream): ResourceRepresenter.data_to_stream(self, resource, stream)