This document is in progress and is tempted to show the basic jief functionality

jief is a framework for importing and exporting data (such as business objects, POJOs) into/from several different formats.

jief base contains logic for holding data in structured elements (like a tree). For each format there is an extra jar containing the code for reading and/or writing the format (e.g. xml, csv).

The trick is that jief does not convert the data from the POJO to CSV in one big step but that there is one class for each step ("one job one tool") which is by the way replaceable because jief itself never references a class directly but the implemented interface.

Let's see an example:

CSVImporter csvImporter = new CSVImporter(reader, binding);

(The binding stuff is described below)

The CSVImporter is able to read from the underlying Importer an maps the values read to the binding passed in.
Be glad: You don't have to care about the Map of data returned. Use FlatImporterAdapter

FlatImporterAdapter flatAdapter = FlatImporterAdapter.create(csvImporter);

The FlatImporterAdapter translates the non-hierarchical data (such as CSV) into the hierarchical format (sturctured data, a tree based format).
After translating into this format all the following busines logic is absoult equivlaent regardless of what you have imported from (non-hierarchical data like csv or hierarchical data like xml).

Calling FlatImporterAdapter#getNext() will return this structured element. But again: You don't have to take care of it!
Simply create a MappingImport and pass the adapter to it:

MappingImport mapImport = DefaultMappingImport.create(flatAdapter, ReflectionReadMapper.create(CostCenter.class));

So calling mapImport#readNext() will return exactly what you expected from a framework: It will return a newly created CostCenter instance filled with the values from the underlying import source.
The instantiation and filling of the data is done by a ReadMapper, jief comes with a Reflection-based implementation named ReflectionReadMapper which does most of the work without any advice automaticaly but is still flexible to serv several expectional cases (please see the javadocs for details).


So let's combine the steps above:
CSVImporter csvImporter = new CSVImporter(reader, createCostCenterBinding());
FlatImporterAdapter flatAdapter = FlatImporterAdapter.create(csvImporter);
MappingImport mapImport = DefaultMappingImport.create(flatAdapter, ReflectionReadMapper.create(CostCenter.class));


Of course you could write this as a single line:
MappingImport mapImport = DefaultMappingImport.create(FlatImporterAdapter.create(new CSVImporter(reader, createCostCenterBinding())), ReflectionReadMapper.create(CostCenter.class));

reading from this importer is quite simple:
while (mapImport.hasNext()) {
CostCenter cc = mapImport.getNext();
// [...] your work
}


TODO BINDING STUFF
------------------

TODO
--------------
-Exporter Used libraries (csv, xml)
TODO UTILITIES
--------------
-Exporter -Compressor
-Sorter