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