Example #1
0
    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 = {}
Example #2
0
    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 = {}
Example #3
0
 def resource_to_data(self, resource):
     ResourceRepresenter.resource_to_data(self, resource)
Example #4
0
 def data_to_stream(self, resource, stream):
     ResourceRepresenter.data_to_stream(self, resource, stream)
Example #5
0
 def resource_to_data(self, resource):
     ResourceRepresenter.resource_to_data(self, resource)
Example #6
0
 def data_to_stream(self, resource, stream):
     ResourceRepresenter.data_to_stream(self, resource, stream)