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