nan0ed / gpx4j

Automatically exported from code.google.com/p/gpx4j
0 stars 0 forks source link

Export data to CSV #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Export a list of CoordinatesObject to a CSV file requesting for field 
delimiter, using quotes, using header, etc.

Original issue reported on code.google.com by superkas83 on 4 Apr 2011 at 1:16

GoogleCodeExporter commented 9 years ago

Original comment by superkas83 on 4 Apr 2011 at 1:21

GoogleCodeExporter commented 9 years ago

Original comment by superkas83 on 7 Apr 2011 at 2:11

GoogleCodeExporter commented 9 years ago

Original comment by superkas83 on 7 Apr 2011 at 2:11

GoogleCodeExporter commented 9 years ago
Done in revision 28.

Created an exporter IExporter wich store fields IField. This fields define each 
field of the content.

There is three types of fields:
  - FieldClassField: this field gets the data from a field of an object
  - MethodClassField: this field gets the data from a method of an object
  - AbstractGeneratedField: this field gets the data from an implementation wich generates the content

Once defined the header adding fields the exporter expects a list of object 
where the fields can get the content. Each item from list represents a row.

Then, export the data using the method export.

CSVExporter expects too the delimiter and if the fields are between quotes.

Original comment by superkas83 on 7 Apr 2011 at 2:22