2 # Copyright (C) 2007 Marco Ferragina <marco.ferragina@gmail.com>
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 Must return a line for each call. It must return a "not line"
22 when and only when no lines remains.
27 not line must be printed only at the end of file
29 raise NotImplementedError()
31 def write(self
, data
):
33 write the data into the storage
35 raise NotImplementedError()
37 def get_new_writer(self
):
39 Return a new writer object. This object must have the write method
40 (must be a StorageHandler). Before return the object this method
41 must initialize the Storage with empty data
43 raise NotImplementedError()
47 Finalize the storage. It execute the real writing or
48 close the file for a file storage handler
50 raise NotImplementedError()