Last change
on this file since 4960 was
4789,
checked in by uli, 15 years ago
|
Merge changes from ulif-layout back into trunk (finally).
|
File size:
882 bytes
|
Line | |
---|
1 | """Interfaces for waeup.csvfile. |
---|
2 | """ |
---|
3 | from zope.interface import Interface |
---|
4 | from zope import schema |
---|
5 | |
---|
6 | class ICSVFile(Interface): |
---|
7 | """A wrapper for a CSV file. |
---|
8 | """ |
---|
9 | required_fields = schema.List( |
---|
10 | title = u'Required header fields.', |
---|
11 | value_type = schema.TextLine( |
---|
12 | title = u'Field name', |
---|
13 | ) |
---|
14 | ) |
---|
15 | |
---|
16 | path = schema.TextLine( |
---|
17 | title = u'Filesystem path to wrapped file.' |
---|
18 | ) |
---|
19 | |
---|
20 | def getData(): |
---|
21 | """Get a dict of data contained in the CSV file. |
---|
22 | """ |
---|
23 | |
---|
24 | def getHeaderFields(): |
---|
25 | """Get a list of (supported) header fields. |
---|
26 | """ |
---|
27 | |
---|
28 | class ICSVDataReceiver(Interface): |
---|
29 | """A receiver for CSV data. |
---|
30 | """ |
---|
31 | def setData(data): |
---|
32 | """Set data. |
---|
33 | """ |
---|
34 | |
---|
35 | class ICSVDataConnector(Interface): |
---|
36 | """A connector brings together a CSVDataSource and a CSVDataReceiver. |
---|
37 | """ |
---|
Note: See
TracBrowser for help on using the repository browser.